Metamath Proof Explorer


Theorem cycpmco2

Description: The composition of a cyclic permutation and a transposition of one element in the cycle and one outside the cycle results in a cyclic permutation with one more element in its orbit. (Contributed by Thierry Arnoux, 2-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 ”⟩
Assertion cycpmco2 φ M W M ⟨“ IJ ”⟩ = M U

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 eqid Base S = Base S
10 1 2 9 tocycf D V M : w Word D | w : dom w 1-1 D Base S
11 3 10 syl φ M : w Word D | w : dom w 1-1 D Base S
12 11 fdmd φ dom M = w Word D | w : dom w 1-1 D
13 4 12 eleqtrd φ W w Word D | w : dom w 1-1 D
14 11 13 ffvelrnd φ M W Base S
15 2 9 symgbasf M W Base S M W : D D
16 14 15 syl φ M W : D D
17 16 ffnd φ M W Fn D
18 5 eldifad φ I D
19 ssrab2 w Word D | w : dom w 1-1 D Word D
20 19 13 sselid φ W Word D
21 id w = W w = W
22 dmeq w = W dom w = dom W
23 eqidd w = W D = D
24 21 22 23 f1eq123d w = W w : dom w 1-1 D W : dom W 1-1 D
25 24 elrab3 W Word D W w Word D | w : dom w 1-1 D W : dom W 1-1 D
26 25 biimpa W Word D W w Word D | w : dom w 1-1 D W : dom W 1-1 D
27 20 13 26 syl2anc φ W : dom W 1-1 D
28 f1f W : dom W 1-1 D W : dom W D
29 27 28 syl φ W : dom W D
30 29 frnd φ ran W D
31 30 6 sseldd φ J D
32 5 eldifbd φ ¬ I ran W
33 nelne2 J ran W ¬ I ran W J I
34 6 32 33 syl2anc φ J I
35 34 necomd φ I J
36 1 3 18 31 35 2 cycpm2cl φ M ⟨“ IJ ”⟩ Base S
37 2 9 symgbasf M ⟨“ IJ ”⟩ Base S M ⟨“ IJ ”⟩ : D D
38 36 37 syl φ M ⟨“ IJ ”⟩ : D D
39 38 ffnd φ M ⟨“ IJ ”⟩ Fn D
40 38 frnd φ ran M ⟨“ IJ ”⟩ D
41 fnco M W Fn D M ⟨“ IJ ”⟩ Fn D ran M ⟨“ IJ ”⟩ D M W M ⟨“ IJ ”⟩ Fn D
42 17 39 40 41 syl3anc φ M W M ⟨“ IJ ”⟩ Fn D
43 18 s1cld φ ⟨“ I ”⟩ Word D
44 splcl W Word D ⟨“ I ”⟩ Word D W splice E E ⟨“ I ”⟩ Word D
45 20 43 44 syl2anc φ W splice E E ⟨“ I ”⟩ Word D
46 8 45 eqeltrid φ U Word D
47 1 2 3 4 5 6 7 8 cycpmco2f1 φ U : dom U 1-1 D
48 1 3 46 47 2 cycpmcl φ M U Base S
49 2 9 symgbasf M U Base S M U : D D
50 48 49 syl φ M U : D D
51 50 ffnd φ M U Fn D
52 fvco3 M ⟨“ IJ ”⟩ : D D i D M W M ⟨“ IJ ”⟩ i = M W M ⟨“ IJ ”⟩ i
53 38 52 sylan φ i D M W M ⟨“ IJ ”⟩ i = M W M ⟨“ IJ ”⟩ i
54 1 3 18 31 35 2 cyc2fv2 φ M ⟨“ IJ ”⟩ J = I
55 54 fveq2d φ M W M ⟨“ IJ ”⟩ J = M W I
56 1 2 3 4 5 6 7 8 cycpmco2lem2 φ U E = I
57 f1cnv W : dom W 1-1 D W -1 : ran W 1-1 onto dom W
58 f1of W -1 : ran W 1-1 onto dom W W -1 : ran W dom W
59 27 57 58 3syl φ W -1 : ran W dom W
60 59 6 ffvelrnd φ W -1 J dom W
61 wrddm W Word D dom W = 0 ..^ W
62 20 61 syl φ dom W = 0 ..^ W
63 60 62 eleqtrd φ W -1 J 0 ..^ W
64 lencl W Word D W 0
65 20 64 syl φ W 0
66 65 nn0cnd φ W
67 1cnd φ 1
68 ovexd φ W -1 J + 1 V
69 7 68 eqeltrid φ E V
70 splval W dom M E V E V ⟨“ I ”⟩ Word D W splice E E ⟨“ I ”⟩ = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
71 4 69 69 43 70 syl13anc φ W splice E E ⟨“ I ”⟩ = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
72 8 71 syl5eq φ U = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
73 72 fveq2d φ U = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W
74 pfxcl W Word D W prefix E Word D
75 20 74 syl φ W prefix E Word D
76 ccatcl W prefix E Word D ⟨“ I ”⟩ Word D W prefix E ++ ⟨“ I ”⟩ Word D
77 75 43 76 syl2anc φ W prefix E ++ ⟨“ I ”⟩ Word D
78 swrdcl W Word D W substr E W Word D
79 20 78 syl φ W substr E W Word D
80 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
81 77 79 80 syl2anc φ W prefix E ++ ⟨“ I ”⟩ ++ W substr E W = W prefix E ++ ⟨“ I ”⟩ + W substr E W
82 ccatws1len W prefix E Word D W prefix E ++ ⟨“ I ”⟩ = W prefix E + 1
83 20 74 82 3syl φ W prefix E ++ ⟨“ I ”⟩ = W prefix E + 1
84 fzofzp1 W -1 J 0 ..^ W W -1 J + 1 0 W
85 63 84 syl φ W -1 J + 1 0 W
86 7 85 eqeltrid φ E 0 W
87 pfxlen W Word D E 0 W W prefix E = E
88 20 86 87 syl2anc φ W prefix E = E
89 88 oveq1d φ W prefix E + 1 = E + 1
90 83 89 eqtrd φ W prefix E ++ ⟨“ I ”⟩ = E + 1
91 nn0fz0 W 0 W 0 W
92 65 91 sylib φ W 0 W
93 swrdlen W Word D E 0 W W 0 W W substr E W = W E
94 20 86 92 93 syl3anc φ W substr E W = W E
95 90 94 oveq12d φ W prefix E ++ ⟨“ I ”⟩ + W substr E W = E + 1 + W E
96 73 81 95 3eqtrd φ U = E + 1 + W E
97 fz0ssnn0 0 W 0
98 97 86 sselid φ E 0
99 98 nn0zd φ E
100 99 peano2zd φ E + 1
101 100 zcnd φ E + 1
102 98 nn0cnd φ E
103 101 66 102 addsubassd φ E + 1 + W - E = E + 1 + W E
104 102 67 66 addassd φ E + 1 + W = E + 1 + W
105 104 oveq1d φ E + 1 + W - E = E + 1 + W - E
106 96 103 105 3eqtr2d φ U = E + 1 + W - E
107 67 66 addcld φ 1 + W
108 102 107 pncan2d φ E + 1 + W - E = 1 + W
109 67 66 addcomd φ 1 + W = W + 1
110 106 108 109 3eqtrd φ U = W + 1
111 66 67 110 mvrraddd φ U 1 = W
112 111 oveq2d φ 0 ..^ U 1 = 0 ..^ W
113 63 112 eleqtrrd φ W -1 J 0 ..^ U 1
114 1 3 46 47 113 cycpmfv1 φ M U U W -1 J = U W -1 J + 1
115 7 fveq2i U E = U W -1 J + 1
116 114 115 eqtr4di φ M U U W -1 J = U E
117 1 3 20 27 18 32 cycpmfv3 φ M W I = I
118 56 116 117 3eqtr4d φ M U U W -1 J = M W I
119 72 fveq1d φ U W -1 J = W prefix E ++ ⟨“ I ”⟩ ++ W substr E W W -1 J
120 fzossfzop1 E 0 0 ..^ E 0 ..^ E + 1
121 98 120 syl φ 0 ..^ E 0 ..^ E + 1
122 elfzonn0 W -1 J 0 ..^ W W -1 J 0
123 fzonn0p1 W -1 J 0 W -1 J 0 ..^ W -1 J + 1
124 63 122 123 3syl φ W -1 J 0 ..^ W -1 J + 1
125 7 oveq2i 0 ..^ E = 0 ..^ W -1 J + 1
126 124 125 eleqtrrdi φ W -1 J 0 ..^ E
127 121 126 sseldd φ W -1 J 0 ..^ E + 1
128 90 oveq2d φ 0 ..^ W prefix E ++ ⟨“ I ”⟩ = 0 ..^ E + 1
129 127 128 eleqtrrd φ W -1 J 0 ..^ W prefix E ++ ⟨“ I ”⟩
130 ccatval1 W prefix E ++ ⟨“ I ”⟩ Word D W substr E W Word D W -1 J 0 ..^ W prefix E ++ ⟨“ I ”⟩ W prefix E ++ ⟨“ I ”⟩ ++ W substr E W W -1 J = W prefix E ++ ⟨“ I ”⟩ W -1 J
131 77 79 129 130 syl3anc φ W prefix E ++ ⟨“ I ”⟩ ++ W substr E W W -1 J = W prefix E ++ ⟨“ I ”⟩ W -1 J
132 88 oveq2d φ 0 ..^ W prefix E = 0 ..^ E
133 126 132 eleqtrrd φ W -1 J 0 ..^ W prefix E
134 ccatval1 W prefix E Word D ⟨“ I ”⟩ Word D W -1 J 0 ..^ W prefix E W prefix E ++ ⟨“ I ”⟩ W -1 J = W prefix E W -1 J
135 75 43 133 134 syl3anc φ W prefix E ++ ⟨“ I ”⟩ W -1 J = W prefix E W -1 J
136 119 131 135 3eqtrd φ U W -1 J = W prefix E W -1 J
137 pfxfv W Word D E 0 W W -1 J 0 ..^ E W prefix E W -1 J = W W -1 J
138 20 86 126 137 syl3anc φ W prefix E W -1 J = W W -1 J
139 f1f1orn W : dom W 1-1 D W : dom W 1-1 onto ran W
140 27 139 syl φ W : dom W 1-1 onto ran W
141 f1ocnvfv2 W : dom W 1-1 onto ran W J ran W W W -1 J = J
142 140 6 141 syl2anc φ W W -1 J = J
143 136 138 142 3eqtrd φ U W -1 J = J
144 143 fveq2d φ M U U W -1 J = M U J
145 55 118 144 3eqtr2d φ M W M ⟨“ IJ ”⟩ J = M U J
146 145 ad2antrr φ i ran W i = J M W M ⟨“ IJ ”⟩ J = M U J
147 simpr φ i ran W i = J i = J
148 147 fveq2d φ i ran W i = J M ⟨“ IJ ”⟩ i = M ⟨“ IJ ”⟩ J
149 148 fveq2d φ i ran W i = J M W M ⟨“ IJ ”⟩ i = M W M ⟨“ IJ ”⟩ J
150 147 fveq2d φ i ran W i = J M U i = M U J
151 146 149 150 3eqtr4d φ i ran W i = J M W M ⟨“ IJ ”⟩ i = M U i
152 3 ad2antrr φ i ran W i J D V
153 18 31 s2cld φ ⟨“ IJ ”⟩ Word D
154 153 ad2antrr φ i ran W i J ⟨“ IJ ”⟩ Word D
155 18 31 35 s2f1 φ ⟨“ IJ ”⟩ : dom ⟨“ IJ ”⟩ 1-1 D
156 155 ad2antrr φ i ran W i J ⟨“ IJ ”⟩ : dom ⟨“ IJ ”⟩ 1-1 D
157 30 sselda φ i ran W i D
158 157 adantr φ i ran W i J i D
159 simpr φ i ran W i ran W
160 32 adantr φ i ran W ¬ I ran W
161 nelne2 i ran W ¬ I ran W i I
162 159 160 161 syl2anc φ i ran W i I
163 162 adantr φ i ran W i J i I
164 simpr φ i ran W i J i J
165 163 164 nelprd φ i ran W i J ¬ i I J
166 18 31 s2rn φ ran ⟨“ IJ ”⟩ = I J
167 166 eleq2d φ i ran ⟨“ IJ ”⟩ i I J
168 167 notbid φ ¬ i ran ⟨“ IJ ”⟩ ¬ i I J
169 168 ad2antrr φ i ran W i J ¬ i ran ⟨“ IJ ”⟩ ¬ i I J
170 165 169 mpbird φ i ran W i J ¬ i ran ⟨“ IJ ”⟩
171 1 152 154 156 158 170 cycpmfv3 φ i ran W i J M ⟨“ IJ ”⟩ i = i
172 171 fveq2d φ i ran W i J M W M ⟨“ IJ ”⟩ i = M W i
173 3 ad3antrrr φ i ran W i J U -1 i 0 ..^ E D V
174 4 ad3antrrr φ i ran W i J U -1 i 0 ..^ E W dom M
175 5 ad3antrrr φ i ran W i J U -1 i 0 ..^ E I D ran W
176 6 ad3antrrr φ i ran W i J U -1 i 0 ..^ E J ran W
177 simpllr φ i ran W i J U -1 i 0 ..^ E i ran W
178 simplr φ i ran W i J U -1 i 0 ..^ E i J
179 simpr φ i ran W i J U -1 i 0 ..^ E U -1 i 0 ..^ E
180 1 2 173 174 175 176 7 8 177 178 179 cycpmco2lem7 φ i ran W i J U -1 i 0 ..^ E M U i = M W i
181 3 ad3antrrr φ i ran W i J U -1 i E ..^ U 1 D V
182 4 ad3antrrr φ i ran W i J U -1 i E ..^ U 1 W dom M
183 5 ad3antrrr φ i ran W i J U -1 i E ..^ U 1 I D ran W
184 6 ad3antrrr φ i ran W i J U -1 i E ..^ U 1 J ran W
185 simpllr φ i ran W i J U -1 i E ..^ U 1 i ran W
186 162 ad2antrr φ i ran W i J U -1 i E ..^ U 1 i I
187 simpr φ i ran W i J U -1 i E ..^ U 1 U -1 i E ..^ U 1
188 1 2 181 182 183 184 7 8 185 186 187 cycpmco2lem6 φ i ran W i J U -1 i E ..^ U 1 M U i = M W i
189 3 ad3antrrr φ i ran W i J U -1 i = U 1 D V
190 4 ad3antrrr φ i ran W i J U -1 i = U 1 W dom M
191 5 ad3antrrr φ i ran W i J U -1 i = U 1 I D ran W
192 6 ad3antrrr φ i ran W i J U -1 i = U 1 J ran W
193 simpllr φ i ran W i J U -1 i = U 1 i ran W
194 simpr φ i ran W i J U -1 i = U 1 U -1 i = U 1
195 1 2 189 190 191 192 7 8 193 194 cycpmco2lem5 φ i ran W i J U -1 i = U 1 M U i = M W i
196 f1f1orn U : dom U 1-1 D U : dom U 1-1 onto ran U
197 47 196 syl φ U : dom U 1-1 onto ran U
198 ssun1 ran W ran W I
199 1 2 3 4 5 6 7 8 cycpmco2rn φ ran U = ran W I
200 198 199 sseqtrrid φ ran W ran U
201 200 sselda φ i ran W i ran U
202 f1ocnvdm U : dom U 1-1 onto ran U i ran U U -1 i dom U
203 197 201 202 syl2an2r φ i ran W U -1 i dom U
204 wrddm U Word D dom U = 0 ..^ U
205 46 204 syl φ dom U = 0 ..^ U
206 205 adantr φ i ran W dom U = 0 ..^ U
207 203 206 eleqtrd φ i ran W U -1 i 0 ..^ U
208 65 nn0zd φ W
209 208 peano2zd φ W + 1
210 110 209 eqeltrd φ U
211 fzoval U 0 ..^ U = 0 U 1
212 210 211 syl φ 0 ..^ U = 0 U 1
213 212 adantr φ i ran W 0 ..^ U = 0 U 1
214 207 213 eleqtrd φ i ran W U -1 i 0 U 1
215 elfzr U -1 i 0 U 1 U -1 i 0 ..^ U 1 U -1 i = U 1
216 214 215 syl φ i ran W U -1 i 0 ..^ U 1 U -1 i = U 1
217 simpr φ i ran W U -1 i 0 ..^ U 1 U -1 i 0 ..^ U 1
218 99 ad2antrr φ i ran W U -1 i 0 ..^ U 1 E
219 fzospliti U -1 i 0 ..^ U 1 E U -1 i 0 ..^ E U -1 i E ..^ U 1
220 217 218 219 syl2anc φ i ran W U -1 i 0 ..^ U 1 U -1 i 0 ..^ E U -1 i E ..^ U 1
221 220 ex φ i ran W U -1 i 0 ..^ U 1 U -1 i 0 ..^ E U -1 i E ..^ U 1
222 221 orim1d φ i ran W U -1 i 0 ..^ U 1 U -1 i = U 1 U -1 i 0 ..^ E U -1 i E ..^ U 1 U -1 i = U 1
223 216 222 mpd φ i ran W U -1 i 0 ..^ E U -1 i E ..^ U 1 U -1 i = U 1
224 df-3or U -1 i 0 ..^ E U -1 i E ..^ U 1 U -1 i = U 1 U -1 i 0 ..^ E U -1 i E ..^ U 1 U -1 i = U 1
225 223 224 sylibr φ i ran W U -1 i 0 ..^ E U -1 i E ..^ U 1 U -1 i = U 1
226 225 adantr φ i ran W i J U -1 i 0 ..^ E U -1 i E ..^ U 1 U -1 i = U 1
227 180 188 195 226 mpjao3dan φ i ran W i J M U i = M W i
228 172 227 eqtr4d φ i ran W i J M W M ⟨“ IJ ”⟩ i = M U i
229 151 228 pm2.61dane φ i ran W M W M ⟨“ IJ ”⟩ i = M U i
230 229 adantlr φ i D i ran W M W M ⟨“ IJ ”⟩ i = M U i
231 1 2 3 4 5 6 7 8 cycpmco2lem4 φ M W M ⟨“ IJ ”⟩ I = M U I
232 231 ad2antrr φ i D ran W i = I M W M ⟨“ IJ ”⟩ I = M U I
233 simpr φ i D ran W i = I i = I
234 233 fveq2d φ i D ran W i = I M ⟨“ IJ ”⟩ i = M ⟨“ IJ ”⟩ I
235 234 fveq2d φ i D ran W i = I M W M ⟨“ IJ ”⟩ i = M W M ⟨“ IJ ”⟩ I
236 233 fveq2d φ i D ran W i = I M U i = M U I
237 232 235 236 3eqtr4d φ i D ran W i = I M W M ⟨“ IJ ”⟩ i = M U i
238 3 ad2antrr φ i D ran W i I D V
239 20 ad2antrr φ i D ran W i I W Word D
240 27 ad2antrr φ i D ran W i I W : dom W 1-1 D
241 simplr φ i D ran W i I i D ran W
242 241 eldifad φ i D ran W i I i D
243 241 eldifbd φ i D ran W i I ¬ i ran W
244 1 238 239 240 242 243 cycpmfv3 φ i D ran W i I M W i = i
245 153 ad2antrr φ i D ran W i I ⟨“ IJ ”⟩ Word D
246 155 ad2antrr φ i D ran W i I ⟨“ IJ ”⟩ : dom ⟨“ IJ ”⟩ 1-1 D
247 simpr φ i D ran W i I i I
248 eldifn i D ran W ¬ i ran W
249 nelne2 J ran W ¬ i ran W J i
250 6 248 249 syl2an φ i D ran W J i
251 250 necomd φ i D ran W i J
252 251 adantr φ i D ran W i I i J
253 247 252 nelprd φ i D ran W i I ¬ i I J
254 168 ad2antrr φ i D ran W i I ¬ i ran ⟨“ IJ ”⟩ ¬ i I J
255 253 254 mpbird φ i D ran W i I ¬ i ran ⟨“ IJ ”⟩
256 1 238 245 246 242 255 cycpmfv3 φ i D ran W i I M ⟨“ IJ ”⟩ i = i
257 256 fveq2d φ i D ran W i I M W M ⟨“ IJ ”⟩ i = M W i
258 46 ad2antrr φ i D ran W i I U Word D
259 47 ad2antrr φ i D ran W i I U : dom U 1-1 D
260 199 ad2antrr φ i D ran W i I ran U = ran W I
261 nelsn i I ¬ i I
262 261 adantl φ i D ran W i I ¬ i I
263 nelun ran U = ran W I ¬ i ran U ¬ i ran W ¬ i I
264 263 biimpar ran U = ran W I ¬ i ran W ¬ i I ¬ i ran U
265 260 243 262 264 syl12anc φ i D ran W i I ¬ i ran U
266 1 238 258 259 242 265 cycpmfv3 φ i D ran W i I M U i = i
267 244 257 266 3eqtr4d φ i D ran W i I M W M ⟨“ IJ ”⟩ i = M U i
268 237 267 pm2.61dane φ i D ran W M W M ⟨“ IJ ”⟩ i = M U i
269 268 adantlr φ i D i D ran W M W M ⟨“ IJ ”⟩ i = M U i
270 undif ran W D ran W D ran W = D
271 30 270 sylib φ ran W D ran W = D
272 271 eleq2d φ i ran W D ran W i D
273 elun i ran W D ran W i ran W i D ran W
274 272 273 bitr3di φ i D i ran W i D ran W
275 274 biimpa φ i D i ran W i D ran W
276 230 269 275 mpjaodan φ i D M W M ⟨“ IJ ”⟩ i = M U i
277 53 276 eqtrd φ i D M W M ⟨“ IJ ”⟩ i = M U i
278 42 51 277 eqfnfvd φ M W M ⟨“ IJ ”⟩ = M U