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

Theorem splcl 11708
Description: Closure of the substring replacement operator. (Contributed by Stefan O'Rear, 26-Aug-2015.)
Assertion
Ref Expression
splcl  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( S splice  <. F ,  T ,  R >. )  e. Word  A )

Proof of Theorem splcl
Dummy variables  s 
b are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 elex 2907 . . . 4  |-  ( S  e. Word  A  ->  S  e.  _V )
2 otex 4369 . . . 4  |-  <. F ,  T ,  R >.  e. 
_V
3 id 20 . . . . . . . 8  |-  ( s  =  S  ->  s  =  S )
4 fveq2 5668 . . . . . . . . . 10  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 1st `  b )  =  ( 1st `  <. F ,  T ,  R >. ) )
54fveq2d 5672 . . . . . . . . 9  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 1st `  ( 1st `  b
) )  =  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) )
65opeq2d 3933 . . . . . . . 8  |-  ( b  =  <. F ,  T ,  R >.  ->  <. 0 ,  ( 1st `  ( 1st `  b ) )
>.  =  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
)
73, 6oveqan12d 6039 . . . . . . 7  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( s substr  <. 0 ,  ( 1st `  ( 1st `  b
) ) >. )  =  ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) )
8 simpr 448 . . . . . . . 8  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  b  =  <. F ,  T ,  R >. )
98fveq2d 5672 . . . . . . 7  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 2nd `  b
)  =  ( 2nd `  <. F ,  T ,  R >. ) )
107, 9oveq12d 6038 . . . . . 6  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( ( s substr  <. 0 ,  ( 1st `  ( 1st `  b
) ) >. ) concat  ( 2nd `  b ) )  =  ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) ) )
11 simpl 444 . . . . . . 7  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  s  =  S )
128fveq2d 5672 . . . . . . . . 9  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 1st `  b
)  =  ( 1st `  <. F ,  T ,  R >. ) )
1312fveq2d 5672 . . . . . . . 8  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 2nd `  ( 1st `  b ) )  =  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) )
1411fveq2d 5672 . . . . . . . 8  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( # `  s
)  =  ( # `  S ) )
1513, 14opeq12d 3934 . . . . . . 7  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  <. ( 2nd `  ( 1st `  b ) ) ,  ( # `  s
) >.  =  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  (
# `  S ) >. )
1611, 15oveq12d 6038 . . . . . 6  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( s substr  <. ( 2nd `  ( 1st `  b ) ) ,  ( # `  s
) >. )  =  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  ( # `  S
) >. ) )
1710, 16oveq12d 6038 . . . . 5  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( ( ( s substr  <. 0 ,  ( 1st `  ( 1st `  b ) ) >.
) concat  ( 2nd `  b
) ) concat  ( s substr  <.
( 2nd `  ( 1st `  b ) ) ,  ( # `  s
) >. ) )  =  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >. ) concat  ( 2nd `  <. F ,  T ,  R >. ) ) concat  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  (
# `  S ) >. ) ) )
18 df-splice 11654 . . . . 5  |- splice  =  ( s  e.  _V , 
b  e.  _V  |->  ( ( ( s substr  <. 0 ,  ( 1st `  ( 1st `  b
) ) >. ) concat  ( 2nd `  b ) ) concat  ( s substr  <. ( 2nd `  ( 1st `  b ) ) ,  ( # `  s
) >. ) ) )
19 ovex 6045 . . . . 5  |-  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) ) concat  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  ( # `  S
) >. ) )  e. 
_V
2017, 18, 19ovmpt2a 6143 . . . 4  |-  ( ( S  e.  _V  /\  <. F ,  T ,  R >.  e.  _V )  ->  ( S splice  <. F ,  T ,  R >. )  =  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) ) concat  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  ( # `  S
) >. ) ) )
211, 2, 20sylancl 644 . . 3  |-  ( S  e. Word  A  ->  ( S splice  <. F ,  T ,  R >. )  =  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) ) concat  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  ( # `  S
) >. ) ) )
2221adantr 452 . 2  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( S splice  <. F ,  T ,  R >. )  =  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) ) concat  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  ( # `  S
) >. ) ) )
23 swrdcl 11693 . . . . 5  |-  ( S  e. Word  A  ->  ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
)  e. Word  A )
2423adantr 452 . . . 4  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
)  e. Word  A )
25 ot3rdg 6302 . . . . . 6  |-  ( R  e. Word  A  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
2625adantl 453 . . . . 5  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
27 simpr 448 . . . . 5  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  R  e. Word  A )
2826, 27eqeltrd 2461 . . . 4  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( 2nd `  <. F ,  T ,  R >. )  e. Word  A )
29 ccatcl 11670 . . . 4  |-  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
)  e. Word  A  /\  ( 2nd `  <. F ,  T ,  R >. )  e. Word  A )  -> 
( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) )  e. Word  A
)
3024, 28, 29syl2anc 643 . . 3  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) )  e. Word  A
)
31 swrdcl 11693 . . . 4  |-  ( S  e. Word  A  ->  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  ( # `  S
) >. )  e. Word  A
)
3231adantr 452 . . 3  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  (
# `  S ) >. )  e. Word  A )
33 ccatcl 11670 . . 3  |-  ( ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) )  e. Word  A  /\  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  (
# `  S ) >. )  e. Word  A )  ->  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >.
) concat  ( 2nd `  <. F ,  T ,  R >. ) ) concat  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  ( # `  S
) >. ) )  e. Word  A )
3430, 32, 33syl2anc 643 . 2  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( ( ( S substr  <. 0 ,  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) >. ) concat  ( 2nd `  <. F ,  T ,  R >. ) ) concat  ( S substr  <. ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) ,  (
# `  S ) >. ) )  e. Word  A
)
3522, 34eqeltrd 2461 1  |-  ( ( S  e. Word  A  /\  R  e. Word  A )  ->  ( S splice  <. F ,  T ,  R >. )  e. Word  A )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1717   _Vcvv 2899   <.cop 3760   <.cotp 3761   ` cfv 5394  (class class class)co 6020   1stc1st 6286   2ndc2nd 6287   0cc0 8923   #chash 11545  Word cword 11644   concat cconcat 11645   substr csubstr 11647   splice csplice 11648
This theorem is referenced by:  efglem  15275  efgtf  15281  frgpuplem  15331  psgnunilem2  27087
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2368  ax-rep 4261  ax-sep 4271  ax-nul 4279  ax-pow 4318  ax-pr 4344  ax-un 4641  ax-cnex 8979  ax-resscn 8980  ax-1cn 8981  ax-icn 8982  ax-addcl 8983  ax-addrcl 8984  ax-mulcl 8985  ax-mulrcl 8986  ax-mulcom 8987  ax-addass 8988  ax-mulass 8989  ax-distr 8990  ax-i2m1 8991  ax-1ne0 8992  ax-1rid 8993  ax-rnegex 8994  ax-rrecex 8995  ax-cnre 8996  ax-pre-lttri 8997  ax-pre-lttrn 8998  ax-pre-ltadd 8999  ax-pre-mulgt0 9000
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2242  df-mo 2243  df-clab 2374  df-cleq 2380  df-clel 2383  df-nfc 2512  df-ne 2552  df-nel 2553  df-ral 2654  df-rex 2655  df-reu 2656  df-rab 2658  df-v 2901  df-sbc 3105  df-csb 3195  df-dif 3266  df-un 3268  df-in 3270  df-ss 3277  df-pss 3279  df-nul 3572  df-if 3683  df-pw 3744  df-sn 3763  df-pr 3764  df-tp 3765  df-op 3766  df-ot 3767  df-uni 3958  df-int 3993  df-iun 4037  df-br 4154  df-opab 4208  df-mpt 4209  df-tr 4244  df-eprel 4435  df-id 4439  df-po 4444  df-so 4445  df-fr 4482  df-we 4484  df-ord 4525  df-on 4526  df-lim 4527  df-suc 4528  df-om 4786  df-xp 4824  df-rel 4825  df-cnv 4826  df-co 4827  df-dm 4828  df-rn 4829  df-res 4830  df-ima 4831  df-iota 5358  df-fun 5396  df-fn 5397  df-f 5398  df-f1 5399  df-fo 5400  df-f1o 5401  df-fv 5402  df-ov 6023  df-oprab 6024  df-mpt2 6025  df-1st 6288  df-2nd 6289  df-riota 6485  df-recs 6569  df-rdg 6604  df-1o 6660  df-oadd 6664  df-er 6841  df-en 7046  df-dom 7047  df-sdom 7048  df-fin 7049  df-card 7759  df-pnf 9055  df-mnf 9056  df-xr 9057  df-ltxr 9058  df-le 9059  df-sub 9225  df-neg 9226  df-nn 9933  df-n0 10154  df-z 10215  df-uz 10421  df-fz 10976  df-fzo 11066  df-hash 11546  df-word 11650  df-concat 11651  df-substr 11653  df-splice 11654
  Copyright terms: Public domain W3C validator