Artificial Intelligence- Module 3_Part 3
Artificial Intelligence- Module 3_Part 3
Knowledge representation,
propositional logic,
first order logic, classical planning,
automated planning
First Order Logic
∀ x King(x) ⇒ Person(x) .
∀ is usually pronounced “For all . . .”. (Remember that the
upside-down A stands for “all.”)
Thus, the sentence says, “For all x, if x is a king, then x is a
person.”
The symbol x is called a variable.
By convention, variables are lowercase letters.
A variable is a term all by itself, and as such can also serve
as the argument of a function—for example, LeftLeg(x).
A term with no variables is called a ground term.
Existential quantification (∃)
Universal quantification makes statements
about every object.
Similarly, we can make a statement about some
object in the universe without naming it, by
using an existential quantifier.
To say, for example, that King John has a crown
on his head, we write
∃ x Crown(x) ∧ OnHead(x, John) .
∃x is pronounced “There exists an x such that . .
.” or “For some x . . .”.
Connections between ∀ and
∃
The two quantifiers are actually intimately
connected with each other, through negation.
Asserting that everyone dislikes parsnips is the
same as asserting there does not exist someone
who likes them, and vice versa:
∀ x ¬ Likes(x, Parsnips ) is equivalent to ¬∃ x
Likes(x, Parsnips) .
We can go one step further: “Everyone likes ice
cream” means that there is no one who does not
like ice cream:
∀ x Likes(x, IceCream) is equivalent to ¬∃ x ¬
Likes(x, IceCream) .
Equality
First-order logic includes one more way to make atomic
sentences, other than using a predicate and terms as described
earlier.
We can use the equality symbol to signify that two terms refer
to the same object.
For example, Father (John)=Henry
The equality symbol can be used to state facts about a given
function, as we just did for the Father symbol.
It can also be used with negation to insist that two terms are
not the same object.
To say that Richard has at least two brothers, we would write
∃ x, y Brother (x,Richard ) ∧ Brother (y,Richard ) ∧ ¬ (x=y) .
The sentence
∃ x, y Brother (x,Richard ) ∧ Brother (y,Richard )