# Principia Mathematica propositional logic

 Principia Mathematica propositional logic
 The purpose of this page is to prove the statements of Interface:Principia Mathematica propositional logic theorems from the Principia Mathematica[1] axioms for propositional logic.
Used interfaces
Imports
Interface:Principia Mathematica propositional logic
Exports
Interface:Principia Mathematica propositional logic theorems
import (PRINCIPIA Interface:Principia_Mathematica_propositional_logic () () Unable to import parameter PRINCIPIA(Interface:Principia_Mathematica_propositional_logic)[]+: Unable to load module Interface:Principia_Mathematica_propositional_logic

We define some variables for well-formed formulas:

Unknown command

Principia Mathematica does not define the nullary connectives "the true", ${\displaystyle \top }$ , and "the false", ${\displaystyle \bot }$ , so we define them here:

Unknown command

We shall now begin to derive the statements. Whitehead and Russell use a decimal numbering system of the form ${\displaystyle *r}$ , where ${\displaystyle r}$ is a rational number with a small number of digits after the decimal point. Unless we give theorems our own name, we shall adopt their system for easier reference. Where we do use our own names, we sometimes give the decimal reference in a JHilbert comment.

## Disjunction and implication

### First steps

The modus ponens rule is an axiom of Principia Mathematica, so we don't need to prove it. The Perm axiom immediately gives rise to the disjunctive commutativity rule:

Unknown command

Likewise it will be convenient to have the Sum axiom as a rule:

Unknown command

Since Principia Mathematica defines implication, ${\displaystyle p\rightarrow q}$ , as ${\displaystyle (\neg p)\vee q}$ , the Add axiom yields the introduction of an antecedent (Whitehead and Russell call it "Simplification").

Unknown command

It will be convenient to have this theorem as helper rule:

Unknown command

Again due to the way implication is defined, Perm gives us our first transposition rule:

Unknown command

Next, we prove a precursor to the commutative law of Conjunction, which will be very convenient until we get Peano's transportation principle. We call this theorem Comm in accordance with Whitehead and Russell.

Unknown command

This theorem enables us to prove two forms of the syllogism from the Sum axiom. The rule applySyllogism expresses the syllogism nature of these theorems (we have two implications and derive a third). But they also can be used to build up more complicated formulas, a pattern which is expressed by the addCommonAntecedent and addCommonConsequent rules, in which we just have one implication and derive a more involved formula.

Unknown command

The syllogism yields the "identity" Id, ${\displaystyle p\rightarrow p}$ , and, by Perm, tertium non datur, which is, by our definition, just ${\displaystyle \top }$ :

Unknown command

Actually, for Whitehead and Russell use the permutation of our TertiumNonDatur as theirs.

With the TertiumNonDatur, we can tackle double negation:

Unknown command

### Transposition

Combined with double negation, the transposition law ${\displaystyle *2.03}$ we already have yields the remaining three:

Unknown command

We now have ${\displaystyle ((\neg p)\rightarrow q)\rightarrow ((\neg p)\rightarrow (\neg (\neg q)))}$ . We transpose the consequent using our transposition law ${\displaystyle *2.03}$

Unknown command

to get ${\displaystyle ((\neg p)\rightarrow q)\rightarrow ((\neg q)\rightarrow (\neg (\neg p)))}$ . All that remains to do now is to eliminate the double negation.

Unknown command

The proofs of the next two theorems work similar but are actually easier due to a more favourable distribution of negations:

Unknown command

### Disjunction introduction

Next, we prove the disjunction introduction laws. Introduction from the left is just the Add axiom of principia, and a permutation yields the introduction from the right.

Unknown command

### Modus ponens law

Next, we prove a version of the modus ponens law with Assoc:

Unknown command

### Disjunction associativity

We now "repair" the extra twist in the Assoc axiom to get the actual associativity rules for disjunction:

Unknown command

### Expression building with disjunctions

Now we prove three helpful theorems regarding expression building with disjunctions, that is, they are companions to the Sum axiom. All these proofs proceed in two steps, using a syllogism to alter the consequent of Sum.

Unknown command

As first step, we simply take the Sum axiom,

Unknown command

and prove ${\displaystyle ((p\vee q)\rightarrow (p\vee r))\rightarrow ((p\vee q)\rightarrow (r\vee p))}$ as second step,

Unknown command

so that the result follows via a syllogism:

Unknown command

As first step, we take the Sum axiom with transposed consequent, that is ${\displaystyle (q\rightarrow r)\rightarrow ((\neg (p\vee r))\rightarrow (\neg (p\vee q)))}$ ,

Unknown command

As second step, we prove ${\displaystyle ((\neg (p\vee r))\rightarrow (\neg (p\vee q)))\rightarrow ((\neg (p\vee r))\rightarrow (\neg (q\vee p)))}$

Unknown command

Combining these two steps, the result follows by transposing the consequent back.

Unknown command

Finally, DisjunctionSummationRR follows directly from DisjunctionSummationRL in the same way.

Unknown command

The rule forms of all three are:

Unknown command

### Implication distribution theorem (if part)

Our next goal will be to prove the if part of the implication distribution theorem, ${\displaystyle (p\rightarrow (q\rightarrow r))\leftrightarrow ((p\rightarrow q)\rightarrow (p\rightarrow r))}$ . Given that implication is defined from disjunction and negation in Principia, it would seem more natural to use de Morgan's law for disjunction negation for that. However, we don't have that yet, and in fact, implication distribution is instrumental to prove the "principle of the factor" Fact below, which in turn is required for de Morgan's law. So what we shall do instead is to install equivalences such as ${\displaystyle p\leftrightarrow (\neg (\neg p))}$ , ${\displaystyle p\leftrightarrow p\vee p}$ and ${\displaystyle p\vee q\leftrightarrow q\vee p}$ in more or less deep subexpression in a long chain of theorems until we finally arrive at the desired result.

Unknown command

That is, we make ${\displaystyle (p\vee q)\rightarrow ((\neg (\neg p))\vee q)}$ from ${\displaystyle p\rightarrow (\neg (\neg q))}$ .

Unknown command

This gives us already the result, except that the last ${\displaystyle q}$ has been duplicated, ${\displaystyle q\vee q}$ . We remove the duplicate using the Taut axiom.

Unknown command

This is the same as ${\displaystyle *2.73}$ except for a permutation in the second antecedent. Since this permutation is nested four levels deep, some work is required. We begin with ${\displaystyle *2.73}$ ,

Unknown command

and prove the permutation ${\displaystyle ((p\vee q)\vee r)\rightarrow ((q\vee p)\vee r)}$ :

Unknown command

We can now install this permutation as an antecedent through a transposition. Then the theorem follows through a syllogism.

Unknown command

This is ${\displaystyle *2.74}$ , with ${\displaystyle q}$ replaced with ${\displaystyle \neg q}$ , plus some of the usual transformations.

Unknown command

This gives us ${\displaystyle (p\vee q)\rightarrow ((\neg q)\rightarrow p)}$ , which we can connect with ${\displaystyle *2.74}$ ,

Unknown command

so we get ${\displaystyle (p\vee q)\rightarrow (((p\vee (\neg q))\vee r)\rightarrow (p\vee r))}$ . The rest of the proof is now to effect the disjunctive associativity law in the second antecedent.

Unknown command

Theorem ${\displaystyle *2.77}$ is now precisely the if part of the implicational distribution law.

### Syllogism in the consequent

We prove a "syllogism in the consequent law", that is, ${\displaystyle (p\rightarrow (q\rightarrow r))\rightarrow ((p\rightarrow (r\rightarrow s))\rightarrow (p\rightarrow (q\rightarrow s)))}$ , which is useful for syllogisms depending on a common hypothesis. We first show a modus ponens law for disjunctions.

Unknown command

This gives us ${\displaystyle (q\vee r)\rightarrow ((\neg r)\rightarrow q)}$ . The theorem follows now by a summation:

Unknown command

Next, we prove a three terms summation law:

Unknown command

This gives us ${\displaystyle (q\rightarrow (r\rightarrow s))\rightarrow ((p\vee q)\rightarrow (p\vee (r\rightarrow s)))}$ , so we only need to distribute the ${\displaystyle p}$ over ${\displaystyle r\rightarrow s}$ :

Unknown command

Combining ${\displaystyle *2.8}$ and ${\displaystyle *2.81}$ , we get

Unknown command

from which we can immediately derive our new syllogism law:

Unknown command

### Implication distribution theorem (only-if part)

Next we prove the only if part of the implicational distribution law (the if part of which we proved in ${\displaystyle *2.77}$ ). We start with a simple consequence of ${\displaystyle *2.53}$ and the converse of ${\displaystyle *2.53}$ :

Unknown command

The meat of our desired result is ${\displaystyle ((p\vee q)\rightarrow (p\vee r))\rightarrow (p\vee (q\rightarrow r))}$ (${\displaystyle *2.85}$ ). It differs only by being partly expressed in terms of disjunction instead of implication. Each of the following thm's is just an intermediate step in proving ${\displaystyle *2.85}$ :

Unknown command

From this follows the only if part of the implicational distribution law:

Unknown command

## Conjunction

In this section we prove statements involving conjunction ${\displaystyle p\wedge q}$ . Recall that conjunction is defined by ${\displaystyle \neg ((\neg p)\vee (\neg q))}$ . Our first theorem is the combination of two statements to a conjunction.

Unknown command

The trick is now to write ${\displaystyle (\neg p)\vee (\neg q)\vee \ldots }$ as ${\displaystyle p\rightarrow (q\rightarrow \ldots )}$ :

Unknown command

We also provide a commuted version:

Unknown command

We can prove the commutative law for conjunction from Perm using transpositions:

Unknown command

Next, we prove the negation of ${\displaystyle \bot }$ :

Unknown command

### Conjunction elimination

Next, we prove the conjunction elimination theorems.

Unknown command

This gives us ${\displaystyle ((\neg p)\vee (\neg q))\vee p}$ . All we need now is a double negation of the left bracket.

Unknown command

### Import and export

We now prove Peano's import and export principles. We begin with exportation:

Unknown command

To shift the bracket right, we combine transposition and the Comm axiom to get ${\displaystyle ((p\wedge q)\rightarrow r)\rightarrow (p\rightarrow ((\neg r)\rightarrow (\neg q)))}$ :

Unknown command

What remains to do now is to install a transposition of ${\displaystyle r}$ with ${\displaystyle q}$ :

Unknown command

Importation is simpler as the conjunction is in the consequent this time:

Unknown command

We can use importation to prove syllogisms in conjunction form:

Unknown command

Import and export also give us another transposition theorem, ${\displaystyle *3.37}$ (which we prove in several steps):

Unknown command

### Composition

Next, we prove Comp, the principle of composition,

Unknown command

### Disjunction composition

Conjunction composition has an analogue for disjunction (${\displaystyle *3.44}$ ), which we prove in several steps:

Unknown command

### Principle of the factor

Finally, we prove Peano's principle of the factor, called Fact by Whitehead and Russell. It complements the Sum axiom and its companion theorems. Two consequences are partial builder theorems for conjunction and disjunction.

Unknown command

We prove this theorem in two steps. First we use the left hand side of the antecedent to deduce ${\displaystyle ((p\rightarrow r)\wedge (q\rightarrow s))\rightarrow ((p\wedge q)\rightarrow (q\wedge r))}$ :

Unknown command

Now we do the same with the right hand side of the antecedent to get ${\displaystyle ((p\rightarrow r)\wedge (q\rightarrow s))\rightarrow ((q\wedge r)\rightarrow (r\wedge s))}$ . The theorem then follows from a syllogism in the consequent.

Unknown command

This theorem follows exactly as ConjunctionMultiplication, except that we use the Sum type theorem DisjunctionSummationRL instead of Fact and ${\displaystyle *3.22}$ .

Unknown command

## Biconditional

In Principia, the biconditional ${\displaystyle p\leftrightarrow q}$ is defined simply as ${\displaystyle (p\rightarrow q)\wedge (q\rightarrow p)}$ , so our combination and elimination theorems for conjunction immediately yield the corresponding introduction and elimination rules for the biconditional.

Unknown command

### Negation

In order to prove the negation function theorem ${\displaystyle (p\leftrightarrow q)\leftrightarrow ((\neg p)\leftrightarrow (\neg q))}$ , we combine the two transposition laws ${\displaystyle *2.16}$ and ${\displaystyle *2.17}$ :

Unknown command

This gives us ${\displaystyle (p\leftrightarrow q)\rightarrow ((\neg q)\leftrightarrow (\neg p))}$ , the right hand side of which must be permuted:

Unknown command

Now the same again for ${\displaystyle *2.17}$ :

Unknown command

### Biconditionalized transposition laws

We proved various transposition laws for the conditional earlier. Now we provide some for the biconditional, starting with ${\displaystyle (p\leftrightarrow (\neg q))\leftrightarrow (q\leftrightarrow (\neg p))}$ . The proof is a straightforward application of the conditional transposition laws, but has to prove each direction of the biconditionals.

Unknown command

Unknown command

### Some more deduction tools

The next two theorems, ${\displaystyle *4.14}$ and ${\displaystyle *4.15}$ , enable making some deductions involving biconditionals and conjunctions. They are similar to ${\displaystyle *3.37}$ but extend it.

The idea behind the proof of the converse of ${\displaystyle *3.37}$ below is quite simple: ${\displaystyle *3.37}$ becomes its own converse (modulo some double negation) when substituted with some negated terms. The rest of the proof is just getting rid of the double negation.

Unknown command

The next theorem, ${\displaystyle (((p\wedge q)\rightarrow (\neg r))\leftrightarrow ((q\wedge r)\rightarrow (\neg p)))}$ , is similar. Until we have built up more of the biconditional machinery, it will be easier to prove each implication separately. The proof is a straightforward substitution together with a commutation of the initial ${\displaystyle p\wedge q}$ . As with the previous proof, most of the length of the proof consists of building up formulas to handle things like removing deeply nested double negation, a process which will get (somewhat) easier later.

Unknown command

### Reflexive, symmetric, and transitive

The biconditional has these three properties (which correspond to those defining an equivalence relation).

Unknown command

The proof of biconditional transitivity is somewhat more complicated. The antecedent contains essentially four disjunctions factors. Each of them has to be picked out and applied:

Unknown command

First factor:

Unknown command

Third factor:

Unknown command

Fourth factor:

Unknown command

Second factor:

Unknown command

Another easy builder theorem:

Unknown command

### More theorems stated using the biconditional

Some more theorems where we have proved implications in both directions, but can now express them using the biconditional:

Unknown command

### Algebraic laws for disjunction and conjunction

Some of the theorems of the propositional calculus can be thought of as analagous to those of other algebras, showing properties such as commutivity and associativity. Although Whitehead and Russell think this concept was overemphasized in their day,[2] they do provide theorems which represent algebraic properties.

#### Idempotence

Idempotence for disjunction and conjunction are perhaps the most interesting, as they cause the biggest differences between this algebra and many other algebras:[3]

Unknown command

To prove conjunction idempotence, we first catch up on a few basic implication theorems we haven't needed until now:

Unknown command

That gives us ${\displaystyle ((p\vee (p\vee q)\rightarrow ((p\vee p)\vee q))}$ and we just need to eliminate the extra ${\displaystyle p\vee p}$ :

Unknown command

Idempotence is also expressed in the following rules.

Unknown command

#### Commutativity

We already have commutativity of disjunction and conjunction, but just need to express them using the biconditional:

Unknown command

#### Associativity

Both disjunction and conjunction are associative:

Unknown command

The link between ${\displaystyle *4.15}$ (which has some implications and negations) and the conjunctions in ConjunctionAssociativity may not be apparent, but follows from the definitions of conjunction and implication.

Unknown command

We already provided rules for associating disjunctions; here are the corresponding ones for conjunctions:

Unknown command

### Substitution and builders

If ${\displaystyle p\leftrightarrow q}$ , then we want to be able to substitute ${\displaystyle p}$ for ${\displaystyle q}$ in a theorem to get a new theorem.[4] The mechanism which we are working towards, in Interface:Classical propositional calculus, is provided by addNegation, removeNegation, buildImplication, buildDisjunction, buildConjunction, and buildBiconditional. Those rules do not eliminate the need for a proof to build up the expressions embodying the substitution, but they reduce the process of constructing such a proof to a familiar (if perhaps tedious) pattern. We already proved addNegation and removeNegation, and we're now ready to prove the rest.

#### Conjunction

The proof proceeds by expanding ${\displaystyle (p\leftrightarrow q)\wedge (r\leftrightarrow s)}$ into four implications, rearranging them using associativity and commutativity, and applying ConjunctionMultiplication to each half.

First, the rearrangement we need is ConjunctionFunction-1, known as an4 in metamath.[5]

Unknown command

#### Disjunction

This is just like the theorem for conjunction, except that we build on the partial builder theorem DisjunctionSummation instead of ConjunctionMultiplication:

Unknown command

#### Implication

The builder for implication is a simple consequence of the builder for disjunction together with the equivalence of ${\displaystyle (\neg p)\leftrightarrow (\neg q)}$ and ${\displaystyle p\leftrightarrow q}$ .

Unknown command

#### Biconditional

To prove the biconditional builder, we need ${\displaystyle ((p\rightarrow r)\wedge (r\rightarrow p))\leftrightarrow ((q\rightarrow s)\wedge (s\rightarrow q))}$ . As this is an equivalence of conjunctions, we'll get it with the conjunction builder. The equivalences needed to apply the conjunction builder will come from the implication builder (and conjunction commutativity in one of the two directions).

Unknown command

### Unidirectional builders

The builders which we just proved start with biconditionals. If we only have implications, there is a similar set of builders (which, of course, only provide implications, not biconditionals, in the consequent). Here we summarize the ones we have already proved, and prove a few more.

#### Negation

The Transposition theorem, ${\displaystyle (p\rightarrow q)\leftrightarrow ((\neg q)\rightarrow (\neg p))}$ , is a unidirectional negation builder.

#### Disjunction

The disjunction summation theorem, ${\displaystyle ((p\rightarrow r)\wedge (q\rightarrow s))\rightarrow ((p\vee q)\rightarrow (r\vee s))}$ , is the general form of the unidirectional disjunction builder.

We also provide convenience theorems for cases in which one of the implications is simply ${\displaystyle r\rightarrow r}$ , and where there might be a commutation in one of the disjunctions. All of these are already proved (DisjunctionSummationLR, disjoinLR, and so on), so the only thing we need to do here is provide DisjunctionSummationLL as a new name for the Sum axiom.

Unknown command

#### Conjunction

The conjunction multiplication theorem, ${\displaystyle ((p\rightarrow r)\wedge (q\rightarrow s))\rightarrow ((p\wedge q)\rightarrow (r\wedge s))}$ , is the general form of the unidirectional disjunction builder.

Here we add convenience theorems for cases in which one of the implications is simply ${\displaystyle r\rightarrow r}$ , and where there might be a commutation in one of the conjunctions.

ConjunctionMultiplicationRR is just a new name for the Fact theorem; the rest could either be proved from Fact and commutativity, or as special cases of ConjunctionMultiplication.

Unknown command

#### Implication

The first two unidirectional implication builders came early on, CommonAntecedentAddition and CommonConsequentAddition.

The general unidirectional implication builder would be ${\displaystyle ((p\rightarrow q)\wedge (r\rightarrow s))\rightarrow ((q\rightarrow r)\rightarrow (p\rightarrow s))}$ .[6]

#### Biconditional

There is no unidirectional builder for the biconditional.

### Distributive laws

We prove two distributive laws. The first one, ${\displaystyle ((p\wedge (q\vee r))\leftrightarrow ((p\wedge q)\vee (p\wedge r))}$ , is analogous to the distributive law in well-known algebras such as the real numbers, ${\displaystyle i\cdot (j+k)=i\cdot j+i\cdot k}$ (if one thinks of conjunction as being like multiplication and disjunction as being like addition).

Unknown command

The second distributive law, ${\displaystyle (p\vee (q\wedge r))\leftrightarrow ((p\vee q)\wedge (p\vee r))}$ , has no analogue in ordinary algebra.[7]

Unknown command

We also supply commuted versions of both laws and some rules:

Unknown command

### De Morgan's laws

Since the definition of conjunction in Principia is based on De Morgan's laws, the laws themselves are not hard to prove.

Unknown command

### Biconditional and conjunction

A true conjunct does not affect the truth of a proposition, or in symbols q → (p ↔ p ∧ q).

Before we prove that statement itself, we prove two equivalences involving implications and conjunctions. We will be using them in the proof of the result stated above.

Unknown command

We start with the forward implication. We stick p → p on the proof stack, and then start with (p → p) ∧ (p → q) → (p → p ∧ q)

Unknown command

Exporting and detaching p → p finishes the forward implication.

Unknown command

The reverse direction is even easier.

Unknown command

We first stick two things on the stack for later use.

Unknown command

Now we start with (p ∧ q → p) → ((p → p ∧ q) → (p ↔ p ∧ q)), and then detach the antecedent (a theorem) to give (p → p ∧ q) → (p ↔ p ∧ q)

Unknown command

The converse of that statement, (p ↔ p ∧ q) → (p → p ∧ q), is even simpler. So combining the two, we get (p → p ∧ q) ↔ (p ↔ p ∧ q)

Unknown command

The only thing left is to combine with (p → q) ↔ (p → p ∧ q) which we left on the proof stack.

Unknown command

### Biconditionalized composition

We earlier proved composition laws for disjunction and conjunction:

• ${\displaystyle ((p\rightarrow r)\wedge (q\rightarrow r))\rightarrow ((p\vee q)\rightarrow r))}$
• ${\displaystyle ((p\rightarrow q)\wedge (p\rightarrow r))\rightarrow (p\rightarrow (q\wedge r))}$

The converses, while less interesting, are also true, and we prove them now.

Unknown command

### Weakening of biconditional to disjunction

We've already dealt with weakening the biconditional to an implication. This section just has the same theorems, or slight variations thereof, phrased in terms of disjunction instead of implication.

Unknown command

## Case Elimination

Proofs often show that one of several cases must apply, and then prove the desired proposition for each case. Here we provide one form of this, where there are two cases: ${\displaystyle p}$ and ${\displaystyle (\neg p)}$ . Note that in principle, it is always possible to reduce the handling of multiple cases to repeated handling of two cases.

Unknown command

## Modus ponens and modus tollens

Now that we have import, we can derive the version of the modus ponens law which Interface:Classical propositional calculus expects:

Unknown command

Modus tollens is just a combination of modus ponens and transposition.

Unknown command

Interface:Classical propositional calculus gives the name Tautology to (p ∨ (¬ p)) ↔ (⊤) and Contradiction to (p ∧ (¬ p)) ↔ (⊥). They are somewhat more subtle than they appear (and in particular are not just trivial consequences of our definitions of and ), because the variable which appears in the definition of or is not the same as the one in the Tautology or Contradiction theorem. We therefore prove them as consequences of the notion that two true statements are equivalent (${\displaystyle *5.1}$ ) or that two false statements are equivalent (${\displaystyle *5.21}$ ).

Unknown command

Along the same lines is ${\displaystyle (\neg p)\leftrightarrow (p\rightarrow (\bot ))}$ .

Unknown command

## Relationships between connectives

Here we express implication in terms of disjunction, biconditional in terms of implication, etc.

### Biconditional and implications

These are all straightforward because we define the biconditional as a conjunction of two implications.

Unknown command

### Biconditional as disjunction of two conjunctions

One way of looking at ${\displaystyle p\leftrightarrow q}$ is "both p and q are true, or neither are true", or in symbols, ${\displaystyle (p\leftrightarrow q)\leftrightarrow ((p\wedge q)\vee ((\neg p)\wedge (\neg q)))}$ . We prove this via a fairly long string of simpler propositions.

Unknown command

At this point we have ${\displaystyle (p\rightarrow q)\vee (p\leftrightarrow (\neg q))}$ . We'll come back to that, after we prove ${\displaystyle (q\rightarrow p)\vee (p\leftrightarrow (\neg q))}$ :

Unknown command

Now we have ${\displaystyle (p\rightarrow q)\vee (p\leftrightarrow (\neg q))}$ and ${\displaystyle (q\rightarrow p)\vee (p\leftrightarrow (\neg q))}$ on the proof stack. It is now enough to join those with a conjunction and apply the distributive law:

Unknown command

At this point we have ${\displaystyle (\neg q)\wedge (\neg p)}$ , and we just need to apply DeMorgan's law and introduce double negation to get ${\displaystyle (\neg ((\neg (\neg q))\vee p))}$ .

Unknown command

We're much closer than it may appear (because JHilbert automatically applies definitions), but other than two applications of DeMorgan's law, it is just the definitions of implication and biconditional: from ${\displaystyle (p\leftrightarrow q)\rightarrow ((p\rightarrow (\neg q))\rightarrow (\neg ((\neg q)\rightarrow p)))}$ the definition of implication yields ${\displaystyle (p\leftrightarrow q)\rightarrow ((\neg (p\rightarrow (\neg q)))\vee (\neg ((\neg q)\rightarrow p)))}$

Unknown command

Now we have ${\displaystyle (p\leftrightarrow q)\rightarrow (\neg ((p\rightarrow (\neg q))\wedge ((\neg q)\rightarrow p)))}$ and hence ${\displaystyle (p\leftrightarrow q)\rightarrow (\neg (p\leftrightarrow (\neg q)))}$ by the definition of the biconditional. A final appeal to the definition of implication yields ${\displaystyle (\neg (p\leftrightarrow q))\vee (\neg (p\leftrightarrow (\neg q)))}$ .

Unknown command

One way to see ${\displaystyle *5.18}$ is as a relationship between the biconditional and the exclusive or. One way to express an exclusive or is ${\displaystyle p\leftrightarrow (\neg q)}$ , and seen this way, ${\displaystyle *5.18}$ states that the biconditional is the negation of the exclusive or:

Unknown command

At this point we have (applying the definition of implication) ${\displaystyle (\neg ((\neg p)\vee q))\vee (\neg ((\neg q)\vee p))}$ and we need (applying the definition of conjunction) ${\displaystyle (\neg ((\neg p)\vee (\neg (\neg q))))\vee (\neg ((\neg q)\vee (\neg (\neg p))))}$ . So we just need to fix the double negation.

Unknown command

We now have ${\displaystyle (p\leftrightarrow q)\leftrightarrow ((p\wedge (\neg (\neg q)))\vee ((\neg q)\wedge (\neg p)))}$ , so we just need to fix the double negation and commute the second conjunction.

Unknown command

### Biconditional as conjunction of two disjunctions

This one follows immediately from our definitions of biconditional and implication, and commutativity.

Unknown command

### Implications and disjunctions

The relationship between implication and disjunction is just our definition of implication, or an easy consequence thereof.

Unknown command

## Implication distribution over biconditional

Antecedent distribution says that we can distribute the antecedent in a formula of the form p → (q → r). Here we prove a similar result for p → (q ↔ r).

Unknown command

We split (p → q) ↔ (p → r) into two implications:

Unknown command

Then we apply AntecedentDistribution to each one,

Unknown command

and combine them.

Unknown command

The left hand side from buildConjunction was ((p → q) → (p → r)) ∧ ((p → r) → (p → q)), so we are ready to apply transitivity there.

Unknown command

The right hand side from buildConjunction was (p → (q → r)) ∧ (p → (r → q)), which we first transform to p → ((q → r) ∧ (r → q)),

Unknown command

and then to p → (q ↔ r).

Unknown command

We now have our desired result except the two sides are interchanged.

Unknown command

That's it! We're ready to export our theorems to Interface:Principia Mathematica propositional logic theorems. That interface also requires us to define the alias formula for wffs.

Unknown command

We also export Interface:Law of the excluded middle, just to emphasize that the law of the excluded middle is a theorem of classical propositional logic.

Unknown command

## References

1. A. Whitehead, B. Russell, Principia Mathematica, Cambridge University Press, 1910.
2. Whitehead and Russell, loc. cit., p. 120
3. Whitehead and Russell, loc. cit., p. 121
4. Whitehead and Russell, loc. cit., p. 120
5. an4 in set.mm, metamath.org, accessed February 15, 2010
6. imim12i in set.mm, metamath.org, accessed February 15, 2010
7. Whitehead and Russell, loc. cit., p. 124