Metamath Proof Explorer


Theorem repswcshw

Description: A cyclically shifted "repeated symbol word". (Contributed by Alexander van der Vekens, 7-Nov-2018) (Proof shortened by AV, 16-Oct-2022)

Ref Expression
Assertion repswcshw SVN0ISrepeatSNcyclShiftI=SrepeatSN

Proof

Step Hyp Ref Expression
1 0csh0 cyclShiftI=
2 repsw0 SVSrepeatS0=
3 2 oveq1d SVSrepeatS0cyclShiftI=cyclShiftI
4 1 3 2 3eqtr4a SVSrepeatS0cyclShiftI=SrepeatS0
5 4 3ad2ant1 SVN0ISrepeatS0cyclShiftI=SrepeatS0
6 oveq2 N=0SrepeatSN=SrepeatS0
7 6 oveq1d N=0SrepeatSNcyclShiftI=SrepeatS0cyclShiftI
8 7 6 eqeq12d N=0SrepeatSNcyclShiftI=SrepeatSNSrepeatS0cyclShiftI=SrepeatS0
9 5 8 imbitrrid N=0SVN0ISrepeatSNcyclShiftI=SrepeatSN
10 idd ¬N=0SVSV
11 df-ne N0¬N=0
12 elnnne0 NN0N0
13 12 simplbi2com N0N0N
14 11 13 sylbir ¬N=0N0N
15 idd ¬N=0II
16 10 14 15 3anim123d ¬N=0SVN0ISVNI
17 nnnn0 NN0
18 17 anim2i SVNSVN0
19 repsw SVN0SrepeatSNWordV
20 18 19 syl SVNSrepeatSNWordV
21 cshword SrepeatSNWordVISrepeatSNcyclShiftI=SrepeatSNsubstrImodSrepeatSNSrepeatSN++SrepeatSNprefixImodSrepeatSN
22 20 21 stoic3 SVNISrepeatSNcyclShiftI=SrepeatSNsubstrImodSrepeatSNSrepeatSN++SrepeatSNprefixImodSrepeatSN
23 repswlen SVN0SrepeatSN=N
24 18 23 syl SVNSrepeatSN=N
25 24 oveq2d SVNImodSrepeatSN=ImodN
26 25 24 opeq12d SVNImodSrepeatSNSrepeatSN=ImodNN
27 26 oveq2d SVNSrepeatSNsubstrImodSrepeatSNSrepeatSN=SrepeatSNsubstrImodNN
28 25 oveq2d SVNSrepeatSNprefixImodSrepeatSN=SrepeatSNprefixImodN
29 27 28 oveq12d SVNSrepeatSNsubstrImodSrepeatSNSrepeatSN++SrepeatSNprefixImodSrepeatSN=SrepeatSNsubstrImodNN++SrepeatSNprefixImodN
30 29 3adant3 SVNISrepeatSNsubstrImodSrepeatSNSrepeatSN++SrepeatSNprefixImodSrepeatSN=SrepeatSNsubstrImodNN++SrepeatSNprefixImodN
31 18 3adant3 SVNISVN0
32 zmodcl INImodN0
33 32 ancoms NIImodN0
34 17 adantr NIN0
35 33 34 jca NIImodN0N0
36 35 3adant1 SVNIImodN0N0
37 nnre NN
38 37 leidd NNN
39 38 3ad2ant2 SVNINN
40 repswswrd SVN0ImodN0N0NNSrepeatSNsubstrImodNN=SrepeatSNImodN
41 31 36 39 40 syl3anc SVNISrepeatSNsubstrImodNN=SrepeatSNImodN
42 simp1 SVNISV
43 17 3ad2ant2 SVNIN0
44 zmodfzp1 INImodN0N
45 44 ancoms NIImodN0N
46 45 3adant1 SVNIImodN0N
47 repswpfx SVN0ImodN0NSrepeatSNprefixImodN=SrepeatSImodN
48 42 43 46 47 syl3anc SVNISrepeatSNprefixImodN=SrepeatSImodN
49 41 48 oveq12d SVNISrepeatSNsubstrImodNN++SrepeatSNprefixImodN=SrepeatSNImodN++SrepeatSImodN
50 32 nn0red INImodN
51 50 ancoms NIImodN
52 37 adantr NIN
53 zre II
54 nnrp NN+
55 modlt IN+ImodN<N
56 53 54 55 syl2anr NIImodN<N
57 51 52 56 ltled NIImodNN
58 57 3adant1 SVNIImodNN
59 33 3adant1 SVNIImodN0
60 nn0sub ImodN0N0ImodNNNImodN0
61 59 43 60 syl2anc SVNIImodNNNImodN0
62 58 61 mpbid SVNINImodN0
63 repswccat SVNImodN0ImodN0SrepeatSNImodN++SrepeatSImodN=SrepeatSN-ImodN+ImodN
64 42 62 59 63 syl3anc SVNISrepeatSNImodN++SrepeatSImodN=SrepeatSN-ImodN+ImodN
65 nncn NN
66 65 adantl INN
67 32 nn0cnd INImodN
68 66 67 npcand INN-ImodN+ImodN=N
69 68 ancoms NIN-ImodN+ImodN=N
70 69 3adant1 SVNIN-ImodN+ImodN=N
71 70 oveq2d SVNISrepeatSN-ImodN+ImodN=SrepeatSN
72 49 64 71 3eqtrd SVNISrepeatSNsubstrImodNN++SrepeatSNprefixImodN=SrepeatSN
73 22 30 72 3eqtrd SVNISrepeatSNcyclShiftI=SrepeatSN
74 16 73 syl6 ¬N=0SVN0ISrepeatSNcyclShiftI=SrepeatSN
75 9 74 pm2.61i SVN0ISrepeatSNcyclShiftI=SrepeatSN