From intuitionistic to classical propositional logic

Instead of proving the axioms of classical propositional logic (for example, Interface:Standard axioms of propositional logic), we prove the Interface:Principia Mathematica propositional logic theorems. This is for two reasons. The first is to show that all the connectives, not just those mentioned in the axioms, have the same meanings (this could alternately be achieved by including all the definitions in the interface with the axioms, as in Interface:Principia Mathematica propositional logic). The second is to present an alternative proof of the Interface:Principia Mathematica propositional logic theorems. In some cases the way we prove the theorems is very similar, but in others it is quite different. The proofs in Principia Mathematica propositional logic rely heavily on the relationships between the connectives (especially implication and disjunction), and the proofs via intuitionistic logic rely more heavily on theorems such as disjunction composition and conjunction composition.

 import (INTUITIONISTIC Interface:Basic_intuitionistic_propositional_logic )

kindbind (formula wff) import (EXCLUDED_MIDDLE Interface:Law_of_the_excluded_middle (INTUITIONISTIC) )  We define some variables:  var (formula p q r s) 

Double negation elimination
 thm (DoubleNegationElimination  ((¬ (¬ p)) → p) ( p TertiumNonDatur swapDisjunction

(¬ p) p DisjunctionImplicationForward applyModusPonens ))

thm (eliminateDoubleNegation ((H (¬ (¬ p)))) p ( H       p DoubleNegationElimination applyModusPonens ))

thm (DoubleNegation  (p ↔ (¬ (¬ p))) ( p DoubleNegationIntroduction p DoubleNegationElimination introduceBiconditionalFromImplications )) 

Transposition elimination
 thm (TranspositionElimination  (((¬ q) → (¬ p)) → (p → q)) ( (¬ q) (¬ p) TranspositionIntroduction

p DoubleNegation q DoubleNegation buildImplication eliminateBiconditionalForward

applySyllogism ))

thm (eliminateTransposition ((H ((¬ q) → (¬ p)))) (p → q) ( H       q p TranspositionElimination applyModusPonens ))

thm (Transposition  ((p → q) ↔ ((¬ q) → (¬ p))) ( p q TranspositionIntroduction q p TranspositionElimination introduceBiconditionalFromImplications ))

thm (TranspositionWithNegatedAntecedent  (((¬ p) → q) ↔ ((¬ q) → p)) ( (¬ p) q Transposition

(¬ q) BiconditionalReflexivity p DoubleNegation buildImplication swapBiconditional

applyBiconditionalTransitivity ))

thm (transposeWithNegatedAntecedent ((H ((¬ p) → q))) ((¬ q) → p) ( H       p q TranspositionWithNegatedAntecedent eliminateBiconditionalReverse applyModusPonens ))

thm (TranspositionWithNegatedConsequent  ((p → (¬ q)) ↔ (q → (¬ p))) ( p DoubleNegation (¬ q) BiconditionalReflexivity buildImplication

q (¬ p) Transposition swapBiconditional

applyBiconditionalTransitivity ))

thm (transposeWithNegatedConsequent ((H (p → (¬ q)))) (q → (¬ p)) ( H       p q TranspositionWithNegatedConsequent eliminateBiconditionalReverse applyModusPonens )) 

Transposition for the biconditional
To prove this biconditional transposition law, we write the biconditional on the left and right side as a pair of implications, and then apply transposition to each of them.

 thm (NegationFunction  ((p ↔ q) ↔ ((¬ p) ↔ (¬ q))) ( p q BiconditionalImplication

p q Transposition q p Transposition buildConjunction applyBiconditionalTransitivity

((¬ q) → (¬ p)) ((¬ p) → (¬ q)) ConjunctionCommutativity applyBiconditionalTransitivity

(¬ p) (¬ q) BiconditionalImplication swapBiconditional applyBiconditionalTransitivity ))

thm (removeNegation ((H ((¬ p) ↔ (¬ q)))) (p ↔ q) ( H       p q NegationFunction eliminateBiconditionalForward applyModusPonens )) 

The following version is similar, but with the negation placed differently. The proof is similar, but is based on different variants of transposition for implications.

 thm (BiconditionalTranspositionWithNegatedRight  ((p ↔ (¬ q)) ↔ (q ↔ (¬ p))) ( p (¬ q) BiconditionalImplication

p q TranspositionWithNegatedConsequent q p TranspositionWithNegatedAntecedent buildConjunction applyBiconditionalTransitivity

q (¬ p) BiconditionalImplication swapBiconditional applyBiconditionalTransitivity ))

thm (transposeBiconditionalWithNegatedRight ((H (p ↔ (¬ q)))) (q ↔ (¬ p)) ( H       p q BiconditionalTranspositionWithNegatedRight eliminateBiconditionalReverse applyModusPonens )) 

It will also be convenient to have a commuted version of this theorem.  thm (BiconditionalTranspositionWithNegatedLeft  (((¬ p) ↔ q) ↔ ((¬ q) ↔ p)) ( (¬ p) q BiconditionalSymmetry

q p BiconditionalTranspositionWithNegatedRight applyBiconditionalTransitivity

p (¬ q) BiconditionalSymmetry applyBiconditionalTransitivity ))

thm (transposeBiconditionalWithNegatedLeft ((H ((¬ p) ↔ q))) ((¬ q) ↔ p) ( H       p q BiconditionalTranspositionWithNegatedLeft eliminateBiconditionalReverse applyModusPonens )) 

DeMorgan's laws
One of DeMorgan's laws holds (in both directions) intuitionistically.

 thm (DeMorganPDP  ((¬ (p ∨ q)) ↔ ((¬ p) ∧ (¬ q))) ( p q NegationCollectionNCNDistributionPDP swapBiconditional )) 

Double negation elimination turns that one into the other three which distribute negation across disjunction.

 thm (DeMorganPDN  ((¬ (p ∨ (¬ q))) ↔ ((¬ p) ∧ q)) ( p (¬ q) DeMorganPDP

(¬ p) BiconditionalReflexivity q DoubleNegation swapBiconditional buildConjunction

applyBiconditionalTransitivity ))

thm (DeMorganNDP  ((¬ ((¬ p) ∨ q)) ↔ (p ∧ (¬ q))) ( (¬ p) q DeMorganPDP

p DoubleNegation swapBiconditional (¬ q) BiconditionalReflexivity buildConjunction

applyBiconditionalTransitivity ))

thm (DeMorganNDN  ((¬ ((¬ p) ∨ (¬ q))) ↔ (p ∧ q)) ( (¬ p) (¬ q) DeMorganPDP

p DoubleNegation q DoubleNegation buildConjunction swapBiconditional

applyBiconditionalTransitivity )) </jh>

The versions which distribute negation across a conjunction follow from the above versions and transposition.  thm (DeMorganPCP  ((¬ (p ∧ q)) ↔ ((¬ p) ∨ (¬ q))) ( p q DeMorganNDN transposeBiconditionalWithNegatedLeft ))

thm (DeMorganPCN  ((¬ (p ∧ (¬ q))) ↔ ((¬ p) ∨ q)) ( p q DeMorganNDP transposeBiconditionalWithNegatedLeft ))

thm (DeMorganNCP  ((¬ ((¬ p) ∧ q)) ↔ (p ∨ (¬ q))) ( p q DeMorganPDN transposeBiconditionalWithNegatedLeft ))

thm (DeMorganNCN  ((¬ ((¬ p) ∧ (¬ q))) ↔ (p ∨ q)) ( p q DeMorganPDP transposeBiconditionalWithNegatedLeft )) </jh>

We supply those rules which do not hold intuitionistically.  thm (distributeNegationPDN ((H (¬ (p ∨ (¬ q))))) ((¬ p) ∧ q) ( H       p q DeMorganPDN eliminateBiconditionalReverse applyModusPonens ))

thm (distributeNegationNDP ((H (¬ ((¬ p) ∨ q)))) (p ∧ (¬ q)) ( H       p q DeMorganNDP eliminateBiconditionalReverse applyModusPonens ))

thm (distributeNegationNDN ((H (¬ ((¬ p) ∨ (¬ q))))) (p ∧ q) ( H       p q DeMorganNDN eliminateBiconditionalReverse applyModusPonens ))

thm (distributeNegationPCP ((H (¬ (p ∧ q)))) ((¬ p) ∨ (¬ q)) ( H       p q DeMorganPCP eliminateBiconditionalReverse applyModusPonens ))

thm (distributeNegationPCN ((H (¬ (p ∧ (¬ q))))) ((¬ p) ∨ q) ( H       p q DeMorganPCN eliminateBiconditionalReverse applyModusPonens ))

thm (distributeNegationNCP ((H (¬ ((¬ p) ∧ q)))) (p ∨ (¬ q)) ( H       p q DeMorganNCP eliminateBiconditionalReverse applyModusPonens ))

thm (distributeNegationNCN ((H (¬ ((¬ p) ∧ (¬ q))))) (p ∨ q) ( H       p q DeMorganNCN eliminateBiconditionalReverse applyModusPonens ))

thm (collectNegationPDN ((H (p ∨ (¬ q)))) (¬ ((¬ p) ∧ q)) ( H       p q DeMorganNCP eliminateBiconditionalForward applyModusPonens ))

thm (collectNegationNDP ((H ((¬ p) ∨ q))) (¬ (p ∧ (¬ q))) ( H       p q DeMorganPCN eliminateBiconditionalForward applyModusPonens ))

thm (collectNegationPCN ((H (p ∧ (¬ q)))) (¬ ((¬ p) ∨ q)) ( H       p q DeMorganNDP eliminateBiconditionalForward applyModusPonens ))

thm (collectNegationNCP ((H ((¬ p) ∧ q))) (¬ (p ∨ (¬ q))) ( H       p q DeMorganPDN eliminateBiconditionalForward applyModusPonens ))

</jh>

Tautology
The intention of this theorem is similar to the intuitionistic, but it is stated in terms of the law of the excluded middle.

 thm (Tautology  ((p ∨ (¬ p)) ↔ (⊤)) ( True (p ∨ (¬ p)) introduceAntecedent p TertiumNonDatur (⊤) introduceAntecedent introduceBiconditionalFromImplications )) </jh>

Implication and disjunction
Intuitionistic logic does have one equivalence relating disjunction to implication,. That and transposition gets us one of the classical equivalences,  thm (DisjunctionImplication  ((p ∨ q) ↔ ((¬ p) → q)) ( p q NotDisjunctionImplication removeNegation )) </jh> and throwing in a little double negation elimination gets us the other.  thm (ImplicationDisjunction  ((p → q) ↔ ((¬ p) ∨ q)) ( (¬ p) q DisjunctionImplication

p DoubleNegation swapBiconditional q BiconditionalReflexivity buildImplication

applyBiconditionalTransitivity

swapBiconditional ))

thm (convertFromImplicationToDisjunction ((H (p → q))) ((¬ p) ∨ q) ( H       p q ImplicationDisjunction eliminateBiconditionalReverse applyModusPonens ))

thm (convertToDisjunctionFromImplication ((H ((¬ p) → q))) (p ∨ q) ( H       p q DisjunctionImplication eliminateBiconditionalForward applyModusPonens )) </jh>

Although the treatment of propositional logic in Whitehead and Russell's Principia relies heavily on this relationship between implication and disjunction, we rely on it only for a handful of theorems.

Biconditional and two disjunctions
 thm (BiconditionalConjunction  ((p ↔ q) ↔ (((¬ p) ∨ q) ∧ (p ∨ (¬ q)))) ( p q BiconditionalImplication

p q ImplicationDisjunction

q p ImplicationDisjunction (¬ q) p DisjunctionCommutativity applyBiconditionalTransitivity

buildConjunction

applyBiconditionalTransitivity ))

thm (BiconditionalDisjunctionLeftElimination  ((p ↔ q) → (p ∨ (¬ q))) ( p q BiconditionalConjunction eliminateBiconditionalReverse

((¬ p) ∨ q) (p ∨ (¬ q)) ConjunctionLeftElimination

applySyllogism ))

thm (BiconditionalDisjunctionRightElimination  ((p ↔ q) → ((¬ p) ∨ q)) ( p q BiconditionalConjunction eliminateBiconditionalReverse

((¬ p) ∨ q) (p ∨ (¬ q)) ConjunctionRightElimination

applySyllogism ))

thm (convertFromBiconditionalToConjunction ((H (p ↔ q))) (((¬ p) ∨ q) ∧ (p ∨ (¬ q))) ( H       p q BiconditionalConjunction eliminateBiconditionalReverse applyModusPonens ))

thm (eliminateLeftBiconditionalDisjunction ((H (p ↔ q))) (p ∨ (¬ q)) ( H       p q BiconditionalDisjunctionLeftElimination applyModusPonens ))

thm (eliminateRightBiconditionalDisjunction ((H (p ↔ q))) ((¬ p) ∨ q) ( H       p q BiconditionalDisjunctionRightElimination applyModusPonens ))

</jh>

Biconditional as the disjunction of two equivalence classes
This theorem,, can be thought of saying that the biconditional is true if and only if both formulas are true or neither is true. We prove it from  by applying the distributive law several times.

The first lemma is, which consists of the notion that we can add or remove a conjunct which is a theorem , and a commutation.  thm (BiconditionalDisjunction-1  (((¬ p) ∨ q) ↔ ((p ∨ (¬ p)) ∧ (q ∨ (¬ p)))) ( (¬ p) q DisjunctionCommutativity

p TertiumNonDatur (q ∨ (¬ p)) introduceAntecedent (q ∨ (¬ p)) ImplicationReflexivity composeConjunction

(p ∨ (¬ p)) (q ∨ (¬ p)) ConjunctionLeftElimination

introduceBiconditionalFromImplications

applyBiconditionalTransitivity )) </jh> The second lemma,, is similar except that the   goes on the right, and there is no commutation.  thm (BiconditionalDisjunction-2  ((p ∨ (¬ q)) ↔ ((p ∨ (¬ q)) ∧ (q ∨ (¬ q)))) ( (p ∨ (¬ q)) ImplicationReflexivity q TertiumNonDatur (p ∨ (¬ q)) introduceAntecedent composeConjunction

(p ∨ (¬ q)) (q ∨ (¬ q)) ConjunctionRightElimination

introduceBiconditionalFromImplications ))

thm (BiconditionalDisjunction  ((p ↔ q) ↔ ((p ∧ q) ∨ ((¬ p) ∧ (¬ q)))) ( p q BiconditionalConjunction

p q BiconditionalDisjunction-1 p q BiconditionalDisjunction-2 buildConjunction applyBiconditionalTransitivity </jh> At this point we have. We apply the distributive law to both halves to get.  p q (¬ p) DisjunctionRightDistribution swapBiconditional p q (¬ q) DisjunctionRightDistribution swapBiconditional buildConjunction applyBiconditionalTransitivity </jh> One more application of the distributive law gives us.  (p ∧ q) (¬ p) (¬ q) DisjunctionLeftDistribution swapBiconditional applyBiconditionalTransitivity ))

thm (convertFromBiconditionalToDisjunction ((H (p ↔ q))) ((p ∧ q) ∨ ((¬ p) ∧ (¬ q))) ( H       p q BiconditionalDisjunction eliminateBiconditionalReverse applyModusPonens ))

thm (convertToBiconditionalFromDisjunction ((H ((p ∧ q) ∨ ((¬ p) ∧ (¬ q))))) (p ↔ q) ( H       p q BiconditionalDisjunction eliminateBiconditionalForward applyModusPonens ))

</jh>

Case elimination
Because of the classical relationship between disjunction and implication, case elimination follows readily from disjunctive case elimination.  thm (CaseElimination  (((p → q) ∧ ((¬ p) → q)) → q) ( p q ImplicationDisjunction eliminateBiconditionalReverse p q DisjunctionImplication eliminateBiconditionalForward conjoin

((¬ p) ∨ q) (p ∨ q) ConjunctionCommutativity eliminateBiconditionalReverse applySyllogism

p q DisjunctiveCaseElimination applySyllogism ))

thm (eliminateCases ((HP (p → q)) (HNOTP ((¬ p) → q))) q ( HP       HNOTP introduceConjunction

p q CaseElimination

applyModusPonens )) </jh>

Export
 kindbind (wff formula) export (CLASSICAL Interface:Principia_Mathematica_propositional_logic_theorems ) </jh>