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

Theorem splval 11466
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 11413 . . 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 10 . 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 732 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  s  =  S )
4 fveq2 5525 . . . . . . . . 9  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 1st `  b )  =  ( 1st `  <. F ,  T ,  R >. ) )
54fveq2d 5529 . . . . . . . 8  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 1st `  ( 1st `  b
) )  =  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) )
65adantl 452 . . . . . . 7  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 1st `  ( 1st `  b ) )  =  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) ) )
7 ot1stg 6134 . . . . . . . 8  |-  ( ( F  e.  W  /\  T  e.  X  /\  R  e.  Y )  ->  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) )  =  F )
87adantl 452 . . . . . . 7  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( 1st `  ( 1st `  <. F ,  T ,  R >. ) )  =  F )
96, 8sylan9eqr 2337 . . . . . 6  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 1st `  ( 1st `  b
) )  =  F )
109opeq2d 3803 . . . . 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 5876 . . . 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 5525 . . . . . 6  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 2nd `  b )  =  ( 2nd `  <. F ,  T ,  R >. ) )
1312adantl 452 . . . . 5  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 2nd `  b
)  =  ( 2nd `  <. F ,  T ,  R >. ) )
14 ot3rdg 6136 . . . . . . 7  |-  ( R  e.  Y  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
15143ad2ant3 978 . . . . . 6  |-  ( ( F  e.  W  /\  T  e.  X  /\  R  e.  Y )  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
1615adantl 452 . . . . 5  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( 2nd `  <. F ,  T ,  R >. )  =  R )
1713, 16sylan9eqr 2337 . . . 4  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 2nd `  b )  =  R )
1811, 17oveq12d 5876 . . 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 5529 . . . . . . 7  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 2nd `  ( 1st `  b
) )  =  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) )
2019adantl 452 . . . . . 6  |-  ( ( s  =  S  /\  b  =  <. F ,  T ,  R >. )  ->  ( 2nd `  ( 1st `  b ) )  =  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) ) )
21 ot2ndg 6135 . . . . . . 7  |-  ( ( F  e.  W  /\  T  e.  X  /\  R  e.  Y )  ->  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) )  =  T )
2221adantl 452 . . . . . 6  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  ( 2nd `  ( 1st `  <. F ,  T ,  R >. ) )  =  T )
2320, 22sylan9eqr 2337 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 2nd `  ( 1st `  b
) )  =  T )
243fveq2d 5529 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( # `  s
)  =  ( # `  S ) )
2523, 24opeq12d 3804 . . . 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 5876 . . 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 5876 . 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 2796 . . 3  |-  ( S  e.  V  ->  S  e.  _V )
2928adantr 451 . 2  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  S  e.  _V )
30 otex 4238 . . 3  |-  <. F ,  T ,  R >.  e. 
_V
3130a1i 10 . 2  |-  ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  ->  <. F ,  T ,  R >.  e. 
_V )
32 ovex 5883 . . 3  |-  ( ( ( S substr  <. 0 ,  F >. ) concat  R ) concat  ( S substr  <. T ,  (
# `  S ) >. ) )  e.  _V
3332a1i 10 . 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 5975 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 358    /\ w3a 934    = wceq 1623    e. wcel 1684   _Vcvv 2788   <.cop 3643   <.cotp 3644   ` cfv 5255  (class class class)co 5858    e. cmpt2 5860   1stc1st 6120   2ndc2nd 6121   0cc0 8737   #chash 11337   concat cconcat 11404   substr csubstr 11406   splice csplice 11407
This theorem is referenced by:  splid  11468  spllen  11469  splfv1  11470  splfv2a  11471  splval2  11472  gsumspl  14466  efgredleme  15052  efgredlemc  15054  efgcpbllemb  15064  frgpuplem  15081
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-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  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-ral 2548  df-rex 2549  df-rab 2552  df-v 2790  df-sbc 2992  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3456  df-if 3566  df-sn 3646  df-pr 3647  df-op 3649  df-ot 3650  df-uni 3828  df-br 4024  df-opab 4078  df-mpt 4079  df-id 4309  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-iota 5219  df-fun 5257  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-splice 11413
  Copyright terms: Public domain W3C validator