Metamath Proof Explorer


Theorem cycpmco2lem6

Description: Lemma for cycpmco2 . (Contributed by Thierry Arnoux, 4-Jan-2024)

Ref Expression
Hypotheses cycpmco2.c M = toCyc D
cycpmco2.s S = SymGrp D
cycpmco2.d φ D V
cycpmco2.w φ W dom M
cycpmco2.i φ I D ran W
cycpmco2.j φ J ran W
cycpmco2.e E = W -1 J + 1
cycpmco2.1 U = W splice E E ⟨“ I ”⟩
cycpmco2lem.1 φ K ran W
cycpmco2lem6.2 φ K I
cycpmco2lem6.1 φ U -1 K E ..^ U 1
Assertion cycpmco2lem6 φ M U K = M W K

Proof

Step Hyp Ref Expression
1 cycpmco2.c M = toCyc D
2 cycpmco2.s S = SymGrp D
3 cycpmco2.d φ D V
4 cycpmco2.w φ W dom M
5 cycpmco2.i φ I D ran W
6 cycpmco2.j φ J ran W
7 cycpmco2.e E = W -1 J + 1
8 cycpmco2.1 U = W splice E E ⟨“ I ”⟩
9 cycpmco2lem.1 φ K ran W
10 cycpmco2lem6.2 φ K I
11 cycpmco2lem6.1 φ U -1 K E ..^ U 1
12 ssrab2 w Word D | w : dom w 1-1 D Word D
13 eqid Base S = Base S
14 1 2 13 tocycf D V M : w Word D | w : dom w 1-1 D Base S
15 3 14 syl φ M : w Word D | w : dom w 1-1 D Base S
16 15 fdmd φ dom M = w Word D | w : dom w 1-1 D
17 4 16 eleqtrd φ W w Word D | w : dom w 1-1 D
18 12 17 sselid φ W Word D
19 5 eldifad φ I D
20 19 s1cld φ ⟨“ I ”⟩ Word D
21 splcl W Word D ⟨“ I ”⟩ Word D W splice E E ⟨“ I ”⟩ Word D
22 18 20 21 syl2anc φ W splice E E ⟨“ I ”⟩ Word D
23 8 22 eqeltrid φ U Word D
24 1 2 3 4 5 6 7 8 cycpmco2f1 φ U : dom U 1-1 D
25 fz0ssnn0 0 W 0
26 id w = W w = W
27 dmeq w = W dom w = dom W
28 eqidd w = W D = D
29 26 27 28 f1eq123d w = W w : dom w 1-1 D W : dom W 1-1 D
30 29 elrab W w Word D | w : dom w 1-1 D W Word D W : dom W 1-1 D
31 17 30 sylib φ W Word D W : dom W 1-1 D
32 31 simprd φ W : dom W 1-1 D
33 f1cnv W : dom W 1-1 D W -1 : ran W 1-1 onto dom W
34 f1of W -1 : ran W 1-1 onto dom W W -1 : ran W dom W
35 32 33 34 3syl φ W -1 : ran W dom W
36 35 6 ffvelrnd φ W -1 J dom W
37 wrddm W Word D dom W = 0 ..^ W
38 18 37 syl φ dom W = 0 ..^ W
39 36 38 eleqtrd φ W -1 J 0 ..^ W
40 fzofzp1 W -1 J 0 ..^ W W -1 J + 1 0 W
41 39 40 syl φ W -1 J + 1 0 W
42 7 41 eqeltrid φ E 0 W
43 25 42 sselid φ E 0
44 nn0uz 0 = 0
45 43 44 eleqtrdi φ E 0
46 fzoss1 E 0 E ..^ U 1 0 ..^ U 1
47 45 46 syl φ E ..^ U 1 0 ..^ U 1
48 47 11 sseldd φ U -1 K 0 ..^ U 1
49 1 3 23 24 48 cycpmfv1 φ M U U U -1 K = U U -1 K + 1
50 f1f1orn U : dom U 1-1 D U : dom U 1-1 onto ran U
51 24 50 syl φ U : dom U 1-1 onto ran U
52 ssun1 ran W ran W I
53 1 2 3 4 5 6 7 8 cycpmco2rn φ ran U = ran W I
54 52 53 sseqtrrid φ ran W ran U
55 54 sselda φ K ran W K ran U
56 f1ocnvfv2 U : dom U 1-1 onto ran U K ran U U U -1 K = K
57 51 55 56 syl2an2r φ K ran W U U -1 K = K
58 9 57 mpdan φ U U -1 K = K
59 58 fveq2d φ M U U U -1 K = M U K
60 8 a1i φ U = W splice E E ⟨“ I ”⟩
61 fzossz E ..^ U 1
62 61 11 sselid φ U -1 K
63 62 zcnd φ U -1 K
64 43 nn0cnd φ E
65 1cnd φ 1
66 63 64 65 nppcan3d φ U -1 K E + 1 + E = U -1 K + 1
67 66 eqcomd φ U -1 K + 1 = U -1 K E + 1 + E
68 60 67 fveq12d φ U U -1 K + 1 = W splice E E ⟨“ I ”⟩ U -1 K E + 1 + E
69 49 59 68 3eqtr3d φ M U K = W splice E E ⟨“ I ”⟩ U -1 K E + 1 + E
70 63 64 npcand φ U -1 K - E + E = U -1 K
71 70 fveq2d φ W U -1 K - E + E = W U -1 K
72 nn0fz0 E 0 E 0 E
73 43 72 sylib φ E 0 E
74 lencl W Word D W 0
75 18 74 syl φ W 0
76 75 nn0cnd φ W
77 ovexd φ W -1 J + 1 V
78 7 77 eqeltrid φ E V
79 splval W dom M E V E V ⟨“ I ”⟩ Word D W splice E E ⟨“ I ”⟩ = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
80 4 78 78 20 79 syl13anc φ W splice E E ⟨“ I ”⟩ = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
81 8 80 syl5eq φ U = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
82 81 fveq2d φ U = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
83 pfxcl W Word D W prefix E Word D
84 18 83 syl φ W prefix E Word D
85 ccatcl W prefix E Word D ⟨“ I ”⟩ Word D W prefix E ++ ⟨“ I ”⟩ Word D
86 84 20 85 syl2anc φ W prefix E ++ ⟨“ I ”⟩ Word D
87 swrdcl W Word D W substr E W Word D
88 18 87 syl φ W substr E W Word D
89 ccatlen W prefix E ++ ⟨“ I ”⟩ Word D W substr E W Word D W prefix E ++ ⟨“ I ”⟩ ++ W substr E W = W prefix E ++ ⟨“ I ”⟩ + W substr E W
90 86 88 89 syl2anc φ W prefix E ++ ⟨“ I ”⟩ ++ W substr E W = W prefix E ++ ⟨“ I ”⟩ + W substr E W
91 ccatws1len W prefix E Word D W prefix E ++ ⟨“ I ”⟩ = W prefix E + 1
92 18 83 91 3syl φ W prefix E ++ ⟨“ I ”⟩ = W prefix E + 1
93 pfxlen W Word D E 0 W W prefix E = E
94 18 42 93 syl2anc φ W prefix E = E
95 94 oveq1d φ W prefix E + 1 = E + 1
96 92 95 eqtrd φ W prefix E ++ ⟨“ I ”⟩ = E + 1
97 nn0fz0 W 0 W 0 W
98 75 97 sylib φ W 0 W
99 swrdlen W Word D E 0 W W 0 W W substr E W = W E
100 18 42 98 99 syl3anc φ W substr E W = W E
101 96 100 oveq12d φ W prefix E ++ ⟨“ I ”⟩ + W substr E W = E + 1 + W E
102 82 90 101 3eqtrd φ U = E + 1 + W E
103 43 nn0zd φ E
104 103 peano2zd φ E + 1
105 104 zcnd φ E + 1
106 105 76 64 addsubassd φ E + 1 + W - E = E + 1 + W E
107 64 65 76 addassd φ E + 1 + W = E + 1 + W
108 107 oveq1d φ E + 1 + W - E = E + 1 + W - E
109 102 106 108 3eqtr2d φ U = E + 1 + W - E
110 65 76 addcld φ 1 + W
111 64 110 pncan2d φ E + 1 + W - E = 1 + W
112 65 76 addcomd φ 1 + W = W + 1
113 109 111 112 3eqtrd φ U = W + 1
114 76 65 113 mvrraddd φ U 1 = W
115 114 oveq2d φ E ..^ U 1 = E ..^ W
116 11 115 eleqtrd φ U -1 K E ..^ W
117 fzosubel U -1 K E ..^ W E U -1 K E E E ..^ W E
118 116 103 117 syl2anc φ U -1 K E E E ..^ W E
119 64 subidd φ E E = 0
120 119 oveq1d φ E E ..^ W E = 0 ..^ W E
121 118 120 eleqtrd φ U -1 K E 0 ..^ W E
122 65 64 addcomd φ 1 + E = E + 1
123 s1len ⟨“ I ”⟩ = 1
124 123 oveq2i E + ⟨“ I ”⟩ = E + 1
125 122 124 eqtr4di φ 1 + E = E + ⟨“ I ”⟩
126 18 73 42 20 121 125 splfv3 φ W splice E E ⟨“ I ”⟩ U -1 K E + 1 + E = W U -1 K - E + E
127 114 oveq1d φ U - 1 - 1 = W 1
128 127 oveq2d φ E ..^ U - 1 - 1 = E ..^ W 1
129 fzoss1 E 0 E ..^ W 1 0 ..^ W 1
130 45 129 syl φ E ..^ W 1 0 ..^ W 1
131 128 130 eqsstrd φ E ..^ U - 1 - 1 0 ..^ W 1
132 f1ocnvdm U : dom U 1-1 onto ran U K ran U U -1 K dom U
133 51 55 132 syl2an2r φ K ran W U -1 K dom U
134 9 133 mpdan φ U -1 K dom U
135 75 nn0zd φ W
136 135 peano2zd φ W + 1
137 elfzonn0 W -1 J 0 ..^ W W -1 J 0
138 nn0p1nn W -1 J 0 W -1 J + 1
139 39 137 138 3syl φ W -1 J + 1
140 7 139 eqeltrid φ E
141 140 nnred φ E
142 135 zred φ W
143 1red φ 1
144 elfzle2 E 0 W E W
145 42 144 syl φ E W
146 141 142 143 145 leadd1dd φ E + 1 W + 1
147 eluz2 W + 1 E + 1 E + 1 W + 1 E + 1 W + 1
148 104 136 146 147 syl3anbrc φ W + 1 E + 1
149 fzoss2 W + 1 E + 1 0 ..^ E + 1 0 ..^ W + 1
150 148 149 syl φ 0 ..^ E + 1 0 ..^ W + 1
151 fzonn0p1 E 0 E 0 ..^ E + 1
152 43 151 syl φ E 0 ..^ E + 1
153 150 152 sseldd φ E 0 ..^ W + 1
154 113 oveq2d φ 0 ..^ U = 0 ..^ W + 1
155 153 154 eleqtrrd φ E 0 ..^ U
156 wrddm U Word D dom U = 0 ..^ U
157 23 156 syl φ dom U = 0 ..^ U
158 155 157 eleqtrrd φ E dom U
159 1 2 3 4 5 6 7 8 cycpmco2lem2 φ U E = I
160 10 58 159 3netr4d φ U U -1 K U E
161 f1fveq U : dom U 1-1 D U -1 K dom U E dom U U U -1 K = U E U -1 K = E
162 161 necon3bid U : dom U 1-1 D U -1 K dom U E dom U U U -1 K U E U -1 K E
163 162 biimp3a U : dom U 1-1 D U -1 K dom U E dom U U U -1 K U E U -1 K E
164 24 134 158 160 163 syl121anc φ U -1 K E
165 fzom1ne1 U -1 K E ..^ U 1 U -1 K E U -1 K 1 E ..^ U - 1 - 1
166 11 164 165 syl2anc φ U -1 K 1 E ..^ U - 1 - 1
167 131 166 sseldd φ U -1 K 1 0 ..^ W 1
168 1 3 18 32 167 cycpmfv1 φ M W W U -1 K 1 = W U -1 K - 1 + 1
169 63 65 64 subsub4d φ U -1 K - 1 - E = U -1 K 1 + E
170 169 oveq1d φ U -1 K - 1 - E + 1 + E = U -1 K 1 + E + 1 + E
171 65 64 addcld φ 1 + E
172 63 171 npcand φ U -1 K 1 + E + 1 + E = U -1 K
173 170 172 eqtr2d φ U -1 K = U -1 K - 1 - E + 1 + E
174 60 173 fveq12d φ U U -1 K = W splice E E ⟨“ I ”⟩ U -1 K - 1 - E + 1 + E
175 64 76 pncan3d φ E + W - E = W
176 114 135 eqeltrd φ U 1
177 1zzd φ 1
178 176 177 zsubcld φ U - 1 - 1
179 178 zred φ U - 1 - 1
180 114 142 eqeltrd φ U 1
181 180 ltm1d φ U - 1 - 1 < U 1
182 181 114 breqtrd φ U - 1 - 1 < W
183 179 142 182 ltled φ U - 1 - 1 W
184 eluz1 U - 1 - 1 W U - 1 - 1 W U - 1 - 1 W
185 184 biimpar U - 1 - 1 W U - 1 - 1 W W U - 1 - 1
186 178 135 183 185 syl12anc φ W U - 1 - 1
187 175 186 eqeltrd φ E + W - E U - 1 - 1
188 fzoss2 E + W - E U - 1 - 1 E ..^ U - 1 - 1 E ..^ E + W - E
189 187 188 syl φ E ..^ U - 1 - 1 E ..^ E + W - E
190 189 166 sseldd φ U -1 K 1 E ..^ E + W - E
191 135 103 zsubcld φ W E
192 fzosubel3 U -1 K 1 E ..^ E + W - E W E U -1 K - 1 - E 0 ..^ W E
193 190 191 192 syl2anc φ U -1 K - 1 - E 0 ..^ W E
194 18 73 42 20 193 125 splfv3 φ W splice E E ⟨“ I ”⟩ U -1 K - 1 - E + 1 + E = W U -1 K 1 - E + E
195 63 65 subcld φ U -1 K 1
196 195 64 npcand φ U -1 K 1 - E + E = U -1 K 1
197 196 fveq2d φ W U -1 K 1 - E + E = W U -1 K 1
198 174 194 197 3eqtrd φ U U -1 K = W U -1 K 1
199 198 58 eqtr3d φ W U -1 K 1 = K
200 199 fveq2d φ M W W U -1 K 1 = M W K
201 63 65 npcand φ U -1 K - 1 + 1 = U -1 K
202 201 fveq2d φ W U -1 K - 1 + 1 = W U -1 K
203 168 200 202 3eqtr3d φ M W K = W U -1 K
204 71 126 203 3eqtr4rd φ M W K = W splice E E ⟨“ I ”⟩ U -1 K E + 1 + E
205 69 204 eqtr4d φ M U K = M W K