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

Theorem scshwfzeqfzo 12910
Description: For a nonempty word the sets of shifted words, expressd by a finite interval of integers or by a half-open integer range are identical. (Contributed by Alexander van der Vekens, 15-Jun-2018.)
Assertion
Ref Expression
scshwfzeqfzo  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  { y  e. Word  V  |  E. n  e.  ( 0 ... N ) y  =  ( X cyclShift  n ) }  =  { y  e. Word  V  |  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) } )
Distinct variable groups:    n, N, y    n, V, y    n, X, y

Proof of Theorem scshwfzeqfzo
StepHypRef Expression
1 lencl 12674 . . . . . . . . . . . 12  |-  ( X  e. Word  V  ->  ( # `
 X )  e. 
NN0 )
2 elnn0uz 11196 . . . . . . . . . . . 12  |-  ( (
# `  X )  e.  NN0  <->  ( # `  X
)  e.  ( ZZ>= ` 
0 ) )
31, 2sylib 199 . . . . . . . . . . 11  |-  ( X  e. Word  V  ->  ( # `
 X )  e.  ( ZZ>= `  0 )
)
43adantr 466 . . . . . . . . . 10  |-  ( ( X  e. Word  V  /\  N  =  ( # `  X
) )  ->  ( # `
 X )  e.  ( ZZ>= `  0 )
)
5 eleq1 2501 . . . . . . . . . . 11  |-  ( N  =  ( # `  X
)  ->  ( N  e.  ( ZZ>= `  0 )  <->  (
# `  X )  e.  ( ZZ>= `  0 )
) )
65adantl 467 . . . . . . . . . 10  |-  ( ( X  e. Word  V  /\  N  =  ( # `  X
) )  ->  ( N  e.  ( ZZ>= ` 
0 )  <->  ( # `  X
)  e.  ( ZZ>= ` 
0 ) ) )
74, 6mpbird 235 . . . . . . . . 9  |-  ( ( X  e. Word  V  /\  N  =  ( # `  X
) )  ->  N  e.  ( ZZ>= `  0 )
)
873adant2 1024 . . . . . . . 8  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  N  e.  ( ZZ>= `  0 )
)
98adantr 466 . . . . . . 7  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  N  e.  ( ZZ>= `  0 )
)
10 fzisfzounsn 12017 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  0
)  ->  ( 0 ... N )  =  ( ( 0..^ N )  u.  { N } ) )
119, 10syl 17 . . . . . 6  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
0 ... N )  =  ( ( 0..^ N )  u.  { N } ) )
1211rexeqdv 3039 . . . . 5  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  (
0 ... N ) y  =  ( X cyclShift  n )  <->  E. n  e.  (
( 0..^ N )  u.  { N }
) y  =  ( X cyclShift  n ) ) )
13 rexun 3652 . . . . 5  |-  ( E. n  e.  ( ( 0..^ N )  u. 
{ N } ) y  =  ( X cyclShift  n )  <->  ( E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n )  \/  E. n  e.  { N } y  =  ( X cyclShift  n ) ) )
1412, 13syl6bb 264 . . . 4  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  (
0 ... N ) y  =  ( X cyclShift  n )  <-> 
( E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n )  \/  E. n  e.  { N } y  =  ( X cyclShift  n ) ) ) )
15 ax-1 6 . . . . . 6  |-  ( E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n )  ->  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) ) )
16 fvex 5891 . . . . . . . . . . . 12  |-  ( # `  X )  e.  _V
17 eleq1 2501 . . . . . . . . . . . 12  |-  ( N  =  ( # `  X
)  ->  ( N  e.  _V  <->  ( # `  X
)  e.  _V )
)
1816, 17mpbiri 236 . . . . . . . . . . 11  |-  ( N  =  ( # `  X
)  ->  N  e.  _V )
19 oveq2 6313 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( X cyclShift  n )  =  ( X cyclShift  N ) )
2019eqeq2d 2443 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (
y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
2120rexsng 4038 . . . . . . . . . . 11  |-  ( N  e.  _V  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
2218, 21syl 17 . . . . . . . . . 10  |-  ( N  =  ( # `  X
)  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
23223ad2ant3 1028 . . . . . . . . 9  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
2423adantr 466 . . . . . . . 8  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
25 oveq2 6313 . . . . . . . . . . . . 13  |-  ( N  =  ( # `  X
)  ->  ( X cyclShift  N )  =  ( X cyclShift  ( # `  X ) ) )
26253ad2ant3 1028 . . . . . . . . . . . 12  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  N )  =  ( X cyclShift  ( # `  X
) ) )
27 cshwn 12884 . . . . . . . . . . . . 13  |-  ( X  e. Word  V  ->  ( X cyclShift  ( # `  X
) )  =  X )
28273ad2ant1 1026 . . . . . . . . . . . 12  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  ( # `  X
) )  =  X )
2926, 28eqtrd 2470 . . . . . . . . . . 11  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  N )  =  X )
3029eqeq2d 2443 . . . . . . . . . 10  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  (
y  =  ( X cyclShift  N )  <->  y  =  X ) )
3130adantr 466 . . . . . . . . 9  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
y  =  ( X cyclShift  N )  <->  y  =  X ) )
32 cshw0 12881 . . . . . . . . . . . . . . 15  |-  ( X  e. Word  V  ->  ( X cyclShift  0 )  =  X )
33323ad2ant1 1026 . . . . . . . . . . . . . 14  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  0 )  =  X )
34 lennncl 12675 . . . . . . . . . . . . . . . . . 18  |-  ( ( X  e. Word  V  /\  X  =/=  (/) )  ->  ( # `
 X )  e.  NN )
35343adant3 1025 . . . . . . . . . . . . . . . . 17  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( # `
 X )  e.  NN )
36 eleq1 2501 . . . . . . . . . . . . . . . . . 18  |-  ( N  =  ( # `  X
)  ->  ( N  e.  NN  <->  ( # `  X
)  e.  NN ) )
37363ad2ant3 1028 . . . . . . . . . . . . . . . . 17  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( N  e.  NN  <->  ( # `  X
)  e.  NN ) )
3835, 37mpbird 235 . . . . . . . . . . . . . . . 16  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  N  e.  NN )
39 lbfzo0 11953 . . . . . . . . . . . . . . . 16  |-  ( 0  e.  ( 0..^ N )  <->  N  e.  NN )
4038, 39sylibr 215 . . . . . . . . . . . . . . 15  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  0  e.  ( 0..^ N ) )
41 oveq2 6313 . . . . . . . . . . . . . . . . . . . 20  |-  ( 0  =  n  ->  ( X cyclShift  0 )  =  ( X cyclShift  n ) )
4241eqeq1d 2431 . . . . . . . . . . . . . . . . . . 19  |-  ( 0  =  n  ->  (
( X cyclShift  0 )  =  X  <->  ( X cyclShift  n )  =  X ) )
4342eqcoms 2441 . . . . . . . . . . . . . . . . . 18  |-  ( n  =  0  ->  (
( X cyclShift  0 )  =  X  <->  ( X cyclShift  n )  =  X ) )
44 eqcom 2438 . . . . . . . . . . . . . . . . . 18  |-  ( ( X cyclShift  n )  =  X  <-> 
X  =  ( X cyclShift  n ) )
4543, 44syl6bb 264 . . . . . . . . . . . . . . . . 17  |-  ( n  =  0  ->  (
( X cyclShift  0 )  =  X  <->  X  =  ( X cyclShift  n ) ) )
4645adantl 467 . . . . . . . . . . . . . . . 16  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  n  =  0 )  -> 
( ( X cyclShift  0
)  =  X  <->  X  =  ( X cyclShift  n ) ) )
4746biimpd 210 . . . . . . . . . . . . . . 15  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  n  =  0 )  -> 
( ( X cyclShift  0
)  =  X  ->  X  =  ( X cyclShift  n ) ) )
4840, 47rspcimedv 3190 . . . . . . . . . . . . . 14  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  (
( X cyclShift  0 )  =  X  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) ) )
4933, 48mpd 15 . . . . . . . . . . . . 13  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) )
5049adantr 466 . . . . . . . . . . . 12  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) )
5150adantr 466 . . . . . . . . . . 11  |-  ( ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  /\  y  =  X )  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) )
52 eqeq1 2433 . . . . . . . . . . . . 13  |-  ( y  =  X  ->  (
y  =  ( X cyclShift  n )  <->  X  =  ( X cyclShift  n ) ) )
5352adantl 467 . . . . . . . . . . . 12  |-  ( ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  /\  y  =  X )  ->  (
y  =  ( X cyclShift  n )  <->  X  =  ( X cyclShift  n ) ) )
5453rexbidv 2946 . . . . . . . . . . 11  |-  ( ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  /\  y  =  X )  ->  ( E. n  e.  (
0..^ N ) y  =  ( X cyclShift  n )  <->  E. n  e.  (
0..^ N ) X  =  ( X cyclShift  n ) ) )
5551, 54mpbird 235 . . . . . . . . . 10  |-  ( ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  /\  y  =  X )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) )
5655ex 435 . . . . . . . . 9  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
y  =  X  ->  E. n  e.  (
0..^ N ) y  =  ( X cyclShift  n ) ) )
5731, 56sylbid 218 . . . . . . . 8  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
y  =  ( X cyclShift  N )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) ) )
5824, 57sylbid 218 . . . . . . 7  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) ) )
5958com12 32 . . . . . 6  |-  ( E. n  e.  { N } y  =  ( X cyclShift  n )  ->  (
( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) ) )
6015, 59jaoi 380 . . . . 5  |-  ( ( E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n )  \/  E. n  e. 
{ N } y  =  ( X cyclShift  n ) )  ->  ( (
( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) ) )
6160com12 32 . . . 4  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
( E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n )  \/  E. n  e.  { N } y  =  ( X cyclShift  n ) )  ->  E. n  e.  (
0..^ N ) y  =  ( X cyclShift  n ) ) )
6214, 61sylbid 218 . . 3  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  (
0 ... N ) y  =  ( X cyclShift  n )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) ) )
63 fzossfz 11936 . . . 4  |-  ( 0..^ N )  C_  (
0 ... N )
64 ssrexv 3532 . . . 4  |-  ( ( 0..^ N )  C_  ( 0 ... N
)  ->  ( E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n )  ->  E. n  e.  ( 0 ... N ) y  =  ( X cyclShift  n ) ) )
6563, 64mp1i 13 . . 3  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  (
0..^ N ) y  =  ( X cyclShift  n )  ->  E. n  e.  ( 0 ... N ) y  =  ( X cyclShift  n ) ) )
6662, 65impbid 193 . 2  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  (
0 ... N ) y  =  ( X cyclShift  n )  <->  E. n  e.  (
0..^ N ) y  =  ( X cyclShift  n ) ) )
6766rabbidva 3078 1  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  { y  e. Word  V  |  E. n  e.  ( 0 ... N ) y  =  ( X cyclShift  n ) }  =  { y  e. Word  V  |  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) } )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 187    \/ wo 369    /\ wa 370    /\ w3a 982    = wceq 1437    e. wcel 1870    =/= wne 2625   E.wrex 2783   {crab 2786   _Vcvv 3087    u. cun 3440    C_ wss 3442   (/)c0 3767   {csn 4002   ` cfv 5601  (class class class)co 6305   0cc0 9538   NNcn 10609   NN0cn0 10869   ZZ>=cuz 11159   ...cfz 11782  ..^cfzo 11913   #chash 12512  Word cword 12643   cyclShift ccsh 12875
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1751  ax-6 1797  ax-7 1841  ax-8 1872  ax-9 1874  ax-10 1889  ax-11 1894  ax-12 1907  ax-13 2055  ax-ext 2407  ax-rep 4538  ax-sep 4548  ax-nul 4556  ax-pow 4603  ax-pr 4661  ax-un 6597  ax-cnex 9594  ax-resscn 9595  ax-1cn 9596  ax-icn 9597  ax-addcl 9598  ax-addrcl 9599  ax-mulcl 9600  ax-mulrcl 9601  ax-mulcom 9602  ax-addass 9603  ax-mulass 9604  ax-distr 9605  ax-i2m1 9606  ax-1ne0 9607  ax-1rid 9608  ax-rnegex 9609  ax-rrecex 9610  ax-cnre 9611  ax-pre-lttri 9612  ax-pre-lttrn 9613  ax-pre-ltadd 9614  ax-pre-mulgt0 9615  ax-pre-sup 9616
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1790  df-eu 2270  df-mo 2271  df-clab 2415  df-cleq 2421  df-clel 2424  df-nfc 2579  df-ne 2627  df-nel 2628  df-ral 2787  df-rex 2788  df-reu 2789  df-rmo 2790  df-rab 2791  df-v 3089  df-sbc 3306  df-csb 3402  df-dif 3445  df-un 3447  df-in 3449  df-ss 3456  df-pss 3458  df-nul 3768  df-if 3916  df-pw 3987  df-sn 4003  df-pr 4005  df-tp 4007  df-op 4009  df-uni 4223  df-int 4259  df-iun 4304  df-br 4427  df-opab 4485  df-mpt 4486  df-tr 4521  df-eprel 4765  df-id 4769  df-po 4775  df-so 4776  df-fr 4813  df-we 4815  df-xp 4860  df-rel 4861  df-cnv 4862  df-co 4863  df-dm 4864  df-rn 4865  df-res 4866  df-ima 4867  df-pred 5399  df-ord 5445  df-on 5446  df-lim 5447  df-suc 5448  df-iota 5565  df-fun 5603  df-fn 5604  df-f 5605  df-f1 5606  df-fo 5607  df-f1o 5608  df-fv 5609  df-riota 6267  df-ov 6308  df-oprab 6309  df-mpt2 6310  df-om 6707  df-1st 6807  df-2nd 6808  df-wrecs 7036  df-recs 7098  df-rdg 7136  df-1o 7190  df-oadd 7194  df-er 7371  df-en 7578  df-dom 7579  df-sdom 7580  df-fin 7581  df-sup 7962  df-card 8372  df-cda 8596  df-pnf 9676  df-mnf 9677  df-xr 9678  df-ltxr 9679  df-le 9680  df-sub 9861  df-neg 9862  df-div 10269  df-nn 10610  df-2 10668  df-n0 10870  df-z 10938  df-uz 11160  df-rp 11303  df-fz 11783  df-fzo 11914  df-fl 12025  df-mod 12094  df-hash 12513  df-word 12651  df-concat 12653  df-substr 12655  df-csh 12876
This theorem is referenced by:  hashecclwwlkn1  25407  usghashecclwwlk  25408
  Copyright terms: Public domain W3C validator