Metamath Proof Explorer


Theorem poimirlem14

Description: Lemma for poimir - for at most one simplex associated with a shared face is the opposite vertex last on the walk. (Contributed by Brendan Leahy, 21-Aug-2020)

Ref Expression
Hypotheses poimir.0 φ N
poimirlem22.s S = t 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N | F = y 0 N 1 if y < 2 nd t y y + 1 / j 1 st 1 st t + f 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0
poimirlem22.1 φ F : 0 N 1 0 K 1 N
Assertion poimirlem14 φ * z S 2 nd z = N

Proof

Step Hyp Ref Expression
1 poimir.0 φ N
2 poimirlem22.s S = t 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N | F = y 0 N 1 if y < 2 nd t y y + 1 / j 1 st 1 st t + f 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0
3 poimirlem22.1 φ F : 0 N 1 0 K 1 N
4 1 ad2antrr φ z S k S 2 nd z = N 2 nd k = N N
5 simplrl φ z S k S 2 nd z = N 2 nd k = N z S
6 1 nngt0d φ 0 < N
7 breq2 2 nd z = N 0 < 2 nd z 0 < N
8 7 biimparc 0 < N 2 nd z = N 0 < 2 nd z
9 6 8 sylan φ 2 nd z = N 0 < 2 nd z
10 9 ad2ant2r φ z S k S 2 nd z = N 2 nd k = N 0 < 2 nd z
11 4 2 5 10 poimirlem5 φ z S k S 2 nd z = N 2 nd k = N F 0 = 1 st 1 st z
12 simplrr φ z S k S 2 nd z = N 2 nd k = N k S
13 breq2 2 nd k = N 0 < 2 nd k 0 < N
14 13 biimparc 0 < N 2 nd k = N 0 < 2 nd k
15 6 14 sylan φ 2 nd k = N 0 < 2 nd k
16 15 ad2ant2rl φ z S k S 2 nd z = N 2 nd k = N 0 < 2 nd k
17 4 2 12 16 poimirlem5 φ z S k S 2 nd z = N 2 nd k = N F 0 = 1 st 1 st k
18 11 17 eqtr3d φ z S k S 2 nd z = N 2 nd k = N 1 st 1 st z = 1 st 1 st k
19 elrabi z t 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N | F = y 0 N 1 if y < 2 nd t y y + 1 / j 1 st 1 st t + f 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0 z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
20 19 2 eleq2s z S z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
21 xp1st z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N 1 st z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
22 xp2nd 1 st z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N 2 nd 1 st z f | f : 1 N 1-1 onto 1 N
23 20 21 22 3syl z S 2 nd 1 st z f | f : 1 N 1-1 onto 1 N
24 fvex 2 nd 1 st z V
25 f1oeq1 f = 2 nd 1 st z f : 1 N 1-1 onto 1 N 2 nd 1 st z : 1 N 1-1 onto 1 N
26 24 25 elab 2 nd 1 st z f | f : 1 N 1-1 onto 1 N 2 nd 1 st z : 1 N 1-1 onto 1 N
27 23 26 sylib z S 2 nd 1 st z : 1 N 1-1 onto 1 N
28 f1ofn 2 nd 1 st z : 1 N 1-1 onto 1 N 2 nd 1 st z Fn 1 N
29 27 28 syl z S 2 nd 1 st z Fn 1 N
30 29 adantr z S k S 2 nd 1 st z Fn 1 N
31 30 ad2antlr φ z S k S 2 nd z = N 2 nd k = N 2 nd 1 st z Fn 1 N
32 elrabi k t 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N | F = y 0 N 1 if y < 2 nd t y y + 1 / j 1 st 1 st t + f 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0 k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
33 32 2 eleq2s k S k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
34 xp1st k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N 1 st k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
35 xp2nd 1 st k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N 2 nd 1 st k f | f : 1 N 1-1 onto 1 N
36 33 34 35 3syl k S 2 nd 1 st k f | f : 1 N 1-1 onto 1 N
37 fvex 2 nd 1 st k V
38 f1oeq1 f = 2 nd 1 st k f : 1 N 1-1 onto 1 N 2 nd 1 st k : 1 N 1-1 onto 1 N
39 37 38 elab 2 nd 1 st k f | f : 1 N 1-1 onto 1 N 2 nd 1 st k : 1 N 1-1 onto 1 N
40 36 39 sylib k S 2 nd 1 st k : 1 N 1-1 onto 1 N
41 f1ofn 2 nd 1 st k : 1 N 1-1 onto 1 N 2 nd 1 st k Fn 1 N
42 40 41 syl k S 2 nd 1 st k Fn 1 N
43 42 adantl z S k S 2 nd 1 st k Fn 1 N
44 43 ad2antlr φ z S k S 2 nd z = N 2 nd k = N 2 nd 1 st k Fn 1 N
45 simpllr φ z S k S 2 nd z = N 2 nd k = N n 1 N z S k S
46 oveq2 n = N 1 n = 1 N
47 46 imaeq2d n = N 2 nd 1 st z 1 n = 2 nd 1 st z 1 N
48 f1ofo 2 nd 1 st z : 1 N 1-1 onto 1 N 2 nd 1 st z : 1 N onto 1 N
49 foima 2 nd 1 st z : 1 N onto 1 N 2 nd 1 st z 1 N = 1 N
50 27 48 49 3syl z S 2 nd 1 st z 1 N = 1 N
51 47 50 sylan9eqr z S n = N 2 nd 1 st z 1 n = 1 N
52 51 adantlr z S k S n = N 2 nd 1 st z 1 n = 1 N
53 46 imaeq2d n = N 2 nd 1 st k 1 n = 2 nd 1 st k 1 N
54 f1ofo 2 nd 1 st k : 1 N 1-1 onto 1 N 2 nd 1 st k : 1 N onto 1 N
55 foima 2 nd 1 st k : 1 N onto 1 N 2 nd 1 st k 1 N = 1 N
56 40 54 55 3syl k S 2 nd 1 st k 1 N = 1 N
57 53 56 sylan9eqr k S n = N 2 nd 1 st k 1 n = 1 N
58 57 adantll z S k S n = N 2 nd 1 st k 1 n = 1 N
59 52 58 eqtr4d z S k S n = N 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
60 45 59 sylan φ z S k S 2 nd z = N 2 nd k = N n 1 N n = N 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
61 simpll φ z S k S 2 nd z = N 2 nd k = N φ
62 elnnuz N N 1
63 1 62 sylib φ N 1
64 fzm1 N 1 n 1 N n 1 N 1 n = N
65 63 64 syl φ n 1 N n 1 N 1 n = N
66 65 anbi1d φ n 1 N n N n 1 N 1 n = N n N
67 66 biimpa φ n 1 N n N n 1 N 1 n = N n N
68 df-ne n N ¬ n = N
69 68 anbi2i n 1 N 1 n = N n N n 1 N 1 n = N ¬ n = N
70 pm5.61 n 1 N 1 n = N ¬ n = N n 1 N 1 ¬ n = N
71 69 70 bitri n 1 N 1 n = N n N n 1 N 1 ¬ n = N
72 67 71 sylib φ n 1 N n N n 1 N 1 ¬ n = N
73 fz1ssfz0 1 N 1 0 N 1
74 73 sseli n 1 N 1 n 0 N 1
75 74 adantr n 1 N 1 ¬ n = N n 0 N 1
76 72 75 syl φ n 1 N n N n 0 N 1
77 61 76 sylan φ z S k S 2 nd z = N 2 nd k = N n 1 N n N n 0 N 1
78 eleq1 m = n m 0 N 1 n 0 N 1
79 78 anbi2d m = n φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 φ z S k S 2 nd z = N 2 nd k = N n 0 N 1
80 oveq2 m = n 1 m = 1 n
81 80 imaeq2d m = n 2 nd 1 st z 1 m = 2 nd 1 st z 1 n
82 80 imaeq2d m = n 2 nd 1 st k 1 m = 2 nd 1 st k 1 n
83 81 82 eqeq12d m = n 2 nd 1 st z 1 m = 2 nd 1 st k 1 m 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
84 79 83 imbi12d m = n φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 2 nd 1 st z 1 m = 2 nd 1 st k 1 m φ z S k S 2 nd z = N 2 nd k = N n 0 N 1 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
85 1 ad3antrrr φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 N
86 3 ad3antrrr φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 F : 0 N 1 0 K 1 N
87 simpl z S k S z S
88 87 ad3antlr φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 z S
89 simplrl φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 2 nd z = N
90 simpr z S k S k S
91 90 ad3antlr φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 k S
92 simplrr φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 2 nd k = N
93 simpr φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 m 0 N 1
94 85 2 86 88 89 91 92 93 poimirlem12 φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 2 nd 1 st z 1 m 2 nd 1 st k 1 m
95 85 2 86 91 92 88 89 93 poimirlem12 φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 2 nd 1 st k 1 m 2 nd 1 st z 1 m
96 94 95 eqssd φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 2 nd 1 st z 1 m = 2 nd 1 st k 1 m
97 84 96 chvarvv φ z S k S 2 nd z = N 2 nd k = N n 0 N 1 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
98 77 97 syldan φ z S k S 2 nd z = N 2 nd k = N n 1 N n N 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
99 98 anassrs φ z S k S 2 nd z = N 2 nd k = N n 1 N n N 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
100 60 99 pm2.61dane φ z S k S 2 nd z = N 2 nd k = N n 1 N 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
101 simpr φ n 1 N n 1 N
102 elfzelz n 1 N n
103 1 nnzd φ N
104 elfzm1b n N n 1 N n 1 0 N 1
105 102 103 104 syl2anr φ n 1 N n 1 N n 1 0 N 1
106 101 105 mpbid φ n 1 N n 1 0 N 1
107 61 106 sylan φ z S k S 2 nd z = N 2 nd k = N n 1 N n 1 0 N 1
108 ovex n 1 V
109 eleq1 m = n 1 m 0 N 1 n 1 0 N 1
110 109 anbi2d m = n 1 φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 φ z S k S 2 nd z = N 2 nd k = N n 1 0 N 1
111 oveq2 m = n 1 1 m = 1 n 1
112 111 imaeq2d m = n 1 2 nd 1 st z 1 m = 2 nd 1 st z 1 n 1
113 111 imaeq2d m = n 1 2 nd 1 st k 1 m = 2 nd 1 st k 1 n 1
114 112 113 eqeq12d m = n 1 2 nd 1 st z 1 m = 2 nd 1 st k 1 m 2 nd 1 st z 1 n 1 = 2 nd 1 st k 1 n 1
115 110 114 imbi12d m = n 1 φ z S k S 2 nd z = N 2 nd k = N m 0 N 1 2 nd 1 st z 1 m = 2 nd 1 st k 1 m φ z S k S 2 nd z = N 2 nd k = N n 1 0 N 1 2 nd 1 st z 1 n 1 = 2 nd 1 st k 1 n 1
116 108 115 96 vtocl φ z S k S 2 nd z = N 2 nd k = N n 1 0 N 1 2 nd 1 st z 1 n 1 = 2 nd 1 st k 1 n 1
117 107 116 syldan φ z S k S 2 nd z = N 2 nd k = N n 1 N 2 nd 1 st z 1 n 1 = 2 nd 1 st k 1 n 1
118 100 117 difeq12d φ z S k S 2 nd z = N 2 nd k = N n 1 N 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1 = 2 nd 1 st k 1 n 2 nd 1 st k 1 n 1
119 fnsnfv 2 nd 1 st z Fn 1 N n 1 N 2 nd 1 st z n = 2 nd 1 st z n
120 29 119 sylan z S n 1 N 2 nd 1 st z n = 2 nd 1 st z n
121 elfznn n 1 N n
122 uncom 1 n 1 n = n 1 n 1
123 122 difeq1i 1 n 1 n 1 n 1 = n 1 n 1 1 n 1
124 difun2 n 1 n 1 1 n 1 = n 1 n 1
125 123 124 eqtri 1 n 1 n 1 n 1 = n 1 n 1
126 nncn n n
127 npcan1 n n - 1 + 1 = n
128 126 127 syl n n - 1 + 1 = n
129 elnnuz n n 1
130 129 biimpi n n 1
131 128 130 eqeltrd n n - 1 + 1 1
132 nnm1nn0 n n 1 0
133 132 nn0zd n n 1
134 uzid n 1 n 1 n 1
135 peano2uz n 1 n 1 n - 1 + 1 n 1
136 133 134 135 3syl n n - 1 + 1 n 1
137 128 136 eqeltrrd n n n 1
138 fzsplit2 n - 1 + 1 1 n n 1 1 n = 1 n 1 n - 1 + 1 n
139 131 137 138 syl2anc n 1 n = 1 n 1 n - 1 + 1 n
140 128 oveq1d n n - 1 + 1 n = n n
141 nnz n n
142 fzsn n n n = n
143 141 142 syl n n n = n
144 140 143 eqtrd n n - 1 + 1 n = n
145 144 uneq2d n 1 n 1 n - 1 + 1 n = 1 n 1 n
146 139 145 eqtrd n 1 n = 1 n 1 n
147 146 difeq1d n 1 n 1 n 1 = 1 n 1 n 1 n 1
148 nnre n n
149 ltm1 n n 1 < n
150 peano2rem n n 1
151 ltnle n 1 n n 1 < n ¬ n n 1
152 150 151 mpancom n n 1 < n ¬ n n 1
153 149 152 mpbid n ¬ n n 1
154 elfzle2 n 1 n 1 n n 1
155 153 154 nsyl n ¬ n 1 n 1
156 148 155 syl n ¬ n 1 n 1
157 incom 1 n 1 n = n 1 n 1
158 157 eqeq1i 1 n 1 n = n 1 n 1 =
159 disjsn 1 n 1 n = ¬ n 1 n 1
160 disj3 n 1 n 1 = n = n 1 n 1
161 158 159 160 3bitr3i ¬ n 1 n 1 n = n 1 n 1
162 156 161 sylib n n = n 1 n 1
163 125 147 162 3eqtr4a n 1 n 1 n 1 = n
164 121 163 syl n 1 N 1 n 1 n 1 = n
165 164 imaeq2d n 1 N 2 nd 1 st z 1 n 1 n 1 = 2 nd 1 st z n
166 165 adantl z S n 1 N 2 nd 1 st z 1 n 1 n 1 = 2 nd 1 st z n
167 dff1o3 2 nd 1 st z : 1 N 1-1 onto 1 N 2 nd 1 st z : 1 N onto 1 N Fun 2 nd 1 st z -1
168 167 simprbi 2 nd 1 st z : 1 N 1-1 onto 1 N Fun 2 nd 1 st z -1
169 imadif Fun 2 nd 1 st z -1 2 nd 1 st z 1 n 1 n 1 = 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1
170 27 168 169 3syl z S 2 nd 1 st z 1 n 1 n 1 = 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1
171 170 adantr z S n 1 N 2 nd 1 st z 1 n 1 n 1 = 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1
172 120 166 171 3eqtr2d z S n 1 N 2 nd 1 st z n = 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1
173 5 172 sylan φ z S k S 2 nd z = N 2 nd k = N n 1 N 2 nd 1 st z n = 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1
174 eleq1 z = k z S k S
175 174 anbi1d z = k z S n 1 N k S n 1 N
176 2fveq3 z = k 2 nd 1 st z = 2 nd 1 st k
177 176 fveq1d z = k 2 nd 1 st z n = 2 nd 1 st k n
178 177 sneqd z = k 2 nd 1 st z n = 2 nd 1 st k n
179 176 imaeq1d z = k 2 nd 1 st z 1 n = 2 nd 1 st k 1 n
180 176 imaeq1d z = k 2 nd 1 st z 1 n 1 = 2 nd 1 st k 1 n 1
181 179 180 difeq12d z = k 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1 = 2 nd 1 st k 1 n 2 nd 1 st k 1 n 1
182 178 181 eqeq12d z = k 2 nd 1 st z n = 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1 2 nd 1 st k n = 2 nd 1 st k 1 n 2 nd 1 st k 1 n 1
183 175 182 imbi12d z = k z S n 1 N 2 nd 1 st z n = 2 nd 1 st z 1 n 2 nd 1 st z 1 n 1 k S n 1 N 2 nd 1 st k n = 2 nd 1 st k 1 n 2 nd 1 st k 1 n 1
184 183 172 chvarvv k S n 1 N 2 nd 1 st k n = 2 nd 1 st k 1 n 2 nd 1 st k 1 n 1
185 12 184 sylan φ z S k S 2 nd z = N 2 nd k = N n 1 N 2 nd 1 st k n = 2 nd 1 st k 1 n 2 nd 1 st k 1 n 1
186 118 173 185 3eqtr4d φ z S k S 2 nd z = N 2 nd k = N n 1 N 2 nd 1 st z n = 2 nd 1 st k n
187 fvex 2 nd 1 st z n V
188 187 sneqr 2 nd 1 st z n = 2 nd 1 st k n 2 nd 1 st z n = 2 nd 1 st k n
189 186 188 syl φ z S k S 2 nd z = N 2 nd k = N n 1 N 2 nd 1 st z n = 2 nd 1 st k n
190 31 44 189 eqfnfvd φ z S k S 2 nd z = N 2 nd k = N 2 nd 1 st z = 2 nd 1 st k
191 20 21 syl z S 1 st z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
192 33 34 syl k S 1 st k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
193 xpopth 1 st z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N 1 st k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N 1 st 1 st z = 1 st 1 st k 2 nd 1 st z = 2 nd 1 st k 1 st z = 1 st k
194 191 192 193 syl2an z S k S 1 st 1 st z = 1 st 1 st k 2 nd 1 st z = 2 nd 1 st k 1 st z = 1 st k
195 194 ad2antlr φ z S k S 2 nd z = N 2 nd k = N 1 st 1 st z = 1 st 1 st k 2 nd 1 st z = 2 nd 1 st k 1 st z = 1 st k
196 18 190 195 mpbi2and φ z S k S 2 nd z = N 2 nd k = N 1 st z = 1 st k
197 eqtr3 2 nd z = N 2 nd k = N 2 nd z = 2 nd k
198 197 adantl φ z S k S 2 nd z = N 2 nd k = N 2 nd z = 2 nd k
199 xpopth z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N k 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N 1 st z = 1 st k 2 nd z = 2 nd k z = k
200 20 33 199 syl2an z S k S 1 st z = 1 st k 2 nd z = 2 nd k z = k
201 200 ad2antlr φ z S k S 2 nd z = N 2 nd k = N 1 st z = 1 st k 2 nd z = 2 nd k z = k
202 196 198 201 mpbi2and φ z S k S 2 nd z = N 2 nd k = N z = k
203 202 ex φ z S k S 2 nd z = N 2 nd k = N z = k
204 203 ralrimivva φ z S k S 2 nd z = N 2 nd k = N z = k
205 fveqeq2 z = k 2 nd z = N 2 nd k = N
206 205 rmo4 * z S 2 nd z = N z S k S 2 nd z = N 2 nd k = N z = k
207 204 206 sylibr φ * z S 2 nd z = N