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

Theorem cshwidxm 12759
Description: The symbol at index (n-N) of a word of length n (not 0) cyclically shifted by N positions (not 0) is the symbol at index 0 of the original word. (Contributed by AV, 18-May-2018.) (Revised by AV, 21-May-2018.) (Revised by AV, 30-Oct-2018.)
Assertion
Ref Expression
cshwidxm  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( ( W cyclShift  N ) `
 ( ( # `  W )  -  N
) )  =  ( W `  0 ) )

Proof of Theorem cshwidxm
StepHypRef Expression
1 simpl 457 . . 3  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  ->  W  e. Word  V )
2 elfzelz 11698 . . . 4  |-  ( N  e.  ( 1 ... ( # `  W
) )  ->  N  e.  ZZ )
32adantl 466 . . 3  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  ->  N  e.  ZZ )
4 ubmelfzo 11862 . . . 4  |-  ( N  e.  ( 1 ... ( # `  W
) )  ->  (
( # `  W )  -  N )  e.  ( 0..^ ( # `  W ) ) )
54adantl 466 . . 3  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( ( # `  W
)  -  N )  e.  ( 0..^ (
# `  W )
) )
6 cshwidxmod 12755 . . 3  |-  ( ( W  e. Word  V  /\  N  e.  ZZ  /\  (
( # `  W )  -  N )  e.  ( 0..^ ( # `  W ) ) )  ->  ( ( W cyclShift  N ) `  (
( # `  W )  -  N ) )  =  ( W `  ( ( ( (
# `  W )  -  N )  +  N
)  mod  ( # `  W
) ) ) )
71, 3, 5, 6syl3anc 1229 . 2  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( ( W cyclShift  N ) `
 ( ( # `  W )  -  N
) )  =  ( W `  ( ( ( ( # `  W
)  -  N )  +  N )  mod  ( # `  W
) ) ) )
8 elfz1b 11758 . . . . . . . 8  |-  ( N  e.  ( 1 ... ( # `  W
) )  <->  ( N  e.  NN  /\  ( # `  W )  e.  NN  /\  N  <_  ( # `  W
) ) )
9 nncn 10551 . . . . . . . . . 10  |-  ( N  e.  NN  ->  N  e.  CC )
10 nncn 10551 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN  ->  ( # `  W
)  e.  CC )
119, 10anim12ci 567 . . . . . . . . 9  |-  ( ( N  e.  NN  /\  ( # `  W )  e.  NN )  -> 
( ( # `  W
)  e.  CC  /\  N  e.  CC )
)
12113adant3 1017 . . . . . . . 8  |-  ( ( N  e.  NN  /\  ( # `  W )  e.  NN  /\  N  <_  ( # `  W
) )  ->  (
( # `  W )  e.  CC  /\  N  e.  CC ) )
138, 12sylbi 195 . . . . . . 7  |-  ( N  e.  ( 1 ... ( # `  W
) )  ->  (
( # `  W )  e.  CC  /\  N  e.  CC ) )
14 npcan 9834 . . . . . . 7  |-  ( ( ( # `  W
)  e.  CC  /\  N  e.  CC )  ->  ( ( ( # `  W )  -  N
)  +  N )  =  ( # `  W
) )
1513, 14syl 16 . . . . . 6  |-  ( N  e.  ( 1 ... ( # `  W
) )  ->  (
( ( # `  W
)  -  N )  +  N )  =  ( # `  W
) )
1615oveq1d 6296 . . . . 5  |-  ( N  e.  ( 1 ... ( # `  W
) )  ->  (
( ( ( # `  W )  -  N
)  +  N )  mod  ( # `  W
) )  =  ( ( # `  W
)  mod  ( # `  W
) ) )
1716adantl 466 . . . 4  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( ( ( (
# `  W )  -  N )  +  N
)  mod  ( # `  W
) )  =  ( ( # `  W
)  mod  ( # `  W
) ) )
18 nnrp 11239 . . . . . . . 8  |-  ( (
# `  W )  e.  NN  ->  ( # `  W
)  e.  RR+ )
19 modid0 12002 . . . . . . . 8  |-  ( (
# `  W )  e.  RR+  ->  ( ( # `
 W )  mod  ( # `  W
) )  =  0 )
2018, 19syl 16 . . . . . . 7  |-  ( (
# `  W )  e.  NN  ->  ( ( # `
 W )  mod  ( # `  W
) )  =  0 )
21203ad2ant2 1019 . . . . . 6  |-  ( ( N  e.  NN  /\  ( # `  W )  e.  NN  /\  N  <_  ( # `  W
) )  ->  (
( # `  W )  mod  ( # `  W
) )  =  0 )
228, 21sylbi 195 . . . . 5  |-  ( N  e.  ( 1 ... ( # `  W
) )  ->  (
( # `  W )  mod  ( # `  W
) )  =  0 )
2322adantl 466 . . . 4  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( ( # `  W
)  mod  ( # `  W
) )  =  0 )
2417, 23eqtrd 2484 . . 3  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( ( ( (
# `  W )  -  N )  +  N
)  mod  ( # `  W
) )  =  0 )
2524fveq2d 5860 . 2  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( W `  (
( ( ( # `  W )  -  N
)  +  N )  mod  ( # `  W
) ) )  =  ( W `  0
) )
267, 25eqtrd 2484 1  |-  ( ( W  e. Word  V  /\  N  e.  ( 1 ... ( # `  W
) ) )  -> 
( ( W cyclShift  N ) `
 ( ( # `  W )  -  N
) )  =  ( W `  0 ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    /\ w3a 974    = wceq 1383    e. wcel 1804   class class class wbr 4437   ` cfv 5578  (class class class)co 6281   CCcc 9493   0cc0 9495   1c1 9496    + caddc 9498    <_ cle 9632    - cmin 9810   NNcn 10543   ZZcz 10871   RR+crp 11230   ...cfz 11682  ..^cfzo 11805    mod cmo 11977   #chash 12386  Word cword 12515   cyclShift ccsh 12740
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1605  ax-4 1618  ax-5 1691  ax-6 1734  ax-7 1776  ax-8 1806  ax-9 1808  ax-10 1823  ax-11 1828  ax-12 1840  ax-13 1985  ax-ext 2421  ax-rep 4548  ax-sep 4558  ax-nul 4566  ax-pow 4615  ax-pr 4676  ax-un 6577  ax-cnex 9551  ax-resscn 9552  ax-1cn 9553  ax-icn 9554  ax-addcl 9555  ax-addrcl 9556  ax-mulcl 9557  ax-mulrcl 9558  ax-mulcom 9559  ax-addass 9560  ax-mulass 9561  ax-distr 9562  ax-i2m1 9563  ax-1ne0 9564  ax-1rid 9565  ax-rnegex 9566  ax-rrecex 9567  ax-cnre 9568  ax-pre-lttri 9569  ax-pre-lttrn 9570  ax-pre-ltadd 9571  ax-pre-mulgt0 9572  ax-pre-sup 9573
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 975  df-3an 976  df-tru 1386  df-ex 1600  df-nf 1604  df-sb 1727  df-eu 2272  df-mo 2273  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2593  df-ne 2640  df-nel 2641  df-ral 2798  df-rex 2799  df-reu 2800  df-rmo 2801  df-rab 2802  df-v 3097  df-sbc 3314  df-csb 3421  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-pss 3477  df-nul 3771  df-if 3927  df-pw 3999  df-sn 4015  df-pr 4017  df-tp 4019  df-op 4021  df-uni 4235  df-int 4272  df-iun 4317  df-br 4438  df-opab 4496  df-mpt 4497  df-tr 4531  df-eprel 4781  df-id 4785  df-po 4790  df-so 4791  df-fr 4828  df-we 4830  df-ord 4871  df-on 4872  df-lim 4873  df-suc 4874  df-xp 4995  df-rel 4996  df-cnv 4997  df-co 4998  df-dm 4999  df-rn 5000  df-res 5001  df-ima 5002  df-iota 5541  df-fun 5580  df-fn 5581  df-f 5582  df-f1 5583  df-fo 5584  df-f1o 5585  df-fv 5586  df-riota 6242  df-ov 6284  df-oprab 6285  df-mpt2 6286  df-om 6686  df-1st 6785  df-2nd 6786  df-recs 7044  df-rdg 7078  df-1o 7132  df-oadd 7136  df-er 7313  df-en 7519  df-dom 7520  df-sdom 7521  df-fin 7522  df-sup 7903  df-card 8323  df-cda 8551  df-pnf 9633  df-mnf 9634  df-xr 9635  df-ltxr 9636  df-le 9637  df-sub 9812  df-neg 9813  df-div 10214  df-nn 10544  df-2 10601  df-n0 10803  df-z 10872  df-uz 11092  df-rp 11231  df-fz 11683  df-fzo 11806  df-fl 11910  df-mod 11978  df-hash 12387  df-word 12523  df-concat 12525  df-substr 12527  df-csh 12741
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator