The WFFs we have studied so far only capture logical statements of a very simple form. Very commonly we want to work with more complex statements, especially those that depend on some kind of parameter or variable. Here are some examples.
There exists a rational number with .
For every natural number22 2 A natural number is a non-negative whole number. there exists a prime number with .
For all real numbers there exists a real number such that for all real numbers greater than it holds that is greater than .
These kinds of statement are especially common in analysis, but they arise everywhere in mathematics. Propositional calculus doesn’t have a way of talking about statements that depend on a variable, and might be true for some values, or all values, or no values that variable could take. It also has no way to talk about functions or relations. The logical theory we’re going to learn about that can deal with statements like this is called first order logic or predicate calculus.
In propositional calculus we had WFFs. The corresponding thing in first order logic is called a first order formula. We will treat these very informally — if you want to learn about these in detail, read chapter 4 of the book by Goldrei mentioned in the further reading section at the end of this chapter, or take MATH0037 in year 3.
Here is a simple example of a first order formula:
The meaning of this is “for all in the set , there exists a in the set such that the property is true for and .” The new things here are the symbol which means “in,” the quantifiers and , and the predicate . In the next two subsections we’ll explain what these last two are.
A predicate on a set is a statement that becomes true or false when an element of is substituted for the variable . For example, “ is even” is a predicate on the integers, since for every integer the statement “ is even” is either true or false.
We need predicates like that require more than one variable. For example, could be the statement “” which is a true or false statement about any two real numbers and .
Lots of statements in mathematics involve the idea of a predicate being true for some, or for all, values of a particular variable. For example:
There exists some rational number such that .
For all real numbers , we have .
For all natural numbers , there exists a prime number such that .
To write these formally we use quantifiers. There are two types of quantifier: , the universal quantifier, and , the existential quantifier.
The universal quantifier is used to say that something is true for every element of a particular set, called the domain of the quantifier. If is a predicate,
is read as “for all belonging to , the statement is true.” So
is false, because not every real number satisfies , but
is true, since every real number satisfies .
The existential quantifier is used to say that something is true for at least one element of a particular set, again called the domain. If is a predicate
says “there exists in such that is true.” Such a statement is true when there is at least one belonging to the set making true. For example,
is true, because there is at least one real number whose square is positive (in fact, there’s infinitely many!), but
is false since there is no real number whose square is negative.
Let’s write the three examples at the start of this subsection using quantifier notation. We use to represent the set of rational numbers, for the set of real numbers, for the set of natural numbers, and for the set of prime numbers. The statement are then:
In all the examples above, we specified the domain of the quantifier explicitly. Sometimes, especially in analysis, the domain is specified using a condition. Analysts will write
to mean “for all positive real numbers , there exists a positive real number , …”. You can think of this as meaning
where means the set of all positive real numbers.
There are even times when the domain of one variable seems to depend on another — you might see an expression like
If is intended to be a natural number, for example, we could rewrite this as
We need more than one quantifier to express statements whose truth depends on more than one variable. For example, in analysis, the definition of a function being bounded is that
that is, there exists a real number such that for all real numbers we have . The definition of a function being continuous at a point is even more complicated, requiring three quantifiers.
When we have more than one quantifier, it’s important to get the quantifiers in the correct order because if you change the order of the quantifiers you may change whether or not the statement is true.
is true, because no matter what real number you give me, I can find a real number (equal to ) such that . On the other hand
which is the same statement except that the quantifiers are the other way round, is false because there is no real number such that for all real numbers we have .
However, quantifiers of the same type can be swapped without changing the truth or falsity of the statement, for example both
and
are true if and only if is true for every in and every in .
It’s often useful to ask what it would mean for a quantified statement not to be true. For example, you might want to prove that a certain sequence does not tend to 0. The definition of a sequence tending to 0 is that
We could negate this just by adding a to the front: to say that a sequence does not tend to 0 is to say that
but it would be helpful if we could simplify this in some way, to make it easier to prove. We can do this with the following quantifier rules.
For any predicate on a set ,
is true if and only if is true, and
is true if and only if is true.
The first of these holds because to say is false means that not every for is true, that is, there exists such that is false. The second can be seen similarly.
By using these rules repeatedly, we can find equivalent forms of negated quantified statements even when they contain multiple quantifiers. Returning to our example of a sequence not tending to zero,
is true if and only if | ||
is true, if and only if | ||
is true, if and only if | ||
At this point we can use what we know about logical equivalences for WFFs to simplify further: this is equivalent to
We now know what we need to do to prove doesn’t tend to 0: we have to find some such that for every , there is an such that .
We will now look at some more examples of producing useful equivalent forms for negations of quantified statements. We’re going to use real-life examples from bits of mathematics you may not have met yet, but this won’t be a problem as our negation procedure doesn’t require understanding anything about the meaning of the statement!
The statement “every value the function takes is less than 10” can be written
What does it mean for this to be false? Let’s negate it, using the negation of quantifiers theorem 1.9.1. That tells us
is equivalent to
which in our case says , or .
Consider the statement “the function is bounded”, which we could write as
Let’s negate it. To keep things short, we’ll write for the predicate . We know that
is true if and only if | ||
is true, if and only if | ||
so “the function is not bounded” can be written as , or equivalently, .