Metamath Proof Explorer


Theorem cshwidx0

Description: The symbol at index 0 of a cyclically shifted nonempty word is the symbol at index N of the original word. (Contributed by AV, 15-May-2018) (Revised by AV, 21-May-2018) (Revised by AV, 30-Oct-2018)

Ref Expression
Assertion cshwidx0 WWordVN0..^WWcyclShiftN0=WN

Proof

Step Hyp Ref Expression
1 hasheq0 WWordVW=0W=
2 elfzo0 N0..^WN0WN<W
3 elnnne0 WW0W0
4 eqneqall W=0W0WWordVWcyclShiftN0=WN
5 4 com12 W0W=0WWordVWcyclShiftN0=WN
6 5 adantl W0W0W=0WWordVWcyclShiftN0=WN
7 3 6 sylbi WW=0WWordVWcyclShiftN0=WN
8 7 3ad2ant2 N0WN<WW=0WWordVWcyclShiftN0=WN
9 2 8 sylbi N0..^WW=0WWordVWcyclShiftN0=WN
10 9 com13 WWordVW=0N0..^WWcyclShiftN0=WN
11 1 10 sylbird WWordVW=N0..^WWcyclShiftN0=WN
12 11 com23 WWordVN0..^WW=WcyclShiftN0=WN
13 12 imp WWordVN0..^WW=WcyclShiftN0=WN
14 13 com12 W=WWordVN0..^WWcyclShiftN0=WN
15 simpl WWordVN0..^WWWordV
16 15 adantl WWWordVN0..^WWWordV
17 simpl WWWordVN0..^WW
18 elfzoelz N0..^WN
19 18 ad2antll WWWordVN0..^WN
20 cshwidx0mod WWordVWNWcyclShiftN0=WNmodW
21 16 17 19 20 syl3anc WWWordVN0..^WWcyclShiftN0=WNmodW
22 zmodidfzoimp N0..^WNmodW=N
23 22 ad2antll WWWordVN0..^WNmodW=N
24 23 fveq2d WWWordVN0..^WWNmodW=WN
25 21 24 eqtrd WWWordVN0..^WWcyclShiftN0=WN
26 25 ex WWWordVN0..^WWcyclShiftN0=WN
27 14 26 pm2.61ine WWordVN0..^WWcyclShiftN0=WN