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

Theorem scshwfzeqfzo 12757
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 12528 . . . . . . . . . . . 12  |-  ( X  e. Word  V  ->  ( # `
 X )  e. 
NN0 )
2 elnn0uz 11119 . . . . . . . . . . . 12  |-  ( (
# `  X )  e.  NN0  <->  ( # `  X
)  e.  ( ZZ>= ` 
0 ) )
31, 2sylib 196 . . . . . . . . . . 11  |-  ( X  e. Word  V  ->  ( # `
 X )  e.  ( ZZ>= `  0 )
)
43adantr 465 . . . . . . . . . 10  |-  ( ( X  e. Word  V  /\  N  =  ( # `  X
) )  ->  ( # `
 X )  e.  ( ZZ>= `  0 )
)
5 eleq1 2539 . . . . . . . . . . 11  |-  ( N  =  ( # `  X
)  ->  ( N  e.  ( ZZ>= `  0 )  <->  (
# `  X )  e.  ( ZZ>= `  0 )
) )
65adantl 466 . . . . . . . . . 10  |-  ( ( X  e. Word  V  /\  N  =  ( # `  X
) )  ->  ( N  e.  ( ZZ>= ` 
0 )  <->  ( # `  X
)  e.  ( ZZ>= ` 
0 ) ) )
74, 6mpbird 232 . . . . . . . . 9  |-  ( ( X  e. Word  V  /\  N  =  ( # `  X
) )  ->  N  e.  ( ZZ>= `  0 )
)
873adant2 1015 . . . . . . . 8  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  N  e.  ( ZZ>= `  0 )
)
98adantr 465 . . . . . . 7  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  N  e.  ( ZZ>= `  0 )
)
10 fzisfzounsn 11889 . . . . . . 7  |-  ( N  e.  ( ZZ>= `  0
)  ->  ( 0 ... N )  =  ( ( 0..^ N )  u.  { N } ) )
119, 10syl 16 . . . . . 6  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
0 ... N )  =  ( ( 0..^ N )  u.  { N } ) )
1211rexeqdv 3065 . . . . 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 3684 . . . . 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 261 . . . 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 5876 . . . . . . . . . . . . 13  |-  ( # `  X )  e.  _V
1716a1i 11 . . . . . . . . . . . 12  |-  ( N  =  ( # `  X
)  ->  ( # `  X
)  e.  _V )
18 eleq1 2539 . . . . . . . . . . . 12  |-  ( N  =  ( # `  X
)  ->  ( N  e.  _V  <->  ( # `  X
)  e.  _V )
)
1917, 18mpbird 232 . . . . . . . . . . 11  |-  ( N  =  ( # `  X
)  ->  N  e.  _V )
20 oveq2 6292 . . . . . . . . . . . . 13  |-  ( n  =  N  ->  ( X cyclShift  n )  =  ( X cyclShift  N ) )
2120eqeq2d 2481 . . . . . . . . . . . 12  |-  ( n  =  N  ->  (
y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
2221rexsng 4063 . . . . . . . . . . 11  |-  ( N  e.  _V  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
2319, 22syl 16 . . . . . . . . . 10  |-  ( N  =  ( # `  X
)  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
24233ad2ant3 1019 . . . . . . . . 9  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
2524adantr 465 . . . . . . . 8  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  ( E. n  e.  { N } y  =  ( X cyclShift  n )  <->  y  =  ( X cyclShift  N ) ) )
26 oveq2 6292 . . . . . . . . . . . . 13  |-  ( N  =  ( # `  X
)  ->  ( X cyclShift  N )  =  ( X cyclShift  ( # `  X ) ) )
27263ad2ant3 1019 . . . . . . . . . . . 12  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  N )  =  ( X cyclShift  ( # `  X
) ) )
28 cshwn 12731 . . . . . . . . . . . . 13  |-  ( X  e. Word  V  ->  ( X cyclShift  ( # `  X
) )  =  X )
29283ad2ant1 1017 . . . . . . . . . . . 12  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  ( # `  X
) )  =  X )
3027, 29eqtrd 2508 . . . . . . . . . . 11  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  N )  =  X )
3130eqeq2d 2481 . . . . . . . . . 10  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  (
y  =  ( X cyclShift  N )  <->  y  =  X ) )
3231adantr 465 . . . . . . . . 9  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
y  =  ( X cyclShift  N )  <->  y  =  X ) )
33 cshw0 12728 . . . . . . . . . . . . . . 15  |-  ( X  e. Word  V  ->  ( X cyclShift  0 )  =  X )
34333ad2ant1 1017 . . . . . . . . . . . . . 14  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( X cyclShift  0 )  =  X )
35 lennncl 12529 . . . . . . . . . . . . . . . . . 18  |-  ( ( X  e. Word  V  /\  X  =/=  (/) )  ->  ( # `
 X )  e.  NN )
36353adant3 1016 . . . . . . . . . . . . . . . . 17  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( # `
 X )  e.  NN )
37 eleq1 2539 . . . . . . . . . . . . . . . . . 18  |-  ( N  =  ( # `  X
)  ->  ( N  e.  NN  <->  ( # `  X
)  e.  NN ) )
38373ad2ant3 1019 . . . . . . . . . . . . . . . . 17  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  ( N  e.  NN  <->  ( # `  X
)  e.  NN ) )
3936, 38mpbird 232 . . . . . . . . . . . . . . . 16  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  N  e.  NN )
40 lbfzo0 11830 . . . . . . . . . . . . . . . 16  |-  ( 0  e.  ( 0..^ N )  <->  N  e.  NN )
4139, 40sylibr 212 . . . . . . . . . . . . . . 15  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  0  e.  ( 0..^ N ) )
42 oveq2 6292 . . . . . . . . . . . . . . . . . . . 20  |-  ( 0  =  n  ->  ( X cyclShift  0 )  =  ( X cyclShift  n ) )
4342eqeq1d 2469 . . . . . . . . . . . . . . . . . . 19  |-  ( 0  =  n  ->  (
( X cyclShift  0 )  =  X  <->  ( X cyclShift  n )  =  X ) )
4443eqcoms 2479 . . . . . . . . . . . . . . . . . 18  |-  ( n  =  0  ->  (
( X cyclShift  0 )  =  X  <->  ( X cyclShift  n )  =  X ) )
45 eqcom 2476 . . . . . . . . . . . . . . . . . 18  |-  ( ( X cyclShift  n )  =  X  <-> 
X  =  ( X cyclShift  n ) )
4644, 45syl6bb 261 . . . . . . . . . . . . . . . . 17  |-  ( n  =  0  ->  (
( X cyclShift  0 )  =  X  <->  X  =  ( X cyclShift  n ) ) )
4746adantl 466 . . . . . . . . . . . . . . . 16  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  n  =  0 )  -> 
( ( X cyclShift  0
)  =  X  <->  X  =  ( X cyclShift  n ) ) )
4847biimpd 207 . . . . . . . . . . . . . . 15  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  n  =  0 )  -> 
( ( X cyclShift  0
)  =  X  ->  X  =  ( X cyclShift  n ) ) )
4941, 48rspcimedv 3216 . . . . . . . . . . . . . 14  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  (
( X cyclShift  0 )  =  X  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) ) )
5034, 49mpd 15 . . . . . . . . . . . . 13  |-  ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) )
5150adantr 465 . . . . . . . . . . . 12  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) )
5251adantr 465 . . . . . . . . . . 11  |-  ( ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  /\  y  =  X )  ->  E. n  e.  ( 0..^ N ) X  =  ( X cyclShift  n ) )
53 eqeq1 2471 . . . . . . . . . . . . 13  |-  ( y  =  X  ->  (
y  =  ( X cyclShift  n )  <->  X  =  ( X cyclShift  n ) ) )
5453adantl 466 . . . . . . . . . . . 12  |-  ( ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  /\  y  =  X )  ->  (
y  =  ( X cyclShift  n )  <->  X  =  ( X cyclShift  n ) ) )
5554rexbidv 2973 . . . . . . . . . . 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 ) ) )
5652, 55mpbird 232 . . . . . . . . . 10  |-  ( ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  /\  y  =  X )  ->  E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n ) )
5756ex 434 . . . . . . . . 9  |-  ( ( ( X  e. Word  V  /\  X  =/=  (/)  /\  N  =  ( # `  X
) )  /\  y  e. Word  V )  ->  (
y  =  X  ->  E. n  e.  (
0..^ N ) y  =  ( X cyclShift  n ) ) )
5832, 57sylbid 215 . . . . . . . 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 ) ) )
5925, 58sylbid 215 . . . . . . 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 ) ) )
6059com12 31 . . . . . 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 ) ) )
6115, 60jaoi 379 . . . . 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 ) ) )
6261com12 31 . . . 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 ) ) )
6314, 62sylbid 215 . . 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 ) ) )
64 fzossfz 11814 . . . 4  |-  ( 0..^ N )  C_  (
0 ... N )
65 ssrexv 3565 . . . 4  |-  ( ( 0..^ N )  C_  ( 0 ... N
)  ->  ( E. n  e.  ( 0..^ N ) y  =  ( X cyclShift  n )  ->  E. n  e.  ( 0 ... N ) y  =  ( X cyclShift  n ) ) )
6664, 65mp1i 12 . . 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 ) ) )
6763, 66impbid 191 . 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 ) ) )
6867rabbidva 3104 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 184    \/ wo 368    /\ wa 369    /\ w3a 973    = wceq 1379    e. wcel 1767    =/= wne 2662   E.wrex 2815   {crab 2818   _Vcvv 3113    u. cun 3474    C_ wss 3476   (/)c0 3785   {csn 4027   ` cfv 5588  (class class class)co 6284   0cc0 9492   NNcn 10536   NN0cn0 10795   ZZ>=cuz 11082   ...cfz 11672  ..^cfzo 11792   #chash 12373  Word cword 12500   cyclShift ccsh 12722
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6576  ax-cnex 9548  ax-resscn 9549  ax-1cn 9550  ax-icn 9551  ax-addcl 9552  ax-addrcl 9553  ax-mulcl 9554  ax-mulrcl 9555  ax-mulcom 9556  ax-addass 9557  ax-mulass 9558  ax-distr 9559  ax-i2m1 9560  ax-1ne0 9561  ax-1rid 9562  ax-rnegex 9563  ax-rrecex 9564  ax-cnre 9565  ax-pre-lttri 9566  ax-pre-lttrn 9567  ax-pre-ltadd 9568  ax-pre-mulgt0 9569  ax-pre-sup 9570
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rmo 2822  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fun 5590  df-fn 5591  df-f 5592  df-f1 5593  df-fo 5594  df-f1o 5595  df-fv 5596  df-riota 6245  df-ov 6287  df-oprab 6288  df-mpt2 6289  df-om 6685  df-1st 6784  df-2nd 6785  df-recs 7042  df-rdg 7076  df-1o 7130  df-oadd 7134  df-er 7311  df-en 7517  df-dom 7518  df-sdom 7519  df-fin 7520  df-sup 7901  df-card 8320  df-pnf 9630  df-mnf 9631  df-xr 9632  df-ltxr 9633  df-le 9634  df-sub 9807  df-neg 9808  df-div 10207  df-nn 10537  df-n0 10796  df-z 10865  df-uz 11083  df-rp 11221  df-fz 11673  df-fzo 11793  df-fl 11897  df-mod 11965  df-hash 12374  df-word 12508  df-concat 12510  df-substr 12512  df-csh 12723
This theorem is referenced by:  hashecclwwlkn1  24538  usghashecclwwlk  24539
  Copyright terms: Public domain W3C validator