Metamath Proof Explorer


Theorem cshwidx0mod

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

Ref Expression
Assertion cshwidx0mod W Word V W N W cyclShift N 0 = W N mod W

Proof

Step Hyp Ref Expression
1 simp1 W Word V W N W Word V
2 simp3 W Word V W N N
3 lennncl W Word V W W
4 lbfzo0 0 0 ..^ W W
5 3 4 sylibr W Word V W 0 0 ..^ W
6 5 3adant3 W Word V W N 0 0 ..^ W
7 cshwidxmod W Word V N 0 0 ..^ W W cyclShift N 0 = W 0 + N mod W
8 1 2 6 7 syl3anc W Word V W N W cyclShift N 0 = W 0 + N mod W
9 zcn N N
10 9 addid2d N 0 + N = N
11 10 3ad2ant3 W Word V W N 0 + N = N
12 11 fvoveq1d W Word V W N W 0 + N mod W = W N mod W
13 8 12 eqtrd W Word V W N W cyclShift N 0 = W N mod W