MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  cshwsiun Structured version   Visualization version   Unicode version

Theorem cshwsiun 15148
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.)
Hypothesis
Ref Expression
cshwrepswhash1.m  |-  M  =  { w  e. Word  V  |  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w }
Assertion
Ref Expression
cshwsiun  |-  ( W  e. Word  V  ->  M  =  U_ n  e.  ( 0..^ ( # `  W
) ) { ( W cyclShift  n ) } )
Distinct variable groups:    n, V, w    n, W, w
Allowed substitution hints:    M( w, n)

Proof of Theorem cshwsiun
StepHypRef Expression
1 df-rab 2765 . . 3  |-  { w  e. Word  V  |  E. n  e.  ( 0..^ ( # `  W ) ) ( W cyclShift  n )  =  w }  =  { w  |  ( w  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W ) ) ( W cyclShift  n )  =  w ) }
2 eqcom 2478 . . . . . . . . 9  |-  ( ( W cyclShift  n )  =  w  <-> 
w  =  ( W cyclShift  n ) )
32biimpi 199 . . . . . . . 8  |-  ( ( W cyclShift  n )  =  w  ->  w  =  ( W cyclShift  n ) )
43reximi 2852 . . . . . . 7  |-  ( E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w  ->  E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )
)
54adantl 473 . . . . . 6  |-  ( ( w  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w )  ->  E. n  e.  ( 0..^ ( # `  W ) ) w  =  ( W cyclShift  n ) )
6 cshwcl 12954 . . . . . . . . . . . 12  |-  ( W  e. Word  V  ->  ( W cyclShift  n )  e. Word  V
)
76adantr 472 . . . . . . . . . . 11  |-  ( ( W  e. Word  V  /\  n  e.  ( 0..^ ( # `  W
) ) )  -> 
( W cyclShift  n )  e. Word  V )
8 eleq1 2537 . . . . . . . . . . 11  |-  ( w  =  ( W cyclShift  n )  ->  ( w  e. Word  V 
<->  ( W cyclShift  n )  e. Word  V ) )
97, 8syl5ibrcom 230 . . . . . . . . . 10  |-  ( ( W  e. Word  V  /\  n  e.  ( 0..^ ( # `  W
) ) )  -> 
( w  =  ( W cyclShift  n )  ->  w  e. Word  V ) )
109rexlimdva 2871 . . . . . . . . 9  |-  ( W  e. Word  V  ->  ( E. n  e.  (
0..^ ( # `  W
) ) w  =  ( W cyclShift  n )  ->  w  e. Word  V ) )
1110imp 436 . . . . . . . 8  |-  ( ( W  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )
)  ->  w  e. Word  V )
12 eqcom 2478 . . . . . . . . . . 11  |-  ( w  =  ( W cyclShift  n )  <-> 
( W cyclShift  n )  =  w )
1312biimpi 199 . . . . . . . . . 10  |-  ( w  =  ( W cyclShift  n )  ->  ( W cyclShift  n )  =  w )
1413reximi 2852 . . . . . . . . 9  |-  ( E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )  ->  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w )
1514adantl 473 . . . . . . . 8  |-  ( ( W  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )
)  ->  E. n  e.  ( 0..^ ( # `  W ) ) ( W cyclShift  n )  =  w )
1611, 15jca 541 . . . . . . 7  |-  ( ( W  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )
)  ->  ( w  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W ) ) ( W cyclShift  n )  =  w ) )
1716ex 441 . . . . . 6  |-  ( W  e. Word  V  ->  ( E. n  e.  (
0..^ ( # `  W
) ) w  =  ( W cyclShift  n )  ->  ( w  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w ) ) )
185, 17impbid2 209 . . . . 5  |-  ( W  e. Word  V  ->  (
( w  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w )  <->  E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )
) )
19 elsn 3973 . . . . . . . 8  |-  ( w  e.  { ( W cyclShift  n ) }  <->  w  =  ( W cyclShift  n ) )
2019bicomi 207 . . . . . . 7  |-  ( w  =  ( W cyclShift  n )  <-> 
w  e.  { ( W cyclShift  n ) } )
2120a1i 11 . . . . . 6  |-  ( W  e. Word  V  ->  (
w  =  ( W cyclShift  n )  <->  w  e.  { ( W cyclShift  n ) } ) )
2221rexbidv 2892 . . . . 5  |-  ( W  e. Word  V  ->  ( E. n  e.  (
0..^ ( # `  W
) ) w  =  ( W cyclShift  n )  <->  E. n  e.  ( 0..^ ( # `  W
) ) w  e. 
{ ( W cyclShift  n ) } ) )
2318, 22bitrd 261 . . . 4  |-  ( W  e. Word  V  ->  (
( w  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w )  <->  E. n  e.  ( 0..^ ( # `  W
) ) w  e. 
{ ( W cyclShift  n ) } ) )
2423abbidv 2589 . . 3  |-  ( W  e. Word  V  ->  { w  |  ( w  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W ) ) ( W cyclShift  n )  =  w ) }  =  {
w  |  E. n  e.  ( 0..^ ( # `  W ) ) w  e.  { ( W cyclShift  n ) } }
)
251, 24syl5eq 2517 . 2  |-  ( W  e. Word  V  ->  { w  e. Word  V  |  E. n  e.  ( 0..^ ( # `  W ) ) ( W cyclShift  n )  =  w }  =  { w  |  E. n  e.  ( 0..^ ( # `  W
) ) w  e. 
{ ( W cyclShift  n ) } } )
26 cshwrepswhash1.m . 2  |-  M  =  { w  e. Word  V  |  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w }
27 df-iun 4271 . 2  |-  U_ n  e.  ( 0..^ ( # `  W ) ) { ( W cyclShift  n ) }  =  { w  |  E. n  e.  ( 0..^ ( # `  W
) ) w  e. 
{ ( W cyclShift  n ) } }
2825, 26, 273eqtr4g 2530 1  |-  ( W  e. Word  V  ->  M  =  U_ n  e.  ( 0..^ ( # `  W
) ) { ( W cyclShift  n ) } )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 189    /\ wa 376    = wceq 1452    e. wcel 1904   {cab 2457   E.wrex 2757   {crab 2760   {csn 3959   U_ciun 4269   ` cfv 5589  (class class class)co 6308   0cc0 9557  ..^cfzo 11942   #chash 12553  Word cword 12703   cyclShift ccsh 12944
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-rep 4508  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rmo 2764  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-int 4227  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-we 4800  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-1o 7200  df-oadd 7204  df-er 7381  df-en 7588  df-dom 7589  df-sdom 7590  df-fin 7591  df-card 8391  df-cda 8616  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-nn 10632  df-2 10690  df-n0 10894  df-z 10962  df-uz 11183  df-fz 11811  df-fzo 11943  df-hash 12554  df-word 12711  df-concat 12713  df-substr 12715  df-csh 12945
This theorem is referenced by:  cshwsex  15149  cshwshashnsame  15152
  Copyright terms: Public domain W3C validator