Metamath Proof Explorer


Theorem cshimadifsn0

Description: The image of a cyclically shifted word under its domain without its upper bound is the image of a cyclically shifted word under its domain without the number of shifted symbols. (Contributed by AV, 19-Mar-2021)

Ref Expression
Assertion cshimadifsn0 F Word S N = F J 0 ..^ N F 0 ..^ N J = F cyclShift J + 1 0 ..^ N 1

Proof

Step Hyp Ref Expression
1 cshimadifsn F Word S N = F J 0 ..^ N F 0 ..^ N J = F cyclShift J 1 ..^ N
2 elfzoel2 J 0 ..^ N N
3 elfzom1elp1fzo1 N y 0 ..^ N 1 y + 1 1 ..^ N
4 3 ex N y 0 ..^ N 1 y + 1 1 ..^ N
5 2 4 syl J 0 ..^ N y 0 ..^ N 1 y + 1 1 ..^ N
6 5 3ad2ant3 F Word S N = F J 0 ..^ N y 0 ..^ N 1 y + 1 1 ..^ N
7 6 imp F Word S N = F J 0 ..^ N y 0 ..^ N 1 y + 1 1 ..^ N
8 elfzo1elm1fzo0 x 1 ..^ N x 1 0 ..^ N 1
9 8 adantl F Word S N = F J 0 ..^ N x 1 ..^ N x 1 0 ..^ N 1
10 oveq1 y = x 1 y + 1 = x - 1 + 1
11 10 eqeq2d y = x 1 x = y + 1 x = x - 1 + 1
12 11 adantl F Word S N = F J 0 ..^ N x 1 ..^ N y = x 1 x = y + 1 x = x - 1 + 1
13 elfzoelz x 1 ..^ N x
14 13 zcnd x 1 ..^ N x
15 npcan1 x x - 1 + 1 = x
16 14 15 syl x 1 ..^ N x - 1 + 1 = x
17 16 eqcomd x 1 ..^ N x = x - 1 + 1
18 17 adantl F Word S N = F J 0 ..^ N x 1 ..^ N x = x - 1 + 1
19 9 12 18 rspcedvd F Word S N = F J 0 ..^ N x 1 ..^ N y 0 ..^ N 1 x = y + 1
20 fveq2 x = y + 1 F cyclShift J x = F cyclShift J y + 1
21 20 3ad2ant3 F Word S N = F J 0 ..^ N y 0 ..^ N 1 x = y + 1 F cyclShift J x = F cyclShift J y + 1
22 elfzoelz y 0 ..^ N 1 y
23 22 zcnd y 0 ..^ N 1 y
24 23 adantl F Word S N = F J 0 ..^ N y 0 ..^ N 1 y
25 elfzoelz J 0 ..^ N J
26 25 zcnd J 0 ..^ N J
27 26 3ad2ant3 F Word S N = F J 0 ..^ N J
28 27 adantr F Word S N = F J 0 ..^ N y 0 ..^ N 1 J
29 1cnd F Word S N = F J 0 ..^ N y 0 ..^ N 1 1
30 add32r y J 1 y + J + 1 = y + 1 + J
31 24 28 29 30 syl3anc F Word S N = F J 0 ..^ N y 0 ..^ N 1 y + J + 1 = y + 1 + J
32 31 fvoveq1d F Word S N = F J 0 ..^ N y 0 ..^ N 1 F y + J + 1 mod F = F y + 1 + J mod F
33 simpl1 F Word S N = F J 0 ..^ N y 0 ..^ N 1 F Word S
34 25 peano2zd J 0 ..^ N J + 1
35 34 3ad2ant3 F Word S N = F J 0 ..^ N J + 1
36 35 adantr F Word S N = F J 0 ..^ N y 0 ..^ N 1 J + 1
37 fzossrbm1 N 0 ..^ N 1 0 ..^ N
38 2 37 syl J 0 ..^ N 0 ..^ N 1 0 ..^ N
39 38 sseld J 0 ..^ N y 0 ..^ N 1 y 0 ..^ N
40 39 3ad2ant3 F Word S N = F J 0 ..^ N y 0 ..^ N 1 y 0 ..^ N
41 40 imp F Word S N = F J 0 ..^ N y 0 ..^ N 1 y 0 ..^ N
42 oveq2 N = F 0 ..^ N = 0 ..^ F
43 42 eleq2d N = F y 0 ..^ N y 0 ..^ F
44 43 3ad2ant2 F Word S N = F J 0 ..^ N y 0 ..^ N y 0 ..^ F
45 44 adantr F Word S N = F J 0 ..^ N y 0 ..^ N 1 y 0 ..^ N y 0 ..^ F
46 41 45 mpbid F Word S N = F J 0 ..^ N y 0 ..^ N 1 y 0 ..^ F
47 cshwidxmod F Word S J + 1 y 0 ..^ F F cyclShift J + 1 y = F y + J + 1 mod F
48 33 36 46 47 syl3anc F Word S N = F J 0 ..^ N y 0 ..^ N 1 F cyclShift J + 1 y = F y + J + 1 mod F
49 25 3ad2ant3 F Word S N = F J 0 ..^ N J
50 49 adantr F Word S N = F J 0 ..^ N y 0 ..^ N 1 J
51 fzo0ss1 1 ..^ N 0 ..^ N
52 2 3ad2ant3 F Word S N = F J 0 ..^ N N
53 52 3 sylan F Word S N = F J 0 ..^ N y 0 ..^ N 1 y + 1 1 ..^ N
54 51 53 sselid F Word S N = F J 0 ..^ N y 0 ..^ N 1 y + 1 0 ..^ N
55 42 eleq2d N = F y + 1 0 ..^ N y + 1 0 ..^ F
56 55 3ad2ant2 F Word S N = F J 0 ..^ N y + 1 0 ..^ N y + 1 0 ..^ F
57 56 adantr F Word S N = F J 0 ..^ N y 0 ..^ N 1 y + 1 0 ..^ N y + 1 0 ..^ F
58 54 57 mpbid F Word S N = F J 0 ..^ N y 0 ..^ N 1 y + 1 0 ..^ F
59 cshwidxmod F Word S J y + 1 0 ..^ F F cyclShift J y + 1 = F y + 1 + J mod F
60 33 50 58 59 syl3anc F Word S N = F J 0 ..^ N y 0 ..^ N 1 F cyclShift J y + 1 = F y + 1 + J mod F
61 32 48 60 3eqtr4rd F Word S N = F J 0 ..^ N y 0 ..^ N 1 F cyclShift J y + 1 = F cyclShift J + 1 y
62 61 3adant3 F Word S N = F J 0 ..^ N y 0 ..^ N 1 x = y + 1 F cyclShift J y + 1 = F cyclShift J + 1 y
63 21 62 eqtrd F Word S N = F J 0 ..^ N y 0 ..^ N 1 x = y + 1 F cyclShift J x = F cyclShift J + 1 y
64 63 eqeq1d F Word S N = F J 0 ..^ N y 0 ..^ N 1 x = y + 1 F cyclShift J x = z F cyclShift J + 1 y = z
65 7 19 64 rexxfrd2 F Word S N = F J 0 ..^ N x 1 ..^ N F cyclShift J x = z y 0 ..^ N 1 F cyclShift J + 1 y = z
66 65 abbidv F Word S N = F J 0 ..^ N z | x 1 ..^ N F cyclShift J x = z = z | y 0 ..^ N 1 F cyclShift J + 1 y = z
67 25 anim2i F Word S J 0 ..^ N F Word S J
68 67 3adant2 F Word S N = F J 0 ..^ N F Word S J
69 cshwfn F Word S J F cyclShift J Fn 0 ..^ F
70 68 69 syl F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F
71 fnfun F cyclShift J Fn 0 ..^ F Fun F cyclShift J
72 71 adantl F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F Fun F cyclShift J
73 42 3ad2ant2 F Word S N = F J 0 ..^ N 0 ..^ N = 0 ..^ F
74 51 73 sseqtrid F Word S N = F J 0 ..^ N 1 ..^ N 0 ..^ F
75 74 adantr F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F 1 ..^ N 0 ..^ F
76 fndm F cyclShift J Fn 0 ..^ F dom F cyclShift J = 0 ..^ F
77 76 adantl F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F dom F cyclShift J = 0 ..^ F
78 75 77 sseqtrrd F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F 1 ..^ N dom F cyclShift J
79 72 78 jca F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F Fun F cyclShift J 1 ..^ N dom F cyclShift J
80 70 79 mpdan F Word S N = F J 0 ..^ N Fun F cyclShift J 1 ..^ N dom F cyclShift J
81 dfimafn Fun F cyclShift J 1 ..^ N dom F cyclShift J F cyclShift J 1 ..^ N = z | x 1 ..^ N F cyclShift J x = z
82 80 81 syl F Word S N = F J 0 ..^ N F cyclShift J 1 ..^ N = z | x 1 ..^ N F cyclShift J x = z
83 34 anim2i F Word S J 0 ..^ N F Word S J + 1
84 83 3adant2 F Word S N = F J 0 ..^ N F Word S J + 1
85 cshwfn F Word S J + 1 F cyclShift J + 1 Fn 0 ..^ F
86 84 85 syl F Word S N = F J 0 ..^ N F cyclShift J + 1 Fn 0 ..^ F
87 fnfun F cyclShift J + 1 Fn 0 ..^ F Fun F cyclShift J + 1
88 87 adantl F Word S N = F J 0 ..^ N F cyclShift J + 1 Fn 0 ..^ F Fun F cyclShift J + 1
89 38 3ad2ant3 F Word S N = F J 0 ..^ N 0 ..^ N 1 0 ..^ N
90 oveq2 F = N 0 ..^ F = 0 ..^ N
91 90 eqcoms N = F 0 ..^ F = 0 ..^ N
92 91 3ad2ant2 F Word S N = F J 0 ..^ N 0 ..^ F = 0 ..^ N
93 89 92 sseqtrrd F Word S N = F J 0 ..^ N 0 ..^ N 1 0 ..^ F
94 93 adantr F Word S N = F J 0 ..^ N F cyclShift J + 1 Fn 0 ..^ F 0 ..^ N 1 0 ..^ F
95 fndm F cyclShift J + 1 Fn 0 ..^ F dom F cyclShift J + 1 = 0 ..^ F
96 95 adantl F Word S N = F J 0 ..^ N F cyclShift J + 1 Fn 0 ..^ F dom F cyclShift J + 1 = 0 ..^ F
97 94 96 sseqtrrd F Word S N = F J 0 ..^ N F cyclShift J + 1 Fn 0 ..^ F 0 ..^ N 1 dom F cyclShift J + 1
98 88 97 jca F Word S N = F J 0 ..^ N F cyclShift J + 1 Fn 0 ..^ F Fun F cyclShift J + 1 0 ..^ N 1 dom F cyclShift J + 1
99 86 98 mpdan F Word S N = F J 0 ..^ N Fun F cyclShift J + 1 0 ..^ N 1 dom F cyclShift J + 1
100 dfimafn Fun F cyclShift J + 1 0 ..^ N 1 dom F cyclShift J + 1 F cyclShift J + 1 0 ..^ N 1 = z | y 0 ..^ N 1 F cyclShift J + 1 y = z
101 99 100 syl F Word S N = F J 0 ..^ N F cyclShift J + 1 0 ..^ N 1 = z | y 0 ..^ N 1 F cyclShift J + 1 y = z
102 66 82 101 3eqtr4d F Word S N = F J 0 ..^ N F cyclShift J 1 ..^ N = F cyclShift J + 1 0 ..^ N 1
103 1 102 eqtrd F Word S N = F J 0 ..^ N F 0 ..^ N J = F cyclShift J + 1 0 ..^ N 1