Metamath Proof Explorer


Theorem cshw0

Description: A word cyclically shifted by 0 is the word itself. (Contributed by AV, 16-May-2018) (Revised by AV, 20-May-2018) (Revised by AV, 26-Oct-2018)

Ref Expression
Assertion cshw0 W Word V W cyclShift 0 = W

Proof

Step Hyp Ref Expression
1 0csh0 cyclShift 0 =
2 oveq1 = W cyclShift 0 = W cyclShift 0
3 id = W = W
4 1 2 3 3eqtr3a = W W cyclShift 0 = W
5 4 a1d = W W Word V W cyclShift 0 = W
6 0z 0
7 cshword W Word V 0 W cyclShift 0 = W substr 0 mod W W ++ W prefix 0 mod W
8 6 7 mpan2 W Word V W cyclShift 0 = W substr 0 mod W W ++ W prefix 0 mod W
9 8 adantr W Word V W W cyclShift 0 = W substr 0 mod W W ++ W prefix 0 mod W
10 necom W W
11 lennncl W Word V W W
12 nnrp W W +
13 0mod W + 0 mod W = 0
14 13 opeq1d W + 0 mod W W = 0 W
15 14 oveq2d W + W substr 0 mod W W = W substr 0 W
16 13 oveq2d W + W prefix 0 mod W = W prefix 0
17 15 16 oveq12d W + W substr 0 mod W W ++ W prefix 0 mod W = W substr 0 W ++ W prefix 0
18 11 12 17 3syl W Word V W W substr 0 mod W W ++ W prefix 0 mod W = W substr 0 W ++ W prefix 0
19 10 18 sylan2b W Word V W W substr 0 mod W W ++ W prefix 0 mod W = W substr 0 W ++ W prefix 0
20 9 19 eqtrd W Word V W W cyclShift 0 = W substr 0 W ++ W prefix 0
21 lencl W Word V W 0
22 pfxval W Word V W 0 W prefix W = W substr 0 W
23 21 22 mpdan W Word V W prefix W = W substr 0 W
24 pfxid W Word V W prefix W = W
25 23 24 eqtr3d W Word V W substr 0 W = W
26 25 adantr W Word V W W substr 0 W = W
27 pfx00 W prefix 0 =
28 27 a1i W Word V W W prefix 0 =
29 26 28 oveq12d W Word V W W substr 0 W ++ W prefix 0 = W ++
30 ccatrid W Word V W ++ = W
31 30 adantr W Word V W W ++ = W
32 20 29 31 3eqtrd W Word V W W cyclShift 0 = W
33 32 expcom W W Word V W cyclShift 0 = W
34 5 33 pm2.61ine W Word V W cyclShift 0 = W