ontolog-forum
[Top] [All Lists]

## Re: [ontolog-forum] new logic

 To: "[ontolog-forum]" "John F. Sowa" Wed, 20 Jan 2010 03:36:38 -0500 <4B56C096.5000407@xxxxxxxxxxx>
 ```Pat and Jakub,    (01) PC> I would be quite satisfied to see an actual demonstration of > an FOL specification that showed how a "plus" function could be > described in a general way so that any arbitrary number can be > added to any other.    (02) As you note, the hard part is handling numerals in some systematic way. Prolog is an excellent language for writing parsers that can translate character strings to some internal form. But you must have some built-in convert predicate that will translate a list of bits in Prolog form, such as [1,0,1,1,0,0], to the internal form. All that is normally done in Prolog. There are also versions of Prolog that handle infinite precision arithmetic (similar to the Bignum datatype in LISP).    (03) PC> I would be quite satisfied to see an actual demonstration of > an FOL specification that showed how a "plus" function could > be described in a general way so that any arbitrary number can > be added to any other.    (04) You can avoid all the messy details by using the representation that Jakub adopted in his previous note:    (05) 0 = 0, 1 = s(0), 2 = s(s(0)), 3 = s(s(s(0))), ...    (06) Following is Jakub's solution in CLIF notation:    (07) (forall (A) (plus A 0 A))    (08) (forall (A B C) (if (plus A B C) (plus A (s B) (s C))))    (09) And following is a version in Prolog notation:    (010) plus(A,0,A).    (011) plus(A,s(B),s(C)) :- plus(A,B,C).    (012) You can try running this in any version of Prolog.    (013) John    (014) _________________________________________________________________ Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/ Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/ Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx Shared Files: http://ontolog.cim3.net/file/ Community Wiki: http://ontolog.cim3.net/wiki/ To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx    (015) ```
 Current Thread Re: [ontolog-forum] new logic, (continued) Re: [ontolog-forum] new logic, Paola Di Maio Re: [ontolog-forum] new logic, Christopher Menzel Re: [ontolog-forum] new logic, John F. Sowa Re: [ontolog-forum] new logic, Christopher Menzel Re: [ontolog-forum] new logic, Patrick Cassidy Re: [ontolog-forum] new logic, Christopher Menzel Re: [ontolog-forum] new logic, Adrian Walker Re: [ontolog-forum] new logic, Christopher Menzel Re: [ontolog-forum] new logic, Patrick Cassidy Re: [ontolog-forum] new logic, Jakub Kotowski Re: [ontolog-forum] new logic, John F. Sowa <= Re: [ontolog-forum] new logic, Patrick Cassidy Re: [ontolog-forum] new logic, John F. Sowa Re: [ontolog-forum] new logic, Rich Cooper Re: [ontolog-forum] new logic, Rob Freeman Re: [ontolog-forum] new logic, Paola Di Maio Re: [ontolog-forum] new logic, John F. Sowa Re: [ontolog-forum] new logic, Paola Di Maio Re: [ontolog-forum] new logic, John F. Sowa Re: [ontolog-forum] new logic, ravi sharma Re: [ontolog-forum] new logic, Paola Di Maio