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

Theorem revco 11805
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 11735 . . . . . . . 8  |-  ( W  e. Word  A  ->  W : ( 0..^ (
# `  W )
) --> A )
2 ffn 5593 . . . . . . . 8  |-  ( W : ( 0..^ (
# `  W )
) --> A  ->  W  Fn  ( 0..^ ( # `  W ) ) )
31, 2syl 16 . . . . . . 7  |-  ( W  e. Word  A  ->  W  Fn  ( 0..^ ( # `  W ) ) )
43ad2antrr 708 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  ->  W  Fn  ( 0..^ ( # `  W
) ) )
5 lencl 11737 . . . . . . . . . . . . 13  |-  ( W  e. Word  A  ->  ( # `
 W )  e. 
NN0 )
65nn0zd 10375 . . . . . . . . . . . 12  |-  ( W  e. Word  A  ->  ( # `
 W )  e.  ZZ )
7 fzoval 11143 . . . . . . . . . . . 12  |-  ( (
# `  W )  e.  ZZ  ->  ( 0..^ ( # `  W
) )  =  ( 0 ... ( (
# `  W )  -  1 ) ) )
86, 7syl 16 . . . . . . . . . . 11  |-  ( W  e. Word  A  ->  (
0..^ ( # `  W
) )  =  ( 0 ... ( (
# `  W )  -  1 ) ) )
98adantr 453 . . . . . . . . . 10  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( 0..^ (
# `  W )
)  =  ( 0 ... ( ( # `  W )  -  1 ) ) )
109eleq2d 2505 . . . . . . . . 9  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( x  e.  ( 0..^ ( # `  W ) )  <->  x  e.  ( 0 ... (
( # `  W )  -  1 ) ) ) )
1110biimpa 472 . . . . . . . 8  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  ->  x  e.  ( 0 ... ( ( # `  W )  -  1 ) ) )
12 fznn0sub2 11088 . . . . . . . 8  |-  ( x  e.  ( 0 ... ( ( # `  W
)  -  1 ) )  ->  ( (
( # `  W )  -  1 )  -  x )  e.  ( 0 ... ( (
# `  W )  -  1 ) ) )
1311, 12syl 16 . . . . . . 7  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  W )  -  1 )  -  x )  e.  ( 0 ... ( ( # `  W
)  -  1 ) ) )
149adantr 453 . . . . . . 7  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( 0..^ ( # `  W ) )  =  ( 0 ... (
( # `  W )  -  1 ) ) )
1513, 14eleqtrrd 2515 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  W )  -  1 )  -  x )  e.  ( 0..^ (
# `  W )
) )
16 fvco2 5800 . . . . . 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 644 . . . . 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 11803 . . . . . . . . 9  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( # `  ( F  o.  W )
)  =  ( # `  W ) )
1918oveq1d 6098 . . . . . . . 8  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( ( # `  ( F  o.  W
) )  -  1 )  =  ( (
# `  W )  -  1 ) )
2019oveq1d 6098 . . . . . . 7  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( ( (
# `  ( F  o.  W ) )  - 
1 )  -  x
)  =  ( ( ( # `  W
)  -  1 )  -  x ) )
2120adantr 453 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  ( F  o.  W
) )  -  1 )  -  x )  =  ( ( (
# `  W )  -  1 )  -  x ) )
2221fveq2d 5734 . . . . 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 11797 . . . . . . 7  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  x )  =  ( W `  ( ( ( # `  W )  -  1 )  -  x ) ) )
2423adantlr 697 . . . . . 6  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  x )  =  ( W `  ( ( ( # `  W )  -  1 )  -  x ) ) )
2524fveq2d 5734 . . . . 5  |-  ( ( ( W  e. Word  A  /\  F : A --> B )  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( F `  (
(reverse `  W ) `  x ) )  =  ( F `  ( W `  ( (
( # `  W )  -  1 )  -  x ) ) ) )
2617, 22, 253eqtr4d 2480 . . . 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 4297 . . 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 6099 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( 0..^ (
# `  ( F  o.  W ) ) )  =  ( 0..^ (
# `  W )
) )
2928mpteq1d 4292 . . 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 ) ) ) )
30 revlen 11796 . . . . . 6  |-  ( W  e. Word  A  ->  ( # `
 (reverse `  W
) )  =  (
# `  W )
)
3130adantr 453 . . . . 5  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( # `  (reverse `  W ) )  =  ( # `  W
) )
3231oveq2d 6099 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( 0..^ (
# `  (reverse `  W
) ) )  =  ( 0..^ ( # `  W ) ) )
3332mpteq1d 4292 . . 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 )
) ) )
3427, 29, 333eqtr4rd 2481 . 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
) ) ) )
35 simpr 449 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  F : A --> B )
36 revcl 11795 . . . . 5  |-  ( W  e. Word  A  ->  (reverse `  W )  e. Word  A
)
37 wrdf 11735 . . . . 5  |-  ( (reverse `  W )  e. Word  A  ->  (reverse `  W ) : ( 0..^ (
# `  (reverse `  W
) ) ) --> A )
3836, 37syl 16 . . . 4  |-  ( W  e. Word  A  ->  (reverse `  W ) : ( 0..^ ( # `  (reverse `  W ) ) ) --> A )
3938adantr 453 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  (reverse `  W ) : ( 0..^ (
# `  (reverse `  W
) ) ) --> A )
40 fcompt 5906 . . 3  |-  ( ( F : A --> B  /\  (reverse `  W ) : ( 0..^ ( # `  (reverse `  W )
) ) --> A )  ->  ( F  o.  (reverse `  W ) )  =  ( x  e.  ( 0..^ ( # `  (reverse `  W )
) )  |->  ( F `
 ( (reverse `  W
) `  x )
) ) )
4135, 39, 40syl2anc 644 . 2  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F  o.  (reverse `  W ) )  =  ( x  e.  ( 0..^ ( # `  (reverse `  W )
) )  |->  ( F `
 ( (reverse `  W
) `  x )
) ) )
42 ffun 5595 . . . . 5  |-  ( F : A --> B  ->  Fun  F )
4342adantl 454 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  Fun  F )
44 simpl 445 . . . 4  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  W  e. Word  A
)
45 cofunexg 5961 . . . 4  |-  ( ( Fun  F  /\  W  e. Word  A )  ->  ( F  o.  W )  e.  _V )
4643, 44, 45syl2anc 644 . . 3  |-  ( ( W  e. Word  A  /\  F : A --> B )  ->  ( F  o.  W )  e.  _V )
47 revval 11794 . . 3  |-  ( ( F  o.  W )  e.  _V  ->  (reverse `  ( F  o.  W
) )  =  ( x  e.  ( 0..^ ( # `  ( F  o.  W )
) )  |->  ( ( F  o.  W ) `
 ( ( (
# `  ( F  o.  W ) )  - 
1 )  -  x
) ) ) )
4846, 47syl 16 . 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
) ) ) )
4934, 41, 483eqtr4d 2480 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 360    = wceq 1653    e. wcel 1726   _Vcvv 2958    e. cmpt 4268    o. ccom 4884   Fun wfun 5450    Fn wfn 5451   -->wf 5452   ` cfv 5456  (class class class)co 6083   0cc0 8992   1c1 8993    - cmin 9293   ZZcz 10284   ...cfz 11045  ..^cfzo 11137   #chash 11620  Word cword 11719  reversecreverse 11724
This theorem is referenced by:  efginvrel1  15362
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-rep 4322  ax-sep 4332  ax-nul 4340  ax-pow 4379  ax-pr 4405  ax-un 4703  ax-cnex 9048  ax-resscn 9049  ax-1cn 9050  ax-icn 9051  ax-addcl 9052  ax-addrcl 9053  ax-mulcl 9054  ax-mulrcl 9055  ax-mulcom 9056  ax-addass 9057  ax-mulass 9058  ax-distr 9059  ax-i2m1 9060  ax-1ne0 9061  ax-1rid 9062  ax-rnegex 9063  ax-rrecex 9064  ax-cnre 9065  ax-pre-lttri 9066  ax-pre-lttrn 9067  ax-pre-ltadd 9068  ax-pre-mulgt0 9069
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-int 4053  df-iun 4097  df-br 4215  df-opab 4269  df-mpt 4270  df-tr 4305  df-eprel 4496  df-id 4500  df-po 4505  df-so 4506  df-fr 4543  df-we 4545  df-ord 4586  df-on 4587  df-lim 4588  df-suc 4589  df-om 4848  df-xp 4886  df-rel 4887  df-cnv 4888  df-co 4889  df-dm 4890  df-rn 4891  df-res 4892  df-ima 4893  df-iota 5420  df-fun 5458  df-fn 5459  df-f 5460  df-f1 5461  df-fo 5462  df-f1o 5463  df-fv 5464  df-ov 6086  df-oprab 6087  df-mpt2 6088  df-1st 6351  df-2nd 6352  df-riota 6551  df-recs 6635  df-rdg 6670  df-1o 6726  df-oadd 6730  df-er 6907  df-en 7112  df-dom 7113  df-sdom 7114  df-fin 7115  df-card 7828  df-pnf 9124  df-mnf 9125  df-xr 9126  df-ltxr 9127  df-le 9128  df-sub 9295  df-neg 9296  df-nn 10003  df-n0 10224  df-z 10285  df-uz 10491  df-fz 11046  df-fzo 11138  df-hash 11621  df-word 11725  df-reverse 11730
  Copyright terms: Public domain W3C validator