# Logic: Quantifiers

Some sentences feel an awful lot like statements but aren't. For example,

is even

This is not a statement because it doesn't have a truth value; unless we know what is, we can't really do much.

Definition. A sentence with one or more variables, so that supplying values for the variables yields a statement, is called an open sentence.

You can think of an open sentence as a function whose values are statements. In fact we will use function notation to name open sentences.

n is even

Just as with ordinary functions, this notation works by substitution. With defined as above,

3 is even

which happens to be a false statement. , on the other hand, is a true statement.

Along with an open sentence, we have to provide some kind of indication of what sort of thing the variable might be. For our example , it makes most sense to let be a natural number or possibly an integer. We call possible values for the variable of an open sentence the universe of that sentence.

One thing that cannot be emphasized enough is that variables can represent any type of thing, not just numbers or other mathematical objects. So we could think about the open sentence

r is t years old

and say that the universe for is everyone in your section of MA 225 and the universe for is any whole number between 15 and 60.

Definition. Given an open sentence with one variable , the statement is true when, no matter what value of we use, is true; otherwise is false.
Given an open sentence with one variable , the statement is true when there is some value of for which is true; otherwise is false.

Terminology. We call the universal quantifier, and we read for all , . We call the existential quantifier, and we read there exists such that .

Observe that if there are only two possible values in the universe for (let's call them and ), then is true when both and are true. But this is the same as being true. Similarly, is true when one of or is true. But this is the same as . So we see that the quantifiers are in some sense a generalization of and . So the following makes sense:

De Morgan's Laws, quantifier version: For any open sentence with variable ,

For example, a denial of the statement

There is a china teapot floating halfway between the earth and the sun.

is

Every china teapot is not floating halfway between the earth and the sun.

### the universal quantifier, conditionals, and the universe

Quantifiers are most interesting when they interact with other logical connectives. For example, consider the following (true) statement:

Every multiple of is even.

We could choose to take our universe to be all multiples of , and consider the open sentence

n is even

and translate the statement as . But that isn't very interesting. A much more natural universe for the sentence is even is the integers. But then we have to do something clever, because if our universe for is the integers, then is false. The solution is to create another open sentence

k is a multiple of 4

How do we use and to translate our true statement? We can think of an open sentence as a test--if we plug in a value for its variable(s), we see whether that variable passes the test. Here we have two tests: , a test for evenness, and , a test for multiple-of--ness. The statement we are trying to translate says that passing the test is enough to guarantee passing the test. That sounds like a conditional. Indeed the correct translation for Every multiple of is even is:

Try translating this statement back into English using some of the various translations for to see that it really does mean the same thing as Every multiple of is even.

Exercise. Translate and into English into English. Explain why these are false statements. Assume the universe for both and is the integers.

In fact, we can always expand the universe by putting in another conditional. If we let be the sentence is an integer and expand our universe to include all mathematical objects encountered in this course, we could translate Every multiple of 4 is even as .

A Note about Notation. It's important to keep in mind that, just as for the functions you've encountered in calculus and before, the particular symbol we use for a variable is not relevant to the meaning of that variable. The statements

and

both say the same thing. namely, Every integer which is a multiple of 4 is even. The fact that we called the variable when we defined and when we defined does not require us to always use those variables. Notice that in the English translation, no variables appear at all! We could equally well have written

except that that's a bit difficult to pronounce.

### The existential quantifier and the universe

We just saw that generally speaking, a universal quantifier should be followed by a conditional. What should an existential quantifier be followed by? Consider the following true statement

There is a multiple of which is even.

How can we represent this symbolically? We could take the universe to be all multiples of and write . But as before, that's not very interesting. So let's keep our universe as it should be: the integers. As before, we'll need a test for multiple-of--ness: denote by the sentence is a multiple of .

Now think about what the statement There is a multiple of which is even means. What is the relationship between multiple-of--ness and evenness? Just that some number happens to be both. Therefore we can translate:

Notice that because is commutative, our symbolic statement is equivalent to . But this is just fine, because our statement and the statement

There is an even number which is a multiple of

pretty clearly mean the same thing.

Let's lock in the connection between and with another example. This time we'll use De Morgan's laws and consider the statement

Every multiple of is even.

which happens to be false. Therefore its negation is true. We compute that negation:

which we could phrase in English as There is an integer which is a multiple of and not even. Thus we see that the existential quantifier pairs naturally with the connective .

Exercise. Let stand for is even, stand for is a multiple of , and stand for is an integer. Let the universe for all three sentences be the set of all mathematical objects encountered in this course. Write a symbolic translation of There is a multiple of which is even using these open sentences.

Exercise. Translate into English. Explain why this is a true statement. Give a useful denial. Assume the universe for both and is the integers.

### quantifier order

Many interesting open sentences have more than one variable, such as:

= is years old

Since there are two variables, we are entitled to ask the question which one? twice. And we may have a different answer each time. There are eight possibilities, of which four are

1. For any person , for any age , that person is that age.
2. For any age , for any person , that person is that age.
3. There is a person who is some age .
4. There is an age so that some person is that age.

A moment's thought should make clear that statements 1 and 2 mean the same thing (in our universe, both are false), and statements 3 and 4 mean the same thing (in our universe, both are true if woefully uninformative). This says that we can move existential quantifiers past one another, and move universal quantifiers past one another.

The other four possibilities are

1. For any person , there is an age so that that person is that age.
2. There is an age so that every person is that age.
3. For any age , there is a person who is that age.
4. There is a person who is every age.

Notice that statement 5 is true (in our universe): everyone has an age. But statement 6 says that everyone is the same age, which is false in our universe. So statement 5 and statement 6 mean different things. Similarly, statement 7 is likely true in our universe, whereas statement 8 is false. The lesson is that quantifiers of different flavors do not commute!