Metamath Proof Explorer


Theorem revlen

Description: The reverse of a word has the same length as the original. (Contributed by Stefan O'Rear, 26-Aug-2015)

Ref Expression
Assertion revlen WWordAreverseW=W

Proof

Step Hyp Ref Expression
1 revval WWordAreverseW=x0..^WWW-1-x
2 1 fveq2d WWordAreverseW=x0..^WWW-1-x
3 wrdf WWordAW:0..^WA
4 3 adantr WWordAx0..^WW:0..^WA
5 simpr WWordAx0..^Wx0..^W
6 lencl WWordAW0
7 6 adantr WWordAx0..^WW0
8 nn0z W0W
9 fzoval W0..^W=0W1
10 7 8 9 3syl WWordAx0..^W0..^W=0W1
11 5 10 eleqtrd WWordAx0..^Wx0W1
12 fznn0sub2 x0W1W-1-x0W1
13 11 12 syl WWordAx0..^WW-1-x0W1
14 13 10 eleqtrrd WWordAx0..^WW-1-x0..^W
15 4 14 ffvelcdmd WWordAx0..^WWW-1-xA
16 15 fmpttd WWordAx0..^WWW-1-x:0..^WA
17 ffn x0..^WWW-1-x:0..^WAx0..^WWW-1-xFn0..^W
18 hashfn x0..^WWW-1-xFn0..^Wx0..^WWW-1-x=0..^W
19 16 17 18 3syl WWordAx0..^WWW-1-x=0..^W
20 hashfzo0 W00..^W=W
21 6 20 syl WWordA0..^W=W
22 2 19 21 3eqtrd WWordAreverseW=W