Metamath Proof Explorer


Theorem poimirlem21

Description: Lemma for poimir stating that, given a face not on a back face of the cube and a simplex in which it's opposite the final point of the walk, there exists exactly one other simplex containing it. (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
poimirlem22.2 φ T S
poimirlem22.3 φ n 1 N p ran F p n 0
poimirlem21.4 φ 2 nd T = N
Assertion poimirlem21 φ ∃! z S z T

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 poimirlem22.2 φ T S
5 poimirlem22.3 φ n 1 N p ran F p n 0
6 poimirlem21.4 φ 2 nd T = N
7 1 2 3 4 5 6 poimirlem20 φ z S z T
8 6 adantr φ z S 2 nd T = N
9 1 nnred φ N
10 9 ltm1d φ N 1 < N
11 nnm1nn0 N N 1 0
12 1 11 syl φ N 1 0
13 12 nn0red φ N 1
14 13 9 ltnled φ N 1 < N ¬ N N 1
15 10 14 mpbid φ ¬ N N 1
16 elfzle2 N 1 N 1 N N 1
17 15 16 nsyl φ ¬ N 1 N 1
18 eleq1 2 nd z = N 2 nd z 1 N 1 N 1 N 1
19 18 notbid 2 nd z = N ¬ 2 nd z 1 N 1 ¬ N 1 N 1
20 17 19 syl5ibrcom φ 2 nd z = N ¬ 2 nd z 1 N 1
21 20 necon2ad φ 2 nd z 1 N 1 2 nd z N
22 21 adantr φ z S 2 nd z 1 N 1 2 nd z N
23 1 ad2antrr φ z S 2 nd z 1 N 1 N
24 fveq2 t = z 2 nd t = 2 nd z
25 24 breq2d t = z y < 2 nd t y < 2 nd z
26 25 ifbid t = z if y < 2 nd t y y + 1 = if y < 2 nd z y y + 1
27 26 csbeq1d t = z 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 = if y < 2 nd z 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
28 2fveq3 t = z 1 st 1 st t = 1 st 1 st z
29 2fveq3 t = z 2 nd 1 st t = 2 nd 1 st z
30 29 imaeq1d t = z 2 nd 1 st t 1 j = 2 nd 1 st z 1 j
31 30 xpeq1d t = z 2 nd 1 st t 1 j × 1 = 2 nd 1 st z 1 j × 1
32 29 imaeq1d t = z 2 nd 1 st t j + 1 N = 2 nd 1 st z j + 1 N
33 32 xpeq1d t = z 2 nd 1 st t j + 1 N × 0 = 2 nd 1 st z j + 1 N × 0
34 31 33 uneq12d t = z 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0 = 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
35 28 34 oveq12d t = z 1 st 1 st t + f 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0 = 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
36 35 csbeq2dv t = z if y < 2 nd z 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 = if y < 2 nd z y y + 1 / j 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
37 27 36 eqtrd t = z 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 = if y < 2 nd z y y + 1 / j 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
38 37 mpteq2dv t = z 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 = y 0 N 1 if y < 2 nd z y y + 1 / j 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
39 38 eqeq2d t = z 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 F = y 0 N 1 if y < 2 nd z y y + 1 / j 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
40 39 2 elrab2 z S z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N F = y 0 N 1 if y < 2 nd z y y + 1 / j 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
41 40 simprbi z S F = y 0 N 1 if y < 2 nd z y y + 1 / j 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
42 41 ad2antlr φ z S 2 nd z 1 N 1 F = y 0 N 1 if y < 2 nd z y y + 1 / j 1 st 1 st z + f 2 nd 1 st z 1 j × 1 2 nd 1 st z j + 1 N × 0
43 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
44 43 2 eleq2s z S z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
45 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
46 44 45 syl z S 1 st z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
47 xp1st 1 st z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N 1 st 1 st z 0 ..^ K 1 N
48 46 47 syl z S 1 st 1 st z 0 ..^ K 1 N
49 elmapi 1 st 1 st z 0 ..^ K 1 N 1 st 1 st z : 1 N 0 ..^ K
50 48 49 syl z S 1 st 1 st z : 1 N 0 ..^ K
51 elfzoelz n 0 ..^ K n
52 51 ssriv 0 ..^ K
53 fss 1 st 1 st z : 1 N 0 ..^ K 0 ..^ K 1 st 1 st z : 1 N
54 50 52 53 sylancl z S 1 st 1 st z : 1 N
55 54 ad2antlr φ z S 2 nd z 1 N 1 1 st 1 st z : 1 N
56 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
57 46 56 syl z S 2 nd 1 st z f | f : 1 N 1-1 onto 1 N
58 fvex 2 nd 1 st z V
59 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
60 58 59 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
61 57 60 sylib z S 2 nd 1 st z : 1 N 1-1 onto 1 N
62 61 ad2antlr φ z S 2 nd z 1 N 1 2 nd 1 st z : 1 N 1-1 onto 1 N
63 simpr φ z S 2 nd z 1 N 1 2 nd z 1 N 1
64 23 42 55 62 63 poimirlem1 φ z S 2 nd z 1 N 1 ¬ * n 1 N F 2 nd z 1 n F 2 nd z n
65 1 ad2antrr φ 2 nd z 1 N 1 2 nd T 2 nd z N
66 fveq2 t = T 2 nd t = 2 nd T
67 66 breq2d t = T y < 2 nd t y < 2 nd T
68 67 ifbid t = T if y < 2 nd t y y + 1 = if y < 2 nd T y y + 1
69 68 csbeq1d t = T 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 = 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
70 2fveq3 t = T 1 st 1 st t = 1 st 1 st T
71 2fveq3 t = T 2 nd 1 st t = 2 nd 1 st T
72 71 imaeq1d t = T 2 nd 1 st t 1 j = 2 nd 1 st T 1 j
73 72 xpeq1d t = T 2 nd 1 st t 1 j × 1 = 2 nd 1 st T 1 j × 1
74 71 imaeq1d t = T 2 nd 1 st t j + 1 N = 2 nd 1 st T j + 1 N
75 74 xpeq1d t = T 2 nd 1 st t j + 1 N × 0 = 2 nd 1 st T j + 1 N × 0
76 73 75 uneq12d t = T 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0 = 2 nd 1 st T 1 j × 1 2 nd 1 st T j + 1 N × 0
77 70 76 oveq12d t = T 1 st 1 st t + f 2 nd 1 st t 1 j × 1 2 nd 1 st t j + 1 N × 0 = 1 st 1 st T + f 2 nd 1 st T 1 j × 1 2 nd 1 st T j + 1 N × 0
78 77 csbeq2dv t = T 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 = 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
79 69 78 eqtrd t = T 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 = 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
80 79 mpteq2dv t = T 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 = 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
81 80 eqeq2d t = T 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 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
82 81 2 elrab2 T 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
83 82 simprbi T S 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
84 4 83 syl φ 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
85 84 ad2antrr φ 2 nd z 1 N 1 2 nd T 2 nd z 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
86 elrabi T 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 T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
87 86 2 eleq2s T S T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
88 4 87 syl φ T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
89 xp1st T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N 1 st T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
90 88 89 syl φ 1 st T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
91 xp1st 1 st T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N 1 st 1 st T 0 ..^ K 1 N
92 90 91 syl φ 1 st 1 st T 0 ..^ K 1 N
93 elmapi 1 st 1 st T 0 ..^ K 1 N 1 st 1 st T : 1 N 0 ..^ K
94 92 93 syl φ 1 st 1 st T : 1 N 0 ..^ K
95 fss 1 st 1 st T : 1 N 0 ..^ K 0 ..^ K 1 st 1 st T : 1 N
96 94 52 95 sylancl φ 1 st 1 st T : 1 N
97 96 ad2antrr φ 2 nd z 1 N 1 2 nd T 2 nd z 1 st 1 st T : 1 N
98 xp2nd 1 st T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N 2 nd 1 st T f | f : 1 N 1-1 onto 1 N
99 90 98 syl φ 2 nd 1 st T f | f : 1 N 1-1 onto 1 N
100 fvex 2 nd 1 st T V
101 f1oeq1 f = 2 nd 1 st T f : 1 N 1-1 onto 1 N 2 nd 1 st T : 1 N 1-1 onto 1 N
102 100 101 elab 2 nd 1 st T f | f : 1 N 1-1 onto 1 N 2 nd 1 st T : 1 N 1-1 onto 1 N
103 99 102 sylib φ 2 nd 1 st T : 1 N 1-1 onto 1 N
104 103 ad2antrr φ 2 nd z 1 N 1 2 nd T 2 nd z 2 nd 1 st T : 1 N 1-1 onto 1 N
105 simplr φ 2 nd z 1 N 1 2 nd T 2 nd z 2 nd z 1 N 1
106 xp2nd T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N 2 nd T 0 N
107 88 106 syl φ 2 nd T 0 N
108 107 adantr φ 2 nd z 1 N 1 2 nd T 0 N
109 eldifsn 2 nd T 0 N 2 nd z 2 nd T 0 N 2 nd T 2 nd z
110 109 biimpri 2 nd T 0 N 2 nd T 2 nd z 2 nd T 0 N 2 nd z
111 108 110 sylan φ 2 nd z 1 N 1 2 nd T 2 nd z 2 nd T 0 N 2 nd z
112 65 85 97 104 105 111 poimirlem2 φ 2 nd z 1 N 1 2 nd T 2 nd z * n 1 N F 2 nd z 1 n F 2 nd z n
113 112 ex φ 2 nd z 1 N 1 2 nd T 2 nd z * n 1 N F 2 nd z 1 n F 2 nd z n
114 113 necon1bd φ 2 nd z 1 N 1 ¬ * n 1 N F 2 nd z 1 n F 2 nd z n 2 nd T = 2 nd z
115 114 adantlr φ z S 2 nd z 1 N 1 ¬ * n 1 N F 2 nd z 1 n F 2 nd z n 2 nd T = 2 nd z
116 64 115 mpd φ z S 2 nd z 1 N 1 2 nd T = 2 nd z
117 116 neeq1d φ z S 2 nd z 1 N 1 2 nd T N 2 nd z N
118 117 exbiri φ z S 2 nd z 1 N 1 2 nd z N 2 nd T N
119 22 118 mpdd φ z S 2 nd z 1 N 1 2 nd T N
120 119 necon2bd φ z S 2 nd T = N ¬ 2 nd z 1 N 1
121 8 120 mpd φ z S ¬ 2 nd z 1 N 1
122 xp2nd z 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N 2 nd z 0 N
123 44 122 syl z S 2 nd z 0 N
124 nn0uz 0 = 0
125 12 124 eleqtrdi φ N 1 0
126 fzpred N 1 0 0 N 1 = 0 0 + 1 N 1
127 125 126 syl φ 0 N 1 = 0 0 + 1 N 1
128 0p1e1 0 + 1 = 1
129 128 oveq1i 0 + 1 N 1 = 1 N 1
130 129 uneq2i 0 0 + 1 N 1 = 0 1 N 1
131 127 130 eqtrdi φ 0 N 1 = 0 1 N 1
132 131 eleq2d φ 2 nd z 0 N 1 2 nd z 0 1 N 1
133 132 notbid φ ¬ 2 nd z 0 N 1 ¬ 2 nd z 0 1 N 1
134 ioran ¬ 2 nd z = 0 2 nd z 1 N 1 ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1
135 elun 2 nd z 0 1 N 1 2 nd z 0 2 nd z 1 N 1
136 fvex 2 nd z V
137 136 elsn 2 nd z 0 2 nd z = 0
138 137 orbi1i 2 nd z 0 2 nd z 1 N 1 2 nd z = 0 2 nd z 1 N 1
139 135 138 bitri 2 nd z 0 1 N 1 2 nd z = 0 2 nd z 1 N 1
140 134 139 xchnxbir ¬ 2 nd z 0 1 N 1 ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1
141 133 140 bitrdi φ ¬ 2 nd z 0 N 1 ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1
142 141 anbi2d φ 2 nd z 0 N ¬ 2 nd z 0 N 1 2 nd z 0 N ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1
143 uncom 0 N 1 N = N 0 N 1
144 143 difeq1i 0 N 1 N 0 N 1 = N 0 N 1 0 N 1
145 difun2 N 0 N 1 0 N 1 = N 0 N 1
146 144 145 eqtri 0 N 1 N 0 N 1 = N 0 N 1
147 1 nncnd φ N
148 npcan1 N N - 1 + 1 = N
149 147 148 syl φ N - 1 + 1 = N
150 1 nnnn0d φ N 0
151 150 124 eleqtrdi φ N 0
152 149 151 eqeltrd φ N - 1 + 1 0
153 12 nn0zd φ N 1
154 uzid N 1 N 1 N 1
155 peano2uz N 1 N 1 N - 1 + 1 N 1
156 153 154 155 3syl φ N - 1 + 1 N 1
157 149 156 eqeltrrd φ N N 1
158 fzsplit2 N - 1 + 1 0 N N 1 0 N = 0 N 1 N - 1 + 1 N
159 152 157 158 syl2anc φ 0 N = 0 N 1 N - 1 + 1 N
160 149 oveq1d φ N - 1 + 1 N = N N
161 1 nnzd φ N
162 fzsn N N N = N
163 161 162 syl φ N N = N
164 160 163 eqtrd φ N - 1 + 1 N = N
165 164 uneq2d φ 0 N 1 N - 1 + 1 N = 0 N 1 N
166 159 165 eqtrd φ 0 N = 0 N 1 N
167 166 difeq1d φ 0 N 0 N 1 = 0 N 1 N 0 N 1
168 elfzle2 N 0 N 1 N N 1
169 15 168 nsyl φ ¬ N 0 N 1
170 incom 0 N 1 N = N 0 N 1
171 170 eqeq1i 0 N 1 N = N 0 N 1 =
172 disjsn 0 N 1 N = ¬ N 0 N 1
173 disj3 N 0 N 1 = N = N 0 N 1
174 171 172 173 3bitr3i ¬ N 0 N 1 N = N 0 N 1
175 169 174 sylib φ N = N 0 N 1
176 146 167 175 3eqtr4a φ 0 N 0 N 1 = N
177 176 eleq2d φ 2 nd z 0 N 0 N 1 2 nd z N
178 eldif 2 nd z 0 N 0 N 1 2 nd z 0 N ¬ 2 nd z 0 N 1
179 136 elsn 2 nd z N 2 nd z = N
180 177 178 179 3bitr3g φ 2 nd z 0 N ¬ 2 nd z 0 N 1 2 nd z = N
181 142 180 bitr3d φ 2 nd z 0 N ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1 2 nd z = N
182 181 biimpd φ 2 nd z 0 N ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1 2 nd z = N
183 182 expdimp φ 2 nd z 0 N ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1 2 nd z = N
184 123 183 sylan2 φ z S ¬ 2 nd z = 0 ¬ 2 nd z 1 N 1 2 nd z = N
185 121 184 mpan2d φ z S ¬ 2 nd z = 0 2 nd z = N
186 1 2 3 poimirlem14 φ * z S 2 nd z = N
187 fveqeq2 z = s 2 nd z = N 2 nd s = N
188 187 rmo4 * z S 2 nd z = N z S s S 2 nd z = N 2 nd s = N z = s
189 186 188 sylib φ z S s S 2 nd z = N 2 nd s = N z = s
190 189 r19.21bi φ z S s S 2 nd z = N 2 nd s = N z = s
191 4 adantr φ z S T S
192 fveqeq2 s = T 2 nd s = N 2 nd T = N
193 192 anbi2d s = T 2 nd z = N 2 nd s = N 2 nd z = N 2 nd T = N
194 eqeq2 s = T z = s z = T
195 193 194 imbi12d s = T 2 nd z = N 2 nd s = N z = s 2 nd z = N 2 nd T = N z = T
196 195 rspccv s S 2 nd z = N 2 nd s = N z = s T S 2 nd z = N 2 nd T = N z = T
197 190 191 196 sylc φ z S 2 nd z = N 2 nd T = N z = T
198 8 197 mpan2d φ z S 2 nd z = N z = T
199 185 198 syld φ z S ¬ 2 nd z = 0 z = T
200 199 necon1ad φ z S z T 2 nd z = 0
201 200 ralrimiva φ z S z T 2 nd z = 0
202 1 2 3 poimirlem13 φ * z S 2 nd z = 0
203 rmoim z S z T 2 nd z = 0 * z S 2 nd z = 0 * z S z T
204 201 202 203 sylc φ * z S z T
205 reu5 ∃! z S z T z S z T * z S z T
206 7 204 205 sylanbrc φ ∃! z S z T