John and Jakub,
Thanks for the specifics. I can visualize the recursion process for
Peano representations in the CLIF format. I'm still curious as to whether
the conversion process of a string of bits to or from Peano format is
similarly representable by FOL axioms. I haven't used Prolog, nor looked at
it for years now. (01)
Pat (02)
Patrick Cassidy
MICRA, Inc.
908-561-3416
cell: 908-565-4053
cassidy@xxxxxxxxx (03)
> -----Original Message-----
> From: ontolog-forum-bounces@xxxxxxxxxxxxxxxx [mailto:ontolog-forum-
> bounces@xxxxxxxxxxxxxxxx] On Behalf Of John F. Sowa
> Sent: Wednesday, January 20, 2010 3:37 AM
> To: [ontolog-forum]
> Subject: Re: [ontolog-forum] new logic
>
> Pat and Jakub,
>
> 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.
>
> 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).
>
> 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.
>
> You can avoid all the messy details by using the representation
> that Jakub adopted in his previous note:
>
> 0 = 0,
> 1 = s(0),
> 2 = s(s(0)),
> 3 = s(s(s(0))), ...
>
> Following is Jakub's solution in CLIF notation:
>
> (forall (A) (plus A 0 A))
>
> (forall (A B C) (if (plus A B C) (plus A (s B) (s C))))
>
> And following is a version in Prolog notation:
>
> plus(A,0,A).
>
> plus(A,s(B),s(C)) :- plus(A,B,C).
>
> You can try running this in any version of Prolog.
>
> John
>
>
>
> _________________________________________________________________
> 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
> (04)
_________________________________________________________________
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 (05)
|