Metamath Proof Explorer


Theorem 2reu5lem3

Description: Lemma for 2reu5 . This lemma is interesting in its own right, showing that existential restriction in the last conjunct (the "at most one" part) is optional; compare rmo2 . (Contributed by Alexander van der Vekens, 17-Jun-2017)

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

Proof

Step Hyp Ref Expression
1 2reu5lem1 ( ∃! 𝑥𝐴 ∃! 𝑦𝐵 𝜑 ↔ ∃! 𝑥 ∃! 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) )
2 2reu5lem2 ( ∀ 𝑥𝐴 ∃* 𝑦𝐵 𝜑 ↔ ∀ 𝑥 ∃* 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) )
3 1 2 anbi12i ( ( ∃! 𝑥𝐴 ∃! 𝑦𝐵 𝜑 ∧ ∀ 𝑥𝐴 ∃* 𝑦𝐵 𝜑 ) ↔ ( ∃! 𝑥 ∃! 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ∧ ∀ 𝑥 ∃* 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ) )
4 2eu5 ( ( ∃! 𝑥 ∃! 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ∧ ∀ 𝑥 ∃* 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ) ↔ ( ∃ 𝑥𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ∧ ∃ 𝑧𝑤𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
5 3anass ( ( 𝑥𝐴𝑦𝐵𝜑 ) ↔ ( 𝑥𝐴 ∧ ( 𝑦𝐵𝜑 ) ) )
6 5 exbii ( ∃ 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ↔ ∃ 𝑦 ( 𝑥𝐴 ∧ ( 𝑦𝐵𝜑 ) ) )
7 19.42v ( ∃ 𝑦 ( 𝑥𝐴 ∧ ( 𝑦𝐵𝜑 ) ) ↔ ( 𝑥𝐴 ∧ ∃ 𝑦 ( 𝑦𝐵𝜑 ) ) )
8 df-rex ( ∃ 𝑦𝐵 𝜑 ↔ ∃ 𝑦 ( 𝑦𝐵𝜑 ) )
9 8 bicomi ( ∃ 𝑦 ( 𝑦𝐵𝜑 ) ↔ ∃ 𝑦𝐵 𝜑 )
10 9 anbi2i ( ( 𝑥𝐴 ∧ ∃ 𝑦 ( 𝑦𝐵𝜑 ) ) ↔ ( 𝑥𝐴 ∧ ∃ 𝑦𝐵 𝜑 ) )
11 6 7 10 3bitri ( ∃ 𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ↔ ( 𝑥𝐴 ∧ ∃ 𝑦𝐵 𝜑 ) )
12 11 exbii ( ∃ 𝑥𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ↔ ∃ 𝑥 ( 𝑥𝐴 ∧ ∃ 𝑦𝐵 𝜑 ) )
13 df-rex ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∃ 𝑥 ( 𝑥𝐴 ∧ ∃ 𝑦𝐵 𝜑 ) )
14 12 13 bitr4i ( ∃ 𝑥𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ↔ ∃ 𝑥𝐴𝑦𝐵 𝜑 )
15 3anan12 ( ( 𝑥𝐴𝑦𝐵𝜑 ) ↔ ( 𝑦𝐵 ∧ ( 𝑥𝐴𝜑 ) ) )
16 15 imbi1i ( ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ( ( 𝑦𝐵 ∧ ( 𝑥𝐴𝜑 ) ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) )
17 impexp ( ( ( 𝑦𝐵 ∧ ( 𝑥𝐴𝜑 ) ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ( 𝑦𝐵 → ( ( 𝑥𝐴𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
18 impexp ( ( ( 𝑥𝐴𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ( 𝑥𝐴 → ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
19 18 imbi2i ( ( 𝑦𝐵 → ( ( 𝑥𝐴𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ( 𝑦𝐵 → ( 𝑥𝐴 → ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
20 16 17 19 3bitri ( ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ( 𝑦𝐵 → ( 𝑥𝐴 → ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
21 20 albii ( ∀ 𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∀ 𝑦 ( 𝑦𝐵 → ( 𝑥𝐴 → ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
22 df-ral ( ∀ 𝑦𝐵 ( 𝑥𝐴 → ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ∀ 𝑦 ( 𝑦𝐵 → ( 𝑥𝐴 → ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ) )
23 r19.21v ( ∀ 𝑦𝐵 ( 𝑥𝐴 → ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ( 𝑥𝐴 → ∀ 𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
24 21 22 23 3bitr2i ( ∀ 𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ( 𝑥𝐴 → ∀ 𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
25 24 albii ( ∀ 𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∀ 𝑥 ( 𝑥𝐴 → ∀ 𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
26 df-ral ( ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∀ 𝑥 ( 𝑥𝐴 → ∀ 𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
27 25 26 bitr4i ( ∀ 𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∀ 𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) )
28 27 exbii ( ∃ 𝑤𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∃ 𝑤𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) )
29 28 exbii ( ∃ 𝑧𝑤𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ↔ ∃ 𝑧𝑤𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) )
30 14 29 anbi12i ( ( ∃ 𝑥𝑦 ( 𝑥𝐴𝑦𝐵𝜑 ) ∧ ∃ 𝑧𝑤𝑥𝑦 ( ( 𝑥𝐴𝑦𝐵𝜑 ) → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝑤𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )
31 3 4 30 3bitri ( ( ∃! 𝑥𝐴 ∃! 𝑦𝐵 𝜑 ∧ ∀ 𝑥𝐴 ∃* 𝑦𝐵 𝜑 ) ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃ 𝑧𝑤𝑥𝐴𝑦𝐵 ( 𝜑 → ( 𝑥 = 𝑧𝑦 = 𝑤 ) ) ) )