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

Theorem revco 11489
Description: Mapping of words commutes with reversal. (Contributed by Stefan O'Rear, 27-Aug-2015.)
Assertion
Ref Expression
revco  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F  o.  (reverse `  W ) )  =  (reverse `  ( F  o.  W )
) )

Proof of Theorem revco
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 wrdf 11419 . . . . . . . 8  |-  ( W  e. Word  A  ->  W : ( 0..^ (
# `  W )
) --> A )
2 ffn 5389 . . . . . . . 8  |-  ( W : ( 0..^ (
# `  W )
) --> A  ->  W  Fn  ( 0..^ ( # `  W ) ) )
31, 2syl 15 . . . . . . 7  |-  ( W  e. Word  A  ->  W  Fn  ( 0..^ ( # `  W ) ) )
43ad2antrr 706 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  ->  W  Fn  ( 0..^ ( # `  W
) ) )
5 lencl 11421 . . . . . . . . . . . . 13  |-  ( W  e. Word  A  ->  ( # `
 W )  e. 
NN0 )
65nn0zd 10115 . . . . . . . . . . . 12  |-  ( W  e. Word  A  ->  ( # `
 W )  e.  ZZ )
7 fzoval 10876 . . . . . . . . . . . 12  |-  ( (
# `  W )  e.  ZZ  ->  ( 0..^ ( # `  W
) )  =  ( 0 ... ( (
# `  W )  -  1 ) ) )
86, 7syl 15 . . . . . . . . . . 11  |-  ( W  e. Word  A  ->  (
0..^ ( # `  W
) )  =  ( 0 ... ( (
# `  W )  -  1 ) ) )
98adantr 451 . . . . . . . . . 10  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( 0..^ (
# `  W )
)  =  ( 0 ... ( ( # `  W )  -  1 ) ) )
109eleq2d 2350 . . . . . . . . 9  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( x  e.  ( 0..^ ( # `  W ) )  <->  x  e.  ( 0 ... (
( # `  W )  -  1 ) ) ) )
1110biimpa 470 . . . . . . . 8  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  ->  x  e.  ( 0 ... ( ( # `  W )  -  1 ) ) )
12 fznn0sub2 10825 . . . . . . . 8  |-  ( x  e.  ( 0 ... ( ( # `  W
)  -  1 ) )  ->  ( (
( # `  W )  -  1 )  -  x )  e.  ( 0 ... ( (
# `  W )  -  1 ) ) )
1311, 12syl 15 . . . . . . 7  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  W )  -  1 )  -  x )  e.  ( 0 ... ( ( # `  W
)  -  1 ) ) )
149adantr 451 . . . . . . 7  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( 0..^ ( # `  W ) )  =  ( 0 ... (
( # `  W )  -  1 ) ) )
1513, 14eleqtrrd 2360 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  W )  -  1 )  -  x )  e.  ( 0..^ (
# `  W )
) )
16 fvco2 5594 . . . . . 6  |-  ( ( W  Fn  ( 0..^ ( # `  W
) )  /\  (
( ( # `  W
)  -  1 )  -  x )  e.  ( 0..^ ( # `  W ) ) )  ->  ( ( F  o.  W ) `  ( ( ( # `  W )  -  1 )  -  x ) )  =  ( F `
 ( W `  ( ( ( # `  W )  -  1 )  -  x ) ) ) )
174, 15, 16syl2anc 642 . . . . 5  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  W ) `  (
( ( # `  W
)  -  1 )  -  x ) )  =  ( F `  ( W `  ( ( ( # `  W
)  -  1 )  -  x ) ) ) )
18 lenco 11487 . . . . . . . . 9  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( # `  ( F  o.  W )
)  =  ( # `  W ) )
1918oveq1d 5873 . . . . . . . 8  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( ( # `  ( F  o.  W
) )  -  1 )  =  ( (
# `  W )  -  1 ) )
2019oveq1d 5873 . . . . . . 7  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( ( (
# `  ( F  o.  W ) )  - 
1 )  -  x
)  =  ( ( ( # `  W
)  -  1 )  -  x ) )
2120adantr 451 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  ( F  o.  W
) )  -  1 )  -  x )  =  ( ( (
# `  W )  -  1 )  -  x ) )
2221fveq2d 5529 . . . . 5  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  W ) `  (
( ( # `  ( F  o.  W )
)  -  1 )  -  x ) )  =  ( ( F  o.  W ) `  ( ( ( # `  W )  -  1 )  -  x ) ) )
23 revfv 11481 . . . . . . 7  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  x )  =  ( W `  ( ( ( # `  W )  -  1 )  -  x ) ) )
2423adantlr 695 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  x )  =  ( W `  ( ( ( # `  W )  -  1 )  -  x ) ) )
2524fveq2d 5529 . . . . 5  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( F `  (
(reverse `  W ) `  x ) )  =  ( F `  ( W `  ( (
( # `  W )  -  1 )  -  x ) ) ) )
2617, 22, 253eqtr4d 2325 . . . 4  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( F  o.  W ) `  (
( ( # `  ( F  o.  W )
)  -  1 )  -  x ) )  =  ( F `  ( (reverse `  W ) `  x ) ) )
2726mpteq2dva 4106 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( x  e.  ( 0..^ ( # `  W ) )  |->  ( ( F  o.  W
) `  ( (
( # `  ( F  o.  W ) )  -  1 )  -  x ) ) )  =  ( x  e.  ( 0..^ ( # `  W ) )  |->  ( F `  ( (reverse `  W ) `  x
) ) ) )
2818oveq2d 5874 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( 0..^ (
# `  ( F  o.  W ) ) )  =  ( 0..^ (
# `  W )
) )
29 eqidd 2284 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( ( F  o.  W ) `  ( ( ( # `  ( F  o.  W
) )  -  1 )  -  x ) )  =  ( ( F  o.  W ) `
 ( ( (
# `  ( F  o.  W ) )  - 
1 )  -  x
) ) )
3028, 29mpteq12dv 4098 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( x  e.  ( 0..^ ( # `  ( F  o.  W
) ) )  |->  ( ( F  o.  W
) `  ( (
( # `  ( F  o.  W ) )  -  1 )  -  x ) ) )  =  ( x  e.  ( 0..^ ( # `  W ) )  |->  ( ( F  o.  W
) `  ( (
( # `  ( F  o.  W ) )  -  1 )  -  x ) ) ) )
31 revlen 11480 . . . . . 6  |-  ( W  e. Word  A  ->  ( # `
 (reverse `  W
) )  =  (
# `  W )
)
3231adantr 451 . . . . 5  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( # `  (reverse `  W ) )  =  ( # `  W
) )
3332oveq2d 5874 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( 0..^ (
# `  (reverse `  W
) ) )  =  ( 0..^ ( # `  W ) ) )
34 eqidd 2284 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F `  ( (reverse `  W ) `  x ) )  =  ( F `  (
(reverse `  W ) `  x ) ) )
3533, 34mpteq12dv 4098 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( x  e.  ( 0..^ ( # `  (reverse `  W )
) )  |->  ( F `
 ( (reverse `  W
) `  x )
) )  =  ( x  e.  ( 0..^ ( # `  W
) )  |->  ( F `
 ( (reverse `  W
) `  x )
) ) )
3627, 30, 353eqtr4rd 2326 . 2  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( x  e.  ( 0..^ ( # `  (reverse `  W )
) )  |->  ( F `
 ( (reverse `  W
) `  x )
) )  =  ( x  e.  ( 0..^ ( # `  ( F  o.  W )
) )  |->  ( ( F  o.  W ) `
 ( ( (
# `  ( F  o.  W ) )  - 
1 )  -  x
) ) ) )
37 simpr 447 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  F : A --> B )
38 revcl 11479 . . . . 5  |-  ( W  e. Word  A  ->  (reverse `  W )  e. Word  A
)
39 wrdf 11419 . . . . 5  |-  ( (reverse `  W )  e. Word  A  ->  (reverse `  W ) : ( 0..^ (
# `  (reverse `  W
) ) ) --> A )
4038, 39syl 15 . . . 4  |-  ( W  e. Word  A  ->  (reverse `  W ) : ( 0..^ ( # `  (reverse `  W ) ) ) --> A )
4140adantr 451 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  (reverse `  W ) : ( 0..^ (
# `  (reverse `  W
) ) ) --> A )
42 fcompt 5694 . . 3  |-  ( ( F : A --> B  /\  (reverse `  W ) : ( 0..^ ( # `  (reverse `  W )
) ) --> A )  ->  ( F  o.  (reverse `  W ) )  =  ( x  e.  ( 0..^ ( # `  (reverse `  W )
) )  |->  ( F `
 ( (reverse `  W
) `  x )
) ) )
4337, 41, 42syl2anc 642 . 2  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F  o.  (reverse `  W ) )  =  ( x  e.  ( 0..^ ( # `  (reverse `  W )
) )  |->  ( F `
 ( (reverse `  W
) `  x )
) ) )
44 ffun 5391 . . . . 5  |-  ( F : A --> B  ->  Fun  F )
4544adantl 452 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  Fun  F )
46 simpl 443 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  W  e. Word  A
)
47 cofunexg 5739 . . . 4  |-  ( ( Fun  F  /\  W  e. Word  A )  ->  ( F  o.  W )  e.  _V )
4845, 46, 47syl2anc 642 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F  o.  W )  e.  _V )
49 revval 11478 . . 3  |-  ( ( F  o.  W )  e.  _V  ->  (reverse `  ( F  o.  W
) )  =  ( x  e.  ( 0..^ ( # `  ( F  o.  W )
) )  |->  ( ( F  o.  W ) `
 ( ( (
# `  ( F  o.  W ) )  - 
1 )  -  x
) ) ) )
5048, 49syl 15 . 2  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  (reverse `  ( F  o.  W ) )  =  ( x  e.  ( 0..^ ( # `  ( F  o.  W )
) )  |->  ( ( F  o.  W ) `
 ( ( (
# `  ( F  o.  W ) )  - 
1 )  -  x
) ) ) )
5136, 43, 503eqtr4d 2325 1  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F  o.  (reverse `  W ) )  =  (reverse `  ( F  o.  W )
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 358    = wceq 1623    e. wcel 1684   _Vcvv 2788    e. cmpt 4077    o. ccom 4693   Fun wfun 5249    Fn wfn 5250   -->wf 5251   ` cfv 5255  (class class class)co 5858   0cc0 8737   1c1 8738    - cmin 9037   ZZcz 10024   ...cfz 10782  ..^cfzo 10870   #chash 11337  Word cword 11403  reversecreverse 11408
This theorem is referenced by:  efginvrel1  15037
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-oadd 6483  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-card 7572  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-nn 9747  df-n0 9966  df-z 10025  df-uz 10231  df-fz 10783  df-fzo 10871  df-hash 11338  df-word 11409  df-reverse 11414
  Copyright terms: Public domain W3C validator