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

Theorem cshco 12563
Description: Mapping of words commutes with the "cyclical shift" operation. (Contributed by AV, 12-Nov-2018.)
Assertion
Ref Expression
cshco  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( F  o.  ( W cyclShift  N ) )  =  ( ( F  o.  W ) cyclShift  N ) )

Proof of Theorem cshco
Dummy variable  i is distinct from all other variables.
StepHypRef Expression
1 ffn 5654 . . . 4  |-  ( F : A --> B  ->  F  Fn  A )
213ad2ant3 1011 . . 3  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  ->  F  Fn  A )
3 cshwfn 12537 . . . 4  |-  ( ( W  e. Word  A  /\  N  e.  ZZ )  ->  ( W cyclShift  N )  Fn  ( 0..^ ( # `  W ) ) )
433adant3 1008 . . 3  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( W cyclShift  N )  Fn  ( 0..^ ( # `  W ) ) )
5 cshwrn 12538 . . . 4  |-  ( ( W  e. Word  A  /\  N  e.  ZZ )  ->  ran  ( W cyclShift  N ) 
C_  A )
653adant3 1008 . . 3  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  ->  ran  ( W cyclShift  N )  C_  A )
7 fnco 5614 . . 3  |-  ( ( F  Fn  A  /\  ( W cyclShift  N )  Fn  ( 0..^ ( # `  W ) )  /\  ran  ( W cyclShift  N )  C_  A )  ->  ( F  o.  ( W cyclShift  N ) )  Fn  (
0..^ ( # `  W
) ) )
82, 4, 6, 7syl3anc 1219 . 2  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( F  o.  ( W cyclShift  N ) )  Fn  ( 0..^ ( # `  W ) ) )
9 wrdco 12558 . . . . 5  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F  o.  W )  e. Word  B
)
1093adant2 1007 . . . 4  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( F  o.  W
)  e. Word  B )
11 simp2 989 . . . 4  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  ->  N  e.  ZZ )
12 cshwfn 12537 . . . 4  |-  ( ( ( F  o.  W
)  e. Word  B  /\  N  e.  ZZ )  ->  ( ( F  o.  W ) cyclShift  N )  Fn  ( 0..^ ( # `  ( F  o.  W
) ) ) )
1310, 11, 12syl2anc 661 . . 3  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( ( F  o.  W ) cyclShift  N )  Fn  ( 0..^ ( # `  ( F  o.  W
) ) ) )
14 lenco 12559 . . . . . 6  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( # `  ( F  o.  W )
)  =  ( # `  W ) )
15143adant2 1007 . . . . 5  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( # `  ( F  o.  W ) )  =  ( # `  W
) )
1615oveq2d 6203 . . . 4  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( 0..^ ( # `  ( F  o.  W
) ) )  =  ( 0..^ ( # `  W ) ) )
1716fneq2d 5597 . . 3  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( ( ( F  o.  W ) cyclShift  N
)  Fn  ( 0..^ ( # `  ( F  o.  W )
) )  <->  ( ( F  o.  W ) cyclShift  N )  Fn  ( 0..^ ( # `  W
) ) ) )
1813, 17mpbid 210 . 2  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( ( F  o.  W ) cyclShift  N )  Fn  ( 0..^ ( # `  W ) ) )
1915adantr 465 . . . . . . 7  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( # `  ( F  o.  W ) )  =  ( # `  W
) )
2019oveq2d 6203 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( i  +  N )  mod  ( # `
 ( F  o.  W ) ) )  =  ( ( i  +  N )  mod  ( # `  W
) ) )
2120fveq2d 5790 . . . . 5  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( W `  (
( i  +  N
)  mod  ( # `  ( F  o.  W )
) ) )  =  ( W `  (
( i  +  N
)  mod  ( # `  W
) ) ) )
2221fveq2d 5790 . . . 4  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( F `  ( W `  ( (
i  +  N )  mod  ( # `  ( F  o.  W )
) ) ) )  =  ( F `  ( W `  ( ( i  +  N )  mod  ( # `  W
) ) ) ) )
23 wrdfn 12346 . . . . . . 7  |-  ( W  e. Word  A  ->  W  Fn  ( 0..^ ( # `  W ) ) )
24233ad2ant1 1009 . . . . . 6  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  ->  W  Fn  ( 0..^ ( # `  W
) ) )
2524adantr 465 . . . . 5  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  ->  W  Fn  ( 0..^ ( # `  W
) ) )
26 elfzoelz 11651 . . . . . . . 8  |-  ( i  e.  ( 0..^ (
# `  W )
)  ->  i  e.  ZZ )
27 zaddcl 10783 . . . . . . . 8  |-  ( ( i  e.  ZZ  /\  N  e.  ZZ )  ->  ( i  +  N
)  e.  ZZ )
2826, 11, 27syl2anr 478 . . . . . . 7  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( i  +  N
)  e.  ZZ )
29 elfzo0 11685 . . . . . . . . 9  |-  ( i  e.  ( 0..^ (
# `  W )
)  <->  ( i  e. 
NN0  /\  ( # `  W
)  e.  NN  /\  i  <  ( # `  W
) ) )
3029simp2bi 1004 . . . . . . . 8  |-  ( i  e.  ( 0..^ (
# `  W )
)  ->  ( # `  W
)  e.  NN )
3130adantl 466 . . . . . . 7  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( # `  W )  e.  NN )
32 zmodfzo 11828 . . . . . . 7  |-  ( ( ( i  +  N
)  e.  ZZ  /\  ( # `  W )  e.  NN )  -> 
( ( i  +  N )  mod  ( # `
 W ) )  e.  ( 0..^ (
# `  W )
) )
3328, 31, 32syl2anc 661 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( i  +  N )  mod  ( # `
 W ) )  e.  ( 0..^ (
# `  W )
) )
3415oveq2d 6203 . . . . . . . 8  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( ( i  +  N )  mod  ( # `
 ( F  o.  W ) ) )  =  ( ( i  +  N )  mod  ( # `  W
) ) )
3534eleq1d 2519 . . . . . . 7  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( ( ( i  +  N )  mod  ( # `  ( F  o.  W )
) )  e.  ( 0..^ ( # `  W
) )  <->  ( (
i  +  N )  mod  ( # `  W
) )  e.  ( 0..^ ( # `  W
) ) ) )
3635adantr 465 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( i  +  N )  mod  ( # `  ( F  o.  W )
) )  e.  ( 0..^ ( # `  W
) )  <->  ( (
i  +  N )  mod  ( # `  W
) )  e.  ( 0..^ ( # `  W
) ) ) )
3733, 36mpbird 232 . . . . 5  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( i  +  N )  mod  ( # `
 ( F  o.  W ) ) )  e.  ( 0..^ (
# `  W )
) )
38 fvco2 5862 . . . . 5  |-  ( ( W  Fn  ( 0..^ ( # `  W
) )  /\  (
( i  +  N
)  mod  ( # `  ( F  o.  W )
) )  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  W ) `  (
( i  +  N
)  mod  ( # `  ( F  o.  W )
) ) )  =  ( F `  ( W `  ( (
i  +  N )  mod  ( # `  ( F  o.  W )
) ) ) ) )
3925, 37, 38syl2anc 661 . . . 4  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  W ) `  (
( i  +  N
)  mod  ( # `  ( F  o.  W )
) ) )  =  ( F `  ( W `  ( (
i  +  N )  mod  ( # `  ( F  o.  W )
) ) ) ) )
40 simpl1 991 . . . . 5  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  ->  W  e. Word  A )
4111adantr 465 . . . . 5  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  ->  N  e.  ZZ )
42 simpr 461 . . . . 5  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
i  e.  ( 0..^ ( # `  W
) ) )
43 cshwidxmod 12539 . . . . . 6  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  i  e.  ( 0..^ ( # `  W ) ) )  ->  ( ( W cyclShift  N ) `  i
)  =  ( W `
 ( ( i  +  N )  mod  ( # `  W
) ) ) )
4443fveq2d 5790 . . . . 5  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  i  e.  ( 0..^ ( # `  W ) ) )  ->  ( F `  ( ( W cyclShift  N ) `
 i ) )  =  ( F `  ( W `  ( ( i  +  N )  mod  ( # `  W
) ) ) ) )
4540, 41, 42, 44syl3anc 1219 . . . 4  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( F `  (
( W cyclShift  N ) `  i ) )  =  ( F `  ( W `  ( (
i  +  N )  mod  ( # `  W
) ) ) ) )
4622, 39, 453eqtr4rd 2502 . . 3  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( F `  (
( W cyclShift  N ) `  i ) )  =  ( ( F  o.  W ) `  (
( i  +  N
)  mod  ( # `  ( F  o.  W )
) ) ) )
47 fvco2 5862 . . . 4  |-  ( ( ( W cyclShift  N )  Fn  ( 0..^ ( # `  W ) )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  ( W cyclShift  N ) ) `
 i )  =  ( F `  (
( W cyclShift  N ) `  i ) ) )
484, 47sylan 471 . . 3  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  ( W cyclShift  N ) ) `
 i )  =  ( F `  (
( W cyclShift  N ) `  i ) ) )
4910adantr 465 . . . 4  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( F  o.  W
)  e. Word  B )
5015eqcomd 2458 . . . . . . 7  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( # `  W )  =  ( # `  ( F  o.  W )
) )
5150oveq2d 6203 . . . . . 6  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( 0..^ ( # `  W ) )  =  ( 0..^ ( # `  ( F  o.  W
) ) ) )
5251eleq2d 2520 . . . . 5  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( i  e.  ( 0..^ ( # `  W
) )  <->  i  e.  ( 0..^ ( # `  ( F  o.  W )
) ) ) )
5352biimpa 484 . . . 4  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
i  e.  ( 0..^ ( # `  ( F  o.  W )
) ) )
54 cshwidxmod 12539 . . . 4  |-  ( ( ( F  o.  W
)  e. Word  B  /\  N  e.  ZZ  /\  i  e.  ( 0..^ ( # `  ( F  o.  W
) ) ) )  ->  ( ( ( F  o.  W ) cyclShift  N ) `  i
)  =  ( ( F  o.  W ) `
 ( ( i  +  N )  mod  ( # `  ( F  o.  W )
) ) ) )
5549, 41, 53, 54syl3anc 1219 . . 3  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( F  o.  W ) cyclShift  N
) `  i )  =  ( ( F  o.  W ) `  ( ( i  +  N )  mod  ( # `
 ( F  o.  W ) ) ) ) )
5646, 48, 553eqtr4d 2501 . 2  |-  ( ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  /\  i  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  ( W cyclShift  N ) ) `
 i )  =  ( ( ( F  o.  W ) cyclShift  N
) `  i )
)
578, 18, 56eqfnfvd 5896 1  |-  ( ( W  e. Word  A  /\  N  e.  ZZ  /\  F : A --> B )  -> 
( F  o.  ( W cyclShift  N ) )  =  ( ( F  o.  W ) cyclShift  N ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758    C_ wss 3423   class class class wbr 4387   ran crn 4936    o. ccom 4939    Fn wfn 5508   -->wf 5509   ` cfv 5513  (class class class)co 6187   0cc0 9380    + caddc 9383    < clt 9516   NNcn 10420   NN0cn0 10677   ZZcz 10744  ..^cfzo 11646    mod cmo 11806   #chash 12201  Word cword 12320   cyclShift ccsh 12524
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 4498  ax-sep 4508  ax-nul 4516  ax-pow 4565  ax-pr 4626  ax-un 6469  ax-cnex 9436  ax-resscn 9437  ax-1cn 9438  ax-icn 9439  ax-addcl 9440  ax-addrcl 9441  ax-mulcl 9442  ax-mulrcl 9443  ax-mulcom 9444  ax-addass 9445  ax-mulass 9446  ax-distr 9447  ax-i2m1 9448  ax-1ne0 9449  ax-1rid 9450  ax-rnegex 9451  ax-rrecex 9452  ax-cnre 9453  ax-pre-lttri 9454  ax-pre-lttrn 9455  ax-pre-ltadd 9456  ax-pre-mulgt0 9457  ax-pre-sup 9458
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 2599  df-ne 2644  df-nel 2645  df-ral 2798  df-rex 2799  df-reu 2800  df-rmo 2801  df-rab 2802  df-v 3067  df-sbc 3282  df-csb 3384  df-dif 3426  df-un 3428  df-in 3430  df-ss 3437  df-pss 3439  df-nul 3733  df-if 3887  df-pw 3957  df-sn 3973  df-pr 3975  df-tp 3977  df-op 3979  df-uni 4187  df-int 4224  df-iun 4268  df-br 4388  df-opab 4446  df-mpt 4447  df-tr 4481  df-eprel 4727  df-id 4731  df-po 4736  df-so 4737  df-fr 4774  df-we 4776  df-ord 4817  df-on 4818  df-lim 4819  df-suc 4820  df-xp 4941  df-rel 4942  df-cnv 4943  df-co 4944  df-dm 4945  df-rn 4946  df-res 4947  df-ima 4948  df-iota 5476  df-fun 5515  df-fn 5516  df-f 5517  df-f1 5518  df-fo 5519  df-f1o 5520  df-fv 5521  df-riota 6148  df-ov 6190  df-oprab 6191  df-mpt2 6192  df-om 6574  df-1st 6674  df-2nd 6675  df-recs 6929  df-rdg 6963  df-1o 7017  df-oadd 7021  df-er 7198  df-en 7408  df-dom 7409  df-sdom 7410  df-fin 7411  df-sup 7789  df-card 8207  df-pnf 9518  df-mnf 9519  df-xr 9520  df-ltxr 9521  df-le 9522  df-sub 9695  df-neg 9696  df-div 10092  df-nn 10421  df-2 10478  df-n0 10678  df-z 10745  df-uz 10960  df-rp 11090  df-fz 11536  df-fzo 11647  df-fl 11740  df-mod 11807  df-hash 12202  df-word 12328  df-concat 12330  df-substr 12332  df-csh 12525
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator