Metamath Proof Explorer


Theorem cshwsiun

Description: The set of (different!) words resulting by cyclically shifting a given word is an indexed union. (Contributed by AV, 19-May-2018) (Revised by AV, 8-Jun-2018) (Proof shortened by AV, 8-Nov-2018)

Ref Expression
Hypothesis cshwrepswhash1.m M=wWordV|n0..^WWcyclShiftn=w
Assertion cshwsiun WWordVM=n0..^WWcyclShiftn

Proof

Step Hyp Ref Expression
1 cshwrepswhash1.m M=wWordV|n0..^WWcyclShiftn=w
2 df-rab wWordV|n0..^WWcyclShiftn=w=w|wWordVn0..^WWcyclShiftn=w
3 eqcom WcyclShiftn=ww=WcyclShiftn
4 3 biimpi WcyclShiftn=ww=WcyclShiftn
5 4 reximi n0..^WWcyclShiftn=wn0..^Ww=WcyclShiftn
6 5 adantl wWordVn0..^WWcyclShiftn=wn0..^Ww=WcyclShiftn
7 cshwcl WWordVWcyclShiftnWordV
8 7 adantr WWordVn0..^WWcyclShiftnWordV
9 eleq1 w=WcyclShiftnwWordVWcyclShiftnWordV
10 8 9 syl5ibrcom WWordVn0..^Ww=WcyclShiftnwWordV
11 10 rexlimdva WWordVn0..^Ww=WcyclShiftnwWordV
12 eqcom w=WcyclShiftnWcyclShiftn=w
13 12 biimpi w=WcyclShiftnWcyclShiftn=w
14 13 reximi n0..^Ww=WcyclShiftnn0..^WWcyclShiftn=w
15 11 14 jca2 WWordVn0..^Ww=WcyclShiftnwWordVn0..^WWcyclShiftn=w
16 6 15 impbid2 WWordVwWordVn0..^WWcyclShiftn=wn0..^Ww=WcyclShiftn
17 velsn wWcyclShiftnw=WcyclShiftn
18 17 bicomi w=WcyclShiftnwWcyclShiftn
19 18 a1i WWordVw=WcyclShiftnwWcyclShiftn
20 19 rexbidv WWordVn0..^Ww=WcyclShiftnn0..^WwWcyclShiftn
21 16 20 bitrd WWordVwWordVn0..^WWcyclShiftn=wn0..^WwWcyclShiftn
22 21 abbidv WWordVw|wWordVn0..^WWcyclShiftn=w=w|n0..^WwWcyclShiftn
23 2 22 eqtrid WWordVwWordV|n0..^WWcyclShiftn=w=w|n0..^WwWcyclShiftn
24 df-iun n0..^WWcyclShiftn=w|n0..^WwWcyclShiftn
25 23 1 24 3eqtr4g WWordVM=n0..^WWcyclShiftn