Handout 3 Predicate Logic Proofs Using Natural Deduction EECS 203 Fall 2019
Handout 3 Predicate Logic Proofs Using Natural Deduction EECS 203 Fall 2019
As usual, we list the premises on lines 1 and 2, then look at the conclusion ∀xQ(x).
It begins with a universal quantifier ∀x, so we suspect that we will have to use the
∀-intro rule. The idea behind this rule is that if you want to prove that something
holds for all x you designate a particular x0 which does not occur previously in the
proof and reason about it. Mathematicians often do this. For example, to show that
all integers have some property, they will say “let n be an integer” and reason about n.
If they show that this arbitrarily chosen n has the property, then they may conclude
that all integers have the property, since there was nothing special about this n. On
line 3 of the proof we have chosen x0 to represent an arbitrary element of the domain.
Notice that we do not need to give a justification on this line: x0 is just a variable,
not an expression. We are not claiming that it is true (in fact, it would not make
sense to say it is true) so we need no justification. (This is analogous to a variable
declaration in a C++ program. The declaration is not executed – it just says we
are going to be using this variable.) Within the subderivation we reason about this
arbitrary x0 . The premise ∀x(P (x) → Q(x)) on line 1 asserts that for all x, P (x)
implies Q(x), so on line 4 we can use the ∀-elim rule to deduce that it holds for x0
– just eliminate the quantifier and substitute x0 for x everywhere in the remaining
part of the expression. At line 5 do the same thing to the premise ∀xP (x) on line 2.
Now we can apply → -elim (Modus Ponens) to the expressions on lines 4 and 5 to
show Q(x0 ) on line 6. This is the end of the subderivation where we reason about x0
so we close off the box. The variable x0 should never appear outside the box. Since
x0 was arbitrary, we can conclude ∀xQ(x) on line 7.
In English we would write the proof as follows.
We are given for all x that P (x) implies Q(x), and for all x that P (x) is
true. We wish to show for all x that Q(x) is true. Consider an arbitrary x0 .
2
We know that P (x0 ) implies Q(x0 ) since this is true for all x. Similarly, we
know that P (x0 ) is true. Therefore, Q(x0 ) is true. Since x0 was arbitrary,
we know Q(x) is true for all x.
Example 2. Prove
∀x∀y(P (x) → Q(y)) ∃xP (x)
∀yQ(y)
Here is the Natural Deduction proof
This proof uses the ∀-intro and ∀-elim rules as before, and in addition uses the
∃-elim rule in the inner subderivation from lines 4 through 7 and its conclusion on
line 8. The justification on line 8 refers to the existential expression ∃xP (x) on line
2. The idea here is that since there are domain elements x such that P (x) is true,
you should be able to pick one and name it x0 . Mathematicians do this routinely in
proofs. This is what we are doing on line 4, the first line of the subderivation. Notice
that we need to give a justification here because we are asserting that P (x0 ) is true.
We are assuming that the element x0 we have have chosen is one for which P (x0 ) is
true. It is not an arbitrary element: we are using the ∃-elim rule, not the ∀-elim
rule here. The last line of the subderivation on line 7 says that Q(y0 ) is true. This
expression does not mention x0 (or, more precisely, x0 is not a free variable), so we
can move it outside the box to line 8. We may not move any expression containing
x0 as a free variable outside the box.
This proof illustrates a general strategy for Natural Deduction proofs in predicate
logic: strip the quantifiers off using the ∀-elim and ∃-elim rules until you get down
to quantifier-free expressions; then use the rules from Handout 2; finally put the
appropriate quantifiers back on using the ∀-intro and ∃-intro rules.
In English we would write the proof as follows.
3
We are given that for all x and y, P (x) implies Q(y), and that there is
an x such that P (x) is true. We wish to show that for all y, Q(y) is true.
Consider an arbitrary y0 . We know that there is an element for which P
is true; call it x0 . Now for every y, P (x0 ) implies Q(y). In particular,
P (x0 ) implies Q(y0 ). We know that P (x0 ) is true, so Q(y0 ) is true. Since
y0 was chosen arbitrarily, Q(y) is true for all y.
Example 3. From the textbook we know that ∃x¬P (x) and ¬∀xP (x) are logically
equivalent. To show this, we would need to show that the second can be derived from
the first, which we do below, and that first can be derived from the second. We will
show that the second can be derived from the first.
Prove
∃x¬P (x)
¬∀xP (x)
Example 4. From the textbook we know that ∃x(P (x) ∨ Q(x)) and
∃xP (x) ∨ ∃xQ(x) are logically equivalent. Again, to show this, we would need
to prove that the second can be derived from the first, which we do below, and that
first can be derived from the second. We will show that the second can be derived
from the first. Pay careful attention to lines 3 and 7. These are the first uses of the
∃-intro rule in this handout. The rule is quite straightforward: if you show that
P (x0 ) holds, then you can conclude that ∃xP (x) holds.
Prove
∃x(P (x) ∨ Q(x))
∃xP (x) ∨ ∃xQ(x)
4
∃x(P (x) ∨ Q(x)) premise
x0 P (x0 ) ∨ Q(x0 ) assumption
P (x0 ) assumption
∃xP (x) ∃-intro 3
∃xP (x) ∨ ∃xQ(x) ∨-intro 4
Q(x0 ) assumption
∃xQ(x) ∃-intro 6
∃xP (x) ∨ ∃xQ(x) ∨-intro 7
∃xP (x) ∨ ∃xQ(x) ∨-elim 2, 3-5, 6-8
∃xP (x) ∨ ∃xQ(x) ∃-elim 1, 2-9