0% found this document useful (0 votes)
32 views

Handout 3 Predicate Logic Proofs Using Natural Deduction EECS 203 Fall 2019

This document contains examples of natural deduction proofs in predicate logic. It provides 4 examples of proofs demonstrating the use of natural deduction rules for quantifiers, conjunction, disjunction and negation. The proofs establish logical equivalences between quantified expressions, such as showing that ∃x¬P(x) and ¬∀xP(x) are logically equivalent.

Uploaded by

sam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Handout 3 Predicate Logic Proofs Using Natural Deduction EECS 203 Fall 2019

This document contains examples of natural deduction proofs in predicate logic. It provides 4 examples of proofs demonstrating the use of natural deduction rules for quantifiers, conjunction, disjunction and negation. The proofs establish logical equivalences between quantified expressions, such as showing that ∃x¬P(x) and ¬∀xP(x) are logically equivalent.

Uploaded by

sam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Handout 3

Predicate Logic Proofs using Natural Deduction


EECS 203
Fall 2019
This handout contains the examples of Natural Deduction proofs for predicate logic.
The rules are given in Handout 4. There is an introduction and elimination rule for
the quantifiers ∀ and ∃, and for the equality predicate =. In addition to these, we also
have the rules and derived rules for Natural Deduction, which are listed in Handout
2.
The Natural Deduction proof system for predicate logic has two nice properties.
The first property is soundness. This means that the rules are correct in all domains,
with any predicate and operation symbols you have designated as part of your syntax.
They work whether you are reasoning about domains of people or domains of integers
or domains of sets.
The second property is completeness. This means that if a predicate logic expres-
sion ψ follows from some other expressions ϕ1 , ϕ2 , . . . , ϕn (in other words, in every
domain where ϕ1 , ϕ2 , . . . , ϕn are true, ψ will also be true), then there is a proof with
ϕ1 , ϕ2 , . . . , ϕn as the premises and ψ as the conclusion. In predicate logic anything
true in all domains can be proved. This result, due to the great Austrian logician
Kurt Gödel in his 1929 doctoral thesis and published the following year, is called
the Completeness Theorem for Predicate Logic. (Gödel’s result was for a different
proof system developed by Russell and Whitehead in a famous book on logic entitled
Principia Mathematica, but the ideas used to prove the Completeness Theorem for
Natural Deduction are very similar.)
You may have heard of another result of Gödel’s called the Incompleteness Theo-
rem. This may seem a little confusing since Gödel proved the Completeness Theorem.
However, they are about different situations. The Completeness Theorem gives a com-
plete set of proof rules that work in all domains. If you restrict yourself to just one
domain, there may be some additional rules that hold. For example, we will see later
that for the domain {0, 1, 2, 3, . . .} (the natural numbers) with the usual operations +
and ∗ (addition and multiplication), there is a proof rule (or, more accurately, a set
of proof rules) called the principle of induction. The principle of induction holds in
the natural numbers, but not in some other domains. The Incompleteness Theorem
says that even if you take all of the axioms you learned in high school for addition
and multiplication, and add the principle of induction to the rules for predicate logic,
you still cannot derive every true statement about the natural numbers. In fact,
something stronger is true: there is no nice way to list all of the axioms and rules you
would need to derive precisely the true statements about the natural numbers. This
is a fundamental limitation on what we can know.
Example 1. Let’s begin by showing

∀x(P (x) → Q(x)) ∀xP (x)


∀xQ(x)
The Natural Deduction proof looks like this.

 ∀x(P (x) → Q(x)) premise


 ∀xP (x) premise
 x0
 P (x0 ) → Q(x0 ) ∀-elim 1
 P (x0 ) ∀-elim 2
 Q(x0 ) →-elim 4, 5
 ∀xQ(x) ∀-intro 3-6

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

 ∀x∀y(P (x) → Q(y)) premise


 ∃xP (x) premise
 y0
 x0 P (x0 ) assumption
 ∀y(P (x0 ) → Q(y)) ∀-elim 1
 P (x0 ) → Q(y0 ) ∀-elim 5
 Q(y0 ) → -elim 4, 6
 Q(y0 ) ∃-elim 2, 4-7
 ∀yQ(y) ∀-intro 3-8

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)

 ∃x¬P (x) premise


 ∀x P (x) assumption
 x0 ¬P (x0 ) assumption
 P (x0 ) ∀-elim 2
 F ¬-elim 3, 4
 F ∃-elim 1, 3-5
 ¬∀xP (y) ¬-intro 2-6

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

You might also like