Metamath Proof Explorer


Theorem hashbclem

Description: Lemma for hashbc : inductive step. (Contributed by Mario Carneiro, 13-Jul-2014)

Ref Expression
Hypotheses hashbc.1 φ A Fin
hashbc.2 φ ¬ z A
hashbc.3 φ j ( A j) = x 𝒫 A | x = j
hashbc.4 φ K
Assertion hashbclem φ ( A z K) = x 𝒫 A z | x = K

Proof

Step Hyp Ref Expression
1 hashbc.1 φ A Fin
2 hashbc.2 φ ¬ z A
3 hashbc.3 φ j ( A j) = x 𝒫 A | x = j
4 hashbc.4 φ K
5 oveq2 j = K ( A j) = ( A K)
6 eqeq2 j = K x = j x = K
7 6 rabbidv j = K x 𝒫 A | x = j = x 𝒫 A | x = K
8 7 fveq2d j = K x 𝒫 A | x = j = x 𝒫 A | x = K
9 5 8 eqeq12d j = K ( A j) = x 𝒫 A | x = j ( A K) = x 𝒫 A | x = K
10 9 3 4 rspcdva φ ( A K) = x 𝒫 A | x = K
11 ssun1 A A z
12 11 sspwi 𝒫 A 𝒫 A z
13 12 sseli x 𝒫 A x 𝒫 A z
14 13 adantl φ x 𝒫 A x 𝒫 A z
15 elpwi x 𝒫 A x A
16 15 ssneld x 𝒫 A ¬ z A ¬ z x
17 2 16 mpan9 φ x 𝒫 A ¬ z x
18 14 17 jca φ x 𝒫 A x 𝒫 A z ¬ z x
19 elpwi x 𝒫 A z x A z
20 uncom A z = z A
21 19 20 sseqtrdi x 𝒫 A z x z A
22 21 adantr x 𝒫 A z ¬ z x x z A
23 simpr x 𝒫 A z ¬ z x ¬ z x
24 disjsn x z = ¬ z x
25 23 24 sylibr x 𝒫 A z ¬ z x x z =
26 disjssun x z = x z A x A
27 25 26 syl x 𝒫 A z ¬ z x x z A x A
28 22 27 mpbid x 𝒫 A z ¬ z x x A
29 vex x V
30 29 elpw x 𝒫 A x A
31 28 30 sylibr x 𝒫 A z ¬ z x x 𝒫 A
32 31 adantl φ x 𝒫 A z ¬ z x x 𝒫 A
33 18 32 impbida φ x 𝒫 A x 𝒫 A z ¬ z x
34 33 anbi1d φ x 𝒫 A x = K x 𝒫 A z ¬ z x x = K
35 anass x 𝒫 A z ¬ z x x = K x 𝒫 A z ¬ z x x = K
36 34 35 bitrdi φ x 𝒫 A x = K x 𝒫 A z ¬ z x x = K
37 36 rabbidva2 φ x 𝒫 A | x = K = x 𝒫 A z | ¬ z x x = K
38 37 fveq2d φ x 𝒫 A | x = K = x 𝒫 A z | ¬ z x x = K
39 10 38 eqtrd φ ( A K) = x 𝒫 A z | ¬ z x x = K
40 oveq2 j = K 1 ( A j) = ( A K 1 )
41 eqeq2 j = K 1 x = j x = K 1
42 41 rabbidv j = K 1 x 𝒫 A | x = j = x 𝒫 A | x = K 1
43 42 fveq2d j = K 1 x 𝒫 A | x = j = x 𝒫 A | x = K 1
44 40 43 eqeq12d j = K 1 ( A j) = x 𝒫 A | x = j ( A K 1 ) = x 𝒫 A | x = K 1
45 peano2zm K K 1
46 4 45 syl φ K 1
47 44 3 46 rspcdva φ ( A K 1 ) = x 𝒫 A | x = K 1
48 pwfi A Fin 𝒫 A Fin
49 1 48 sylib φ 𝒫 A Fin
50 rabexg 𝒫 A Fin x 𝒫 A | x = K 1 V
51 49 50 syl φ x 𝒫 A | x = K 1 V
52 snfi z Fin
53 unfi A Fin z Fin A z Fin
54 1 52 53 sylancl φ A z Fin
55 pwfi A z Fin 𝒫 A z Fin
56 54 55 sylib φ 𝒫 A z Fin
57 ssrab2 x 𝒫 A z | z x x = K 𝒫 A z
58 ssfi 𝒫 A z Fin x 𝒫 A z | z x x = K 𝒫 A z x 𝒫 A z | z x x = K Fin
59 56 57 58 sylancl φ x 𝒫 A z | z x x = K Fin
60 fveqeq2 x = u x = K 1 u = K 1
61 60 elrab u x 𝒫 A | x = K 1 u 𝒫 A u = K 1
62 eleq2 x = u z z x z u z
63 fveqeq2 x = u z x = K u z = K
64 62 63 anbi12d x = u z z x x = K z u z u z = K
65 elpwi u 𝒫 A u A
66 65 ad2antrl φ u 𝒫 A u = K 1 u A
67 unss1 u A u z A z
68 66 67 syl φ u 𝒫 A u = K 1 u z A z
69 vex u V
70 snex z V
71 69 70 unex u z V
72 71 elpw u z 𝒫 A z u z A z
73 68 72 sylibr φ u 𝒫 A u = K 1 u z 𝒫 A z
74 1 adantr φ u 𝒫 A u = K 1 A Fin
75 74 66 ssfid φ u 𝒫 A u = K 1 u Fin
76 52 a1i φ u 𝒫 A u = K 1 z Fin
77 2 adantr φ u 𝒫 A u = K 1 ¬ z A
78 66 77 ssneldd φ u 𝒫 A u = K 1 ¬ z u
79 disjsn u z = ¬ z u
80 78 79 sylibr φ u 𝒫 A u = K 1 u z =
81 hashun u Fin z Fin u z = u z = u + z
82 75 76 80 81 syl3anc φ u 𝒫 A u = K 1 u z = u + z
83 simprr φ u 𝒫 A u = K 1 u = K 1
84 hashsng z V z = 1
85 84 elv z = 1
86 85 a1i φ u 𝒫 A u = K 1 z = 1
87 83 86 oveq12d φ u 𝒫 A u = K 1 u + z = K - 1 + 1
88 4 adantr φ u 𝒫 A u = K 1 K
89 88 zcnd φ u 𝒫 A u = K 1 K
90 ax-1cn 1
91 npcan K 1 K - 1 + 1 = K
92 89 90 91 sylancl φ u 𝒫 A u = K 1 K - 1 + 1 = K
93 82 87 92 3eqtrd φ u 𝒫 A u = K 1 u z = K
94 ssun2 z u z
95 vex z V
96 95 snss z u z z u z
97 94 96 mpbir z u z
98 93 97 jctil φ u 𝒫 A u = K 1 z u z u z = K
99 64 73 98 elrabd φ u 𝒫 A u = K 1 u z x 𝒫 A z | z x x = K
100 99 ex φ u 𝒫 A u = K 1 u z x 𝒫 A z | z x x = K
101 61 100 syl5bi φ u x 𝒫 A | x = K 1 u z x 𝒫 A z | z x x = K
102 eleq2 x = v z x z v
103 fveqeq2 x = v x = K v = K
104 102 103 anbi12d x = v z x x = K z v v = K
105 104 elrab v x 𝒫 A z | z x x = K v 𝒫 A z z v v = K
106 fveqeq2 x = v z x = K 1 v z = K 1
107 elpwi v 𝒫 A z v A z
108 107 ad2antrl φ v 𝒫 A z z v v = K v A z
109 108 20 sseqtrdi φ v 𝒫 A z z v v = K v z A
110 ssundif v z A v z A
111 109 110 sylib φ v 𝒫 A z z v v = K v z A
112 vex v V
113 112 difexi v z V
114 113 elpw v z 𝒫 A v z A
115 111 114 sylibr φ v 𝒫 A z z v v = K v z 𝒫 A
116 1 adantr φ v 𝒫 A z z v v = K A Fin
117 116 111 ssfid φ v 𝒫 A z z v v = K v z Fin
118 hashcl v z Fin v z 0
119 117 118 syl φ v 𝒫 A z z v v = K v z 0
120 119 nn0cnd φ v 𝒫 A z z v v = K v z
121 pncan v z 1 v z + 1 - 1 = v z
122 120 90 121 sylancl φ v 𝒫 A z z v v = K v z + 1 - 1 = v z
123 undif1 v z z = v z
124 simprrl φ v 𝒫 A z z v v = K z v
125 124 snssd φ v 𝒫 A z z v v = K z v
126 ssequn2 z v v z = v
127 125 126 sylib φ v 𝒫 A z z v v = K v z = v
128 123 127 eqtrid φ v 𝒫 A z z v v = K v z z = v
129 128 fveq2d φ v 𝒫 A z z v v = K v z z = v
130 52 a1i φ v 𝒫 A z z v v = K z Fin
131 disjdifr v z z =
132 131 a1i φ v 𝒫 A z z v v = K v z z =
133 hashun v z Fin z Fin v z z = v z z = v z + z
134 117 130 132 133 syl3anc φ v 𝒫 A z z v v = K v z z = v z + z
135 85 oveq2i v z + z = v z + 1
136 134 135 eqtrdi φ v 𝒫 A z z v v = K v z z = v z + 1
137 simprrr φ v 𝒫 A z z v v = K v = K
138 129 136 137 3eqtr3d φ v 𝒫 A z z v v = K v z + 1 = K
139 138 oveq1d φ v 𝒫 A z z v v = K v z + 1 - 1 = K 1
140 122 139 eqtr3d φ v 𝒫 A z z v v = K v z = K 1
141 106 115 140 elrabd φ v 𝒫 A z z v v = K v z x 𝒫 A | x = K 1
142 141 ex φ v 𝒫 A z z v v = K v z x 𝒫 A | x = K 1
143 105 142 syl5bi φ v x 𝒫 A z | z x x = K v z x 𝒫 A | x = K 1
144 61 105 anbi12i u x 𝒫 A | x = K 1 v x 𝒫 A z | z x x = K u 𝒫 A u = K 1 v 𝒫 A z z v v = K
145 simp3rl φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K z v
146 145 snssd φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K z v
147 incom z u = u z
148 80 3adant3 φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K u z =
149 147 148 eqtrid φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K z u =
150 uneqdifeq z v z u = z u = v v z = u
151 146 149 150 syl2anc φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K z u = v v z = u
152 151 bicomd φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K v z = u z u = v
153 eqcom u = v z v z = u
154 eqcom v = u z u z = v
155 uncom u z = z u
156 155 eqeq1i u z = v z u = v
157 154 156 bitri v = u z z u = v
158 152 153 157 3bitr4g φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K u = v z v = u z
159 158 3expib φ u 𝒫 A u = K 1 v 𝒫 A z z v v = K u = v z v = u z
160 144 159 syl5bi φ u x 𝒫 A | x = K 1 v x 𝒫 A z | z x x = K u = v z v = u z
161 51 59 101 143 160 en3d φ x 𝒫 A | x = K 1 x 𝒫 A z | z x x = K
162 ssrab2 x 𝒫 A | x = K 1 𝒫 A
163 ssfi 𝒫 A Fin x 𝒫 A | x = K 1 𝒫 A x 𝒫 A | x = K 1 Fin
164 49 162 163 sylancl φ x 𝒫 A | x = K 1 Fin
165 hashen x 𝒫 A | x = K 1 Fin x 𝒫 A z | z x x = K Fin x 𝒫 A | x = K 1 = x 𝒫 A z | z x x = K x 𝒫 A | x = K 1 x 𝒫 A z | z x x = K
166 164 59 165 syl2anc φ x 𝒫 A | x = K 1 = x 𝒫 A z | z x x = K x 𝒫 A | x = K 1 x 𝒫 A z | z x x = K
167 161 166 mpbird φ x 𝒫 A | x = K 1 = x 𝒫 A z | z x x = K
168 47 167 eqtrd φ ( A K 1 ) = x 𝒫 A z | z x x = K
169 39 168 oveq12d φ ( A K) + ( A K 1 ) = x 𝒫 A z | ¬ z x x = K + x 𝒫 A z | z x x = K
170 52 a1i φ z Fin
171 disjsn A z = ¬ z A
172 2 171 sylibr φ A z =
173 hashun A Fin z Fin A z = A z = A + z
174 1 170 172 173 syl3anc φ A z = A + z
175 85 oveq2i A + z = A + 1
176 174 175 eqtrdi φ A z = A + 1
177 176 oveq1d φ ( A z K) = ( A + 1 K)
178 hashcl A Fin A 0
179 1 178 syl φ A 0
180 bcpasc A 0 K ( A K) + ( A K 1 ) = ( A + 1 K)
181 179 4 180 syl2anc φ ( A K) + ( A K 1 ) = ( A + 1 K)
182 177 181 eqtr4d φ ( A z K) = ( A K) + ( A K 1 )
183 pm2.1 ¬ z x z x
184 183 biantrur x = K ¬ z x z x x = K
185 andir ¬ z x z x x = K ¬ z x x = K z x x = K
186 184 185 bitri x = K ¬ z x x = K z x x = K
187 186 rabbii x 𝒫 A z | x = K = x 𝒫 A z | ¬ z x x = K z x x = K
188 unrab x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K = x 𝒫 A z | ¬ z x x = K z x x = K
189 187 188 eqtr4i x 𝒫 A z | x = K = x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K
190 189 fveq2i x 𝒫 A z | x = K = x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K
191 ssrab2 x 𝒫 A z | ¬ z x x = K 𝒫 A z
192 ssfi 𝒫 A z Fin x 𝒫 A z | ¬ z x x = K 𝒫 A z x 𝒫 A z | ¬ z x x = K Fin
193 56 191 192 sylancl φ x 𝒫 A z | ¬ z x x = K Fin
194 inrab x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K = x 𝒫 A z | ¬ z x x = K z x x = K
195 simprl ¬ z x x = K z x x = K z x
196 simpll ¬ z x x = K z x x = K ¬ z x
197 195 196 pm2.65i ¬ ¬ z x x = K z x x = K
198 197 rgenw x 𝒫 A z ¬ ¬ z x x = K z x x = K
199 rabeq0 x 𝒫 A z | ¬ z x x = K z x x = K = x 𝒫 A z ¬ ¬ z x x = K z x x = K
200 198 199 mpbir x 𝒫 A z | ¬ z x x = K z x x = K =
201 194 200 eqtri x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K =
202 201 a1i φ x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K =
203 hashun x 𝒫 A z | ¬ z x x = K Fin x 𝒫 A z | z x x = K Fin x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K = x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K = x 𝒫 A z | ¬ z x x = K + x 𝒫 A z | z x x = K
204 193 59 202 203 syl3anc φ x 𝒫 A z | ¬ z x x = K x 𝒫 A z | z x x = K = x 𝒫 A z | ¬ z x x = K + x 𝒫 A z | z x x = K
205 190 204 eqtrid φ x 𝒫 A z | x = K = x 𝒫 A z | ¬ z x x = K + x 𝒫 A z | z x x = K
206 169 182 205 3eqtr4d φ ( A z K) = x 𝒫 A z | x = K