Proof by contradiction: this proof technique allows you to prove P by
showing that, from "Not P", you can prove a falsehood.
Proof by contradiction is not a theorem of constructive logic, so it
requires the
Classical constraint. But note that the similar
technique of proof by contrapositive (not-introduction)
is
valid in constructive logic! For comparison, the two types are:
contradiction :: Classical => (Proof (Not p) -> Proof FALSE) -> Proof p
introNot :: (Proof p -> Proof FALSE) -> Proof (Not p)
The derivation of proof by contradiction from the law of the excluded
middle goes like this: first, use the law of the excluded middle to
prove
p || Not p. Then use or-elimination to prove
p
for each alternative. The first alternative is immediate; for the
second alternative, use the provided implication to get a proof of
falsehood, from which the desired conclusion is derived.
contradiction impl = elimOr id (absurd . impl) lem