While revisiting "Mathematical Logic", I noticed a quiz that I had never worked out. It requires to prove
$$\{\} \vdash (\lnot p \to p) \to p$$
in 19 steps.
To be clear, each "step" should be in one of the following forms:
- $p \to (q \to p)$ (L1)
- $(p \to (q \to r)) \to ((p \to q) \to (p \to r))$ (L2)
- $(p \to q) \to (\lnot q \to \lnot p)$ (L3)
- $q$, provided that both $p$ and $p \to q$ have appeared in previous steps (Modus Ponens, MP)
(According to the book, using MP twice in an expression counts as 2 steps, and similar counting method holds for other expressions)
I still can't work this out, any one point out a way?
For example, here's a valid proof of $\{p \to q, q \to r\} \vdash p \to r$ in 7 steps:
- $(q \to r) \to (p \to (q \to r))$ (L1)
- $q \to r$ (Assumption)
- $p \to (q \to r)$ (1, 2, MP)
- $(p \to (q \to r)) \to ((p \to q) \to (p \to r))$ (L2)
- $(p \to q) \to (p \to r)$ (3, 4, MP)
- $p \to q$ (Assumption)
- $p \to r$ (5, 6, MP)
Sketch of the proof.
I'll use the following axiom in place of (L3) :
The axiom system (L1), (L2) and (L3') is complete for classical propositional logic.
With it we can prove (L3) as well as Double Negation laws and
1) $\vdash \lnot A \to (\lnot B \to \lnot A)$ --- (L1)
2) $\vdash (¬B→¬A) → (A→B)$ --- (L3')
1) $\vdash (\lnot A \to (A \to \lnot B)) \to ((\lnot A \to A) \to (\lnot A \to \lnot B))$ --- (L2)
2) $\vdash \lnot A \to (A \to \lnot B)$ --- from (B) with $\lnot B$ in place of $B$
3) $\vdash (\lnot A \to A) \to (\lnot A \to \lnot B)$ --- from 1) and 2) by MP
1) $\vdash (\lnot p \to p) \to ((\lnot p \to p) \to p)$ --- from (C) with $(\lnot p \to p)$ in place of $B$
2) suitable version of (L2)
3) $\vdash ((\lnot p \to p) \to (\lnot p \to p)) \to ((\lnot p \to p) \to p)$ --- from 1) and 2) by MP
4) $\vdash (\lnot p \to p) \to (\lnot p \to p)$ --- from (A)