| ![[ICO]](/icons/blank.gif) | Name | Last modified | Size | Description | 
|---|---|---|---|---|
| ![[PARENTDIR]](/icons/back.gif) | Parent Directory | - | ||
| ![[TXT]](/icons/text.gif) | README.html | 2018-01-26 19:54 | 2.2K | |
| ![[DIR]](/icons/folder.gif) | agents/ | 2018-01-26 19:54 | - | |
| ![[DIR]](/icons/folder.gif) | algorithms/ | 2018-01-26 19:54 | - | |
| ![[DIR]](/icons/folder.gif) | domains/ | 2018-01-26 19:54 | - | |
| ![[DIR]](/icons/folder.gif) | environments/ | 2018-01-26 19:54 | - | |
| ![[   ]](/icons/unknown.gif) | test-logic.lisp | 2018-01-26 19:54 | 3.6K | |
| ![[   ]](/icons/unknown.gif) | test-logic.x86f | 2018-01-26 19:54 | 4.5K | |
We need a new language for logical expressions, since we don't have all the nice characters (like upside-down A) that we would like to use. We will allow an infix format for input, and manipulate a Lisp-like prefix format internally. Here is a description of the formats (compare to [p 167, 187]). The prefix notation is a subset of the KIF 3.0 Knowledge Interchange Format.
Infix         Prefix             Meaning              Alternate Infix Notation
==========    ======             ===========          ========================
~P            (not P)            negation             not P    
P ^ Q         (and P Q)          conjunction          P and Q  
P | Q         (or P Q)           disjunction          P or Q   
P => Q        (=> P Q)           implication                   
P <=> Q       (<=> P Q)          logical equivalence
P(x)          (P x)              predicate   
Q(x,y)        (Q x y)            predicate with multiple arguments
f(x)          (f x)              function    
f(x)=3        (= (f x) 3)        equality    
forall(x,P(x) (forall (x) (P x)) universal quantification
exists(x,P(x) (exists (x) (P x)) existential quantification
[a,b]         (listof a b)       list of elements
{a,b}         (setof a b)        mathematical set of elements
true          true               the true logical constant
false         false              the false logical constant
You can also use the usual operators for mathematical notation: +, -,
*, / for arithmetic, and &;lt;, >, <=, >= for comparison.
Many of the functions we define also accept strings as input,
interpreting them as infix expressions, so the following are
equivalent:
	(tell kb "P=>Q")  
        (tell kb '(=> P Q))