Metamath Proof Explorer


Theorem 2reu5

Description: Double restricted existential uniqueness in terms of restricted existential quantification and restricted universal quantification, analogous to 2eu5 and reu3 . (Contributed by Alexander van der Vekens, 17-Jun-2017)

Ref Expression
Assertion 2reu5 ( ( ∃! 𝑥𝐴 ∃! 𝑦𝐵 𝜑 ∧ ∀ 𝑥𝐴 ∃* 𝑦𝐵 𝜑 ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝐴𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )

Proof

Step Hyp Ref Expression
1 r19.29r ( ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) → ∃ 𝑥𝐴 ( ∃ 𝑦𝐵 𝜑 ∧ ∀ 𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
2 r19.29r ( ( ∃ 𝑦𝐵 𝜑 ∧ ∀ 𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) → ∃ 𝑦𝐵 ( 𝜑 ∧ ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
3 2 reximi ( ∃ 𝑥𝐴 ( ∃ 𝑦𝐵 𝜑 ∧ ∀ 𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) → ∃ 𝑥𝐴𝑦𝐵 ( 𝜑 ∧ ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
4 pm3.35 ( ( 𝜑 ∧ ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) )
5 4 reximi ( ∃ 𝑦𝐵 ( 𝜑 ∧ ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) → ∃ 𝑦𝐵 ( 𝑥 = 𝑧𝑦 = 𝑤 ) )
6 5 reximi ( ∃ 𝑥𝐴𝑦𝐵 ( 𝜑 ∧ ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) → ∃ 𝑥𝐴𝑦𝐵 ( 𝑥 = 𝑧𝑦 = 𝑤 ) )
7 eleq1w ( 𝑥 = 𝑧 → ( 𝑥𝐴𝑧𝐴 ) )
8 eleq1w ( 𝑦 = 𝑤 → ( 𝑦𝐵𝑤𝐵 ) )
9 7 8 bi2anan9 ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → ( ( 𝑥𝐴𝑦𝐵 ) ↔ ( 𝑧𝐴𝑤𝐵 ) ) )
10 9 biimpac ( ( ( 𝑥𝐴𝑦𝐵 ) ∧ ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) → ( 𝑧𝐴𝑤𝐵 ) )
11 10 ancomd ( ( ( 𝑥𝐴𝑦𝐵 ) ∧ ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) → ( 𝑤𝐵𝑧𝐴 ) )
12 11 ex ( ( 𝑥𝐴𝑦𝐵 ) → ( ( 𝑥 = 𝑧𝑦 = 𝑤 ) → ( 𝑤𝐵𝑧𝐴 ) ) )
13 12 rexlimivv ( ∃ 𝑥𝐴𝑦𝐵 ( 𝑥 = 𝑧𝑦 = 𝑤 ) → ( 𝑤𝐵𝑧𝐴 ) )
14 1 3 6 13 4syl ( ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) → ( 𝑤𝐵𝑧𝐴 ) )
15 14 ex ( ∃ 𝑥𝐴𝑦𝐵 𝜑 → ( ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) → ( 𝑤𝐵𝑧𝐴 ) ) )
16 15 pm4.71rd ( ∃ 𝑥𝐴𝑦𝐵 𝜑 → ( ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ( ( 𝑤𝐵𝑧𝐴 ) ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
17 anass ( ( ( 𝑤𝐵𝑧𝐴 ) ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
18 16 17 bitrdi ( ∃ 𝑥𝐴𝑦𝐵 𝜑 → ( ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) ) )
19 18 2exbidv ( ∃ 𝑥𝐴𝑦𝐵 𝜑 → ( ∃ 𝑧𝑤𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∃ 𝑧𝑤 ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) ) )
20 19 pm5.32i ( ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝑤𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝑤 ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) ) )
21 2reu5lem3 ( ( ∃! 𝑥𝐴 ∃! 𝑦𝐵 𝜑 ∧ ∀ 𝑥𝐴 ∃* 𝑦𝐵 𝜑 ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝑤𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
22 df-rex ( ∃ 𝑧𝐴𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∃ 𝑧 ( 𝑧𝐴 ∧ ∃ 𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
23 r19.42v ( ∃ 𝑤𝐵 ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ( 𝑧𝐴 ∧ ∃ 𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
24 df-rex ( ∃ 𝑤𝐵 ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ∃ 𝑤 ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
25 23 24 bitr3i ( ( 𝑧𝐴 ∧ ∃ 𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ∃ 𝑤 ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
26 25 exbii ( ∃ 𝑧 ( 𝑧𝐴 ∧ ∃ 𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ∃ 𝑧𝑤 ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
27 22 26 bitri ( ∃ 𝑧𝐴𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∃ 𝑧𝑤 ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
28 27 anbi2i ( ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝐴𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝑤 ( 𝑤𝐵 ∧ ( 𝑧𝐴 ∧ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) ) )
29 20 21 28 3bitr4i ( ( ∃! 𝑥𝐴 ∃! 𝑦𝐵 𝜑 ∧ ∀ 𝑥𝐴 ∃* 𝑦𝐵 𝜑 ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝐴𝑤𝐵𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )