Skip to main content
Logo image

Section 4.1 Predicates and quantifiers

We often let variables represent arbitrary mathematical objects. However, as we have seen, object variables or free variables (as opposed to statement variables) lead to problems in logic. For example, the phrase โ€œf is a differentiable functionโ€ can only be determined to be true or false when f represents a specific function.
In this section, we deal with these problems by quantifying such free variables: restricting ourselves to discussing whether โ€œstatementsโ€ involving one or more free variables are always/sometimes/never true for objects of the type represented by the free variables.
predicate
a statement whose truth value depends on one or more free variables
A(x)
a predicate statement A whose truth value depends on the free variable x
A(x,y)
a predicate statement A whose truth value depends on the free variables x and y

Example 4.1.1.

  1. Let A(f) represent the phrase โ€œf is differentiableโ€, a predicate statement in one free variable f.
  2. Let B(m,n) represent the phrase โ€œm is greater than nโ€, a predicate statement in two free variables m and n.

Note 4.1.2.

A predicate is not a logical statement unless all of its variables represent specific objects.
domain
the type of object that a variable in a predicate represents

Example 4.1.3.

In Example 4.1.1, the domain of the variable f could be โ€œfunctions of a single real variableโ€, and the domains of the variables m and n could both be โ€œnatural numbersโ€ (i.e. whole, nonnegative numbers).

Note 4.1.4.

Usually the domain of a variable in a predicate is implicit and can be determined from the context of the statement. However, if we want to make the domain explicit we can prefix it to the variable. For example,
A(f)= โ€œfunction f is differentiableโ€,B(m,n)= โ€œinteger m is greater than integer nโ€.
We can turn a predicate into a logical statement by being more specific about which objects in their domains the variables represent. However, we often do not want to be too specific (or else we would usually not need variables).

Example 4.1.5.

The following sentences are logical statements, because their truth value can be determined.
  • โ€œEvery function f is differentiable.โ€
  • โ€œThere exists an integer m that 2 divides.โ€
The first statement is false; for example, the function f(x)=|x| is not differentiable at x=0. The second statement is true; this statement basically says that even integers exist.
quantifier
the sentence fragments โ€œfor everyโ€ and โ€œthere existsโ€ quantify whether a predicate should apply to all or only some of the objects in the domain of one of its variables.
universal quantifier
the quantifier โ€œfor everyโ€
โˆ€
symbol for the universal quantifier
existential quantifier
the quantifier โ€œthere existsโ€
โˆƒ
symbol for the existential quantifier

Example 4.1.6.

As before, let A(f) represent the predicate โ€œf is differentiable.โ€ Then the statement (โˆ€f)A(f) is false, because not every function is differentiable. However, the statement (โˆƒf)A(f) is true โ€” for example, polynomials are differentiable.

Warning 4.1.7.

For an existentially quantified statement to be true, it is not necessary for there to be one and only one object in the implied domain that satisfies the conditions of the predicate โ€” there could be many such objects. So, just as you should always read a disjunction pโˆจq as โ€œp or q or both,โ€ you should always read an existentially quantified statement (โˆƒx)A(x) as โ€œthere exists at least one x such that A(x) is true.โ€
Mathematical statements often involve several quantified variables.

Worked Example 4.1.8. Working with quantified statements of several variables.

Let B(m,n) represent โ€œm divides nโ€, where m and n are positive whole numbers. Which of the following statements are true?
  1. (โˆ€m)(โˆ€n)B(m,n)
  2. (โˆƒm)(โˆƒn)B(m,n)
  3. (โˆ€m)(โˆƒn)B(m,n)
  4. (โˆƒm)(โˆ€n)B(m,n)
  5. (โˆ€n)(โˆƒm)B(m,n)
  6. (โˆƒn)(โˆ€m)B(m,n)
Solution.
  1. False.
    This statement says โ€œfor every m and for every n, m divides n.โ€ One example of values for m and n with m not dividing n (such as m=3 and n=2) suffices to show that it is not always true that one number m divides another number n.
  2. True.
    This statement says โ€œthere exists m such that there exists n such that m divides n.โ€ To demonstrate that this statement is true, we have to explicitly show that at least one pair of values for m and n exists by giving an example (such as m=n=2).
  3. True.
    This statement says โ€œfor every m there exists an n such that m divides n.โ€ To show that this statement is true, we have to provide, for every possible value of m, a value of n that works. When m=1, we have example n=1. When m=2, we have example n=2. When m=3, we have example n=3. Similarly, for each value of m, we can choose n to be the same value as m as an example.
  4. True.
    This statement says โ€œthere exists m such that for every n we have m divides n.โ€ This is true, as the example m=1, which divides every number n, demonstrates existence of this special m (though it is the only example possible).
  5. True.
    This statement says โ€œfor every n there exists an m so that m divides n.โ€ Similarly to the justification for Statement 3, for every possible value of n we need to provide an example m so that m divides n, but this time it is the n that is arbitrary and the m that is to be the example. But again, every positive number divides itself, so we could always take m to be the same value as n as our example to demonstrate that such an m exists. (Or, actually we could always choose m=1 as the example for each different value of n.)
  6. False.
    This statement says โ€œthere exists n such that for every m we have m divides n.โ€ However, there is no positive number that is divisible by every other positive number.

Warning 4.1.9.

While the order of two quantifiers of the same type does not matter (which is why we didnโ€™t consider the statements with quantifiers in the order (โˆ€n)(โˆ€m) and (โˆƒn)(โˆƒm) in Worked Example 4.1.8 above), the order of a โ€œmixedโ€ pair of quantifiers matters! This is demonstrated by Statement 3 and Statement 6 in Worked Example 4.1.8 โ€” both of these statements involve a โˆ€m and a โˆƒn, but in opposite orders. Since one of these two statements is true and one is false, they obviously cannot be the same statement.
Even more, the order of a โ€œmixedโ€ pair of quantifiers implies a dependence of the second quantified variable on the first.
  1. If the statement (โˆ€x)(โˆƒy)A(x,y) is true, it means that, corresponding to each and every object x in the appropriate domain, there will exist at least one example of an object y in the appropriate domain so that A(x,y) is true. But the corresponding example y could be different for different examples of the object x.
  2. If the statement (โˆƒy)(โˆ€x)A(x,y) is true, it means that there is at least one โ€œspecialโ€ example object y that enjoys the property that A(x,y) will be true for each and every object x in the appropriate domain.

Example 4.1.10.

Suppose A(x,y) is a predicate statement, where x and y are variables that can only take on the values 0, 1, or 2. Further suppose that it is known that A(x,y) is true in the specific instances
A(0,1),A(1,0),A(1,1),A(1,2),A(2,2).
  1. Statement (โˆ€x)(โˆƒy)A(x,y) is true because for each value of x we can exhibit at least one value y for which A(x,y) is true:
    • when x=0, we know A(0,y) is true for at least one y (for example, y=1);
    • when x=1, we know A(1,y) is true for at least one y (for example, y=1); and
    • when x=2, we know A(2,y) is true for at least one y (for example, y=2).
  2. Statement (โˆƒx)(โˆ€y)A(x,y) is true because we can exhibit at least one โ€œspecialโ€ value of x for which A(x,y) is true for each and every value of y. In particular, we see that for x=1 we have A(1,y) true for each of y=0,1,2.

Remark 4.1.11.

Depending on grammar requirements or personal style, the quantifier โ€œfor everyโ€ might be expressed as โ€œfor allโ€ or just โ€œeveryโ€ or โ€œallโ€. The quantifier โ€œthere existsโ€ can also be expressed as โ€œsomeโ€ or โ€œthere is at least oneโ€, but remember that the reality of the situation could be โ€œmore than one.โ€

Warning 4.1.12.

Mathematicians are fond of using โ€œanyโ€ or โ€œfor anyโ€ in place of โ€œeveryโ€ or โ€œfor everyโ€.

Worked Example 4.1.13.

Prove that n+1 is an odd number for any even number n.
Solution 1. (Incorrect)
It says to prove n+1 is odd for any even number n, so I will choose my favourite even number n=8. Then 8+1=9 is obviously odd.
Solution 2. (Correct)
The problem statement is really asking to prove that every even number has the property that the subsequent number is odd. So let n represent an arbitrary but unspecified even number. Then n is divisible by 2, so there is some number m such that n=2m. Now, n+1=2m+1 is not divisible by 2, since (2m+1)/2=m+12 is not a whole number. Therefore, n+1 must be odd.