CS 3110: Proof Strategies and Examples for Propositional and Predicate Logic, Papers of Computer Science

Strategies for proving formulas in propositional and predicate logic, including rules and examples. It covers proof strategies for various logical connectives and quantifiers, as well as side conditions and invalid proofs in predicate logic.

Typology: Papers

Pre 2010

Uploaded on 08/31/2009

koofers-user-wag
koofers-user-wag 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 3110: Proof Strategy and Examples
1 Propositional Logic Proof Strategy
The fundamental thing you have to do is figure out where each connective is going to come
from. Sometimes the answer is very simple; other times, it may require a substantial detour.
If you are trying to prove some formula involving:
: You can usually assume the antecedent, prove the consequent, and use I.
: You can almost always just prove both sides.
: If you can prove one of the sides, you can use I. If you can’t prove either side alone, it
becomes significantly harder, and you often need to use something like RAA.
¬: You can often prove that the non-negated form leads to a contradiction, then use I.
Anything: You can try to produce PQ, where Pis something you have and Qis either
what you want to show or something that will help you.
Anything: You can assume the negation and try to use RAA.
If you are trying to use some formula involving:
: You usually want to prove the antecedent and use Eto get the consequent.
: You usually want to break it up into the two subformulas using E.
: You usually want to use E, which is a complicated rule that requires two other branches.
¬: If you can prove the thing being negated, you can derive a contradiction using E.
Anything: Keep in mind that sometimes you don’t need to break down formulas at all. If
a whole huge formula appears as the antecedent of a somewhere, once you get that huge
formula you probably don’t want to break it up.
When other approaches fail, it is often worthwhile to assume the negation of what you’re
trying to prove, and try to derive a contradiction and then use RAA.
2 A Proof Walkthrough
Consider trying to prove `(PQ) ¬(¬P ¬Q). We can see that the main connective
is a , so our strategy will be to prove ¬(¬P ¬Q) by assuming PQ. So we have two
proof components, one which must be the end of the proof, and another that we can use
somewhere in the proof.
[x:PQ]A
. . .
¬(¬P ¬Q)?
PQ ¬(¬P ¬Q)I, x
Since ¬(¬P ¬Q) has a negation as its primary connection, we try the approach of
assuming ¬P ¬Qand deriving . So now we have one primary component of the proof
tree that starts with and ends at the conclusion, and two assumptions that we can make
pf3
pf4
pf5

Partial preview of the text

Download CS 3110: Proof Strategies and Examples for Propositional and Predicate Logic and more Papers Computer Science in PDF only on Docsity!

CS 3110: Proof Strategy and Examples

1 Propositional Logic Proof Strategy

The fundamental thing you have to do is figure out where each connective is going to come from. Sometimes the answer is very simple; other times, it may require a substantial detour.

If you are trying to prove some formula involving: ⇒: You can usually assume the antecedent, prove the consequent, and use ⇒ I. ∧: You can almost always just prove both sides. ∨: If you can prove one of the sides, you can use ∨I. If you can’t prove either side alone, it becomes significantly harder, and you often need to use something like RAA. ¬: You can often prove that the non-negated form leads to a contradiction, then use ⇒ I. Anything: You can try to produce P ⇒ Q, where P is something you have and Q is either what you want to show or something that will help you. Anything: You can assume the negation and try to use RAA.

If you are trying to use some formula involving: ⇒: You usually want to prove the antecedent and use ⇒ E to get the consequent. ∧: You usually want to break it up into the two subformulas using ∧E. ∨: You usually want to use ∨E, which is a complicated rule that requires two other branches. ¬: If you can prove the thing being negated, you can derive a contradiction using ⇒ E. Anything: Keep in mind that sometimes you don’t need to break down formulas at all. If a whole huge formula appears as the antecedent of a ⇒ somewhere, once you get that huge formula you probably don’t want to break it up.

When other approaches fail, it is often worthwhile to assume the negation of what you’re trying to prove, and try to derive a contradiction and then use RAA.

2 A Proof Walkthrough

Consider trying to prove ` (P ∨ Q) ⇒ ¬(¬P ∧ ¬Q). We can see that the main connective is a ⇒, so our strategy will be to prove ¬(¬P ∧ ¬Q) by assuming P ∨ Q. So we have two proof components, one which must be the end of the proof, and another that we can use somewhere in the proof.

[x : P ∨ Q]

A

¬(¬P ∧ ¬Q)

P ∨ Q ⇒ ¬(¬P ∧ ¬Q)

⇒ I, x

Since ¬(¬P ∧ ¬Q) has a negation as its primary connection, we try the approach of assuming ¬P ∧ ¬Q and deriving ⊥. So now we have one primary component of the proof tree that starts with ⊥ and ends at the conclusion, and two assumptions that we can make

use of to get to ⊥.

[x : P ∨ Q]

A

[y : ¬P ∧ ¬Q]

A

¬(¬P ∧ ¬Q)

⇒ I, y

P ∨ Q ⇒ ¬(¬P ∧ ¬Q)

⇒ I, x

So we have ¬P ∧ ¬Q and P ∨ Q, and we want to get ⊥. We are out of useful things to assume at this point, so we must make use of what we have. Looking at the two formulas we have to work with, splitting ¬P ∧ ¬Q into ¬P and ¬Q immediately seems to be a dead end - if we do that, there’s not really anywhere to go. Using P ∨ Q, on the other hand, is promising. The ∨E rule can be used to get ⊥, if we can show show that both P and Q lead to ⊥. So we can link one of our assumptions into the main proof now, giving us a main proof that has two subproofs missing and one other assumption we can use somewhere.

[y : ¬P ∧ ¬Q]

A

[x : P ∨ Q]

A

P

A

Q

A

∨ E

¬(¬P ∧ ¬Q)

⇒ I, y ⇒ I, x

So now we need to fill in the two subproofs, one that starts with P and ends with ⊥, and the other that starts with Q and ends with ⊥. But since we can assume ¬P ∧ ¬Q wherever we want, this is easy - we can assume it in both subproofs. In the P subproof, we can use the ¬P part to get from P to ⊥, and similarly for Q. So we can now assemble all the pieces into a complete proof.

[x : P ∨ Q]

A

[y 1 : ¬P ∧ ¬Q]

A

P ⇒⊥

∧ E

[z 1 : P ]

A

⇒ E

[y 2 : ¬P ∧ ¬Q]

A

Q ⇒⊥

∧ E

[z 2 : Q]

A

⇒ E

¬(¬P ∧ ¬Q)

⇒ I, y 1 , y 2

P ∨ Q ⇒ ¬(¬P ∧ ¬Q)

⇒ I, x

∨E, z 1 , z 2

Note that we actually to have a ¬P ∧ ¬Q assumption twice. This is necessary for the proof, but works out due to the fact that using ⇒ I to go from ψ to φ ⇒ ψ can discharge any number of assumptions of the formula φ.

4 Predicate Logic Proof Strategy

Due to the quantifiers, predicate logic proofs are often harder to write than propositional logic proofs. The rules for quantifiers are less intuitive than the rules for propostional connections. Additionally, the side conditions on the quantifier rules can be tricky. In general, getting rid of ∀s is easy, and so is getting ∃s is easy - the hard part is getting ∀s and getting rid of ∃s. To get a ∀, you generally need to start with a ∀, apply ∀E, manipulate the inner formula in some fashion, and eventually apply ∀I to put the ∀ back on. To get rid of a ∃x , you need to use the formula inside the ∃ to prove something in which x is not free (so it must either not involve x, or x must be bound by some other quantifier).

5 Side Conditions and Invalid Proofs in Predicate Logic

For proofs involving quantifiers, great care must be taken to not violate the side conditions on the ∀I and ∃E rules. When we use ∀I to introduce ∀x, x must not be free in any of the undischarged assumptions. When we use ∃E to get rid of ∃x and conclude φ, x must not be free in any of the undis- charged assumptions or the conclusion φ.

If we aren’t careful, it is easy to produce invalid proofs. For example, consider the following.

[x : ∃x∀yP (x, y)]

A

[y : ∀yP (c, y)]

A

∀yP (c, y)

∃E, y

P (c, d)

∀E

∀xP (x, d)

∀I

∀y∀xP (x, y)

∀I

∃x∀yP (x, y) ⇒ ∀y∀xP (x, y)

⇒ I, x

This proof is clearly false, but what’s wrong with it? Most of the steps look reasonable at first glance. You might suspect that one of the ∀I steps is invalid, but in fact, all the ∀I steps are valid; they only introduce variables that are not free in the undischarged assumptions. Even though they are the steps that seem to be doing something unreasonable, the root of the problem lies somewhere else. As it turns out, the problem is right at the start of the proof, in the use of ∃E. One of the side conditions on the use of the ∃E rule is that the specific object we use in place of the variable is not free in the conclusion. However, we are using the specific object c in our assumption y : ∀yP (c, y), and c is free in the conclusion ∀yP (c, y), so this use of ∃E is invalid. It is easy to fall into traps like this when using predicate logic: one small oversight at the beginning of a proof can result in bizarre conclusions being reached later on. This can make it hard to track down the source of the error, which is why it is important to verify the side conditions every time you use ∃E or ∀I.

6 The Rule of Induction

Having a formal system of logic allows us to now formalize the concept of induction by introducing it as another inference rule. Letting the domain of our quantifiers be the natural numbers { 0 , 1 , 2 , ...}, we can write the rule of induction as:

∀nP (n) ⇒ P (n + 1) P (0) ∀nP (n)

7 Sample Predicate Logic Proofs

If you really want to see if you understand predicate logic, go through every use of ∀I and ∃E and figure out precisely why the side conditions are satisfied!

7.1 ¬∃xP (x) ⇒ ∀x¬P (x)

[x : ¬∃xP (x)]

A

[y : P (x)]

A

∃xP (x)

∃I

⇒ E

¬P (x)

⇒ I, y

∀x¬P (x)

∀I

¬∃xP (x) ⇒ ∀x¬P (x)

⇒ I, x

7.2 ∃x∀yP (x, y) ⇒ ∀y∀xP (x, y)

Goal: ` ∃x∀yP (x, y) ⇒ ∀y∀xP (x, y).

[x : ∃x∀yP (x, y)]

A

[y : ∀yP (x, y)]

A

P (x, y)

∀E

∃xP (x, y)

∃I

∀y∃xP (x, y)

∀I

∀y∃xP (x, y)

∃E

∃x∀yP (x, y) ⇒ ∀y∃xP (x, y)

⇒ I, x

7.3 ∀n0 + 1 + ... + n =

(n+1)(n) 2

Let P (n) be the predicate 0+1+...+n = (n+1)( 2 n). Note that P (0) is equivalent to 0 = (0+1)(0) 2