https://books.google.com/books?id=iYHuBwAAQBAJ&pg=PA52&lpg=P...
https://books.google.com/books?id=iYHuBwAAQBAJ&pg=PA52&lpg=P...
((p V q) -> (p V r)) -> (p V (q -> r))
It's easy to justify this tautology by considering the case when (p) is true and (p) is false.By contrast, the proof in PM and by LT strike me as highly unintuitive. I guess it's an example of using Hilbert Deduction instead of Natural Deduction, where Natural Deduction is closer to how people normally prove things. For programmers, it's as if they programmed in Combinatory Logic [1] instead of Lambda Calculus[2].
[1] - https://en.wikipedia.org/wiki/SKI_combinator_calculus [2] - https://en.wikipedia.org/wiki/Lambda_calculus
Proving: (p ∨ q → p ∨ r) → p ∨ (q → r)
Start from:
(x → y) → (y → z) → x → z
Replace x with q, y with p ∨ q, z with p ∨ r:
(q → p ∨ q) → (p ∨ q → p ∨ r) → q → p ∨ r
The first part (q → p ∨ q) is already a known tautology so via modus ponens
(p ∨ q → p ∨ r) → q → p ∨ r
Replace the last → with its definition, (a → b) = ¬a ∨ b:
(p ∨ q → p ∨ r) → ¬q ∨ p ∨ r
Use the commutative property of (∨):
(p ∨ q → p ∨ r) → p ∨ ¬q ∨ r
Then use the definition again:
(p ∨ q → p ∨ r) → p ∨ (q → r)
QED.
The first part is also valid in intuitionistic logic and essentially just transforms a known truth `x → y` into "continuation passing style" `∀z. (y → z) → x → z` with a valid result, I think this is why the authors were quite pleased with the proof.The second half is the shifty bit for intuitionistic logic, going from `q -> Either p r` to `Either p (q -> r)` where it's really easy to see that you could not, say, have a Haskell function of that type generally.
There is a stronger system, called "intuitionistic propositional logic", where this axiom is not valid. There are less formulae that are valid intuitionistically, but any formula that is valid intuitionistically is also valid clasically.
There are various philosophical reasons why one prefers intuitionistic logic, but note that in any case it is stronger to have an intuitionistic proof, so these are preferable (when they exist).
a*b + a*c = a*(b + c)
which you ought to remember from school as "factoring/factorization". Except in this case, " * " is replaced with "V", and "+" is replaced with "->". In mathematics, you call that a "distributive law". Some more examples are a^c * b^c = (a*b)^c
p/\q V p/\r = p/\(q V r)
(pVq) /\ (pVr) = pV(q /\ r)(The truth table of implication is clearly different from binary exxponentiation)
irb(main):001:0> 0**0
=> 1
irb(main):002:0> 0**1
=> 0
irb(main):003:0> 1**0
=> 1
irb(main):004:0> 1**1
=> 1
Notice that `p -> q` becomes `q^p`, i.e. the operands swap position.