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

Theorem revrev 11485
Description: Reversion is an involution on words. (Contributed by Mario Carneiro, 1-Oct-2015.)
Assertion
Ref Expression
revrev  |-  ( W  e. Word  A  ->  (reverse `  (reverse `  W )
)  =  W )

Proof of Theorem revrev
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 revcl 11479 . . . . 5  |-  ( W  e. Word  A  ->  (reverse `  W )  e. Word  A
)
2 revcl 11479 . . . . 5  |-  ( (reverse `  W )  e. Word  A  ->  (reverse `  (reverse `  W
) )  e. Word  A
)
31, 2syl 15 . . . 4  |-  ( W  e. Word  A  ->  (reverse `  (reverse `  W )
)  e. Word  A )
4 wrdf 11419 . . . 4  |-  ( (reverse `  (reverse `  W )
)  e. Word  A  ->  (reverse `  (reverse `  W )
) : ( 0..^ ( # `  (reverse `  (reverse `  W )
) ) ) --> A )
5 ffn 5389 . . . 4  |-  ( (reverse `  (reverse `  W )
) : ( 0..^ ( # `  (reverse `  (reverse `  W )
) ) ) --> A  ->  (reverse `  (reverse `  W
) )  Fn  (
0..^ ( # `  (reverse `  (reverse `  W )
) ) ) )
63, 4, 53syl 18 . . 3  |-  ( W  e. Word  A  ->  (reverse `  (reverse `  W )
)  Fn  ( 0..^ ( # `  (reverse `  (reverse `  W )
) ) ) )
7 revlen 11480 . . . . . . 7  |-  ( (reverse `  W )  e. Word  A  ->  ( # `  (reverse `  (reverse `  W )
) )  =  (
# `  (reverse `  W
) ) )
81, 7syl 15 . . . . . 6  |-  ( W  e. Word  A  ->  ( # `
 (reverse `  (reverse `  W ) ) )  =  ( # `  (reverse `  W ) ) )
9 revlen 11480 . . . . . 6  |-  ( W  e. Word  A  ->  ( # `
 (reverse `  W
) )  =  (
# `  W )
)
108, 9eqtrd 2315 . . . . 5  |-  ( W  e. Word  A  ->  ( # `
 (reverse `  (reverse `  W ) ) )  =  ( # `  W
) )
1110oveq2d 5874 . . . 4  |-  ( W  e. Word  A  ->  (
0..^ ( # `  (reverse `  (reverse `  W )
) ) )  =  ( 0..^ ( # `  W ) ) )
1211fneq2d 5336 . . 3  |-  ( W  e. Word  A  ->  (
(reverse `  (reverse `  W
) )  Fn  (
0..^ ( # `  (reverse `  (reverse `  W )
) ) )  <->  (reverse `  (reverse `  W ) )  Fn  ( 0..^ ( # `  W ) ) ) )
136, 12mpbid 201 . 2  |-  ( W  e. Word  A  ->  (reverse `  (reverse `  W )
)  Fn  ( 0..^ ( # `  W
) ) )
14 wrdf 11419 . . 3  |-  ( W  e. Word  A  ->  W : ( 0..^ (
# `  W )
) --> A )
15 ffn 5389 . . 3  |-  ( W : ( 0..^ (
# `  W )
) --> A  ->  W  Fn  ( 0..^ ( # `  W ) ) )
1614, 15syl 15 . 2  |-  ( W  e. Word  A  ->  W  Fn  ( 0..^ ( # `  W ) ) )
171adantr 451 . . . 4  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
(reverse `  W )  e. Word  A )
18 simpr 447 . . . . 5  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  ->  x  e.  ( 0..^ ( # `  W
) ) )
199adantr 451 . . . . . 6  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( # `  (reverse `  W
) )  =  (
# `  W )
)
2019oveq2d 5874 . . . . 5  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( 0..^ ( # `  (reverse `  W )
) )  =  ( 0..^ ( # `  W
) ) )
2118, 20eleqtrrd 2360 . . . 4  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  ->  x  e.  ( 0..^ ( # `  (reverse `  W ) ) ) )
22 revfv 11481 . . . 4  |-  ( ( (reverse `  W )  e. Word  A  /\  x  e.  ( 0..^ ( # `  (reverse `  W )
) ) )  -> 
( (reverse `  (reverse `  W ) ) `  x )  =  ( (reverse `  W ) `  ( ( ( # `  (reverse `  W )
)  -  1 )  -  x ) ) )
2317, 21, 22syl2anc 642 . . 3  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  (reverse `  W ) ) `  x )  =  ( (reverse `  W ) `  ( ( ( # `  (reverse `  W )
)  -  1 )  -  x ) ) )
2419oveq1d 5873 . . . . . 6  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( # `  (reverse `  W ) )  - 
1 )  =  ( ( # `  W
)  -  1 ) )
2524oveq1d 5873 . . . . 5  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  (reverse `  W )
)  -  1 )  -  x )  =  ( ( ( # `  W )  -  1 )  -  x ) )
2625fveq2d 5529 . . . 4  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  ( (
( # `  (reverse `  W
) )  -  1 )  -  x ) )  =  ( (reverse `  W ) `  (
( ( # `  W
)  -  1 )  -  x ) ) )
27 lencl 11421 . . . . . . . . . . . 12  |-  ( W  e. Word  A  ->  ( # `
 W )  e. 
NN0 )
2827nn0zd 10115 . . . . . . . . . . 11  |-  ( W  e. Word  A  ->  ( # `
 W )  e.  ZZ )
29 fzoval 10876 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  ZZ  ->  ( 0..^ ( # `  W
) )  =  ( 0 ... ( (
# `  W )  -  1 ) ) )
3028, 29syl 15 . . . . . . . . . 10  |-  ( W  e. Word  A  ->  (
0..^ ( # `  W
) )  =  ( 0 ... ( (
# `  W )  -  1 ) ) )
3130eleq2d 2350 . . . . . . . . 9  |-  ( W  e. Word  A  ->  (
x  e.  ( 0..^ ( # `  W
) )  <->  x  e.  ( 0 ... (
( # `  W )  -  1 ) ) ) )
3231biimpa 470 . . . . . . . 8  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  ->  x  e.  ( 0 ... ( ( # `  W )  -  1 ) ) )
33 fznn0sub2 10825 . . . . . . . 8  |-  ( x  e.  ( 0 ... ( ( # `  W
)  -  1 ) )  ->  ( (
( # `  W )  -  1 )  -  x )  e.  ( 0 ... ( (
# `  W )  -  1 ) ) )
3432, 33syl 15 . . . . . . 7  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  W )  -  1 )  -  x )  e.  ( 0 ... ( ( # `  W
)  -  1 ) ) )
3530adantr 451 . . . . . . 7  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( 0..^ ( # `  W ) )  =  ( 0 ... (
( # `  W )  -  1 ) ) )
3634, 35eleqtrrd 2360 . . . . . 6  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  W )  -  1 )  -  x )  e.  ( 0..^ (
# `  W )
) )
37 revfv 11481 . . . . . 6  |-  ( ( W  e. Word  A  /\  ( ( ( # `  W )  -  1 )  -  x )  e.  ( 0..^ (
# `  W )
) )  ->  (
(reverse `  W ) `  ( ( ( # `  W )  -  1 )  -  x ) )  =  ( W `
 ( ( (
# `  W )  -  1 )  -  ( ( ( # `  W )  -  1 )  -  x ) ) ) )
3836, 37syldan 456 . . . . 5  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  ( (
( # `  W )  -  1 )  -  x ) )  =  ( W `  (
( ( # `  W
)  -  1 )  -  ( ( (
# `  W )  -  1 )  -  x ) ) ) )
39 peano2zm 10062 . . . . . . . . 9  |-  ( (
# `  W )  e.  ZZ  ->  ( ( # `
 W )  - 
1 )  e.  ZZ )
4028, 39syl 15 . . . . . . . 8  |-  ( W  e. Word  A  ->  (
( # `  W )  -  1 )  e.  ZZ )
4140zcnd 10118 . . . . . . 7  |-  ( W  e. Word  A  ->  (
( # `  W )  -  1 )  e.  CC )
42 elfzoelz 10875 . . . . . . . 8  |-  ( x  e.  ( 0..^ (
# `  W )
)  ->  x  e.  ZZ )
4342zcnd 10118 . . . . . . 7  |-  ( x  e.  ( 0..^ (
# `  W )
)  ->  x  e.  CC )
44 nncan 9076 . . . . . . 7  |-  ( ( ( ( # `  W
)  -  1 )  e.  CC  /\  x  e.  CC )  ->  (
( ( # `  W
)  -  1 )  -  ( ( (
# `  W )  -  1 )  -  x ) )  =  x )
4541, 43, 44syl2an 463 . . . . . 6  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( ( ( # `  W )  -  1 )  -  ( ( ( # `  W
)  -  1 )  -  x ) )  =  x )
4645fveq2d 5529 . . . . 5  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( W `  (
( ( # `  W
)  -  1 )  -  ( ( (
# `  W )  -  1 )  -  x ) ) )  =  ( W `  x ) )
4738, 46eqtrd 2315 . . . 4  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  ( (
( # `  W )  -  1 )  -  x ) )  =  ( W `  x
) )
4826, 47eqtrd 2315 . . 3  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  W
) `  ( (
( # `  (reverse `  W
) )  -  1 )  -  x ) )  =  ( W `
 x ) )
4923, 48eqtrd 2315 . 2  |-  ( ( W  e. Word  A  /\  x  e.  ( 0..^ ( # `  W
) ) )  -> 
( (reverse `  (reverse `  W ) ) `  x )  =  ( W `  x ) )
5013, 16, 49eqfnfvd 5625 1  |-  ( W  e. Word  A  ->  (reverse `  (reverse `  W )
)  =  W )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 358    = wceq 1623    e. wcel 1684    Fn wfn 5250   -->wf 5251   ` cfv 5255  (class class class)co 5858   CCcc 8735   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