Metamath Proof Explorer


Theorem kmlem14

Description: Lemma for 5-quantifier AC of Kurt Maes, Th. 4, part of 5 <=> 4. (Contributed by NM, 4-Apr-2004)

Ref Expression
Hypotheses kmlem14.1 ( 𝜑 ↔ ( 𝑧𝑦 → ( ( 𝑣𝑥𝑦𝑣 ) ∧ 𝑧𝑣 ) ) )
kmlem14.2 ( 𝜓 ↔ ( 𝑧𝑥 → ( ( 𝑣𝑧𝑣𝑦 ) ∧ ( ( 𝑢𝑧𝑢𝑦 ) → 𝑢 = 𝑣 ) ) ) )
kmlem14.3 ( 𝜒 ↔ ∀ 𝑧𝑥 ∃! 𝑣 𝑣 ∈ ( 𝑧𝑦 ) )
Assertion kmlem14 ( ∃ 𝑧𝑥𝑣𝑧𝑤𝑥 ( 𝑧𝑤𝑣 ∈ ( 𝑧𝑤 ) ) ↔ ∃ 𝑦𝑧𝑣𝑢 ( 𝑦𝑥𝜑 ) )

Proof

Step Hyp Ref Expression
1 kmlem14.1 ( 𝜑 ↔ ( 𝑧𝑦 → ( ( 𝑣𝑥𝑦𝑣 ) ∧ 𝑧𝑣 ) ) )
2 kmlem14.2 ( 𝜓 ↔ ( 𝑧𝑥 → ( ( 𝑣𝑧𝑣𝑦 ) ∧ ( ( 𝑢𝑧𝑢𝑦 ) → 𝑢 = 𝑣 ) ) ) )
3 kmlem14.3 ( 𝜒 ↔ ∀ 𝑧𝑥 ∃! 𝑣 𝑣 ∈ ( 𝑧𝑦 ) )
4 neeq1 ( 𝑧 = 𝑦 → ( 𝑧𝑤𝑦𝑤 ) )
5 ineq1 ( 𝑧 = 𝑦 → ( 𝑧𝑤 ) = ( 𝑦𝑤 ) )
6 5 eleq2d ( 𝑧 = 𝑦 → ( 𝑣 ∈ ( 𝑧𝑤 ) ↔ 𝑣 ∈ ( 𝑦𝑤 ) ) )
7 4 6 anbi12d ( 𝑧 = 𝑦 → ( ( 𝑧𝑤𝑣 ∈ ( 𝑧𝑤 ) ) ↔ ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ) )
8 7 rexbidv ( 𝑧 = 𝑦 → ( ∃ 𝑤𝑥 ( 𝑧𝑤𝑣 ∈ ( 𝑧𝑤 ) ) ↔ ∃ 𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ) )
9 8 raleqbi1dv ( 𝑧 = 𝑦 → ( ∀ 𝑣𝑧𝑤𝑥 ( 𝑧𝑤𝑣 ∈ ( 𝑧𝑤 ) ) ↔ ∀ 𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ) )
10 9 cbvrexvw ( ∃ 𝑧𝑥𝑣𝑧𝑤𝑥 ( 𝑧𝑤𝑣 ∈ ( 𝑧𝑤 ) ) ↔ ∃ 𝑦𝑥𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) )
11 df-rex ( ∃ 𝑦𝑥𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ↔ ∃ 𝑦 ( 𝑦𝑥 ∧ ∀ 𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ) )
12 eleq1w ( 𝑣 = 𝑧 → ( 𝑣 ∈ ( 𝑦𝑤 ) ↔ 𝑧 ∈ ( 𝑦𝑤 ) ) )
13 12 anbi2d ( 𝑣 = 𝑧 → ( ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ↔ ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) )
14 13 rexbidv ( 𝑣 = 𝑧 → ( ∃ 𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ↔ ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) )
15 14 cbvralvw ( ∀ 𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ↔ ∀ 𝑧𝑦𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) )
16 df-ral ( ∀ 𝑧𝑦𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ↔ ∀ 𝑧 ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) )
17 15 16 bitri ( ∀ 𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ↔ ∀ 𝑧 ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) )
18 17 anbi2i ( ( 𝑦𝑥 ∧ ∀ 𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ) ↔ ( 𝑦𝑥 ∧ ∀ 𝑧 ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ) )
19 19.28v ( ∀ 𝑧 ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ) ↔ ( 𝑦𝑥 ∧ ∀ 𝑧 ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ) )
20 neeq2 ( 𝑤 = 𝑣 → ( 𝑦𝑤𝑦𝑣 ) )
21 ineq2 ( 𝑤 = 𝑣 → ( 𝑦𝑤 ) = ( 𝑦𝑣 ) )
22 21 eleq2d ( 𝑤 = 𝑣 → ( 𝑧 ∈ ( 𝑦𝑤 ) ↔ 𝑧 ∈ ( 𝑦𝑣 ) ) )
23 20 22 anbi12d ( 𝑤 = 𝑣 → ( ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ↔ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) )
24 23 cbvrexvw ( ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ↔ ∃ 𝑣𝑥 ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) )
25 df-rex ( ∃ 𝑣𝑥 ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ↔ ∃ 𝑣 ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) )
26 24 25 bitri ( ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ↔ ∃ 𝑣 ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) )
27 26 imbi2i ( ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ↔ ( 𝑧𝑦 → ∃ 𝑣 ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) )
28 19.37v ( ∃ 𝑣 ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) ↔ ( 𝑧𝑦 → ∃ 𝑣 ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) )
29 27 28 bitr4i ( ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ↔ ∃ 𝑣 ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) )
30 29 anbi2i ( ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ) ↔ ( 𝑦𝑥 ∧ ∃ 𝑣 ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) ) )
31 19.42v ( ∃ 𝑣 ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) ) ↔ ( 𝑦𝑥 ∧ ∃ 𝑣 ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) ) )
32 19.3v ( ∀ 𝑢 ( 𝑦𝑥𝜑 ) ↔ ( 𝑦𝑥𝜑 ) )
33 elin ( 𝑧 ∈ ( 𝑦𝑣 ) ↔ ( 𝑧𝑦𝑧𝑣 ) )
34 33 baibr ( 𝑧𝑦 → ( 𝑧𝑣𝑧 ∈ ( 𝑦𝑣 ) ) )
35 34 anbi2d ( 𝑧𝑦 → ( ( ( 𝑣𝑥𝑦𝑣 ) ∧ 𝑧𝑣 ) ↔ ( ( 𝑣𝑥𝑦𝑣 ) ∧ 𝑧 ∈ ( 𝑦𝑣 ) ) ) )
36 anass ( ( ( 𝑣𝑥𝑦𝑣 ) ∧ 𝑧 ∈ ( 𝑦𝑣 ) ) ↔ ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) )
37 35 36 bitrdi ( 𝑧𝑦 → ( ( ( 𝑣𝑥𝑦𝑣 ) ∧ 𝑧𝑣 ) ↔ ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) )
38 37 pm5.74i ( ( 𝑧𝑦 → ( ( 𝑣𝑥𝑦𝑣 ) ∧ 𝑧𝑣 ) ) ↔ ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) )
39 1 38 bitri ( 𝜑 ↔ ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) )
40 39 anbi2i ( ( 𝑦𝑥𝜑 ) ↔ ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) ) )
41 32 40 bitr2i ( ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) ) ↔ ∀ 𝑢 ( 𝑦𝑥𝜑 ) )
42 41 exbii ( ∃ 𝑣 ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ( 𝑣𝑥 ∧ ( 𝑦𝑣𝑧 ∈ ( 𝑦𝑣 ) ) ) ) ) ↔ ∃ 𝑣𝑢 ( 𝑦𝑥𝜑 ) )
43 30 31 42 3bitr2i ( ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ) ↔ ∃ 𝑣𝑢 ( 𝑦𝑥𝜑 ) )
44 43 albii ( ∀ 𝑧 ( 𝑦𝑥 ∧ ( 𝑧𝑦 → ∃ 𝑤𝑥 ( 𝑦𝑤𝑧 ∈ ( 𝑦𝑤 ) ) ) ) ↔ ∀ 𝑧𝑣𝑢 ( 𝑦𝑥𝜑 ) )
45 18 19 44 3bitr2i ( ( 𝑦𝑥 ∧ ∀ 𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ) ↔ ∀ 𝑧𝑣𝑢 ( 𝑦𝑥𝜑 ) )
46 45 exbii ( ∃ 𝑦 ( 𝑦𝑥 ∧ ∀ 𝑣𝑦𝑤𝑥 ( 𝑦𝑤𝑣 ∈ ( 𝑦𝑤 ) ) ) ↔ ∃ 𝑦𝑧𝑣𝑢 ( 𝑦𝑥𝜑 ) )
47 10 11 46 3bitri ( ∃ 𝑧𝑥𝑣𝑧𝑤𝑥 ( 𝑧𝑤𝑣 ∈ ( 𝑧𝑤 ) ) ↔ ∃ 𝑦𝑧𝑣𝑢 ( 𝑦𝑥𝜑 ) )