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

Theorem splval 11781
Description: Value of the substring replacement operator. (Contributed by Stefan O'Rear, 15-Aug-2015.)
Assertion
Ref Expression
splval  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( S splice  <. F ,  T ,  R >. )  =  ( ( ( S substr  <. 0 ,  F >. ) concat  R ) concat  ( S substr  <. T ,  (
# `  S ) >. ) ) )

Proof of Theorem splval
Dummy variables  s 
b are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-splice 11728 . . 3  |- splice  =  ( s  e.  _V , 
b  e.  _V  |->  ( ( ( s substr  <. 0 ,  ( 1st `  ( 1st `  b
) ) >. ) concat  ( 2nd `  b ) ) concat  ( s substr  <. ( 2nd `  ( 1st `  b ) ) ,  ( # `  s
) >. ) ) )
21a1i 11 . 2  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  -> splice  =  ( s  e.  _V , 
b  e.  _V  |->  ( ( ( s substr  <. 0 ,  ( 1st `  ( 1st `  b
) ) >. ) concat  ( 2nd `  b ) ) concat  ( s substr  <. ( 2nd `  ( 1st `  b ) ) ,  ( # `  s
) >. ) ) ) )
3 simprl 734 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  s  =  S )
4 fveq2 5729 . . . . . . . . 9  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 1st `  b )  =  ( 1st `  <. F ,  T ,  R >. ) )
54fveq2d 5733 . . . . . . . 8  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 1st `  ( 1st `  b
) )  =  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) )
65adantl 454 . . . . . . 7  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 1st `  ( 1st `  b ) )  =  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) )
7 ot1stg 6362 . . . . . . . 8  |-  ( ( F  e.  W  /\  T  e.  X  /\  R  e.  Y )  ->  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) )  =  F )
87adantl 454 . . . . . . 7  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) )  =  F )
96, 8sylan9eqr 2491 . . . . . 6  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 1st `  ( 1st `  b
) )  =  F )
109opeq2d 3992 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  <. 0 ,  ( 1st `  ( 1st `  b ) )
>.  =  <. 0 ,  F >. )
113, 10oveq12d 6100 . . . 4  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( s substr  <.
0 ,  ( 1st `  ( 1st `  b
) ) >. )  =  ( S substr  <. 0 ,  F >. ) )
12 fveq2 5729 . . . . . 6  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 2nd `  b )  =  ( 2nd `  <. F ,  T ,  R >. ) )
1312adantl 454 . . . . 5  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 2nd `  b
)  =  ( 2nd `  <. F ,  T ,  R >. ) )
14 ot3rdg 6364 . . . . . . 7  |-  ( R  e.  Y  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
15143ad2ant3 981 . . . . . 6  |-  ( ( F  e.  W  /\  T  e.  X  /\  R  e.  Y )  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
1615adantl 454 . . . . 5  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
1713, 16sylan9eqr 2491 . . . 4  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 2nd `  b )  =  R )
1811, 17oveq12d 6100 . . 3  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( (
s substr  <. 0 ,  ( 1st `  ( 1st `  b ) ) >.
) concat  ( 2nd `  b
) )  =  ( ( S substr  <. 0 ,  F >. ) concat  R )
)
194fveq2d 5733 . . . . . . 7  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 2nd `  ( 1st `  b
) )  =  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) )
2019adantl 454 . . . . . 6  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 2nd `  ( 1st `  b ) )  =  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) )
21 ot2ndg 6363 . . . . . . 7  |-  ( ( F  e.  W  /\  T  e.  X  /\  R  e.  Y )  ->  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) )  =  T )
2221adantl 454 . . . . . 6  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) )  =  T )
2320, 22sylan9eqr 2491 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 2nd `  ( 1st `  b
) )  =  T )
243fveq2d 5733 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( # `  s
)  =  ( # `  S ) )
2523, 24opeq12d 3993 . . . 4  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  <. ( 2nd `  ( 1st `  b
) ) ,  (
# `  s ) >.  =  <. T ,  (
# `  S ) >. )
263, 25oveq12d 6100 . . 3  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( s substr  <.
( 2nd `  ( 1st `  b ) ) ,  ( # `  s
) >. )  =  ( S substr  <. T ,  (
# `  S ) >. ) )
2718, 26oveq12d 6100 . 2  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
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 ,  F >. ) concat  R ) concat  ( S substr  <. T , 
( # `  S )
>. ) ) )
28 elex 2965 . . 3  |-  ( S  e.  V  ->  S  e.  _V )
2928adantr 453 . 2  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  S  e.  _V )
30 otex 4429 . . 3  |-  <. F ,  T ,  R >.  e. 
_V
3130a1i 11 . 2  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  <. F ,  T ,  R >.  e. 
_V )
32 ovex 6107 . . 3  |-  ( ( ( S substr  <. 0 ,  F >. ) concat  R ) concat  ( S substr  <. T ,  (
# `  S ) >. ) )  e.  _V
3332a1i 11 . 2  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  (
( ( S substr  <. 0 ,  F >. ) concat  R ) concat  ( S substr  <. T ,  (
# `  S ) >. ) )  e.  _V )
342, 27, 29, 31, 33ovmpt2d 6202 1  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( S splice  <. F ,  T ,  R >. )  =  ( ( ( S substr  <. 0 ,  F >. ) concat  R ) concat  ( S substr  <. T ,  (
# `  S ) >. ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 360    /\ w3a 937    = wceq 1653    e. wcel 1726   _Vcvv 2957   <.cop 3818   <.cotp 3819   ` cfv 5455  (class class class)co 6082    e. cmpt2 6084   1stc1st 6348   2ndc2nd 6349   0cc0 8991   #chash 11619   concat cconcat 11719   substr csubstr 11721   splice csplice 11722
This theorem is referenced by:  splid  11783  spllen  11784  splfv1  11785  splfv2a  11786  splval2  11787  gsumspl  14790  efgredleme  15376  efgredlemc  15378  efgcpbllemb  15388  frgpuplem  15405
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 2418  ax-sep 4331  ax-nul 4339  ax-pow 4378  ax-pr 4404  ax-un 4702
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2286  df-mo 2287  df-clab 2424  df-cleq 2430  df-clel 2433  df-nfc 2562  df-ne 2602  df-ral 2711  df-rex 2712  df-rab 2715  df-v 2959  df-sbc 3163  df-dif 3324  df-un 3326  df-in 3328  df-ss 3335  df-nul 3630  df-if 3741  df-sn 3821  df-pr 3822  df-op 3824  df-ot 3825  df-uni 4017  df-br 4214  df-opab 4268  df-mpt 4269  df-id 4499  df-xp 4885  df-rel 4886  df-cnv 4887  df-co 4888  df-dm 4889  df-rn 4890  df-iota 5419  df-fun 5457  df-fv 5463  df-ov 6085  df-oprab 6086  df-mpt2 6087  df-1st 6350  df-2nd 6351  df-splice 11728
  Copyright terms: Public domain W3C validator