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

Theorem cshwsiun 14795
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 2413 . . . . . . . . 9  |-  ( ( W cyclShift  n )  =  w  <-> 
w  =  ( W cyclShift  n ) )
32biimpi 196 . . . . . . . 8  |-  ( ( W cyclShift  n )  =  w  ->  w  =  ( W cyclShift  n ) )
43reximi 2874 . . . . . . 7  |-  ( E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w  ->  E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )
)
54adantl 466 . . . . . 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 12827 . . . . . . . . . . . 12  |-  ( W  e. Word  V  ->  ( W cyclShift  n )  e. Word  V
)
76adantr 465 . . . . . . . . . . 11  |-  ( ( W  e. Word  V  /\  n  e.  ( 0..^ ( # `  W
) ) )  -> 
( W cyclShift  n )  e. Word  V )
8 eleq1 2476 . . . . . . . . . . 11  |-  ( w  =  ( W cyclShift  n )  ->  ( w  e. Word  V 
<->  ( W cyclShift  n )  e. Word  V ) )
97, 8syl5ibrcom 224 . . . . . . . . . 10  |-  ( ( W  e. Word  V  /\  n  e.  ( 0..^ ( # `  W
) ) )  -> 
( w  =  ( W cyclShift  n )  ->  w  e. Word  V ) )
109rexlimdva 2898 . . . . . . . . 9  |-  ( W  e. Word  V  ->  ( E. n  e.  (
0..^ ( # `  W
) ) w  =  ( W cyclShift  n )  ->  w  e. Word  V ) )
1110imp 429 . . . . . . . 8  |-  ( ( W  e. Word  V  /\  E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )
)  ->  w  e. Word  V )
12 eqcom 2413 . . . . . . . . . . 11  |-  ( w  =  ( W cyclShift  n )  <-> 
( W cyclShift  n )  =  w )
1312biimpi 196 . . . . . . . . . 10  |-  ( w  =  ( W cyclShift  n )  ->  ( W cyclShift  n )  =  w )
1413reximi 2874 . . . . . . . . 9  |-  ( E. n  e.  ( 0..^ ( # `  W
) ) w  =  ( W cyclShift  n )  ->  E. n  e.  ( 0..^ ( # `  W
) ) ( W cyclShift  n )  =  w )
1514adantl 466 . . . . . . . 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 532 . . . . . . 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 434 . . . . . 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 206 . . . . 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 3988 . . . . . . . 8  |-  ( w  e.  { ( W cyclShift  n ) }  <->  w  =  ( W cyclShift  n ) )
2019bicomi 204 . . . . . . 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 2920 . . . . 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 255 . . . 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 2540 . . 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 2457 . 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 4275 . 2  |-  U_ n  e.  ( 0..^ ( # `  W ) ) { ( W cyclShift  n ) }  =  { w  |  E. n  e.  ( 0..^ ( # `  W
) ) w  e. 
{ ( W cyclShift  n ) } }
2825, 26, 273eqtr4g 2470 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 186    /\ wa 369    = wceq 1407    e. wcel 1844   {cab 2389   E.wrex 2757   {crab 2760   {csn 3974   U_ciun 4273   ` cfv 5571  (class class class)co 6280   0cc0 9524  ..^cfzo 11856   #chash 12454  Word cword 12585   cyclShift ccsh 12817
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1641  ax-4 1654  ax-5 1727  ax-6 1773  ax-7 1816  ax-8 1846  ax-9 1848  ax-10 1863  ax-11 1868  ax-12 1880  ax-13 2028  ax-ext 2382  ax-rep 4509  ax-sep 4519  ax-nul 4527  ax-pow 4574  ax-pr 4632  ax-un 6576  ax-cnex 9580  ax-resscn 9581  ax-1cn 9582  ax-icn 9583  ax-addcl 9584  ax-addrcl 9585  ax-mulcl 9586  ax-mulrcl 9587  ax-mulcom 9588  ax-addass 9589  ax-mulass 9590  ax-distr 9591  ax-i2m1 9592  ax-1ne0 9593  ax-1rid 9594  ax-rnegex 9595  ax-rrecex 9596  ax-cnre 9597  ax-pre-lttri 9598  ax-pre-lttrn 9599  ax-pre-ltadd 9600  ax-pre-mulgt0 9601
This theorem depends on definitions:  df-bi 187  df-or 370  df-an 371  df-3or 977  df-3an 978  df-tru 1410  df-ex 1636  df-nf 1640  df-sb 1766  df-eu 2244  df-mo 2245  df-clab 2390  df-cleq 2396  df-clel 2399  df-nfc 2554  df-ne 2602  df-nel 2603  df-ral 2761  df-rex 2762  df-reu 2763  df-rmo 2764  df-rab 2765  df-v 3063  df-sbc 3280  df-csb 3376  df-dif 3419  df-un 3421  df-in 3423  df-ss 3430  df-pss 3432  df-nul 3741  df-if 3888  df-pw 3959  df-sn 3975  df-pr 3977  df-tp 3979  df-op 3981  df-uni 4194  df-int 4230  df-iun 4275  df-br 4398  df-opab 4456  df-mpt 4457  df-tr 4492  df-eprel 4736  df-id 4740  df-po 4746  df-so 4747  df-fr 4784  df-we 4786  df-xp 4831  df-rel 4832  df-cnv 4833  df-co 4834  df-dm 4835  df-rn 4836  df-res 4837  df-ima 4838  df-pred 5369  df-ord 5415  df-on 5416  df-lim 5417  df-suc 5418  df-iota 5535  df-fun 5573  df-fn 5574  df-f 5575  df-f1 5576  df-fo 5577  df-f1o 5578  df-fv 5579  df-riota 6242  df-ov 6283  df-oprab 6284  df-mpt2 6285  df-om 6686  df-1st 6786  df-2nd 6787  df-wrecs 7015  df-recs 7077  df-rdg 7115  df-1o 7169  df-oadd 7173  df-er 7350  df-en 7557  df-dom 7558  df-sdom 7559  df-fin 7560  df-card 8354  df-cda 8582  df-pnf 9662  df-mnf 9663  df-xr 9664  df-ltxr 9665  df-le 9666  df-sub 9845  df-neg 9846  df-nn 10579  df-2 10637  df-n0 10839  df-z 10908  df-uz 11130  df-fz 11729  df-fzo 11857  df-hash 12455  df-word 12593  df-concat 12595  df-substr 12597  df-csh 12818
This theorem is referenced by:  cshwsex  14796  cshwshashnsame  14799
  Copyright terms: Public domain W3C validator