Predicate & Quantifiers
Predicate & Quantifiers
Lecture 2
Predicates
• A predicate or propositional function is a sentence that contains one
or more variables and becomes a statement when specific values are
substituted for the variables.
• For example:
– “x+2 = 7”,
– “X is American”,
– “x < y”,
– “p is a prime number”
• The truth value of the predicate depends on the value assigned to its
variables.
• For instance if we replace x with 1 in the predicate “x+2 = 7” we
obtain “1+2 = 7”, which is false, but if we replace it with 5 we get “5
+ 2 = 7”, which is true.
• We represent a predicate by a letter followed by the variables
enclosed between parentheses: P(x), Q(x, y), etc.
Predicates
• Each variable in a predicate is assumed to belong to
a universe (or domain) of discourse,
• The domain D of a predicate variable consists of all
values that may be substituted in place of the
variable
• For instance in the predicate
– P(n): n is an odd integer – ‘n’ represents an integer, so the
universe of discourse of n is the set of all integers.
– P(x): x is American - we may assume that x is a human
being, so in this case the universe of discourse is the set
of all human beings.
Quantifiers
• Quantifiers are words that refer to quantities
such as “all”, “every”, or “some” and tell for
how many elements a given predicate is true.
• Basically there are two quantifiers:
1. Universal quantifier
2. Existential quantifier
Universal quantifier
••The Universal quantifier is denoted by the symbol
•Let P(x) be a predicate and D the domain of x.
• A universal statement is a statement of the form “∀x ∈ D, P(x) ” is defined to
be true if, and only if, P(x) is true for every x in D.
• It is defined to be false if, and only if, P(x) is false for at least one x in D.
• The sentence “for all x, P(x)”—also “for any x, P(x)”, “for every x, P(x)”,
“for each x, P(x)”—, represented as xP(x), has a definite truth value.
• An element for which P(x)is false is called a counterexample of ∀x, P(x).
• Example: if P(x) is “x + 2 = 7” and the universe of discourse is the integers,
then xP(x) is false.
Existential Quantifier
•• The
existential quantifier is denoted by the symbol ) -
“there exists”.
• Given a predicate P(x) and D the domain of x, the
statements: “for some x, P(x)” or “there is some x such
that P(x)”, represented “x∈ D , P(x)”, is defined to be true
if, and only if, P(x) is true for at least one x in D.
• It is defined to be false if, and only if, P(x) is false for all x
in D.
• Example: if P(x) is “x + 2 = 7” with the integers as
universe of discourse, then x, P(x) is true, since there is
indeed an integer, namely 5, such that P(5) is a true
statement.
Precedence of Quantifiers