Metamath Proof Explorer


Theorem reuind

Description: Existential uniqueness via an indirect equality. (Contributed by NM, 16-Oct-2010)

Ref Expression
Hypotheses reuind.1 ( 𝑥 = 𝑦 → ( 𝜑𝜓 ) )
reuind.2 ( 𝑥 = 𝑦𝐴 = 𝐵 )
Assertion reuind ( ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) ∧ ∃ 𝑥 ( 𝐴𝐶𝜑 ) ) → ∃! 𝑧𝐶𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) )

Proof

Step Hyp Ref Expression
1 reuind.1 ( 𝑥 = 𝑦 → ( 𝜑𝜓 ) )
2 reuind.2 ( 𝑥 = 𝑦𝐴 = 𝐵 )
3 2 eleq1d ( 𝑥 = 𝑦 → ( 𝐴𝐶𝐵𝐶 ) )
4 3 1 anbi12d ( 𝑥 = 𝑦 → ( ( 𝐴𝐶𝜑 ) ↔ ( 𝐵𝐶𝜓 ) ) )
5 4 cbvexvw ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) ↔ ∃ 𝑦 ( 𝐵𝐶𝜓 ) )
6 r19.41v ( ∃ 𝑧𝐶 ( 𝑧 = 𝐵𝜓 ) ↔ ( ∃ 𝑧𝐶 𝑧 = 𝐵𝜓 ) )
7 6 exbii ( ∃ 𝑦𝑧𝐶 ( 𝑧 = 𝐵𝜓 ) ↔ ∃ 𝑦 ( ∃ 𝑧𝐶 𝑧 = 𝐵𝜓 ) )
8 rexcom4 ( ∃ 𝑧𝐶𝑦 ( 𝑧 = 𝐵𝜓 ) ↔ ∃ 𝑦𝑧𝐶 ( 𝑧 = 𝐵𝜓 ) )
9 risset ( 𝐵𝐶 ↔ ∃ 𝑧𝐶 𝑧 = 𝐵 )
10 9 anbi1i ( ( 𝐵𝐶𝜓 ) ↔ ( ∃ 𝑧𝐶 𝑧 = 𝐵𝜓 ) )
11 10 exbii ( ∃ 𝑦 ( 𝐵𝐶𝜓 ) ↔ ∃ 𝑦 ( ∃ 𝑧𝐶 𝑧 = 𝐵𝜓 ) )
12 7 8 11 3bitr4ri ( ∃ 𝑦 ( 𝐵𝐶𝜓 ) ↔ ∃ 𝑧𝐶𝑦 ( 𝑧 = 𝐵𝜓 ) )
13 5 12 bitri ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) ↔ ∃ 𝑧𝐶𝑦 ( 𝑧 = 𝐵𝜓 ) )
14 eqeq2 ( 𝐴 = 𝐵 → ( 𝑧 = 𝐴𝑧 = 𝐵 ) )
15 14 imim2i ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) → ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → ( 𝑧 = 𝐴𝑧 = 𝐵 ) ) )
16 biimpr ( ( 𝑧 = 𝐴𝑧 = 𝐵 ) → ( 𝑧 = 𝐵𝑧 = 𝐴 ) )
17 16 imim2i ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → ( 𝑧 = 𝐴𝑧 = 𝐵 ) ) → ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → ( 𝑧 = 𝐵𝑧 = 𝐴 ) ) )
18 an31 ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) ∧ 𝑧 = 𝐵 ) ↔ ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) ∧ ( 𝐴𝐶𝜑 ) ) )
19 18 imbi1i ( ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) ∧ 𝑧 = 𝐵 ) → 𝑧 = 𝐴 ) ↔ ( ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) ∧ ( 𝐴𝐶𝜑 ) ) → 𝑧 = 𝐴 ) )
20 impexp ( ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) ∧ 𝑧 = 𝐵 ) → 𝑧 = 𝐴 ) ↔ ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → ( 𝑧 = 𝐵𝑧 = 𝐴 ) ) )
21 impexp ( ( ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) ∧ ( 𝐴𝐶𝜑 ) ) → 𝑧 = 𝐴 ) ↔ ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
22 19 20 21 3bitr3i ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → ( 𝑧 = 𝐵𝑧 = 𝐴 ) ) ↔ ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
23 17 22 sylib ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → ( 𝑧 = 𝐴𝑧 = 𝐵 ) ) → ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
24 15 23 syl ( ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) → ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
25 24 2alimi ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) → ∀ 𝑥𝑦 ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
26 19.23v ( ∀ 𝑦 ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) ↔ ( ∃ 𝑦 ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
27 an12 ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) ↔ ( 𝐵𝐶 ∧ ( 𝑧 = 𝐵𝜓 ) ) )
28 eleq1 ( 𝑧 = 𝐵 → ( 𝑧𝐶𝐵𝐶 ) )
29 28 adantr ( ( 𝑧 = 𝐵𝜓 ) → ( 𝑧𝐶𝐵𝐶 ) )
30 29 pm5.32ri ( ( 𝑧𝐶 ∧ ( 𝑧 = 𝐵𝜓 ) ) ↔ ( 𝐵𝐶 ∧ ( 𝑧 = 𝐵𝜓 ) ) )
31 27 30 bitr4i ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) ↔ ( 𝑧𝐶 ∧ ( 𝑧 = 𝐵𝜓 ) ) )
32 31 exbii ( ∃ 𝑦 ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) ↔ ∃ 𝑦 ( 𝑧𝐶 ∧ ( 𝑧 = 𝐵𝜓 ) ) )
33 19.42v ( ∃ 𝑦 ( 𝑧𝐶 ∧ ( 𝑧 = 𝐵𝜓 ) ) ↔ ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) )
34 32 33 bitri ( ∃ 𝑦 ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) ↔ ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) )
35 34 imbi1i ( ( ∃ 𝑦 ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) ↔ ( ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
36 26 35 bitri ( ∀ 𝑦 ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) ↔ ( ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
37 36 albii ( ∀ 𝑥𝑦 ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) ↔ ∀ 𝑥 ( ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
38 19.21v ( ∀ 𝑥 ( ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) ↔ ( ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) → ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
39 37 38 bitri ( ∀ 𝑥𝑦 ( ( 𝑧 = 𝐵 ∧ ( 𝐵𝐶𝜓 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) ↔ ( ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) → ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
40 25 39 sylib ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) → ( ( 𝑧𝐶 ∧ ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) ) → ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
41 40 expd ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) → ( 𝑧𝐶 → ( ∃ 𝑦 ( 𝑧 = 𝐵𝜓 ) → ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) ) )
42 41 reximdvai ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) → ( ∃ 𝑧𝐶𝑦 ( 𝑧 = 𝐵𝜓 ) → ∃ 𝑧𝐶𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
43 13 42 syl5bi ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) → ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) → ∃ 𝑧𝐶𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ) )
44 43 imp ( ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) ∧ ∃ 𝑥 ( 𝐴𝐶𝜑 ) ) → ∃ 𝑧𝐶𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) )
45 pm4.24 ( ( 𝐴𝐶𝜑 ) ↔ ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐴𝐶𝜑 ) ) )
46 45 biimpi ( ( 𝐴𝐶𝜑 ) → ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐴𝐶𝜑 ) ) )
47 anim12 ( ( ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐴𝐶𝜑 ) ) → ( 𝑧 = 𝐴𝑤 = 𝐴 ) ) )
48 eqtr3 ( ( 𝑧 = 𝐴𝑤 = 𝐴 ) → 𝑧 = 𝑤 )
49 46 47 48 syl56 ( ( ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝑤 ) )
50 49 alanimi ( ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝑤 ) )
51 19.23v ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝑤 ) ↔ ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) → 𝑧 = 𝑤 ) )
52 50 51 sylib ( ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) → 𝑧 = 𝑤 ) )
53 52 com12 ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) → ( ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → 𝑧 = 𝑤 ) )
54 53 a1d ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) → ( ( 𝑧𝐶𝑤𝐶 ) → ( ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → 𝑧 = 𝑤 ) ) )
55 54 ralrimivv ( ∃ 𝑥 ( 𝐴𝐶𝜑 ) → ∀ 𝑧𝐶𝑤𝐶 ( ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → 𝑧 = 𝑤 ) )
56 55 adantl ( ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) ∧ ∃ 𝑥 ( 𝐴𝐶𝜑 ) ) → ∀ 𝑧𝐶𝑤𝐶 ( ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → 𝑧 = 𝑤 ) )
57 eqeq1 ( 𝑧 = 𝑤 → ( 𝑧 = 𝐴𝑤 = 𝐴 ) )
58 57 imbi2d ( 𝑧 = 𝑤 → ( ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ↔ ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) )
59 58 albidv ( 𝑧 = 𝑤 → ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ↔ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) )
60 59 reu4 ( ∃! 𝑧𝐶𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ↔ ( ∃ 𝑧𝐶𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑧𝐶𝑤𝐶 ( ( ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) ∧ ∀ 𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑤 = 𝐴 ) ) → 𝑧 = 𝑤 ) ) )
61 44 56 60 sylanbrc ( ( ∀ 𝑥𝑦 ( ( ( 𝐴𝐶𝜑 ) ∧ ( 𝐵𝐶𝜓 ) ) → 𝐴 = 𝐵 ) ∧ ∃ 𝑥 ( 𝐴𝐶𝜑 ) ) → ∃! 𝑧𝐶𝑥 ( ( 𝐴𝐶𝜑 ) → 𝑧 = 𝐴 ) )