User:Lord Farin/Sandbox/Completeness/Replacement H2

Theorem
Let $\mathcal L$ be the language of propositional logic.

Let $\mathbf A, \mathbf A'$ be WFFs of $\mathcal L$.

Let $\mathbf B$ be another WFF.

Suppose that $\mathbf A \iff \mathbf A'$ is a theorem for $\mathscr H_2$, Instance 2 of the Hilbert proof systems.

Then:


 * $\mathbf B \iff \mathbf B \paren{ \mathbf A' \mathbin{//} \mathbf A }$

is also a theorem of $\mathscr H_2$, where $\mathbf B \paren{ \mathbf A' \mathbin{//} \mathbf A }$ denotes the substitution of $\mathbf A'$ for $\mathbf A$ in $\mathbf B$.

Proof
If $\mathbf B = \mathbf A$, then the result is immediate.

Otherwise, proceed by the Principle of Structural Induction on $\mathbf B$.

If $\mathbf B = p$ for some propositional symbol $p$, then:


 * $\mathbf B \iff \mathbf B \paren{ \mathbf A' \mathbin{//} \mathbf A }$

reduces to:


 * $p \iff p$

which is the statement of Biconditional is Reflexive.

If $\mathbf B = \mathbf B_1 \lor \mathbf B_2$, then since $\mathbf B \ne \mathbf A$:


 * $\mathbf B \paren{ \mathbf A' \mathbin{//} \mathbf A } = \mathbf B_1 \paren{ \mathbf A' \mathbin{//} \mathbf A } \lor \mathbf B_2 \paren{ \mathbf A' \mathbin{//} \mathbf A }$

Using $RST 4$ and commutation the desired equivalence readily follows.

If $\mathbf B = \neg \mathbf B_1$, then since $\mathbf B \ne \mathbf A$:


 * $\mathbf B \paren{ \mathbf A' \mathbin{//} \mathbf A } = \neg \mathbf B_1 \paren{ \mathbf A' \mathbin{//} \mathbf A }$

Using the rule of contraposition, the desired equivalence readily follows.

By $RST 2$, the cases $\land$, $\implies$ and $\iff$ are covered in terms of $\lor$ and $\neg$.

Hence the result, by the Principle of Structural Induction.