Home page for accesible maths 2 Logic

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

2.4 Quantifiers

In this section we shall introduce two more symbols. Statements involving ‘‘for all’’ or ‘‘there exist(s)’’ are very common in mathematics; for example,

for alln,  n2\text{for all}\ n\in\mathbb{N},\ n^{2}\in\mathbb{N}

(that is, the square of any natural number is a natural number — which is true), or

there existsxsuch thatx2+1=0\text{there exists}\ x\in\mathbb{R}\ \text{such that}\ x^{2}+1=0

(that is, the equation x2+1=0x^{2}+1=0 has a real solution — which is false).

Notation 2.4.1

The universal quantifier \forall means ‘‘for all’’; the existential quantifier \exists means ‘‘there exist(s)’’.

Example 2.4.2

In this notation, the two statements above could be written

(n)(n2)  and  (x)(x2+1=0),(\forall n\in\mathbb{N})(n^{2}\in\mathbb{N})\qquad\text{and}\qquad(\exists\,x% \in\mathbb{R})(x^{2}+1=0),

respectively.

Remark 2.4.3
  1. (i)

    The symbol \forall (an upside-down letter ‘‘A’’) is suggested by the word ‘‘all’’, while the symbol \exists (a back-to-front letter ‘‘E’’) refers to the word ‘‘exists’’.

  2. (ii)

    \forall may also be read ‘‘for every’’ or ‘‘for each’’, while \exists may alternatively be read ‘‘there is/are’’, ‘‘for some’’ or ‘‘for at least one’’.

Example 2.4.4
  1. (i)

    The statement ‘‘for every pair of integers, their product is positive’’ can be written

    (m)(n)(mn>0).(\forall m\in\mathbb{Z})(\forall n\in\mathbb{Z})(mn>0).

    This statement is false because 00=00\cdot 0=0 is not positive.

  2. (ii)

    The statement ‘‘There exists a natural number whose square root is greater than five’’ can be written

    (n)(n>5),(\exists\,n\in\mathbb{N})(\sqrt{n}>5),

    and this statement is true because 36=6>5.\sqrt{36}=6>5.

  3. (iii)

    The statement ‘‘for every non-zero rational number rr, there is a rational number ss such that rs=1rs=1’’ can be written

    (r{0})(s)(rs=1),(\forall r\in\mathbb{Q}\setminus\{0\})(\exists\,s\in\mathbb{Q})(rs=1),

    and this statement is true.

  4. (iv)

    The statement ‘‘there is a rational number which is greater than every natural number’’ can be written

    (r)(n)(r>n),(\exists\,r\in\mathbb{Q})(\forall n\in\mathbb{N})(r>n),

    and this statement is false (as we shall explain in Example 3.4.1 below).

Remark 2.4.5
  1. (i)

    In English, the phrase ‘‘there exist(s)’’ is almost always followed by ‘‘… such that’’, which does not appear in the symbolic version.

  2. (ii)

    In English, a statement like ‘‘some politicians are honest’’ may carry the suggestion that others are not. In mathematics, however, there are no such subtle nuances about statements of this form. For instance, the statement

    (xP)(xH)(\exists\,x\in P)(x\in H)

    (where P={politicians}P=\{\text{politicians}\} and H={honest people}H=\{\text{honest people}\}) carries no such overtones; all it asserts is the existence of (at least) one honest politician.

Sometimes mathematical statements that do not explicitly use the words ‘‘for all’’ or ‘‘there exist(s)’’ (or their equivalents) may be recast as statements involving quantifiers, as the following example shows.

Example 2.4.6
  1. (i)

    We may express the statement ‘‘ABA\cap B\neq\emptyset’’ as

    (xA)(xB).(\exists\,x\in A)(x\in B).
  2. (ii)

    The statement ‘‘2\sqrt{2} is a rational number’’ (or, in symbols, ‘‘2\sqrt{2}\in\mathbb{Q}’’) may be written

    (a)(b{0})(2=ab).(\exists\,a\in\mathbb{Z})\bigl(\exists\,b\in\mathbb{Z}\setminus\{0\}\bigr)% \biggl(\sqrt{2}=\frac{a}{b}\biggr).

    (We shall soon see that this is false).

  3. (iii)

    We may express the statement ‘‘every integer greater than 11 can be written as a product of primes’’ as

    (n{2,3,4,})(m)(p1)(p2)(pm)(n=p1p2pm),(\forall n\in\{2,3,4,\ldots\})(\exists\,m\in\mathbb{N})(\exists\,p_{1}\in% \mathbb{P})(\exists\,p_{2}\in\mathbb{P})\ldots(\exists\,p_{m}\in\mathbb{P})\\ (n=p_{1}p_{2}\cdots p_{m}),

    where we have introduced the symbol \mathbb{P} for the set of prime numbers. (You may know that this is true; we shall give a formal proof at the end of the course.)

In Examples 2.4.4(iii)–(iv) and 2.4.6(ii)–(iii), we used several quantifiers; statements involving two or more quantifiers are fairly common. If the quantifiers are all of the same type (that is, all ‘‘\forall’’ or all ‘‘\exists’’), then there is no difficulty, but if there is a mixture, then it is important to be careful about their order, as the following example shows.

Example 2.4.7

The statement

(n)(m)(m=n+1)(\forall n\in\mathbb{N})(\exists\,m\in\mathbb{N})(m=n+1)

asserts that, for every natural number nn, there is a natural number mm which is exactly 11 greater than nn (which is clearly true), whereas

(m)(n)(m=n+1)(\exists\,m\in\mathbb{N})(\forall n\in\mathbb{N})(m=n+1)

states that there is a natural number mm which is exactly 11 greater than every natural number nn (which is clearly false).

We conclude this section by considering how negation interacts with quantifiers. Often we may wish to negate a quantified statement. The simplest way to do this is just to put a ‘‘¬\neg’’ at the beginning, but it is usually more informative to convert this into a positive statement.

Example 2.4.8
  1. (i)

    The negation of the statement ‘‘all cows eat grass’’ is

    ‘‘there is a cow which does not eat grass’’.

    The negation must be a statement about cows, eating and grass!

  2. (ii)

    The negation of the statement ‘‘all students attended the workshop’’ is

    ‘‘somebody did not attend the workshop’’,

    or in other words

    ‘‘at least one student did not attend the workshop’’.

In general, for a set AA and a statement P(x)P(x) involving a variable xx,

¬((xA)(P(x)))  is logically equivalent to  (xA)(¬P(x)).\framebox{$\neg\Bigl((\forall x\in A)\bigl(P(x)\bigr)\Bigr)\qquad\text{is % logically equivalent to}\qquad(\exists\,x\in A)\bigl(\neg P(x)\bigr).$}
Example 2.4.9
  1. (i)

    The negation of the statement ‘‘there is a lecturer who writes legibly’’ is

    ‘‘all lecturers write illegibly’’.
  2. (ii)

    The negation of the statement ‘‘someone failed the exam’’ is

    ‘‘nobody failed the exam’’

    or in other words

    ‘‘everybody passed the exam’’.

In general, for a set AA and a statement P(x)P(x) involving a variable xx,

¬((xA)(P(x)))  is logically equivalent to  (xA)(¬P(x)).\neg\Bigl((\exists\,x\in A)\bigl(P(x)\bigr)\Bigr)\qquad\text{is logically % equivalent to}\qquad(\forall x\in A)\bigl(\neg P(x)\bigr).

To deal with statements involving multiple quantifiers, we work through each in turn.

Example 2.4.10
  1. (i)

    The statement

    ¬((x)(y)(x+y=0))\neg\bigl((\forall x\in\mathbb{R})(\exists\,y\in\mathbb{R})(x+y=0)\bigr)

    is logically equivalent to

    (x)(¬((y)(x+y=0)))(\exists\,x\in\mathbb{R})\Bigl(\neg\bigl((\exists\,y\in\mathbb{R})(x+y=0)\bigr% )\Bigr)

    which in turn is logically equivalent to

    (x)(y)(x+y0).(\exists\,x\in\mathbb{R})(\forall y\in\mathbb{R})(x+y\neq 0).
  2. (ii)

    Similarly, the statement

    ¬((x)(y)(xy=y))\neg\bigl((\exists\,x\in\mathbb{Z})(\forall y\in\mathbb{Z})(xy=y)\bigr)

    is logically equivalent to

    (x)(¬((y)(xy=y)))(\forall x\in\mathbb{Z})\Bigl(\neg\bigl((\forall y\in\mathbb{Z})(xy=y)\bigr)\Bigr)

    which in turn is logically equivalent to

    (x)(y)(xyy).(\forall x\in\mathbb{Z})(\exists\,y\in\mathbb{Z})(xy\neq y).

For a case involving a compound statement at the end, we may use the logical equivalences established in the previous section.

Example 2.4.11

The statement

¬((x)((2+x)&(2-x)))\neg\Bigl((\exists\,x\in\mathbb{R})\bigl((\sqrt{2}+x\in\mathbb{Q})\ \&\ (\sqrt% {2}-x\in\mathbb{Q})\bigr)\Bigr)

is logically equivalent to

(x)(¬((2+x)&(2-x))),(\forall x\in\mathbb{R})\Bigl(\neg\bigl((\sqrt{2}+x\in\mathbb{Q})\ \&\ (\sqrt{% 2}-x\in\mathbb{Q})\bigr)\Bigr),

which by Example 2.3.5 is logically equivalent to

(x)((2+x)or(2-x)).(\forall x\in\mathbb{R})\bigl((\sqrt{2}+x\notin\mathbb{Q})\ \text{or}\ (\sqrt{% 2}-x\notin\mathbb{Q})\bigr).