Proof Prop
Proof Prop
Resolution
The key here is the set of inference rules. A set of inference rules defines
a proof system.
Σ`ϕ .
This means,
Σ ` ϕ implies Σ |= ϕ .
1. p assumption
2. q assumption
3. ¬p ∨ ¬q assumption (from negated goal)
1. p assumption
2. q assumption
3. ¬p ∨ ¬q assumption (from negated goal)
1. p assumption
2. q assumption
3. ¬p ∨ ¬q assumption (from negated goal)
4. ¬q 1, 3
1. p assumption
2. q assumption
3. ¬p ∨ ¬q assumption (from negated goal)
4. ¬q 1, 3
5. ⊥ 2, 4
1. ¬p ∨ q assumption
2. ¬q ∨ r assumption
3. p assumption (from negated conclusion)
4. ¬r assumption (from negated conclusion)
1. ¬p ∨ q assumption
2. ¬q ∨ r assumption
3. p assumption (from negated conclusion)
4. ¬r assumption (from negated conclusion)
5. q 1, 3 (variable p)
1. ¬p ∨ q assumption
2. ¬q ∨ r assumption
3. p assumption (from negated conclusion)
4. ¬r assumption (from negated conclusion)
5. q 1, 3 (variable p)
6. r 2, 5 (variable q)
1. ¬p ∨ q assumption
2. ¬q ∨ r assumption
3. p assumption (from negated conclusion)
4. ¬r assumption (from negated conclusion)
5. q 1, 3 (variable p)
6. r 2, 5 (variable q)
7. ⊥ 4, 6 (variable r )
Refutation complete!
• If Σ ∧ ¬ϕ is consistent, then . . .
• If Σ ∧ ¬ϕ is inconsistent, then . . .
• If Σ ∧ ϕ is consistent, then. . .
• If Σ ∧ ϕ is inconsistent, then . . .
Inductive hypothesis: The claim holds for sets having at most k variables.
Done!
Proofs in Propositional Logic Soundness and Completeness of Resolution 100/448
Resolution Provides an Algorithm
Modern SAT solvers can often solve hard real-world instances with over
a million propositional variables and several million clauses.
http://www.satcompetition.org/
• Resolution proofs are fine for computers, but people normally reason
quite differently. To model what people do, we must take another
approach.
• Resolution is closely tied to propositional logic. Extending it to
other forms of logic requires significant additional techniques.
Σ `ND ϕ or simply Σ ` ϕ .
The simplest rule is, if you have a formula in the proof already, you may
write it down again. This is called reflexivity.
We will write rules like this:
Here is a proof of p, q ` p.
1. p Premise
2. q Premise
3. p Reflexivity: 1
1. p Premise
and be done.
Rule ∧i means
Rule ∧e means
1. p∧q Premise
2. q ∧e: 1
3. p ∧e: 1
4. q ∧ p ∧i: 2, 3
1. p∧q Premise
2. r Premise
3. q ∧e: 1
4. q ∧ r ∧i: 3, 2
In words:
if you have that ϕ implies α, and also that ϕ , than you may
conclude α.
(Rumours that “modus ponens” is the Latin equivalent of “D’uh!” are untrue, however well justified.)
Assumption Rule:
Finally: every sub-proof must be closed before the last line of the proof.
p→r ???
Rule ∨i is much like rule ∧i. Rule ∨e, however, is more complicated.
1. p∨q Premise
2. p Assumption
3. q Assumption
4. p Reflexivity: 2
5. q→p →i: 3–4
6. (p → q) ∨ (q → p) ∨i: 5
7. q Assumption
8. p Assumption
9. q Reflexivity: 7
10. p→q →i: 8–9
11. (p → q) ∨ (q → p) ∨i: 10
12. (p → q) ∨ (q → p) ∨e: 1, 2–6, 7–11
1. ϕ → ¬ϕ Premise
¬ϕ ??
1. ϕ → ¬ϕ Premise
2. ϕ Assumption
3.
4. ⊥ ??
5. ¬ϕ ¬i: 2–?
1. ϕ → ¬ϕ Premise
2. ϕ Assumption
3. ¬ϕ →e: 1, 2
4. ⊥ ??
5. ¬ϕ ¬i: 2–?
1. ϕ → ¬ϕ Premise
2. ϕ Assumption
3. ¬ϕ →e: 1, 2
4. ⊥ ¬e: 2, 3
5. ¬ϕ ¬i: 2–4
Double-Negation Elimination:
Contradiction Elimination:
Thus any proof that uses ⊥e can be modified into a proof that does not.
1. p→q Premise
2. ¬q Premise
¬p ??
1. p→q Premise
2. ¬q Premise
3. p Assumption
4.
5. ⊥ ??
6. ¬p ¬i: ??
1. p→q Premise
2. ¬q Premise
3. p Assumption
4. q →e: 3, 1
5. ⊥ ??
6. ¬p ¬i: ??
1. p→q Premise
2. ¬q Premise
3. p Assumption
4. q →e: 3, 1
5. ⊥ ¬e: 2, 4
6. ¬p ¬i: 3–5
Using derived rules does not expand the things that can be proved. But
they can make it easier to find a proof.
1. Start with the premises at the top and the conclusion at the bottom.
2. If you can apply an elimination rule to premises, do so.
(In the case of ∨-elimination, open two sub-proofs.)
3. Next, work backwards from the end. If your target formula has a
connective, try its introduction rule.
This will yield a new target. Repeat steps 2 and 3 with the new
target, until you reach premises and/or available assumptions.
4. Treat a subproof as if it were a full proof (with a new premise).
Sometimes these ideas will lead you to a proof; sometimes they will not.
If not, try something else instead of an introduction rule (idea 3).
Sometime nothing works. Take a break, and perhaps try again later.
Natural Deduction Additional Examples and Techniques 128/448
Further Examples of Natural Deduction
Example. Show that p → q ` (r ∨ p) → (r ∨ q).
1. p→q Premise
(r ∨ p) → (r ∨ q) ??
1. p→q Premise
2. r∨p Assumption
r ∨q ??
9. (r ∨ p) → (r ∨ q) ??
1. p→q Premise
2. r∨p Assumption
3. r Assumption
4. r ∨q ??
5. p Assumption
6.
7. r ∨q ??
8. r ∨q ∨e: ??
9. (r ∨ p) → (r ∨ q) →i: 2–8
It works!
1. p→q Premise
2. r∨p Assumption
3. r Assumption
4. r ∨q ∨i: 3
5. p Assumption
6. q →e: 5, 1
7. r ∨q ∨i: 6
8. r ∨q ∨e: 2, 3–4, 5–7
9. (r ∨ p) → (r ∨ q) →i: 2–8
Example. Show that ` (p → q) → p → p.
1.
(p → q) → p → p Try →i. . .
Example. Show that ` (p → q) → p → p.
1. (p → q) → p Assumption
5. p
6. (p → q) → p → p Try →i. . .
Example. Show that ` (p → q) → p → p.
1. (p → q) → p Assumption
2. No elimination applies.
3.
4. ?????
5. p No connective.
6. (p → q) → p → p Try →i. . .
Example. Show that ` (p → q) → p → p.
1. (p → q) → p Assumption
2. No elimination applies.
3.
4. ?????
5. p No connective.
6. (p → q) → p → p Try →i. . .
if Σ, ¬ϕ `⊥, then Σ ` ϕ .
If Σ `ND ϕ , then Σ |= ϕ .
If Σ |= ϕ , then Σ `ND ϕ .
That property, however, is not quite good enough to carry out the
induction. We actually use the following property of a natural number n.
Base case. The shortest deductions have length 1, and thus are either
1. ϕ Premise.
or
1. ϕ Assumption.
We have either ϕ ∈ Σ (in the first case), or ϕ ∈ Γ (in the second case).
Thus Σ ∪ Γ |= ϕ , as required.
Inductive step. Hypothesis: the property holds for each n < k; that is,
Cases IV–XIII:
If Σ |= ϕ , then Σ ` ϕ .
• Prove α and ¬β .
• Assume α → β ; from it, conclude β (→e) and then ⊥ (¬e).
• From the sub-proof, conclude ¬(α → β), by ¬i.