First-Order Logic (FOL or FOPC) Syntax
- User defines these primitives:
- Constant symbols (i.e., the "individuals" in the world)
E.g., Mary, 3
- Function symbols (mapping individuals to individuals)
E.g., father-of(Mary) = John, color-of(Sky) = Blue
- Predicate symbols (mapping from individuals to truth values)
E.g., greater(5,3), green(Grass), color(Grass, Green)
- FOL supplies these primitives:
- Variable symbols. E.g., x, y
- Connectives. Same as in PL: not (~), and (^), or (v), implies (=>),
if and only if (<=>)
- Quantifiers: Universal (A) and Existential (E)
- Universal quantification corresponds to conjunction ("and")
in that (Ax)P(x) means that P holds for all values of x in the
domain associated with that variable. E.g., (Ax) dolphin(x) => mammal(x)
- Existential quantification corresponds to disjunction ("or")
in that (Ex)P(x) means that P holds for some value of x in the domain
associated with that variable. E.g., (Ex) mammal(x) ^ lays-eggs(x)
- Universal quantifiers usually used with "implies" to form
"rules." E.g., (Ax) cs627-student(x) => smart(x) means
"All cs627 students are smart." You rarely use universal quantification
to make blanket statements about every individual in the world:
(Ax)cs627-student(x) ^ smart(x) meaning that everyone in the world
is a cs627 student and is smart.
- Existential quantifiers usually used with "and" to specify a
list of properties about an individual. E.g.,
(Ex) cs627-student(x) ^ smart(x) means "there is a cs627 student who
is smart." A common mistake is to represent this English sentence
as the FOL sentence: (Ex) cs627-student(x) => smart(x)
But consider what happens when there is a person who is
NOT a cs627-student.
- Switching the order of universal quantifiers does not change
the meaning: (Ax)(Ay)P(x,y) is logically equivalent to (Ay)(Ax)P(x,y).
Similarly, you can switch the order of existential quantifiers.
- Switching the order of universals and existentials does
change meaning:
- Everyone likes someone: (Ax)(Ey)likes(x,y)
- Someone is liked by everyone: (Ey)(Ax)likes(x,y)