Metamath Proof Explorer


Theorem cshwsidrepsw

Description: If cyclically shifting a word of length being a prime number by a number of positions which is not divisible by the prime number results in the word itself, the word is a "repeated symbol word". (Contributed by AV, 18-May-2018) (Revised by AV, 10-Nov-2018)

Ref Expression
Assertion cshwsidrepsw WWordVWLLmodW0WcyclShiftL=WW=W0repeatSW

Proof

Step Hyp Ref Expression
1 simpr WWordVWW
2 1 adantr WWordVWLLmodW0WcyclShiftL=WW
3 simp1 LLmodW0WcyclShiftL=WL
4 3 adantl WWordVWLLmodW0WcyclShiftL=WL
5 simpr2 WWordVWLLmodW0WcyclShiftL=WLmodW0
6 2 4 5 3jca WWordVWLLmodW0WcyclShiftL=WWLLmodW0
7 6 adantr WWordVWLLmodW0WcyclShiftL=Wi0..^WWLLmodW0
8 simpr WWordVWLLmodW0WcyclShiftL=Wi0..^Wi0..^W
9 modprmn0modprm0 WLLmodW0i0..^Wj0..^Wi+jLmodW=0
10 7 8 9 sylc WWordVWLLmodW0WcyclShiftL=Wi0..^Wj0..^Wi+jLmodW=0
11 oveq1 k=jkL=jL
12 11 oveq2d k=ji+kL=i+jL
13 12 fvoveq1d k=jWi+kLmodW=Wi+jLmodW
14 13 eqeq2d k=jWi=Wi+kLmodWWi=Wi+jLmodW
15 simpl WWordVWWWordV
16 15 3 anim12i WWordVWLLmodW0WcyclShiftL=WWWordVL
17 16 adantr WWordVWLLmodW0WcyclShiftL=Wi0..^WWWordVL
18 17 adantl j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^WWWordVL
19 simpr3 WWordVWLLmodW0WcyclShiftL=WWcyclShiftL=W
20 19 anim1i WWordVWLLmodW0WcyclShiftL=Wi0..^WWcyclShiftL=Wi0..^W
21 20 adantl j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^WWcyclShiftL=Wi0..^W
22 cshweqrep WWordVLWcyclShiftL=Wi0..^Wk0Wi=Wi+kLmodW
23 18 21 22 sylc j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^Wk0Wi=Wi+kLmodW
24 elfzonn0 j0..^Wj0
25 24 ad2antrr j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^Wj0
26 14 23 25 rspcdva j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^WWi=Wi+jLmodW
27 fveq2 i+jLmodW=0Wi+jLmodW=W0
28 27 adantl j0..^Wi+jLmodW=0Wi+jLmodW=W0
29 28 adantr j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^WWi+jLmodW=W0
30 26 29 eqtrd j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^WWi=W0
31 30 ex j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^WWi=W0
32 31 rexlimiva j0..^Wi+jLmodW=0WWordVWLLmodW0WcyclShiftL=Wi0..^WWi=W0
33 10 32 mpcom WWordVWLLmodW0WcyclShiftL=Wi0..^WWi=W0
34 33 ralrimiva WWordVWLLmodW0WcyclShiftL=Wi0..^WWi=W0
35 repswsymballbi WWordVW=W0repeatSWi0..^WWi=W0
36 35 ad2antrr WWordVWLLmodW0WcyclShiftL=WW=W0repeatSWi0..^WWi=W0
37 34 36 mpbird WWordVWLLmodW0WcyclShiftL=WW=W0repeatSW
38 37 ex WWordVWLLmodW0WcyclShiftL=WW=W0repeatSW