Metamath Proof Explorer


Theorem 2rexrsb

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

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

Proof

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