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

Theorem splid 11702
Description: Splicing a subword for the same subword makes no difference. (Contributed by Stefan O'Rear, 20-Aug-2015.)
Assertion
Ref Expression
splid  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( S splice  <. X ,  Y ,  ( S substr  <. X ,  Y >. )
>. )  =  S
)

Proof of Theorem splid
StepHypRef Expression
1 ovex 6038 . . 3  |-  ( S substr  <. X ,  Y >. )  e.  _V
2 splval 11700 . . 3  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) )  /\  ( S substr  <. X ,  Y >. )  e.  _V )
)  ->  ( S splice  <. X ,  Y , 
( S substr  <. X ,  Y >. ) >. )  =  ( ( ( S substr  <. 0 ,  X >. ) concat  ( S substr  <. X ,  Y >. ) ) concat  ( S substr  <. Y ,  (
# `  S ) >. ) ) )
31, 2mp3anr3 1278 . 2  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( S splice  <. X ,  Y ,  ( S substr  <. X ,  Y >. )
>. )  =  (
( ( S substr  <. 0 ,  X >. ) concat  ( S substr  <. X ,  Y >. ) ) concat  ( S substr  <. Y , 
( # `  S )
>. ) ) )
4 simpl 444 . . . . 5  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  S  e. Word  A
)
5 elfzuz 10980 . . . . . . 7  |-  ( X  e.  ( 0 ... Y )  ->  X  e.  ( ZZ>= `  0 )
)
65ad2antrl 709 . . . . . 6  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  X  e.  (
ZZ>= `  0 ) )
7 eluzfz1 10989 . . . . . 6  |-  ( X  e.  ( ZZ>= `  0
)  ->  0  e.  ( 0 ... X
) )
86, 7syl 16 . . . . 5  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  0  e.  ( 0 ... X ) )
9 simprl 733 . . . . 5  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  X  e.  ( 0 ... Y ) )
10 simprr 734 . . . . 5  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  Y  e.  ( 0 ... ( # `  S ) ) )
11 ccatswrd 11693 . . . . 5  |-  ( ( S  e. Word  A  /\  ( 0  e.  ( 0 ... X )  /\  X  e.  ( 0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S ) ) ) )  ->  ( ( S substr  <. 0 ,  X >. ) concat  ( S substr  <. X ,  Y >. ) )  =  ( S substr  <. 0 ,  Y >. ) )
124, 8, 9, 10, 11syl13anc 1186 . . . 4  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( ( S substr  <. 0 ,  X >. ) concat 
( S substr  <. X ,  Y >. ) )  =  ( S substr  <. 0 ,  Y >. ) )
1312oveq1d 6028 . . 3  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( ( ( S substr  <. 0 ,  X >. ) concat  ( S substr  <. X ,  Y >. ) ) concat  ( S substr  <. Y ,  (
# `  S ) >. ) )  =  ( ( S substr  <. 0 ,  Y >. ) concat  ( S substr  <. Y ,  ( # `  S
) >. ) ) )
14 elfzuz 10980 . . . . . . 7  |-  ( Y  e.  ( 0 ... ( # `  S
) )  ->  Y  e.  ( ZZ>= `  0 )
)
1514ad2antll 710 . . . . . 6  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  Y  e.  (
ZZ>= `  0 ) )
16 eluzfz1 10989 . . . . . 6  |-  ( Y  e.  ( ZZ>= `  0
)  ->  0  e.  ( 0 ... Y
) )
1715, 16syl 16 . . . . 5  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  0  e.  ( 0 ... Y ) )
18 elfzuz2 10987 . . . . . . 7  |-  ( Y  e.  ( 0 ... ( # `  S
) )  ->  ( # `
 S )  e.  ( ZZ>= `  0 )
)
1918ad2antll 710 . . . . . 6  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( # `  S
)  e.  ( ZZ>= ` 
0 ) )
20 eluzfz2 10990 . . . . . 6  |-  ( (
# `  S )  e.  ( ZZ>= `  0 )  ->  ( # `  S
)  e.  ( 0 ... ( # `  S
) ) )
2119, 20syl 16 . . . . 5  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( # `  S
)  e.  ( 0 ... ( # `  S
) ) )
22 ccatswrd 11693 . . . . 5  |-  ( ( S  e. Word  A  /\  ( 0  e.  ( 0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S ) )  /\  ( # `  S )  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( ( S substr  <. 0 ,  Y >. ) concat 
( S substr  <. Y , 
( # `  S )
>. ) )  =  ( S substr  <. 0 ,  (
# `  S ) >. ) )
234, 17, 10, 21, 22syl13anc 1186 . . . 4  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( ( S substr  <. 0 ,  Y >. ) concat 
( S substr  <. Y , 
( # `  S )
>. ) )  =  ( S substr  <. 0 ,  (
# `  S ) >. ) )
24 swrdid 11692 . . . . 5  |-  ( S  e. Word  A  ->  ( S substr  <. 0 ,  (
# `  S ) >. )  =  S )
2524adantr 452 . . . 4  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( S substr  <. 0 ,  ( # `  S
) >. )  =  S )
2623, 25eqtrd 2412 . . 3  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( ( S substr  <. 0 ,  Y >. ) concat 
( S substr  <. Y , 
( # `  S )
>. ) )  =  S )
2713, 26eqtrd 2412 . 2  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( ( ( S substr  <. 0 ,  X >. ) concat  ( S substr  <. X ,  Y >. ) ) concat  ( S substr  <. Y ,  (
# `  S ) >. ) )  =  S )
283, 27eqtrd 2412 1  |-  ( ( S  e. Word  A  /\  ( X  e.  (
0 ... Y )  /\  Y  e.  ( 0 ... ( # `  S
) ) ) )  ->  ( S splice  <. X ,  Y ,  ( S substr  <. X ,  Y >. )
>. )  =  S
)
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1717   _Vcvv 2892   <.cop 3753   <.cotp 3754   ` cfv 5387  (class class class)co 6013   0cc0 8916   ZZ>=cuz 10413   ...cfz 10968   #chash 11538  Word cword 11637   concat cconcat 11638   substr csubstr 11640   splice csplice 11641
This theorem is referenced by:  psgnunilem2  27080
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 2361  ax-rep 4254  ax-sep 4264  ax-nul 4272  ax-pow 4311  ax-pr 4337  ax-un 4634  ax-cnex 8972  ax-resscn 8973  ax-1cn 8974  ax-icn 8975  ax-addcl 8976  ax-addrcl 8977  ax-mulcl 8978  ax-mulrcl 8979  ax-mulcom 8980  ax-addass 8981  ax-mulass 8982  ax-distr 8983  ax-i2m1 8984  ax-1ne0 8985  ax-1rid 8986  ax-rnegex 8987  ax-rrecex 8988  ax-cnre 8989  ax-pre-lttri 8990  ax-pre-lttrn 8991  ax-pre-ltadd 8992  ax-pre-mulgt0 8993
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 2235  df-mo 2236  df-clab 2367  df-cleq 2373  df-clel 2376  df-nfc 2505  df-ne 2545  df-nel 2546  df-ral 2647  df-rex 2648  df-reu 2649  df-rab 2651  df-v 2894  df-sbc 3098  df-csb 3188  df-dif 3259  df-un 3261  df-in 3263  df-ss 3270  df-pss 3272  df-nul 3565  df-if 3676  df-pw 3737  df-sn 3756  df-pr 3757  df-tp 3758  df-op 3759  df-ot 3760  df-uni 3951  df-int 3986  df-iun 4030  df-br 4147  df-opab 4201  df-mpt 4202  df-tr 4237  df-eprel 4428  df-id 4432  df-po 4437  df-so 4438  df-fr 4475  df-we 4477  df-ord 4518  df-on 4519  df-lim 4520  df-suc 4521  df-om 4779  df-xp 4817  df-rel 4818  df-cnv 4819  df-co 4820  df-dm 4821  df-rn 4822  df-res 4823  df-ima 4824  df-iota 5351  df-fun 5389  df-fn 5390  df-f 5391  df-f1 5392  df-fo 5393  df-f1o 5394  df-fv 5395  df-ov 6016  df-oprab 6017  df-mpt2 6018  df-1st 6281  df-2nd 6282  df-riota 6478  df-recs 6562  df-rdg 6597  df-1o 6653  df-oadd 6657  df-er 6834  df-en 7039  df-dom 7040  df-sdom 7041  df-fin 7042  df-card 7752  df-pnf 9048  df-mnf 9049  df-xr 9050  df-ltxr 9051  df-le 9052  df-sub 9218  df-neg 9219  df-nn 9926  df-n0 10147  df-z 10208  df-uz 10414  df-fz 10969  df-fzo 11059  df-hash 11539  df-word 11643  df-concat 11644  df-substr 11646  df-splice 11647
  Copyright terms: Public domain W3C validator