Metamath Proof Explorer


Theorem cshimadifsn

Description: The image of a cyclically shifted word under its domain without its left 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 cshimadifsn F Word S N = F J 0 ..^ N F 0 ..^ N J = F cyclShift J 1 ..^ N

Proof

Step Hyp Ref Expression
1 wrdfn F Word S F Fn 0 ..^ F
2 fnfun F Fn 0 ..^ F Fun F
3 1 2 syl F Word S Fun F
4 3 3ad2ant1 F Word S N = F J 0 ..^ N Fun F
5 wrddm F Word S dom F = 0 ..^ F
6 difssd dom F = 0 ..^ F N = F 0 ..^ F J 0 ..^ F
7 oveq2 N = F 0 ..^ N = 0 ..^ F
8 7 difeq1d N = F 0 ..^ N J = 0 ..^ F J
9 8 adantl dom F = 0 ..^ F N = F 0 ..^ N J = 0 ..^ F J
10 simpl dom F = 0 ..^ F N = F dom F = 0 ..^ F
11 6 9 10 3sstr4d dom F = 0 ..^ F N = F 0 ..^ N J dom F
12 11 a1d dom F = 0 ..^ F N = F J 0 ..^ N 0 ..^ N J dom F
13 12 ex dom F = 0 ..^ F N = F J 0 ..^ N 0 ..^ N J dom F
14 5 13 syl F Word S N = F J 0 ..^ N 0 ..^ N J dom F
15 14 3imp F Word S N = F J 0 ..^ N 0 ..^ N J dom F
16 4 15 jca F Word S N = F J 0 ..^ N Fun F 0 ..^ N J dom F
17 dfimafn Fun F 0 ..^ N J dom F F 0 ..^ N J = z | x 0 ..^ N J F x = z
18 16 17 syl F Word S N = F J 0 ..^ N F 0 ..^ N J = z | x 0 ..^ N J F x = z
19 modsumfzodifsn J 0 ..^ N y 1 ..^ N y + J mod N 0 ..^ N J
20 19 3ad2antl3 F Word S N = F J 0 ..^ N y 1 ..^ N y + J mod N 0 ..^ N J
21 oveq2 F = N y + J mod F = y + J mod N
22 21 eqcoms N = F y + J mod F = y + J mod N
23 22 eleq1d N = F y + J mod F 0 ..^ N J y + J mod N 0 ..^ N J
24 23 3ad2ant2 F Word S N = F J 0 ..^ N y + J mod F 0 ..^ N J y + J mod N 0 ..^ N J
25 24 adantr F Word S N = F J 0 ..^ N y 1 ..^ N y + J mod F 0 ..^ N J y + J mod N 0 ..^ N J
26 20 25 mpbird F Word S N = F J 0 ..^ N y 1 ..^ N y + J mod F 0 ..^ N J
27 modfzo0difsn J 0 ..^ N x 0 ..^ N J y 1 ..^ N x = y + J mod N
28 27 3ad2antl3 F Word S N = F J 0 ..^ N x 0 ..^ N J y 1 ..^ N x = y + J mod N
29 oveq2 N = F y + J mod N = y + J mod F
30 29 eqcomd N = F y + J mod F = y + J mod N
31 30 eqeq2d N = F x = y + J mod F x = y + J mod N
32 31 rexbidv N = F y 1 ..^ N x = y + J mod F y 1 ..^ N x = y + J mod N
33 32 3ad2ant2 F Word S N = F J 0 ..^ N y 1 ..^ N x = y + J mod F y 1 ..^ N x = y + J mod N
34 33 adantr F Word S N = F J 0 ..^ N x 0 ..^ N J y 1 ..^ N x = y + J mod F y 1 ..^ N x = y + J mod N
35 28 34 mpbird F Word S N = F J 0 ..^ N x 0 ..^ N J y 1 ..^ N x = y + J mod F
36 fveq2 x = y + J mod F F x = F y + J mod F
37 36 3ad2ant3 F Word S N = F J 0 ..^ N y 1 ..^ N x = y + J mod F F x = F y + J mod F
38 simpl1 F Word S N = F J 0 ..^ N y 1 ..^ N F Word S
39 elfzoelz J 0 ..^ N J
40 39 3ad2ant3 F Word S N = F J 0 ..^ N J
41 40 adantr F Word S N = F J 0 ..^ N y 1 ..^ N J
42 oveq2 N = F 1 ..^ N = 1 ..^ F
43 42 eleq2d N = F y 1 ..^ N y 1 ..^ F
44 fzo0ss1 1 ..^ F 0 ..^ F
45 44 sseli y 1 ..^ F y 0 ..^ F
46 43 45 syl6bi N = F y 1 ..^ N y 0 ..^ F
47 46 3ad2ant2 F Word S N = F J 0 ..^ N y 1 ..^ N y 0 ..^ F
48 47 imp F Word S N = F J 0 ..^ N y 1 ..^ N y 0 ..^ F
49 cshwidxmod F Word S J y 0 ..^ F F cyclShift J y = F y + J mod F
50 49 eqcomd F Word S J y 0 ..^ F F y + J mod F = F cyclShift J y
51 38 41 48 50 syl3anc F Word S N = F J 0 ..^ N y 1 ..^ N F y + J mod F = F cyclShift J y
52 51 3adant3 F Word S N = F J 0 ..^ N y 1 ..^ N x = y + J mod F F y + J mod F = F cyclShift J y
53 37 52 eqtrd F Word S N = F J 0 ..^ N y 1 ..^ N x = y + J mod F F x = F cyclShift J y
54 53 eqeq1d F Word S N = F J 0 ..^ N y 1 ..^ N x = y + J mod F F x = z F cyclShift J y = z
55 26 35 54 rexxfrd2 F Word S N = F J 0 ..^ N x 0 ..^ N J F x = z y 1 ..^ N F cyclShift J y = z
56 55 abbidv F Word S N = F J 0 ..^ N z | x 0 ..^ N J F x = z = z | y 1 ..^ N F cyclShift J y = z
57 39 anim2i F Word S J 0 ..^ N F Word S J
58 57 3adant2 F Word S N = F J 0 ..^ N F Word S J
59 cshwfn F Word S J F cyclShift J Fn 0 ..^ F
60 58 59 syl F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F
61 fnfun F cyclShift J Fn 0 ..^ F Fun F cyclShift J
62 61 adantl F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F Fun F cyclShift J
63 42 44 eqsstrdi N = F 1 ..^ N 0 ..^ F
64 63 3ad2ant2 F Word S N = F J 0 ..^ N 1 ..^ N 0 ..^ F
65 64 adantr F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F 1 ..^ N 0 ..^ F
66 fndm F cyclShift J Fn 0 ..^ F dom F cyclShift J = 0 ..^ F
67 66 adantl F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F dom F cyclShift J = 0 ..^ F
68 65 67 sseqtrrd F Word S N = F J 0 ..^ N F cyclShift J Fn 0 ..^ F 1 ..^ N dom F cyclShift J
69 62 68 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
70 60 69 mpdan F Word S N = F J 0 ..^ N Fun F cyclShift J 1 ..^ N dom F cyclShift J
71 dfimafn Fun F cyclShift J 1 ..^ N dom F cyclShift J F cyclShift J 1 ..^ N = z | y 1 ..^ N F cyclShift J y = z
72 70 71 syl F Word S N = F J 0 ..^ N F cyclShift J 1 ..^ N = z | y 1 ..^ N F cyclShift J y = z
73 56 72 eqtr4d F Word S N = F J 0 ..^ N z | x 0 ..^ N J F x = z = F cyclShift J 1 ..^ N
74 18 73 eqtrd F Word S N = F J 0 ..^ N F 0 ..^ N J = F cyclShift J 1 ..^ N