Metamath Proof Explorer


Theorem 2rexsb

Description: An equivalent expression for double restricted existence, analogous to rexsb . (Contributed by Alexander van der Vekens, 1-Jul-2017)

Ref Expression
Assertion 2rexsb ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∃ 𝑧𝐴𝑤𝐵𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )

Proof

Step Hyp Ref Expression
1 rexsb ( ∃ 𝑦𝐵 𝜑 ↔ ∃ 𝑤𝐵𝑦 ( 𝑦 = 𝑤𝜑 ) )
2 1 rexbii ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∃ 𝑥𝐴𝑤𝐵𝑦 ( 𝑦 = 𝑤𝜑 ) )
3 rexcom ( ∃ 𝑥𝐴𝑤𝐵𝑦 ( 𝑦 = 𝑤𝜑 ) ↔ ∃ 𝑤𝐵𝑥𝐴𝑦 ( 𝑦 = 𝑤𝜑 ) )
4 2 3 bitri ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∃ 𝑤𝐵𝑥𝐴𝑦 ( 𝑦 = 𝑤𝜑 ) )
5 rexsb ( ∃ 𝑥𝐴𝑦 ( 𝑦 = 𝑤𝜑 ) ↔ ∃ 𝑧𝐴𝑥 ( 𝑥 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜑 ) ) )
6 impexp ( ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) ↔ ( 𝑥 = 𝑧 → ( 𝑦 = 𝑤𝜑 ) ) )
7 6 albii ( ∀ 𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) ↔ ∀ 𝑦 ( 𝑥 = 𝑧 → ( 𝑦 = 𝑤𝜑 ) ) )
8 19.21v ( ∀ 𝑦 ( 𝑥 = 𝑧 → ( 𝑦 = 𝑤𝜑 ) ) ↔ ( 𝑥 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜑 ) ) )
9 7 8 bitr2i ( ( 𝑥 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜑 ) ) ↔ ∀ 𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )
10 9 albii ( ∀ 𝑥 ( 𝑥 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜑 ) ) ↔ ∀ 𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )
11 10 rexbii ( ∃ 𝑧𝐴𝑥 ( 𝑥 = 𝑧 → ∀ 𝑦 ( 𝑦 = 𝑤𝜑 ) ) ↔ ∃ 𝑧𝐴𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )
12 5 11 bitri ( ∃ 𝑥𝐴𝑦 ( 𝑦 = 𝑤𝜑 ) ↔ ∃ 𝑧𝐴𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )
13 12 rexbii ( ∃ 𝑤𝐵𝑥𝐴𝑦 ( 𝑦 = 𝑤𝜑 ) ↔ ∃ 𝑤𝐵𝑧𝐴𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )
14 rexcom ( ∃ 𝑤𝐵𝑧𝐴𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) ↔ ∃ 𝑧𝐴𝑤𝐵𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )
15 13 14 bitri ( ∃ 𝑤𝐵𝑥𝐴𝑦 ( 𝑦 = 𝑤𝜑 ) ↔ ∃ 𝑧𝐴𝑤𝐵𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )
16 4 15 bitri ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∃ 𝑧𝐴𝑤𝐵𝑥𝑦 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → 𝜑 ) )