|
|
|
Why use logic? |
|
CycL Syntax |
|
Collections and Individuals (#$isa and #$genls) |
|
Microtheories |
|
|
|
|
|
A sampling of some constants: |
|
#$Dog, #$SnowSkiing, #$PhysicalAttribute |
|
|
|
#$BillClinton,#$Rover,
#$DisneyLand-TouristAttraction |
|
#$likesAsFriend, #$bordersOn, #$objectHasColor, #$and,
#$not, #$implies, #$forAll |
|
|
|
#$RedColor, #$Soil-Sandy |
|
|
|
|
|
CycLFormula:
a relation applied to some arguments, enclosed in parentheses |
|
|
|
Examples: |
|
(#$isa #$GeorgeWBush #$Person) |
|
(#$likesAsFriend #$GeorgeWBush #$AlGore) |
|
(#$BirthFn #$JacquelineKennedyOnassis) |
|
|
|
A CycL Sentence is a well-formed CycLFormula
with a Truth Function, such as a predicate in the arg0 position. Sentences have truth values. |
|
|
|
A CycL Non-atomic Term is a well-formed
CycLFormula with a Function-Denotational in the arg0 position. |
|
|
|
|
|
|
|
|
A TruthFunction: |
|
is a relation that can be used to form
sentences. |
|
begins with a lower-case letter. |
|
|
|
Types of TruthFunctions: |
|
Predicates: #$likesAsFriend, #$bordersOn,
#$objectHasColor, #$isa |
|
Logical Connectives: #$and, #$or, #$not |
|
Quantifiers: #$implies#$forAll, #$thereExists |
|
|
|
|
|
Sample CycLSentences: |
|
(#$isa #$GeorgeWBush #$Person) |
|
(#$likesAsFriend #$GeorgeWBush #$AlGore) |
|
|
|
CycLSentences are used to form assertions and
queries. |
|
|
|
|
|
|
A Function-Denotational |
|
is a relation that can be applied to some
arguments to pick out something new |
|
usually ends in “Fn” |
|
|
|
Examples of Function-Denotational: |
|
#$BirthFn, #$GovernmentFn, #$BorderBetweenFn |
|
|
|
Sample CycL Non-atomic Terms: |
|
(#$GovernmentFn #$France) |
|
(#$BorderBetweenFn #$France #$Switzerland) |
|
(#$BirthFn #$JacquelineKennedyOnassis) |
|
|
|
CycL Non-atomic Terms are denotational terms.
They can be used like any other, as in: |
|
(#$residenceOfOrganization (#$GovernmentFn
#$France) #$CityOfParisFrance) |
|
|
|
|
|
Arity constraints are represented in CycL with
the predicate #$arity: |
|
|
|
(#$arity #$performedBy 2) |
|
Represents the fact that #$performedBy takes two arguments, e.g.: (#$performedBy
#$AssassinationOfPresidentLincoln #$JohnWilkesBooth) |
|
|
|
|
|
(#$arity #$BirthFn 1) |
|
Represents the fact that #$BirthFn takes one
arguments, e.g.: |
|
(#$BirthFn #$JacquelineKennedyOnassis) |
|
|
|
|
|
|
Argument type constraints are represented in
CycL with the following 2 predicates: |
|
|
|
1 #$argIsa |
|
(#$argIsa #$performedBy 1 #$Action) means that
the first argument of #$performedBy must be an individual #$Action, such as
the assassination of Lincoln in: |
|
(#$performedBy #$AssassinationOfPresidentLincoln
#$JohnWilkesBooth) |
|
|
|
2 #$argGenl |
|
(#$argGenl #$penaltyForInfraction 2 #$Event) means
that the second argument of #$penaltyForInfraction must be a type of
#$Event, such as the collection of illegal equipment use events in: |
|
(#$penaltyForInfraction #$SportsEvent
#$IllegalEquipmentUse #$Disqualification) |
|
|
|
|
CycL also includes logical terms to allow us to
stick formulas together and quantify into them |
|
|
|
|
|
|
Logical connectives |
|
truth functions |
|
take sentences as their arguments |
|
|
|
(#$and
(#$performedBy #$GettysburgAddress
#$Lincoln)
(#$objectHasColor #$Rover #$TanColor)) |
|
(#$or
(#$objectHasColor #$Rover #$TanColor)
(#$objectHasColor #$Rover #$BlackColor)) |
|
(#$implies
(#mainColorOfObject #$Rover #$TanColor)
(#$not (#$mainColorOfObject #$Rover #$RedColor))) |
|
(#$not
(#$performedBy #$GettysburgAddress |
|
#$BillClinton)) |
|
|
|
|
By adding variables and quantifiers to the
logical connectives, predicates and other CycL components we’ve already
covered, we gain the ability to represent many pieces of ordinary
knowledge. |
|
Sentences involving concepts like “everybody,”
“something,” and “nothing” require variables and quantifiers: |
|
Everybody loves somebody. |
|
Nobody likes spinach. |
|
Some people like spinach and some people like
broccoli, but no one likes them both. |
|
|
|
|
|
|
|
Adding variables and quantifiers, we can
represent more general knowledge. |
|
Two main quantifiers: |
|
1. Universal Quantifer -- #$forAll |
|
Used to represent very general facts, like: |
|
All dogs are mammals |
|
Everyone loves dogs |
|
2. Existential Quantifier -- #$thereExists |
|
Used to assert that something exists, to state
facts like: |
|
Someone
is bored |
|
Some people like dogs |
|
|
|
|
|
|
Universal Quantifier |
|
(#$forAll ?THING |
|
(#$isa ?THING #$Thing)) |
|
Existential Quantifier: |
|
(#$thereExists ?JOE |
|
(#$isa ?JOE #$Poodle)) |
|
|
|
Others: |
|
(#$thereExistsExactly 12 ?ZOS (#$isa ?ZOS
#$ZodiacSign)) |
|
|
|
(#$thereExistsAtLeast 9 ?PLNT (#$isa ?PLNT
#$Planet)) |
|
|
|
|
|
|
All variables occurring “free” in a formula are
understood by Cyc to be implicitly universally quantified. |
|
So, to CYC, the following two formulas represent
the same fact: |
|
(#$forAll ?X |
|
(#$implies |
|
(#$isa ?X #$Dog) |
|
(#$isa ?X #$Animal)) |
|
|
|
(#$implies |
|
(#$isa ?X #$Dog) |
|
(#$isa ?X #$Animal)) |
|
|
|
|
|
What does this formula mean? |
|
(#$thereExists ?PLANET
(#$and
(#$isa ?PLANET
#$Planet)
(#$orbits ?PLANET
#$Sun))) |
|
|
|
|
|
What does this formula mean? |
|
(#$thereExists ?PLANET
(#$and
(#$isa ?PLANET
#$Planet)
(#$orbits ?PLANET
#$Sun))) |
|
|
|
|
|
What does this formula mean? |
|
(#$forAll ?PERSON1
(#$implies |
|
(#$isa ?PERSON1 #$Person) |
|
(#$thereExists ?PERSON2 |
|
(#$and
(#$isa ?PERSON2
#$Person)
(#$loves ?PERSON1
?PERSON2))) |
|
|
|
|
|
What does this formula mean? |
|
(#$forAll ?PERSON1
(#$implies |
|
(#$isa ?PERSON1 #$Person) |
|
(#$thereExists ?PERSON2 |
|
(#$and
(#$isa ?PERSON2
#$Person)
(#$loves ?PERSON1
?PERSON2))) |
|
|
|
|
|
|
How about this one? |
|
(#$implies
(#$isa ?PERSON1
#$Person)
(thereExists ?PERSON2
(#$and
(#$isa ?PERSON2 #$Person)
(#$loves ?PERSON2
?PERSON1)))) |
|
|
|
|
|
|
How about this one? |
|
(#$implies
(#$isa ?PERSON1
#$Person)
(thereExists ?PERSON2
(#$and
(#$isa ?PERSON2 #$Person)
(#$loves ?PERSON2
?PERSON1)))) |
|
|
|
|
|
|
|
|
And this? |
|
|
|
(#$implies |
|
(#$isa ?PRSN #$Person) |
|
(#$loves ?PRSN ?PRSN)) |
|
|
|
|
|
|
|
|
|
|
And this? |
|
|
|
(#$implies |
|
(#$isa ?PRSN #$Person) |
|
(#$loves ?PRSN ?PRSN)) |
|
|
|
|
|
|
|
Denotational Functions can be applied to some
arguments to pick out something new.
The result of applying a denotational function is a term that
denotes something. Function names
are always capitalized, and often end in “Fn”. |
|
Examples: |
|
#$FruitFn |
|
#$GovernmentFn |
|
#$DeadFn |
|
|
|
|
|
|
A non-atomic term (NAT) is a denoting term like
a constant. |
|
NATs are formed by applying a denotational
function to a denoting term. |
|
(#$FruitFn #$AppleTree) |
|
(#$GovernmentFn #$France) |
|
(#$DeadFn #$Cockroach) |
|
|
|
NATs can be used just like atomic terms (i.e.,
constants). |
|
(#$implies |
|
(#$isa ?APPLE (#$FruitFn #$AppleTree)) |
|
(#$colorOfObject ?APPLE #$RedColor)) |
|
|
|
The denotation of a NAT is determined by the
denotations of the inputs to the denoting function. |
|
|
|
|
|
|
Uniformity |
|
All kinds of fruits, nuts, etc., are represented
in the same, compositional way: |
|
(#$FruitFn
PLANT) * |
|
|
|
Inferential Efficiency |
|
Forward rules can automatically conclude many
useful assertions about NATs as soon as they are created, based on the
function and arguments used to create the NAT. |
|
what kind of thing that NAT represents |
|
how to refer to the NAT in English |
|
… |
|
|
|
|
Some functions return concepts that we want to
“reify” and keep in the KB. These
are reifiable functions, such as: |
|
#$GovernmentFn |
|
#$BirthFn |
|
|
|
When a new NAT is created using a reifiable
function, that new term is itself reified (kept around separately in the
KB) and becomes a Non-Atomic Reified Term, or NART, such as |
|
(#$GovernmentFn #$France) |
|
(#$BirthFn
#$JacquelineKennedyOnassis) |
|
Other functions return concepts that we don’t
want to store separately in the KB.
These are unrefiable functions, such as: |
|
#$TimesFn |
|
When a new NAT is created using an unrefiable
functions, it does not get created as a persistent term in the KB. Unrefiable functions result in
Non-Atomic Unreified Terms, such as (#$TimesFn 3 7). |
|
|
|
|
|
CycL components |
|
Constants |
|
Formulas |
|
Sentences (and Truth Functions) |
|
Non-atomic Terms (and Denotational Functions) |
|
Logical Constants |
|
Variables and Quantifiers |
|
Well-Formedness |
|
arity |
|
argument constraints |
|