Академический Документы
Профессиональный Документы
Культура Документы
Language Propositional logic First-order logic Ontological Commitment facts facts, objects, relations facts, objects, relations, times facts facts + degree of truth Epistemological Commitment true/false/unknown true/false/unknown true/false/unknown degree of belief known interval value
Predicate calculus
Predicate logic (aka predicate calculus) extends propositional logic with:
Functions:
transform zero or more constant values into some other constant value. Functions of one or more arguments that return the value true or false. Allow reference to arbitrary, unspecied values. color(x,GRAY) is predicate indicating that some as yet unbound variable x has the color gray. Indicate whether some or all objects exhibit a particular property.
Predicates: Variables:
Quantiers:
S, S1 S2 , S1 S2 , S1 S2 , S1 S2
CS 5300/6300: First-order predicate calculus p. 3 CS 5300/6300: First-order predicate calculus p. 6
Quantiers
Universal quantier
Properties of quantiers
When order matters:
p(x) is true for all values of x p(x) is true for some value of x
(x)p(x): (x)p(x):
Existential quantier
x y is the same as y x (why?) x y is the same as y x (why?) x y is not the same as y x (why?)
DeMorgans Laws for quantication Universal and existential quantication can be related using negation:
color(x, GRAY))
x P xP xP xP
CS 5300/6300: First-order predicate calculus p. 7
xP x P x P x P
CS 5300/6300: First-order predicate calculus p. 10
Common mistakes
Typically, is the main connective with Be careful about using as the main connective with : x At(x, UofU) Smart(x) Everyone is at the UofU and Everyone is smart More accurately, Everything in the universe is at. . . Typically, is the main connective with Be careful about using as the main connective with : x At(x, UofU) Smart(x) Implication is true as long as there is anyone (anything) not at the UofU!
Decidability
Predicate calculus is undecidable There exist predicate calculus theorems that are always true, yet can never be proven true by any systematic procedure Proof procedures for predicate calculus are guaranteed to produce proof of any provable theorem Will not terminate for true but unprovable theorems Guaranteed to demonstrate falsity of any non-theorem Complexity, not undecidability, is the real problem
x y owns(x,y)
Every entity in the universe owns at least one entity in the universe.
y x owns(x,y)
There is some entity in the universe that is owned by every entity in the universe. How would you limit entities to people?
CS 5300/6300: First-order predicate calculus p. 9
Examples:
Brothers are siblings
x, ySibling(x, y) Sibling(y, x)
Ones mother is ones female parent
x Pompeian(x) Roman(x)
C A B
ruler (CAESAR)
(y)ON(y, x))
5. All Romans were either loyal to Caesar or hated him. x Roman(x) ( (loyal(x,CAESAR) hated(x,CAESAR)) ( loyal(x,CAESAR) hated(x,CAESAR)) ) 6. Everyone is loyal to someone.
The implication formula gives precise relationship between the CLEAR and ON predicates Show that there is nothing on top of block C. Need to prove theorem (y)ON(y, C)
CS 5300/6300: First-order predicate calculus p. 15
x y loyal-to(x,y)
7. People only try to assassinate rulers they are not loyal to. x,y person(x) ruler(y) try-to-assassinate(x,y) loyal-to(x,y) 8. Marcus tried to assassinate Caesar. try-to-assassinate(MARCUS,CAESAR)
CS 5300/6300: First-order predicate calculus p. 18
loyal-to(x, y)
True for any x and y , so true for x = MARCUS , y = CAESAR Removing implication operator, negating conjunction:
Common Problems
Time Past/present/future tense is not represented Ambiguity Everyone is loyal to someone could mean that everyone is loyal to some person, or that everyone is loyal to the same person Even for simple tasks, KB may not contain all facts needed to derive useful statements Very easy to forget to include statements that represent the most obvious facts!