From: Daniel al-Autistiqui
Subject: Dan's first attempt at a LISP-based "artificial symbolic language"
Date: 
Message-ID: <49lg12lb3bkqpb2jbfvel6s4grbe46pv5h@4ax.com>
Hello, everyone on sci.logic and comp.lang.lisp.  I am trying to
re-learn mathematics from scratch, as I lost the ability to do math
easily around the age of 12.  (I might eventually be able to prove a
difficult mathematical theorem, thereby becoming famous!)  Some time
ago, one of my caretakers gave me a copy of a book that seemed rather
helpful, to some extent -- it's called _Introduction to Logic_, by
Irving M. Copi.  Logic is, of course, a fundamental element that
underlies a lot of mathematical systems.  So you see, one of my
favorite things in the book is the "vocabulary" that appears on page
381.  It's part of an exercise in which the reader is to supply
various idiomatic English sentences (proverbs) from translations into
Copi's formulaic language.  The vocabulary lists symbols for every
attribute that is needed for rendering the proverbs as logical
formulas: for example, "Px" is "x is a person", "Wxy" is "x is at/in
y", "Bxyz" is "x borrows y from z", and "g" is "God".

However, I don't really think his system of symbolic notation is the
best possible choice of such.  For whatever reason, I prefer a
notation in the form of a computer-programming language --
specifically, LISP.  So, once I had looked at Winston & Horn's _LISP_
(3rd ed.) and read chapter 26, "Rule-Based Expert Systems and Forward
Chaining", in closer and more thorough detail, I managed to create a
tentative system in which formulas that appear in Copi's book get
rendered as LISP expressions.  I found that the global variables
*ASSERTIONS*, the assertion stream, and *RULES*, the rule stream --
from W&H's chapter on forward chaining -- were a handy thing to have,
for the assertion is a concept in W&H that is suggestive of proverbs
and similar statements, while the rule is the W&H analogue of Copi's
concept of "Rules of Inference".

I have taken each of the formulated proverbs in Copi's exercise on
pages 381-2 for which a plain-English translation is supplied in the
solutions (five of them) and turned them into LISP "assertions".  I
have also taken each of the nine Rules of Inference (pages 311-12) and
translated them into LISP notation to produce a "rule".  So, after you
finish reading this message, please take a look at my messages
entitled "Dansassertions.lsip" and "Dansrules.lsip", which I will post
subsequently to the same newsgroups as this one.  These posts contain
fragments of semi-fake LISP code that register the assertions and the
rules, respectively, into  the appropriate streams.  The function
REMEMBER-ASSERTION, from the W&H book, gets used to register a new
item into the assertion stream; ditto REMEMBER-RULE for the rule
stream.  Whenever one of these functions appears in my ".lsip" (sic)
code, the quoted expression that follows it will be my LISP rendition
-- either as an assertion, or as a rule -- of a formula from Copi's
book.

Have you read my postings subsidiary to this one, containing LISP-ish
code?  What do you think of my tentative LISP-based notation system?
Am I off to a good start?  Where am I to go next?  In any case, I
strongly desire a response to this posting.  (I wanted to avoid making
it too long, which is why I had to post the code fragments
separately.)

daniel mcgrath
-- 
Daniel Gerard McGrath, a/k/a "Govende":
for e-mail replace "invalid" with "com"

Developmentally disabled;
has Autism (Pervasive Developmental Disorder),
    Obsessive-Compulsive Disorder,
    & periodic bouts of depression.
[This signature is under construction.]
From: Daniel al-Autistiqui
Subject: KIF: Knowledge Interchange Format (was: Re: Dan's first attempt at a LISP-based "artificial symbolic language")
Date: 
Message-ID: <p6b822l0jv0sp3m5mar3qpva6c11cr5su5@4ax.com>
On Wed, 15 Mar 2006 12:56:44 -0500, Daniel al-Autistiqui
<·········@hotmail.invalid> wrote:

>Have you read my postings subsidiary to this one, containing LISP-ish
>code?  What do you think of my tentative LISP-based notation system?
>Am I off to a good start?  Where am I to go next?  In any case, I
>strongly desire a response to this posting.  (I wanted to avoid making
>it too long, which is why I had to post the code fragments
>separately.)
>
It's me again.  I managed to do what was suggested to me a while back;
I took a look at KIF, the Knowledge Interchange Format
(http://logic.stanford.edu/kif/), and the other day I printed out the
entire "draft proposed American National Standard" (dpans.html) page.
Since the notation of KIF is written in the style of Common LISP, it
would seem that it would be possible to write various LISP functions
relating to manipulation of KIF forms.  Perhaps someone can show me
how to work this out?  I suppose it's probably been done.

I noticed that the DPANS page had a special section devoted to a
syntactic variant of KIF that used C-like infix notation instead of
LISP-like prefix notation surrounded by parentheses.  You can see the
discussion of this at http://logic.stanford.edu/kif/dpans.html#Infix.
To me, "Infix KIF" seems considerably easier to deal with than the
LISP-style notation.  Unfortunately it seems that the grammar written
out for it on the page was not edited very well: after reading it for
some time I found a number of obvious errors.

daniel mcgrath
-- 
Daniel Gerard McGrath, a/k/a "Govende":
for e-mail replace "invalid" with "com"

Developmentally disabled;
has Autism (Pervasive Developmental Disorder),
    Obsessive-Compulsive Disorder,
    & periodic bouts of depression.
[This signature is under construction.]