23.10.2014 Views

Quantifiers - University of Nebraska Omaha

Quantifiers - University of Nebraska Omaha

Quantifiers - University of Nebraska Omaha

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14 ANDRZEJ ROSLANOWSKI<br />

3. <strong>Quantifiers</strong><br />

The propositional calculus may to some extend formalize how we<br />

carry out arguments, but it is not strong enough to be actually useful.<br />

Only after allowing the use <strong>of</strong> variables and quantifiers in our syntax<br />

we will receive a formal structure that is rich and applicable. But this<br />

makes the topic harder and it is the treatment <strong>of</strong> quantifiers in mathematical<br />

statements that is the hardest part in mathematical pro<strong>of</strong><br />

writing. This is also what makes mathematical arguments di cult.<br />

3.1. Syntax: an informal introduction. We fix a list <strong>of</strong> allowed<br />

variables, say, x, x 1 ,x 2 ,..., y, y 1 ,y 2 ,... and z,z 1 ,z 2 ,.... We think<br />

about these variables as denoting some unspecified objects (compare<br />

with the phrase “a man entered the room”).<br />

All formulas we consider are related to some mathematical reality.<br />

It is convenient to think that the variables stand for objects from this<br />

reality, thattheycomefromafixeduniverse. It is just to make some<br />

expressions more practical: if we are talking about equations, then our<br />

variables should denote numbers. But if we are interested in insects,<br />

then the universe <strong>of</strong> our variables is the collection <strong>of</strong> all insects. This<br />

means that the scope <strong>of</strong> variables and/or quantifiers is <strong>of</strong>ten restricted<br />

to some fixed non-empty set called the “universe” or “domain.”<br />

We will formalize this notion later, but we can imagine what a formula<br />

in variables x 1 ,...,x n may mean. It is just some (mathematical)<br />

expression “talking” about unspecified objects x 1 ,...,x n .Examples<strong>of</strong><br />

such expressions are<br />

(⇤) 1 x 1 is bigger than x 2 +2<br />

(⇤) 2 x 1 is a prime number<br />

(⇤) 3 x 2 is a multiple <strong>of</strong> x 1<br />

(⇤) 4 x 1 + x 2 + x 3 2 x 1<br />

= x 4<br />

or looking at less mathematical context<br />

(⇤) 5 x loves y<br />

(⇤) 6 z is tall<br />

(⇤) 7 x is father <strong>of</strong> y.<br />

Each <strong>of</strong> the above examples comes with the domain <strong>of</strong> involved variables,<br />

but <strong>of</strong>ten we do not mention it explicitly. What are the domains<br />

<strong>of</strong> the variables in the above examples?<br />

If I ask you if the formulas listed above are true or false, you might<br />

be somewhat confused. Is x 1 bigger than x 2 +2? Depends on the<br />

particular choice <strong>of</strong> x 1 ,x 2 , but they are “free” in our sentence, they<br />

can be anything. You may pick x 1 =1andx 2 =2andclaimthatthe<br />

formula is false. But I will take x 1 =2013andx 2 =2andIwillinsist


MATH 2230 — FALL 2013 15<br />

that it is true. Thus, if a formula has a “free” instance <strong>of</strong> a variable,<br />

then it does not make much sense to ask if it is true 12 .<br />

Why do I add the adjective “free” when talking about a variable?<br />

Note that not every occurrence <strong>of</strong> a variable is the same as any other.<br />

Compare the following two formulas:<br />

(a) x is a prime number bigger than 1000,<br />

(b) there is a prime number x such that x>1000.<br />

Again, if I ask you if the first formula is true, than you will reply<br />

“depends on x”. But the same question on the second formula will<br />

be clearly answered with “sure, this formula is true”! So what is the<br />

di↵erence? Both formulas involve a variable x, but<br />

• the first formula “speaks” about x, while<br />

• the second formula “speaks” about 1000, the x here could be<br />

totally eliminated. (We could have just say “there is a prime<br />

number bigger than 1000.)<br />

Look carefully what happens here. We have formula<br />

x is a prime number bigger than 1000<br />

(i.e., formula in (a)) and then, essentially, we add in front <strong>of</strong> it the<br />

phrase “there is an x such that” getting<br />

there is an x such that x is a prime number bigger than 1000<br />

(and you should agree that this is the formula in (b)). In general, if we<br />

have a formula with a free variable x, then by adding “there is an x such<br />

that” in front <strong>of</strong> it we obtain a formula where x is not free anymore.<br />

In situations like that we say that “the variable x got bounded by the<br />

existential quantifier”.<br />

In a parallel way we may consider adding “for all x we have that” in<br />

front <strong>of</strong> a formula with a free variable x, asinthesentence<br />

• for all real numbers x we have that x 2 0.<br />

This operation also creates a formula where x is not free anymore<br />

and we say then that “the variable x got bounded by the universal<br />

quantifier”.<br />

Thus we have two 13 quantifiers:<br />

• the existential quantifier 9x (it is read “there is an x such that”,<br />

“for some x we have”),<br />

• the universal quantifier 8x (it is read “for all x we have”, “for<br />

every x we have”).<br />

12 unless there are some conventions around, see later<br />

13 we may consider more quantifiers but these two are the most important


16 ANDRZEJ ROSLANOWSKI<br />

When you add them in front <strong>of</strong> a formula with a free variable x, we<br />

make this variable bounded. If x was the only free variable, then (in a<br />

sense) we may ask if the formula obtained this way is true or false.<br />

Some examples <strong>of</strong> mathematical formulas with quantifiers:<br />

(⇤) 8 (8x)(x 2 0)<br />

(⇤) 9 (9x)(x 3 124x +3=0)<br />

(⇤) 10 (9y)(5 sin(y) =⇡).<br />

We may have multiple quantifiers:<br />

(⇤) 11 (8x)(8y)(x + y = y + x)<br />

(⇤) 12 (8x)(9y)(x + y =2013)<br />

(⇤) 13 (9x)(8y)(2 x > sin(y))<br />

(⇤) 14 (8x)(8" >0)(9 >0)(8z)(|x z| < )|sin(x) sin(z)|


MATH 2230 — FALL 2013 17<br />

Warning: Never ever use quantifiers as abbreviations for English language<br />

phrases “for all” or “there exists” etc. Never write anything like<br />

“this solves the question 8x >0butwestillhavetodealwithc apple 0”<br />

or “we know that 9 a good object, but constructing it is more complicated”.<br />

3.2. Pro<strong>of</strong>s Involving <strong>Quantifiers</strong>. What makes mathematical theorems<br />

complicated is a sequence <strong>of</strong> alternating quantifiers, like in the<br />

sentence in (⇤) 14 . However, even with only one quantifier around we<br />

may get lost if the arguments are not presented properly.<br />

Some sentences are true in every possible interpretation (model).<br />

For instance, (9x)(x >0) ) (9x)(x >0) is always true, regardless<br />

<strong>of</strong> our interpretation <strong>of</strong> >. All (suitable) substitutions to tautologies<br />

<strong>of</strong> propositional calculus will have this property, but not only those.<br />

In this part we will meet several sentences which are true regardless<br />

<strong>of</strong> their interpretation. Sentences <strong>of</strong> this type are called logical validities,<br />

orlogical axioms, ortautologies <strong>of</strong> the quantifier calculus. We<br />

will give some justifications for them – these arguments could serve as<br />

“templates” for all “common sense” pro<strong>of</strong>s involving quantifiers.<br />

So, from now on let us fix:<br />

• the non-empty domain (universe) U <strong>of</strong> all variables,<br />

• formulas (x), (x) withatmostonefreevariablex.<br />

When a is an object from U, then we write (a) forthesentence<br />

obtained from (x) byreplacingeveryfreeoccurrence<strong>of</strong>x with a.<br />

Similarly for .<br />

We will use x 0 to denote some fixed objects from U —note,thisis<br />

not a variable!<br />

Remark 3.2.1. Many mathematical theorems have the form <strong>of</strong> an implication.<br />

There are various strategies to prove the conditional ' ) but<br />

most <strong>of</strong>ten the direct approach is best. We assume that the hypothesis<br />

(antecedent) ' is true and we argue that the conclusion (consequent)<br />

holds true.<br />

Sometimes we want to argue for a biconditional statement ' , .<br />

Then most <strong>of</strong>ten we prove the two implications separately (remembering<br />

Corollary 2.2.5(9)).<br />

Proposition 3.2.2. The sentence<br />

(8x) (x) ) (9x) (x)


18 ANDRZEJ ROSLANOWSKI<br />

is a tautology <strong>of</strong> the quantifier calculus.<br />

Pro<strong>of</strong>. Assume that (8x) (x) is true, that is, for every x 0 ,thesentence<br />

(x 0 )holdstrue. Chooseanyx 0 from the domain U and fix it. Then it<br />

follows that (x 0 )istrue. Consequently,x 0 witnesses that there exists<br />

an x such that (x) istrue. Thus,(9x) (x) holds,sowehaveshown<br />

the implication<br />

holds. This completes the pro<strong>of</strong>.<br />

(8x) (x) ) (9x) (x)<br />

Proposition 3.2.3. The following sentences are tautologies <strong>of</strong> the quantifier<br />

calculus:<br />

(a) (8x)( (x) ^ (x)) , (8x) (x) ^ (8x) (x).<br />

(b) (9x)( (x) _ (x)) , (9x) (x) _ (9x) (x).<br />

(c) (8x) (x) _ (8x) (x) ) (8x)( (x) _ (x)).<br />

(d) (9x)( (x) ^ (x)) ) (9x) (x) ^ (9x) (x).<br />

Pro<strong>of</strong>. (a) To prove this biconditional we will argue for the two implications<br />

separately.<br />

()) Let us assume that<br />

(i) (8x) (x) ^ (x) holds true.<br />

Suppose that x 0 is arbitrary but fixed. It follows from (i) that<br />

is true, and hence<br />

that<br />

(ii)<br />

(x 0 ) ^ (x 0 )<br />

(x 0 )holdstrue. Sincex 0 was arbitrary we conclude<br />

(8x) (x) holdstrue.<br />

Again assuming x 0 is arbitrary, we know that (x 0 ) ^ (x 0 )istrueby<br />

(i). It follows that (x 0 ) is true as well. Hence, we get<br />

(iii)<br />

(8x) (x) holdstrue.<br />

Finally, clauses (ii) and (iii) imply that the conjunction<br />

(8x) (x) ^ (8x) (x)<br />

is true, completing the pro<strong>of</strong> <strong>of</strong> the implication.<br />

(() Assume that (8x) (x) ^ (8x) (x) holdstrue.Thus<br />

and<br />

(⇤)<br />

(⇤⇤)<br />

(8x) (x) istrue,<br />

(8x) (x) istrue.<br />


MATH 2230 — FALL 2013 19<br />

Now, suppose that x 0 is arbitrary but fixed. It follows from (⇤) that<br />

(x 0 )istrue,andby(⇤⇤) wegetthat (x 0 )holds.Therefore,<br />

(x 0 ) ^ (x 0 )<br />

is true. Since x 0 was arbitrary, we conclude that (8x)( (x) ^ (x)) is<br />

true.<br />

Consequently, the desired implication is true and the pro<strong>of</strong> <strong>of</strong> the<br />

biconditional is complete.<br />

(b) To show this biconditional we will prove the two implications<br />

separately.<br />

()) Assume (9x)( (x) _ (x)) holds true. Let x 0 be such that<br />

(x 0 ) _ (x 0 )<br />

is true. Hence, one <strong>of</strong> the statements,<br />

consider the two possible cases.<br />

(x 0 )or (x 0 ), is true. Let us<br />

Case 1: (x 0 )istrue.<br />

Then, x 0 witnesses that (9x) (x) holds true. Consequently, the disjunction<br />

(9x) (x) _ (9x) (x)<br />

holds true.<br />

Case 2: (x 0 )istrue.<br />

Then, similarly as in the previous case, except interchanging and ,<br />

we conclude that the disjunction<br />

holds true.<br />

(9x) (x) _ (9x) (x)<br />

In both cases we concluded that the disjunction (9x) (x)_(9x) (x)<br />

holds true. Therefore the implication is justified.<br />

(() Assume (9x) (x) _ (9x) (x) holdstrue. Thus,either(9x) (x)<br />

or (9x) (x) istrueandthisleadstotwopossiblecases.<br />

Case 1: (9x) (x) istrue.<br />

Then we may choose an x 0 so that (x 0 )holds. Itthenfollowsthat<br />

(x 0 ) _ (x 0 )istrue.Consequently,x 0 witnesses that<br />

(9x)( (x) _ (x))<br />

holds true.<br />

Case 2: (9x) (x) istrue.<br />

By interchanging and in the previous case, we conclude that<br />

(9x)( (x) _ (x))


20 ANDRZEJ ROSLANOWSKI<br />

holds true.<br />

In both cases we conclude that (9x)( (x) _ (x)) is true. Therefore<br />

the pro<strong>of</strong> <strong>of</strong> the implication is complete. Hence, the biconditional (b)<br />

is shown.<br />

(c) Assume that (8x) (x)_(8x) (x) holds true. Then either (8x) (x)<br />

or (8x) (x) istrue,sowemayconsidertwopossiblecases.<br />

Case 1: (8x) (x) istrue.<br />

Let x 0 be arbitrary but fixed. By the assumption <strong>of</strong> the current case,<br />

(x 0 ) holds true. Hence, the disjunction (x 0 ) _ (x 0 )alsoholdstrue.<br />

Since x 0 was arbitrary, we conclude<br />

(8x)( (x) _ (x))<br />

holds true.<br />

Case 2: (8x) (x) istrue.<br />

Interchanging and in the previous argument we justify that in the<br />

current case<br />

(8x)( (x) _ (x))<br />

also holds true.<br />

In both possible cases we concluded that<br />

(8x)( (x) _ (x))<br />

holds true, so the implication is shown.<br />

(d) Assume (9x)( (x) ^ (x)) holds true. Let x 0 be a witness for<br />

this, that is it is chosen so that (x 0 ) ^ (x 0 )istrue. Thenboth (x 0 )<br />

and (x 0 )aretrue. Since (x 0 )istrue,weseethat(9x) (x) holds,<br />

and since (x 0 )istrueweseethat(9x) (x) holds.Consequently,the<br />

conjunction<br />

(9x) (x) ^9x (x)<br />

holds true, and this completes the pro<strong>of</strong> <strong>of</strong> the implication.<br />

We have shown finally, that the four statements in Proposition 3.2.3<br />

are true, and this completes the pro<strong>of</strong>.<br />

⇤<br />

Remark 3.2.4. The sentence<br />

(8x)( (x) _<br />

(x)) ) (8x) (x) _ (8x) (x)<br />

may be false. For instance, let x range over natural numbers and (x)<br />

means “x is even” and (x) means“x is odd.” Then, (8x)( (x)_ (x))<br />

holds true, but both (8x) (x) and(8x) (x) arefalse.


MATH 2230 — FALL 2013 21<br />

Definition 3.2.5. Two sentences and (<strong>of</strong> quantifier calculus) are<br />

equivalent if the biconditional ( , ) is a tautology <strong>of</strong> the quantifier<br />

calculus.<br />

Formulas (x) and (x) areequivalent if the sentence<br />

(8x)( (x) , (x))<br />

is a tautology. Similarly if more free variables are involved.<br />

Example 3.2.6. ¿Thefollowingpairs<strong>of</strong>formulasareequivalent:<br />

(1) (8x)( (x) ^ (x)) and (8x) (x) ^ (8x) (x).<br />

(2) (9x)( (x) _ (x)) and (9x) (x) _ (9x) (x).<br />

(3) ¬(9x) (x) and(8x)¬ (x).<br />

(4) ¬(8x) (x) and(9x)¬ (x).<br />

(5) ¬(8x)(9y) (x, y) and(9x)(8y)¬ (x, y).<br />

3.3. Syntax: First Order Logic. We start with fixing a lis <strong>of</strong> symbols<br />

that we will use in our formulas. Some symbols are independent<br />

<strong>of</strong> the area <strong>of</strong> mathematics that we are working in are called “logical”<br />

or “syntax” symbols. “Logical” symbols include:<br />

(~) q 1 variables: x, x 1 ,x 2 ,..., y, y 1 ,y 2 ,... and z,z 1 ,z 2 ,...;<br />

(~) q 2 grouping symbols: (, )<br />

to increase readability we may use also [ , ], but they should be<br />

interpreted just as a di↵erent way <strong>of</strong> writing round parentheses;<br />

(~) q 3 logical connectives: ^, _, ¬, ), ,;<br />

(~) q 4 quantifiers: 9, 8.<br />

We also have area specific symbols which may include:<br />

(~) q 5 constants like 0, 1, 2,e,⇡ etc;<br />

(~) q 6 relational symbols like


22 ANDRZEJ ROSLANOWSKI<br />

1, while x y has an arity <strong>of</strong> 2. Often times, if F is a binary functional<br />

symbol, then we <strong>of</strong>ten write it between the terms. For example, 2 + 7,<br />

3 · x, x y, andsoon.OtherwiseweusetheformF (x, y, z) etc.<br />

Definition 3.3.1. (1) An alphabet for a first order language is a<br />

list A <strong>of</strong><br />

(a) constants: c 1 ,c 2 ,c 3 ,...<br />

(b) relational symbols: R 1 ,R 2 ,R 3 ,...<br />

(each with fixed arity) and<br />

(c) functional symbols: F 1 ,F 2 ,F 3 ,...<br />

(each with fixed arity).<br />

(2) For the alphabet A, wedefineterms and formulas <strong>of</strong> the language<br />

L(A) asfollows.<br />

(a) Variables and constants are terms.<br />

(b) If F i is an n-ary function symbol and t 1 ,...,t n are terms,<br />

then F (t 1 ,...,t n )isaterm.<br />

(c) If t 1 ,t 2 are terms, then t 1 = t 2 is a formula.<br />

(d) If t 1 ,...,t n are terms and R is an n-ary relational symbol,<br />

then R(t 1 ,...,t n )isaformula.<br />

(e) If , ,... are formulas, then so are<br />

¬ , ( ^ ), ( _ ), ( ) ), ( , ).<br />

(f) If is a formula, then both (8x) and (9x) are formulas.<br />

Remark 3.3.2. If the function symbol is binary and we put it between<br />

the terms (i.e., we write t 1 Ft 2 ), then we add parentheses. So we write<br />

then (t 1 Ft 2 ). Without the parentheses, the structure <strong>of</strong> complex terms<br />

can be misinterpreted.<br />

Definition 3.3.3. Aformulawithoutfreevariablesiscalledasentence.<br />

Defining derivations in first order logic is somewhat more complicated<br />

than in propositional calculus (subsection 2.3). We may be lazy<br />

though and take as the logical axioms all tautologies <strong>of</strong> the quantifier<br />

calculus we can come with, including all substitutions to tautologies <strong>of</strong><br />

propositional calculus. Then there are two rules <strong>of</strong> inference: modus<br />

ponens and the substitution rule. The latter can be described as follows<br />

15 :<br />

If t is a term and is a formula possibly containing the variable x,<br />

then [t/x] istheresult<strong>of</strong>replacingallfreeinstances<strong>of</strong>x by t in .<br />

The substitution rule states that for any and any term t, onecan<br />

conclude [t/x] from provided that no free variable <strong>of</strong> t becomes<br />

bound during the substitution process.<br />

15 quoted after Wikipedia


MATH 2230 — FALL 2013 23<br />

Thus we develop syntactics like in the propositional calculus case. We<br />

also study semantics (the model theory), but this is a totally di↵erent<br />

story.<br />

3.4. Exercises.<br />

Problem 3.1. Using binary relational symbols


24 ANDRZEJ ROSLANOWSKI<br />

Problem 3.4. Let (x, y) andbeaformulawithatmosttw<strong>of</strong>ree<br />

variables x and y. Suppose also that no occurrence <strong>of</strong> x or y in is<br />

bounded by a quantifier. Prove that the following sentences are true.<br />

(1) (8x)(8y) (x, y) ) (8x) (x, x)<br />

(2) (9x) (x, x) ) (9x)(9y) (x, y)<br />

(3) (9x)(8y) (x, y) ) (8y)(9x) (x, y)<br />

Problem 3.5. Justify Remark 3.2.6.<br />

Problem 3.6. Which <strong>of</strong> the following sentences are always true (i.e.,<br />

which sentences are tautologies <strong>of</strong> the quantifiers calculus) ? Justify<br />

those which are tautologies, provide counterexamples for those which<br />

are not.<br />

(1) (8x) (x, x) ) (8x)(8y) (x, y)<br />

(2) (9x)(9y) (x, y) ) (9x) (x, x)<br />

(3) (8y)(9x) (x, y) ) (9x)(8y) (x, y)<br />

(4) (8y)(8x) (x, y) , (8x)(8y) (x, y)<br />

(5) (9y)(9x) (x, y) , (9x)(9y) (x, y)<br />

(6) (8x) (9x) (x) ) (x)<br />

(7) (8x) (x) ) (9x) (x)<br />

(8) (8x) (x) ) (8x) (x) ) 8x (x) ) (x)<br />

(9) (8x) (x) , (8x) (x) ) 8x (x) , (x)<br />

(10) (8x) (x) ) (8y) (y)<br />

Problem 3.7. Aformulaisinprenex form if it is written as a string<br />

<strong>of</strong> quantifiers (referred to as the prefix) followed by a quantifier–free<br />

part (referred to as the matrix). 16 For each <strong>of</strong> the following formulas<br />

find a formula in the prenex form equivalent to the given formula and<br />

the matrix simplified as much as possible.<br />

(1) ¬(8x)(8y)(x + y = y + x)<br />

(2) ¬(8x)(9y)(x + y =2013)<br />

(3) ¬(9x)(8y)(2 x > sin(y))<br />

(4) ¬(8" >0)(9 >0)(8x)(8z)(|x z| < )|sin(x) sin(z)| 0)(9 >0)(8z)(|x z| < )|2 x 2 z |

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!