Predicate Logic: Lucia Moura
Predicate Logic: Lucia Moura
Predicate Logic: Lucia Moura
Predicate Logic
Lucia Moura
Winter 2010
Predicates
A Predicate is a declarative sentence whose true/false value depends on
one or more variables.
The statement “x is greater than 3” has two parts:
the subject: x is the subject of the statement
the predicate: “is greater than 3” (a property that the subject can
have).
We denote the statement “x is greater than 3” by P (x), where P is the
predicate “is greater than 3” and x is the variable.
The statement P (x) is also called the value of propositional function P
at x.
Assign a value to x, so P (x) becomes a proposition and has a truth value:
P (5) is the statement “5 is greater than 3”, so P (5) is true.
P (2) is the statement “2 is greater than 3”, so P (2) is false.
Predicates: Examples
Quantifiers
Assign a value to x in P (x) =“x is an odd number”, so the resulting
statement becomes a proposition: P (7) is true, P (2) is false.
Universal Quantifier
The universal quantification of P (x) is the statement:
“P (x) for all values of x in the domain” denoted ∀xP (x).
∀xP (x) is true when P (x) is true for every x in the domain.
If the domain is empty, ∀xP (x) is true for any propositional function
P (x), since there are no counterexamples in the domain.
Existencial Quantifier
The existential quantification of P (x) is the statement:
“There exists an element x in the domain such that P (x)” denoted
∃xP (x).
∃xP (x) is true when P (x) is true for one or more x in the domain.
An element for which P (x) is true is called a witness of ∃xP (x).
∃xP (x) is false when P (x) is false for every x in the domain
(if domain nonempty).
If the domain is empty, ∃xP (x) is false for any propositional function
P (x), since there are no witnesses in the domain.
Definition
Two statements S and T involving predicates and quantifiers are logically
equivalent if and only if they have the same truth value regardless of the
interpretation, i.e. regardless of
the meaning that is attributed to each propositional function,
the domain of discourse.
We denote S ≡ T .
Is ∀x(P (x) ∧ Q(x)) logically equivalent to ∀xP (x) ∧ ∀xQ(x) ?
Is ∀x(P (x) ∨ Q(x)) logically equivalent to ∀xP (x) ∨ ∀xQ(x) ?
We have:
∀x(P (x) ∨ Q(x)) (every person is a male or a female) is true;
while ∀xP (x) ∨ ∀xQ(x) (every person is a male or every person is a
female) is false.
Practice Exercises
Assume that the domain is the set of all creatures and P (x) =“x is a
lion”, Q(x) =“x is fierce”, R(x) =“x drinks coffee”.
Exercise: Express the above statements using P (x), Q(x) and R(x), under
the domain of all creatures.
Nested Quantifiers
Nested Quantifiers
Nested Quantifiers
Nested Quantifiers
Nested Quantifiers
Nested Quantifiers
Nested Quantifiers
Nested Quantifiers
Note that definitions in English form use if instead of if and only if, but we
really mean if and only if.
father_child(tom, sally).
father_child(tom, erica).
father_child(mike, tom).