Metamath Proof Explorer


Theorem ax12wdemo

Description: Example of an application of ax12w that results in an instance of ax-12 for a contrived formula with mixed free and bound variables, ( x e. y /\ A. x z e. x /\ A. y A. z y e. x ) , in place of ph . The proof illustrates bound variable renaming with cbvalvw to obtain fresh variables to avoid distinct variable clashes. Uses only Tarski's FOL axiom schemes. (Contributed by NM, 14-Apr-2017)

Ref Expression
Assertion ax12wdemo ( 𝑥 = 𝑦 → ( ∀ 𝑦 ( 𝑥𝑦 ∧ ∀ 𝑥 𝑧𝑥 ∧ ∀ 𝑦𝑧 𝑦𝑥 ) → ∀ 𝑥 ( 𝑥 = 𝑦 → ( 𝑥𝑦 ∧ ∀ 𝑥 𝑧𝑥 ∧ ∀ 𝑦𝑧 𝑦𝑥 ) ) ) )

Proof

Step Hyp Ref Expression
1 elequ1 ( 𝑥 = 𝑦 → ( 𝑥𝑦𝑦𝑦 ) )
2 elequ2 ( 𝑥 = 𝑤 → ( 𝑧𝑥𝑧𝑤 ) )
3 2 cbvalvw ( ∀ 𝑥 𝑧𝑥 ↔ ∀ 𝑤 𝑧𝑤 )
4 3 a1i ( 𝑥 = 𝑦 → ( ∀ 𝑥 𝑧𝑥 ↔ ∀ 𝑤 𝑧𝑤 ) )
5 elequ1 ( 𝑦 = 𝑣 → ( 𝑦𝑥𝑣𝑥 ) )
6 5 albidv ( 𝑦 = 𝑣 → ( ∀ 𝑧 𝑦𝑥 ↔ ∀ 𝑧 𝑣𝑥 ) )
7 6 cbvalvw ( ∀ 𝑦𝑧 𝑦𝑥 ↔ ∀ 𝑣𝑧 𝑣𝑥 )
8 elequ2 ( 𝑥 = 𝑦 → ( 𝑣𝑥𝑣𝑦 ) )
9 8 albidv ( 𝑥 = 𝑦 → ( ∀ 𝑧 𝑣𝑥 ↔ ∀ 𝑧 𝑣𝑦 ) )
10 9 albidv ( 𝑥 = 𝑦 → ( ∀ 𝑣𝑧 𝑣𝑥 ↔ ∀ 𝑣𝑧 𝑣𝑦 ) )
11 7 10 syl5bb ( 𝑥 = 𝑦 → ( ∀ 𝑦𝑧 𝑦𝑥 ↔ ∀ 𝑣𝑧 𝑣𝑦 ) )
12 1 4 11 3anbi123d ( 𝑥 = 𝑦 → ( ( 𝑥𝑦 ∧ ∀ 𝑥 𝑧𝑥 ∧ ∀ 𝑦𝑧 𝑦𝑥 ) ↔ ( 𝑦𝑦 ∧ ∀ 𝑤 𝑧𝑤 ∧ ∀ 𝑣𝑧 𝑣𝑦 ) ) )
13 elequ2 ( 𝑦 = 𝑣 → ( 𝑥𝑦𝑥𝑣 ) )
14 7 a1i ( 𝑦 = 𝑣 → ( ∀ 𝑦𝑧 𝑦𝑥 ↔ ∀ 𝑣𝑧 𝑣𝑥 ) )
15 13 14 3anbi13d ( 𝑦 = 𝑣 → ( ( 𝑥𝑦 ∧ ∀ 𝑥 𝑧𝑥 ∧ ∀ 𝑦𝑧 𝑦𝑥 ) ↔ ( 𝑥𝑣 ∧ ∀ 𝑥 𝑧𝑥 ∧ ∀ 𝑣𝑧 𝑣𝑥 ) ) )
16 12 15 ax12w ( 𝑥 = 𝑦 → ( ∀ 𝑦 ( 𝑥𝑦 ∧ ∀ 𝑥 𝑧𝑥 ∧ ∀ 𝑦𝑧 𝑦𝑥 ) → ∀ 𝑥 ( 𝑥 = 𝑦 → ( 𝑥𝑦 ∧ ∀ 𝑥 𝑧𝑥 ∧ ∀ 𝑦𝑧 𝑦𝑥 ) ) ) )