Equality implies Substitution

Theorem
Let $\phi ( x )$ denote a Well-Formed Formula which contains $x$ as a free variable.

Then the following are tautologies:


 * $\forall x: ( \phi ( x ) \iff \exists y: ( y = x \land \phi ( y ) ) )$
 * $\forall x: ( \phi ( x ) \iff \forall y: ( y = x \implies \phi ( y ) ) )$

Note that when $y$ is substituted for $x$ in either formula, it is false in general; compare Confusion of Bound Variables.

Proof
$\forall x: ( ( \exists y: y = x \land \forall y: ( y = x \implies \phi ( x ) ) ) \implies \exists y: ( y = x \land \phi ( x ) ) )$


 * $\forall x: x = x$

$\implies \forall x: \exists y: y = x$

$\implies \forall x: ( \forall y: ( y = x \implies \phi ( x ) ) \implies \exists y: ( y = x \land \phi ( x ) ) )$


 * $\forall x,y: ( ( y = x \land \phi ( y ) ) \implies \phi ( x ) )$

$\implies \forall x: ( \exists y: ( y = x \land \phi ( y ) ) \implies \phi ( x ) )$ (1)

From the first two lemmas, we can also derive the following statement. These two statements comprise one direction of the assertion:


 * $\forall x: ( \forall y: ( y = x \implies \phi ( y ) ) \implies \phi ( x ) ) )$ (2)

Similarly:


 * $\forall x,y: ( \phi ( x ) \implies ( y = x \implies \phi ( y ) ) )$

$\implies \forall x: ( \phi ( x ) \implies \forall y: ( y = x \implies \phi ( y ) ) )$ (3)

$\implies \forall x: ( \phi ( x ) \implies \exists y: ( y = x \land \phi ( y ) ) )$ (4)

The above two statements comprise the other direction of the biconditional assertions. Together, (1), (2), (3), and (4) prove the two assertions.

Source

 * : $\S 6.1$
 * : $\S 6.2$