Lecture First Order Logic
Lecture First Order Logic
Philipp Koehn
10 March 2020
6. The general form of a proposition is the general form of a truth function, which
¯ N (ξ)].
is: [p̄, ξ, ¯ This is the general form of a proposition.
why?
● Functions: father of, best friend, third inning of, one more than, end of . . .
Higher-order logic:
relations and functions operate not only on objects,
but also on relations and functions
● For instance
– Sibling(KingJohn, Richard) Ô⇒ Sibling(Richard, KingJohn)
– >(1, 2) ∨ ≤(1, 2)
– >(1, 2) ∧ ¬>(1, 2)
● Object symbols
– Richard → Richard the Lionheart
– John → the evil King John
● Predicat symbol
– Brother → the brotherhood relation
● Atomic sentence
– Brother(Richard, John)
true iff Richard the Lionheart and the evil King John
are in the brotherhood relation in the model
● Correct
∀ x At(x, JHU ) Ô⇒ Smart(x)
● Correct
∃ x At(x, JHU ) ∧ Smart(x)
● ∀ x ∀ y is the same as ∀ y ∀ x
● ∃ x ∃ y is the same as ∃ y ∃ x
● ∃ x ∀ y Loves(x, y)
“There is a person who loves everyone in the world”
● ∀ y ∃ x Loves(x, y)
“Everyone in the world is loved by at least one person”
● For instance
– 1 = 2 and ∀ x ×(Sqrt(x), Sqrt(x)) = x are satisfiable
– 2 = 2 is true
(note: syntax does not imply anything about the semantics of 1, 2, Sqrt(x), etc.)
● “Sibling” is symmetric
∀ x, y Sibling(x, y) ⇔ Sibling(y, x)
∀ p ∃ t F ool(p, t)
∧
∃ p ∀ t F ool(p, t)
∧
¬ ∀ p ∀ t F ool(p, t)
wampus world
● Shorthands
– ∀ b, g, t P ercept([Smell, b, g], t) Ô⇒ Smelt(t)
– ∀ s, b, t P ercept([s, b, Glitter], t) Ô⇒ AtGold(t)
● Properties of locations:
∀ x, t At(Agent, x, t) ∧ Smelt(t) Ô⇒ Smelly(x)
∀ x, t At(Agent, x, t) ∧ Breeze(t) Ô⇒ Breezy(x)
● Neither of these is complete—e.g., the causal rule doesn’t say whether squares
far away from pits can be breezy
● This assumes that the agent is interested in plans starting at S0 and that S0 is the
only situation described in the KB
● First-order logic
– objects and relations are semantic primitives
– syntax: constants, functions, predicates, equality, quantifiers
● Situation calculus
– conventions for describing actions and change in FOL
– can formulate planning as inference on a situation calculus KB