Metamath Proof Explorer


Theorem axsepg2

Description: A generalization of ax-sep in which y and z need not be distinct. See also axsepg which instead allows z to occur in ph . Usage of this theorem is discouraged because it depends on ax-13 . (Contributed by BTernaryTau, 3-Aug-2025) (New usage is discouraged.)

Ref Expression
Assertion axsepg2 𝑦𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) )

Proof

Step Hyp Ref Expression
1 nfv 𝑥 ¬ ∀ 𝑦 𝑦 = 𝑧
2 nfvd ( ¬ ∀ 𝑦 𝑦 = 𝑧 → Ⅎ 𝑦 𝑥𝑤 )
3 nfcvf ( ¬ ∀ 𝑦 𝑦 = 𝑧 𝑦 𝑧 )
4 3 nfcrd ( ¬ ∀ 𝑦 𝑦 = 𝑧 → Ⅎ 𝑦 𝑥𝑧 )
5 nfvd ( ¬ ∀ 𝑦 𝑦 = 𝑧 → Ⅎ 𝑦 𝜑 )
6 4 5 nfand ( ¬ ∀ 𝑦 𝑦 = 𝑧 → Ⅎ 𝑦 ( 𝑥𝑧𝜑 ) )
7 2 6 nfbid ( ¬ ∀ 𝑦 𝑦 = 𝑧 → Ⅎ 𝑦 ( 𝑥𝑤 ↔ ( 𝑥𝑧𝜑 ) ) )
8 1 7 nfald ( ¬ ∀ 𝑦 𝑦 = 𝑧 → Ⅎ 𝑦𝑥 ( 𝑥𝑤 ↔ ( 𝑥𝑧𝜑 ) ) )
9 nfvd ( ¬ ∀ 𝑦 𝑦 = 𝑧 → Ⅎ 𝑤𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) )
10 elequ2 ( 𝑤 = 𝑦 → ( 𝑥𝑤𝑥𝑦 ) )
11 10 bibi1d ( 𝑤 = 𝑦 → ( ( 𝑥𝑤 ↔ ( 𝑥𝑧𝜑 ) ) ↔ ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) )
12 11 biimpd ( 𝑤 = 𝑦 → ( ( 𝑥𝑤 ↔ ( 𝑥𝑧𝜑 ) ) → ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) )
13 12 alimdv ( 𝑤 = 𝑦 → ( ∀ 𝑥 ( 𝑥𝑤 ↔ ( 𝑥𝑧𝜑 ) ) → ∀ 𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) )
14 13 a1i ( ¬ ∀ 𝑦 𝑦 = 𝑧 → ( 𝑤 = 𝑦 → ( ∀ 𝑥 ( 𝑥𝑤 ↔ ( 𝑥𝑧𝜑 ) ) → ∀ 𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) ) )
15 elequ2 ( 𝑦 = 𝑧 → ( 𝑥𝑦𝑥𝑧 ) )
16 15 anbi1d ( 𝑦 = 𝑧 → ( ( 𝑥𝑦𝜑 ) ↔ ( 𝑥𝑧𝜑 ) ) )
17 16 bibi2d ( 𝑦 = 𝑧 → ( ( 𝑥𝑦 ↔ ( 𝑥𝑦𝜑 ) ) ↔ ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) )
18 17 biimpd ( 𝑦 = 𝑧 → ( ( 𝑥𝑦 ↔ ( 𝑥𝑦𝜑 ) ) → ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) )
19 18 alimdv ( 𝑦 = 𝑧 → ( ∀ 𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑦𝜑 ) ) → ∀ 𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) )
20 19 sps ( ∀ 𝑦 𝑦 = 𝑧 → ( ∀ 𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑦𝜑 ) ) → ∀ 𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) ) ) )
21 ax-sep 𝑤𝑥 ( 𝑥𝑤 ↔ ( 𝑥𝑧𝜑 ) )
22 ax-nul 𝑦𝑥 ¬ 𝑥𝑦
23 id ( ¬ 𝑥𝑦 → ¬ 𝑥𝑦 )
24 23 bianfd ( ¬ 𝑥𝑦 → ( 𝑥𝑦 ↔ ( 𝑥𝑦𝜑 ) ) )
25 24 alimi ( ∀ 𝑥 ¬ 𝑥𝑦 → ∀ 𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑦𝜑 ) ) )
26 22 25 eximii 𝑦𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑦𝜑 ) )
27 8 9 14 20 21 26 dvelimexcasei 𝑦𝑥 ( 𝑥𝑦 ↔ ( 𝑥𝑧𝜑 ) )