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

Theorem lsw 12544
Description: Extract the last symbol of a word. May be not meaningful for other sets which are not words. (Contributed by Alexander van der Vekens, 18-Mar-2018.)
Assertion
Ref Expression
lsw  |-  ( W  e.  X  ->  ( lastS  `  W )  =  ( W `  ( (
# `  W )  -  1 ) ) )

Proof of Theorem lsw
Dummy variable  w is distinct from all other variables.
StepHypRef Expression
1 elex 3122 . 2  |-  ( W  e.  X  ->  W  e.  _V )
2 fvex 5874 . 2  |-  ( W `
 ( ( # `  W )  -  1 ) )  e.  _V
3 id 22 . . . 4  |-  ( w  =  W  ->  w  =  W )
4 fveq2 5864 . . . . 5  |-  ( w  =  W  ->  ( # `
 w )  =  ( # `  W
) )
54oveq1d 6297 . . . 4  |-  ( w  =  W  ->  (
( # `  w )  -  1 )  =  ( ( # `  W
)  -  1 ) )
63, 5fveq12d 5870 . . 3  |-  ( w  =  W  ->  (
w `  ( ( # `
 w )  - 
1 ) )  =  ( W `  (
( # `  W )  -  1 ) ) )
7 df-lsw 12503 . . 3  |- lastS  =  ( w  e.  _V  |->  ( w `  ( (
# `  w )  -  1 ) ) )
86, 7fvmptg 5946 . 2  |-  ( ( W  e.  _V  /\  ( W `  ( (
# `  W )  -  1 ) )  e.  _V )  -> 
( lastS  `  W )  =  ( W `  (
( # `  W )  -  1 ) ) )
91, 2, 8sylancl 662 1  |-  ( W  e.  X  ->  ( lastS  `  W )  =  ( W `  ( (
# `  W )  -  1 ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    = wceq 1379    e. wcel 1767   _Vcvv 3113   ` cfv 5586  (class class class)co 6282   1c1 9489    - cmin 9801   #chash 12367   lastS clsw 12495
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-sep 4568  ax-nul 4576  ax-pr 4686
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-ral 2819  df-rex 2820  df-rab 2823  df-v 3115  df-sbc 3332  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-nul 3786  df-if 3940  df-sn 4028  df-pr 4030  df-op 4034  df-uni 4246  df-br 4448  df-opab 4506  df-mpt 4507  df-id 4795  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-iota 5549  df-fun 5588  df-fv 5594  df-ov 6285  df-lsw 12503
This theorem is referenced by:  lsw0  12545  lsw1  12547  lswcl  12548  ccatval1lsw  12561  lswccatn0lsw  12565  lswccat0lsw  12566  swrd0fvlsw  12627  wrdeqswrdlsw  12631  swrdlsw  12634  swrdccatwrd  12650  repswlsw  12711  lswcshw  12740  lswco  12761  swrd2lsw  12847  wwlknext  24397  wwlknredwwlkn  24399  wwlkextproplem2  24415  clwwlkgt0  24444  clwwlkn2  24448  clwlkisclwwlklem2a1  24452  clwlkisclwwlklem2a3  24454  clwlkisclwwlklem2a4  24457  clwlkisclwwlklem1  24460  clwwlkel  24466  clwwlkf  24467  clwwisshclwwlem  24479  numclwwlkovf2ex  24760  numclwlk1lem2f1  24768  numclwlk1lem2fo  24769  iwrdsplit  27963  lswn0  31812
  Copyright terms: Public domain W3C validator