Standard axioms imply Principia Mathematica axioms

The axioms are defined in Interface:Standard axioms of propositional logic, which we import straight away.  import (STANDARD Interface:Standard_axioms_of_propositional_logic ) 

We also define some variables:  var (formula p q r) 

The standard axioms are built on implication and negation (with the other three connectives defined in terms of those), whereas the Principia axioms are built on disjunction and negation.  def ((∨ p q) ((¬ p) → q)) # Disjunction 

Some of the results here are named according to their names in Principia, which uses a decimal numbering system of the form *r, where r is a rational number with a small number of digits after the decimal point. The proofs are mostly taken from metamath but are not cited individually.

The add axiom
Given our definition of disjunction, the Add axiom we are trying to prove is only a negation away from the Simp axiom that we start with:  thm (Add  (p → (q ∨ p)) ( p (¬ q) Simp )) 

A few rules, syllogism, and Id
It will be convenient to have the Frege axiom as a rule:  thm (distributeAntecedent ((H (p → (q → r)))) ((p → q) → (p → r)) ( H       p q r Frege applyModusPonens )) 

Next we derive the syllogism, which allows us to combine several implications.  thm (applySyllogism ((H1 (p → q)) (H2 (q → r))) (p → r) ( H1

 First we turn  into  :  H2       (q → r) p Simp applyModusPonens

 Then we turn that into :  distributeAntecedent

 Now we can apply modus ponens to get our desired result:  applyModusPonens )) </jh>

Any proposition implies itself:  thm (Id  (p → p) ( p p Simp

p (p → p) Simp p (p → p) p Frege applyModusPonens

applyModusPonens )) </jh>

A consequence is that we can absorb a redundant antecedent:  thm (apply*2.43 ((H (p → (p → q)))) (p → q) ( p Id

H       distributeAntecedent

applyModusPonens )) </jh>

Two results involving a proposition and its negation
From a proposition and its negation, we can derive anything:  thm (*2.21  ((¬ p) → (p → q)) ( (¬ p) (¬ q) Simp q p Transp applySyllogism )) </jh>

One form of proof by contradiction. If assuming the negation of p implies p, then the original assumption must be incorrect.  thm (*2.18  (((¬ p) → p) → p) ( p (¬ ((¬ p) → p)) *2.21 distributeAntecedent

p ((¬ p) → p) Transp applySyllogism

apply*2.43 )) </jh>

Restating this using our definition of disjunction gives the Taut axiom:  thm (Taut  ((p ∨ p) → p) ( p *2.18 )) </jh>

Double negation
Removing double negation does not change the meaning:  thm (DoubleNegationRemoval  ((¬ (¬ p)) → p) ( (¬ p) p *2.21 p *2.18 applySyllogism )) </jh>

Neither does adding it:  thm (DoubleNegationAddition  (p → (¬ (¬ p))) ( (¬ p) DoubleNegationRemoval (¬ (¬ p)) p Transp applyModusPonens )) </jh>

More common operations with implications
Given a nested implication we often want to exchange the two antecedents:  thm (applyComm ((H (p → (q → r)))) (q → (p → r)) ( q p Simp

H       distributeAntecedent

applySyllogism )) </jh>

If we have an implication, adding a common term to the antecedent and the consequent yields a new theorem:  thm (CommonAntecedentAddition  ((p → q) → ((r → p) → (r → q))) ( (p → q) r Simp r p q Frege applySyllogism ))

thm (addCommonAntecedent ((H (p → q))) ((r → p) → (r → q)) ( H       (p → q) r Simp applyModusPonens

distributeAntecedent )) </jh>

The analogous operation adding consequents swaps the initial antecedent and consequent:  thm (addCommonConsequent ((H (p → q))) ((q → r) → (p → r)) ( H

q r p CommonAntecedentAddition applyComm

applyModusPonens )) </jh>

Adding antecedents is very close to the Sum axiom we are trying to prove:  thm (Sum  ((p → q) → ((r ∨ p) → (r ∨ q))) ( p q (¬ r) CommonAntecedentAddition )) </jh>

We return to swapping the order of antecedents and prove a theorem form of.  thm (Comm  ((p → (q → r)) → (q → (p → r))) ( p q r Frege

q p Simp (p → r) addCommonConsequent

applySyllogism )) </jh>

Given the definition of disjunction, this is simply the Assoc axiom we are trying to prove:  thm (Assoc  ((p ∨ (q ∨ r)) → (q ∨ (p ∨ r))) ( (¬ p) (¬ q) r Comm )) </jh>

Transpose with negated antecedent
The  rule and double negation allow us to deduce a second form of transposition, this one with negated antecedents:  thm (*2.15  (((¬ p) → q) → ((¬ q) → p)) ( q DoubleNegationAddition (¬ p) addCommonAntecedent

p (¬ q) Transp applySyllogism )) </jh>

Given our definition of disjunction, this amounts to saying that disjunction is commutative, which is one of the Principia axioms we need to prove:  thm (Perm  ((p ∨ q) → (q ∨ p)) ( p q *2.15 )) </jh>

Reconciling definitions of implication and disjunction
This completes the proof of the Principia axioms. We're not quite done, though.

Here, we define  as. The interface we are trying to export to treats disjunction as fundamental, and defines  as. These two definitions are not the same, so we need to fix up the discrepency with a little double negation elimination.

We define the Principia negation and disjunction to be the same as their counterparts from this file. <jh> kindbind (formula Principia.wff) def ((Principia.¬ p) (¬ p)) def ((Principia.∨ p q) (p ∨ q)) </jh> We define implication according to the Principia definition, which if expanded would work out to. <jh> def ((Principia.→ p q) ((¬ p) ∨ q)) </jh>

The other two connectives do not figure in either set of axioms, but Interface:Principia Mathematica propositional logic defines them, so we need to provide definitions: <jh> def ((Principia.∧ p q) (¬ ((¬ p) ∨ (¬ q)))) # Conjunction def ((Principia.↔ p q) ((p Principia.→ q) Principia.∧ (q Principia.→ p))) # Biconditional </jh>

Now we need to express the axioms in terms of  rather than just. The easiest way to do this will be to define some theorems and rules for moving between the two: <jh> thm (ToPrincipia  ((p → q) → (p Principia.→ q)) ( p DoubleNegationRemoval q addCommonConsequent ))

thm (FromPrincipia  ((p Principia.→ q) → (p → q)) ( p DoubleNegationAddition q addCommonConsequent ))

thm (dePrincipiize ((H (p Principia.→ q))) (p → q) ( H       p q FromPrincipia applyModusPonens ))

thm (principiize ((H (p → q))) (p Principia.→ q) ( H       p q ToPrincipia applyModusPonens )) </jh>

All Principia axioms except Sum use implication only as their head symbol, so the theorems we just proved can be applied directly: <jh> thm (Principia.applyModusPonens ((H1 p) (H2 (p Principia.→ q))) q ( H1

H2       dePrincipiize

applyModusPonens ))

thm (Principia.Taut  ((p ∨ p) Principia.→ p) ( p Taut principiize ))

thm (Principia.Add  (q Principia.→ (p ∨ q)) ( q p Add principiize ))

thm (Principia.Perm  ((p ∨ q) Principia.→ (q ∨ p)) ( p q Perm principiize ))

thm (Principia.Assoc  ((p ∨ (q ∨ r)) Principia.→ (q ∨ (p ∨ r))) ( p q r Assoc principiize )) </jh> For Sum it is slightly more difficult, as implication appears three times: <jh> thm (Principia.Sum  ((q Principia.→ r) Principia.→ ((p ∨ q) Principia.→ (p ∨ r))) ( </jh> First, we transport the leftmost implication using a syllogism: <jh> q r FromPrincipia q r p Sum applySyllogism </jh> Next, we transport the rightmost implication: <jh> (p ∨ q) (p ∨ r) ToPrincipia applySyllogism </jh> And finally, we transport the heading implication: <jh> principiize )) </jh>

We can now export the Interface:Principia Mathematica propositional logic: <jh> export (PRINCIPIA Interface:Principia_Mathematica_propositional_logic Principia.) </jh>