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

Theorem splval 11482
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 11429 . . 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 5541 . . . . . . . . 9  |-  ( b  =  <. F ,  T ,  R >.  ->  ( 1st `  b )  =  ( 1st `  <. F ,  T ,  R >. ) )
54fveq2d 5545 . . . . . . . 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 6150 . . . . . . . 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 2350 . . . . . 6  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 1st `  ( 1st `  b
) )  =  F )
109opeq2d 3819 . . . . 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 5892 . . . 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 5541 . . . . . 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 6152 . . . . . . 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 2350 . . . 4  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 2nd `  b )  =  R )
1811, 17oveq12d 5892 . . 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 5545 . . . . . . 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 6151 . . . . . . 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 2350 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( 2nd `  ( 1st `  b
) )  =  T )
243fveq2d 5545 . . . . 5  |-  ( ( ( S  e.  V  /\  ( F  e.  W  /\  T  e.  X  /\  R  e.  Y
) )  /\  (
s  =  S  /\  b  =  <. F ,  T ,  R >. ) )  ->  ( # `  s
)  =  ( # `  S ) )
2523, 24opeq12d 3820 . . . 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 5892 . . 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 5892 . 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 2809 . . 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 4254 . . 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 5899 . . 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 5991 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 1632    e. wcel 1696   _Vcvv 2801   <.cop 3656   <.cotp 3657   ` cfv 5271  (class class class)co 5874    e. cmpt2 5876   1stc1st 6136   2ndc2nd 6137   0cc0 8753   #chash 11353   concat cconcat 11420   substr csubstr 11422   splice csplice 11423
This theorem is referenced by:  splid  11484  spllen  11485  splfv1  11486  splfv2a  11487  splval2  11488  gsumspl  14482  efgredleme  15068  efgredlemc  15070  efgcpbllemb  15080  frgpuplem  15097
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-ral 2561  df-rex 2562  df-rab 2565  df-v 2803  df-sbc 3005  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-nul 3469  df-if 3579  df-sn 3659  df-pr 3660  df-op 3662  df-ot 3663  df-uni 3844  df-br 4040  df-opab 4094  df-mpt 4095  df-id 4325  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-iota 5235  df-fun 5273  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-1st 6138  df-2nd 6139  df-splice 11429
  Copyright terms: Public domain W3C validator