Natural Deduction for Predicate Logic
Before seeing the natural deduction rules for handling the quantifiers ( and ), we will need to be careful about how we handle variables in proofs. We will now have three1 different uses of identifiers in our proofs, representing different entities that we want to be able to refer to by name:
Propositions (, , …) and predicates (, , …) stand for primitive statements that may be true or false, perhaps depending on the values of arguments. When we show that an argument is valid for and , for example, we have also shown that the argument is valid when those propositional and predicate variables are replaced by actual statements, such as "It is raining" or " is an even number". As long as we are consistent about replacing variables with the same statement each time they occur, the resulting argument will have the same structure and be equally valid. If we are careful, we can even perform substitutions such as becomes and (simultaneously) becomes ; for example, if we have proven the argument (Modus Tollens), then applying this substitution would allow us to also use the argument as a step in a proof.
Line labels (, , …, as well as , , …) allow us to name individual steps and assumptions in our proofs. I have been following the convention that lines in an actual proof are named , , …, although they could be given more meaningful names such as hypothesis, first_case, or premise2. When describing the deduction rules, I have been using labels such as and to emphasize that the line being referenced could be anywhere earlier in the proof (as long as it is not local to a nested subproof).
Entity variables (, , …, as well as , , …) stand for entities from the domain of discourse. I have been using , , … to stand for particular values, such as the number 42 or the student Joe, that might be used in an argument, so could represent the statement "42 is an even number." When the variable is bound by a quantifier, I generally use or instead, to emphasize that the formula is saying something about the full range of values from the domain of discourse, and we are not free to interpret it as any particular entity. The actual name of a bound variable does not matter, only the association between its uses and the quantifier that is binding it. That is, we will consider and to be the same (and we may choose the name of the variable to avoid confusion with other variables as needed).2
Just as we can introduce temporary assumptions into subproofs, that are only available within that nested block of the proof, we will also introduce temporary entity variables in proofs by writing an assumption such as "fresh " (or , …, as needed). This means that, within that subproof, the variable will refer to some entity from the domain of discourse. Unlike the variables (, , …) bound by quantifiers, such a fresh variable should be understood as representing a single entity; it can stand alone in a statement such as . However, unlike the top-level free variables (, , …), we do not get to choose a value for a fresh variable, nor is it allowed to escape from its subproof. That is, no formula outside of the braces is allowed to refer to .
Universal Quantification
To prove a proposition , and "introduce" a universal quantifier, we need to show that is true regardless of which entity is substituted for . This is what a subproof with a fresh variable gives us:
The nested proof is a demonstration that is true with no external assumptions on which entity refers to. The only way we can do this is if is actually true for all entities in the domain of discourse, that is, .
Here is an example, proving the validity of the argument :
At step , we are asserting that is true for some entity , but since we were able to conclude this with no extra conditions on which entity that is, in we can introduce the universal quantifier. At this point, there are no remaining references to , so nothing about the result can depend on which entity we use—it must be true for all of them.
The corresponding elimination rule for the universal quantifier is simple: from the premise we may conclude that the predicate holds for any entity in the domain of discourse:
For example, we can use this to prove the following quantified version of modus ponens: . That is, if implies for each , then knowing that holds for some lets us conclude that also holds. Here is the proof:
Here is a longer example showing a quantified version of the law of syllogism, :
Existential Quantification
Extending the analogy between the conjunction/disjunction operators and the universal/existential quantifiers, we find that the rule for introducing an existential is the dual of the universal elimination rule:
That is, to show that there exists some making true it is enough to show a specific in the domain of discourse such that holds.
For example, we may prove the validity of the argument , as long as we are able to name some element of the domain of discourse:
For a different sort of example, suppose we are proving statements of arithmetic, and we have some means of deriving various equations and inequations about integers. Then we might see the following in a proof:
The conclusion on the last line shows that the number 42 is composite. There are other proofs of this fact (for example, starting from ); to show that 42 is composite, we only have to come up with one way of factoring it into numbers greater than 1.
Finally, just as with the elimination rule for disjunction, the elimination rule for the existential is somewhat more complicated. However, instead of doing a case analysis of the two ways that could be true, and show that we can conclude a common result in either case, for the existential we must analyze the potentially infinite number of cases (over all of the entities in our domain of discourse) and show that in each case we may conclude the same common result. The idea of conducting a subproof with extra assumptions, including a fresh variable to stand for whatever entity it is that "witnesses" the truth of the existential, captures what we need here:
In the nested proof, we assume two additional pieces of information: first, that is the name of a value in the domain of discourse, and second, that we have the additional fact that is true. Within the subproof, we may use this extra knowledge to prove our conclusion . However, since needs to be "fresh" to the subproof, the identity of the witnessing entity is not allowed to escape from the block3 This meshes with our understanding of the existential—it tells us that there is some making true, but it doesn't tell us which entity it is.
We may now prove a law about the interaction of the existential and conjunction: .
It is instructive to see where the proof attempt fails if we try to go the other direction and show :
The problem comes in step , where we must introduce a different variable, , as the witness for , because of the requirement that the variable be fresh. This should match your intuition for why the claim failed: although there exists an making true and there also exists an making true, there is no reason to believe that they are the same entities. Indeed, if says " is odd" and says " is even", then there will be no overlap in the entities making each true. There are odd numbers, and there are even numbers, but there are no numbers that are both odd and even.
Exercises
- Prove a similar result to the one just above, showing the interaction of the existential and the universal quantifiers:
Answer
- Discuss why the opposite direction of the previous problem is not a valid argument:
Answer
The premise claims that for any you can find an making true, but it might be a different for each . That is, the existential witness for should be expressed as a function of : given input , the output of the function is an appropriate witness (a value of such that for that particular choice of ).
However, the conclusion of the argument asserts that there is a single that makes true for all values of . That's a much stronger statement, saying that we can choose the witness independent of knowing .
For a simple example, let be . The premise claims , and it is easy to see that the function giving the witness is just . However, the conclusion of this invalid argument would claim that , but there is no way that we can choose a single that is simultaneously equal to all of the even numbers!
- There is also a fourth use, if we are maintaining a library of previous proofs and applying them by name, such as "Modus Tollens", to justify steps in later proofs.↩
- The analogy in programming is to note that the index variable for a loop can be anything; although we might usually use i, we may consistently switch to using j for a given loop if there is already a variable named i in that part of the program.↩
- There is some sort of "witness protection program" analogy to be made here….↩