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

Theorem cshw0 12533
Description: A word cyclically shifted by 0 is the word itself. (Contributed by AV, 16-May-2018.) (Revised by AV, 20-May-2018.) (Revised by AV, 26-Oct-2018.)
Assertion
Ref Expression
cshw0  |-  ( W  e. Word  V  ->  ( W cyclShift  0 )  =  W )

Proof of Theorem cshw0
StepHypRef Expression
1 0csh0 12532 . . . 4  |-  ( (/) cyclShift  0 )  =  (/)
2 oveq1 6197 . . . 4  |-  ( (/)  =  W  ->  ( (/) cyclShift  0 )  =  ( W cyclShift  0 ) )
3 id 22 . . . 4  |-  ( (/)  =  W  ->  (/)  =  W )
41, 2, 33eqtr3a 2516 . . 3  |-  ( (/)  =  W  ->  ( W cyclShift  0 )  =  W )
54a1d 25 . 2  |-  ( (/)  =  W  ->  ( W  e. Word  V  ->  ( W cyclShift  0 )  =  W ) )
6 0z 10758 . . . . . . 7  |-  0  e.  ZZ
7 cshword 12530 . . . . . . 7  |-  ( ( W  e. Word  V  /\  0  e.  ZZ )  ->  ( W cyclShift  0 )  =  ( ( W substr  <. ( 0  mod  ( # `
 W ) ) ,  ( # `  W
) >. ) concat  ( W substr  <.
0 ,  ( 0  mod  ( # `  W
) ) >. )
) )
86, 7mpan2 671 . . . . . 6  |-  ( W  e. Word  V  ->  ( W cyclShift  0 )  =  ( ( W substr  <. (
0  mod  ( # `  W
) ) ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  ( 0  mod  ( # `  W
) ) >. )
) )
98adantr 465 . . . . 5  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( W cyclShift  0 )  =  ( ( W substr  <. (
0  mod  ( # `  W
) ) ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  ( 0  mod  ( # `  W
) ) >. )
) )
10 necom 2717 . . . . . 6  |-  ( (/)  =/=  W  <->  W  =/=  (/) )
11 lennncl 12352 . . . . . . 7  |-  ( ( W  e. Word  V  /\  W  =/=  (/) )  ->  ( # `
 W )  e.  NN )
12 nnrp 11101 . . . . . . 7  |-  ( (
# `  W )  e.  NN  ->  ( # `  W
)  e.  RR+ )
13 0mod 11840 . . . . . . . . . 10  |-  ( (
# `  W )  e.  RR+  ->  ( 0  mod  ( # `  W
) )  =  0 )
1413opeq1d 4163 . . . . . . . . 9  |-  ( (
# `  W )  e.  RR+  ->  <. ( 0  mod  ( # `  W
) ) ,  (
# `  W ) >.  =  <. 0 ,  (
# `  W ) >. )
1514oveq2d 6206 . . . . . . . 8  |-  ( (
# `  W )  e.  RR+  ->  ( W substr  <.
( 0  mod  ( # `
 W ) ) ,  ( # `  W
) >. )  =  ( W substr  <. 0 ,  (
# `  W ) >. ) )
1613opeq2d 4164 . . . . . . . . 9  |-  ( (
# `  W )  e.  RR+  ->  <. 0 ,  ( 0  mod  ( # `
 W ) )
>.  =  <. 0 ,  0 >. )
1716oveq2d 6206 . . . . . . . 8  |-  ( (
# `  W )  e.  RR+  ->  ( W substr  <.
0 ,  ( 0  mod  ( # `  W
) ) >. )  =  ( W substr  <. 0 ,  0 >. )
)
1815, 17oveq12d 6208 . . . . . . 7  |-  ( (
# `  W )  e.  RR+  ->  ( ( W substr  <. ( 0  mod  ( # `  W
) ) ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  ( 0  mod  ( # `  W
) ) >. )
)  =  ( ( W substr  <. 0 ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  0 >. )
) )
1911, 12, 183syl 20 . . . . . 6  |-  ( ( W  e. Word  V  /\  W  =/=  (/) )  ->  (
( W substr  <. ( 0  mod  ( # `  W
) ) ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  ( 0  mod  ( # `  W
) ) >. )
)  =  ( ( W substr  <. 0 ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  0 >. )
) )
2010, 19sylan2b 475 . . . . 5  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( ( W substr  <. (
0  mod  ( # `  W
) ) ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  ( 0  mod  ( # `  W
) ) >. )
)  =  ( ( W substr  <. 0 ,  (
# `  W ) >. ) concat  ( W substr  <. 0 ,  0 >. )
) )
219, 20eqtrd 2492 . . . 4  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( W cyclShift  0 )  =  ( ( W substr  <. 0 ,  ( # `  W
) >. ) concat  ( W substr  <.
0 ,  0 >.
) ) )
22 swrdid 12423 . . . . . 6  |-  ( W  e. Word  V  ->  ( W substr  <. 0 ,  (
# `  W ) >. )  =  W )
2322adantr 465 . . . . 5  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( W substr  <. 0 ,  ( # `  W
) >. )  =  W )
24 swrd00 12416 . . . . . 6  |-  ( W substr  <. 0 ,  0 >.
)  =  (/)
2524a1i 11 . . . . 5  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( W substr  <. 0 ,  0 >. )  =  (/) )
2623, 25oveq12d 6208 . . . 4  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( ( W substr  <. 0 ,  ( # `  W
) >. ) concat  ( W substr  <.
0 ,  0 >.
) )  =  ( W concat  (/) ) )
27 ccatrid 12387 . . . . 5  |-  ( W  e. Word  V  ->  ( W concat 
(/) )  =  W )
2827adantr 465 . . . 4  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( W concat  (/) )  =  W )
2921, 26, 283eqtrd 2496 . . 3  |-  ( ( W  e. Word  V  /\  (/) 
=/=  W )  -> 
( W cyclShift  0 )  =  W )
3029expcom 435 . 2  |-  ( (/)  =/=  W  ->  ( W  e. Word  V  ->  ( W cyclShift  0 )  =  W ) )
315, 30pm2.61ine 2761 1  |-  ( W  e. Word  V  ->  ( W cyclShift  0 )  =  W )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1370    e. wcel 1758    =/= wne 2644   (/)c0 3735   <.cop 3981   ` cfv 5516  (class class class)co 6190   0cc0 9383   NNcn 10423   ZZcz 10747   RR+crp 11092    mod cmo 11809   #chash 12204  Word cword 12323   concat cconcat 12325   substr csubstr 12327   cyclShift ccsh 12527
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-rep 4501  ax-sep 4511  ax-nul 4519  ax-pow 4568  ax-pr 4629  ax-un 6472  ax-cnex 9439  ax-resscn 9440  ax-1cn 9441  ax-icn 9442  ax-addcl 9443  ax-addrcl 9444  ax-mulcl 9445  ax-mulrcl 9446  ax-mulcom 9447  ax-addass 9448  ax-mulass 9449  ax-distr 9450  ax-i2m1 9451  ax-1ne0 9452  ax-1rid 9453  ax-rnegex 9454  ax-rrecex 9455  ax-cnre 9456  ax-pre-lttri 9457  ax-pre-lttrn 9458  ax-pre-ltadd 9459  ax-pre-mulgt0 9460  ax-pre-sup 9461
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rmo 2803  df-rab 2804  df-v 3070  df-sbc 3285  df-csb 3387  df-dif 3429  df-un 3431  df-in 3433  df-ss 3440  df-pss 3442  df-nul 3736  df-if 3890  df-pw 3960  df-sn 3976  df-pr 3978  df-tp 3980  df-op 3982  df-uni 4190  df-int 4227  df-iun 4271  df-br 4391  df-opab 4449  df-mpt 4450  df-tr 4484  df-eprel 4730  df-id 4734  df-po 4739  df-so 4740  df-fr 4777  df-we 4779  df-ord 4820  df-on 4821  df-lim 4822  df-suc 4823  df-xp 4944  df-rel 4945  df-cnv 4946  df-co 4947  df-dm 4948  df-rn 4949  df-res 4950  df-ima 4951  df-iota 5479  df-fun 5518  df-fn 5519  df-f 5520  df-f1 5521  df-fo 5522  df-f1o 5523  df-fv 5524  df-riota 6151  df-ov 6193  df-oprab 6194  df-mpt2 6195  df-om 6577  df-1st 6677  df-2nd 6678  df-recs 6932  df-rdg 6966  df-1o 7020  df-oadd 7024  df-er 7201  df-en 7411  df-dom 7412  df-sdom 7413  df-fin 7414  df-sup 7792  df-card 8210  df-pnf 9521  df-mnf 9522  df-xr 9523  df-ltxr 9524  df-le 9525  df-sub 9698  df-neg 9699  df-div 10095  df-nn 10424  df-n0 10681  df-z 10748  df-uz 10963  df-rp 11093  df-fz 11539  df-fzo 11650  df-fl 11743  df-mod 11810  df-hash 12205  df-word 12331  df-concat 12333  df-substr 12335  df-csh 12528
This theorem is referenced by:  cshwn  12536  cshwrepswhash1  14231  clwwisshclww  30609  erclwwlkref  30621  cshwlemma1  30627  scshwfzeqfzo  30630  erclwwlknref  30637
  Copyright terms: Public domain W3C validator