Metamath Proof Explorer


Theorem poimirlem10

Description: Lemma for poimir establishing the cube that yields the simplex that yields a face if the opposite vertex was first 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
poimirlem12.2 φ T S
poimirlem11.3 φ 2 nd T = 0
Assertion poimirlem10 φ F N 1 f 1 N × 1 = 1 st 1 st 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 poimirlem12.2 φ T S
5 poimirlem11.3 φ 2 nd T = 0
6 ovexd φ 1 N V
7 nnm1nn0 N N 1 0
8 1 7 syl φ N 1 0
9 nn0fz0 N 1 0 N 1 0 N 1
10 8 9 sylib φ N 1 0 N 1
11 3 10 ffvelrnd φ F N 1 0 K 1 N
12 elmapfn F N 1 0 K 1 N F N 1 Fn 1 N
13 11 12 syl φ F N 1 Fn 1 N
14 1ex 1 V
15 fnconstg 1 V 1 N × 1 Fn 1 N
16 14 15 mp1i φ 1 N × 1 Fn 1 N
17 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
18 17 2 eleq2s T S T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
19 4 18 syl φ T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N × 0 N
20 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
21 19 20 syl φ 1 st T 0 ..^ K 1 N × f | f : 1 N 1-1 onto 1 N
22 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
23 21 22 syl φ 1 st 1 st T 0 ..^ K 1 N
24 elmapfn 1 st 1 st T 0 ..^ K 1 N 1 st 1 st T Fn 1 N
25 23 24 syl φ 1 st 1 st T Fn 1 N
26 fveq2 t = T 2 nd t = 2 nd T
27 26 breq2d t = T y < 2 nd t y < 2 nd T
28 27 ifbid t = T if y < 2 nd t y y + 1 = if y < 2 nd T y y + 1
29 28 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
30 2fveq3 t = T 1 st 1 st t = 1 st 1 st T
31 2fveq3 t = T 2 nd 1 st t = 2 nd 1 st T
32 31 imaeq1d t = T 2 nd 1 st t 1 j = 2 nd 1 st T 1 j
33 32 xpeq1d t = T 2 nd 1 st t 1 j × 1 = 2 nd 1 st T 1 j × 1
34 31 imaeq1d t = T 2 nd 1 st t j + 1 N = 2 nd 1 st T j + 1 N
35 34 xpeq1d t = T 2 nd 1 st t j + 1 N × 0 = 2 nd 1 st T j + 1 N × 0
36 33 35 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
37 30 36 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
38 37 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
39 29 38 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
40 39 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
41 40 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
42 41 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
43 42 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
44 4 43 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
45 breq12 y = N 1 2 nd T = 0 y < 2 nd T N 1 < 0
46 5 45 sylan2 y = N 1 φ y < 2 nd T N 1 < 0
47 46 ancoms φ y = N 1 y < 2 nd T N 1 < 0
48 oveq1 y = N 1 y + 1 = N - 1 + 1
49 1 nncnd φ N
50 npcan1 N N - 1 + 1 = N
51 49 50 syl φ N - 1 + 1 = N
52 48 51 sylan9eqr φ y = N 1 y + 1 = N
53 47 52 ifbieq2d φ y = N 1 if y < 2 nd T y y + 1 = if N 1 < 0 y N
54 8 nn0ge0d φ 0 N 1
55 0red φ 0
56 8 nn0red φ N 1
57 55 56 lenltd φ 0 N 1 ¬ N 1 < 0
58 54 57 mpbid φ ¬ N 1 < 0
59 58 iffalsed φ if N 1 < 0 y N = N
60 59 adantr φ y = N 1 if N 1 < 0 y N = N
61 53 60 eqtrd φ y = N 1 if y < 2 nd T y y + 1 = N
62 61 csbeq1d φ y = 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 = N / j 1 st 1 st T + f 2 nd 1 st T 1 j × 1 2 nd 1 st T j + 1 N × 0
63 oveq2 j = N 1 j = 1 N
64 63 imaeq2d j = N 2 nd 1 st T 1 j = 2 nd 1 st T 1 N
65 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
66 21 65 syl φ 2 nd 1 st T f | f : 1 N 1-1 onto 1 N
67 fvex 2 nd 1 st T V
68 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
69 67 68 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
70 66 69 sylib φ 2 nd 1 st T : 1 N 1-1 onto 1 N
71 f1ofo 2 nd 1 st T : 1 N 1-1 onto 1 N 2 nd 1 st T : 1 N onto 1 N
72 foima 2 nd 1 st T : 1 N onto 1 N 2 nd 1 st T 1 N = 1 N
73 70 71 72 3syl φ 2 nd 1 st T 1 N = 1 N
74 64 73 sylan9eqr φ j = N 2 nd 1 st T 1 j = 1 N
75 74 xpeq1d φ j = N 2 nd 1 st T 1 j × 1 = 1 N × 1
76 oveq1 j = N j + 1 = N + 1
77 76 oveq1d j = N j + 1 N = N + 1 N
78 1 nnred φ N
79 78 ltp1d φ N < N + 1
80 1 nnzd φ N
81 80 peano2zd φ N + 1
82 fzn N + 1 N N < N + 1 N + 1 N =
83 81 80 82 syl2anc φ N < N + 1 N + 1 N =
84 79 83 mpbid φ N + 1 N =
85 77 84 sylan9eqr φ j = N j + 1 N =
86 85 imaeq2d φ j = N 2 nd 1 st T j + 1 N = 2 nd 1 st T
87 86 xpeq1d φ j = N 2 nd 1 st T j + 1 N × 0 = 2 nd 1 st T × 0
88 ima0 2 nd 1 st T =
89 88 xpeq1i 2 nd 1 st T × 0 = × 0
90 0xp × 0 =
91 89 90 eqtri 2 nd 1 st T × 0 =
92 87 91 eqtrdi φ j = N 2 nd 1 st T j + 1 N × 0 =
93 75 92 uneq12d φ j = N 2 nd 1 st T 1 j × 1 2 nd 1 st T j + 1 N × 0 = 1 N × 1
94 un0 1 N × 1 = 1 N × 1
95 93 94 eqtrdi φ j = N 2 nd 1 st T 1 j × 1 2 nd 1 st T j + 1 N × 0 = 1 N × 1
96 95 oveq2d φ j = N 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 1 N × 1
97 1 96 csbied φ N / j 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 1 N × 1
98 97 adantr φ y = N 1 N / j 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 1 N × 1
99 62 98 eqtrd φ y = 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 = 1 st 1 st T + f 1 N × 1
100 ovexd φ 1 st 1 st T + f 1 N × 1 V
101 44 99 10 100 fvmptd φ F N 1 = 1 st 1 st T + f 1 N × 1
102 101 fveq1d φ F N 1 n = 1 st 1 st T + f 1 N × 1 n
103 102 adantr φ n 1 N F N 1 n = 1 st 1 st T + f 1 N × 1 n
104 inidm 1 N 1 N = 1 N
105 eqidd φ n 1 N 1 st 1 st T n = 1 st 1 st T n
106 14 fvconst2 n 1 N 1 N × 1 n = 1
107 106 adantl φ n 1 N 1 N × 1 n = 1
108 25 16 6 6 104 105 107 ofval φ n 1 N 1 st 1 st T + f 1 N × 1 n = 1 st 1 st T n + 1
109 103 108 eqtrd φ n 1 N F N 1 n = 1 st 1 st T n + 1
110 elmapi 1 st 1 st T 0 ..^ K 1 N 1 st 1 st T : 1 N 0 ..^ K
111 23 110 syl φ 1 st 1 st T : 1 N 0 ..^ K
112 111 ffvelrnda φ n 1 N 1 st 1 st T n 0 ..^ K
113 elfzonn0 1 st 1 st T n 0 ..^ K 1 st 1 st T n 0
114 112 113 syl φ n 1 N 1 st 1 st T n 0
115 114 nn0cnd φ n 1 N 1 st 1 st T n
116 pncan1 1 st 1 st T n 1 st 1 st T n + 1 - 1 = 1 st 1 st T n
117 115 116 syl φ n 1 N 1 st 1 st T n + 1 - 1 = 1 st 1 st T n
118 6 13 16 25 109 107 117 offveq φ F N 1 f 1 N × 1 = 1 st 1 st T