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

Theorem swrdccatin2d 12737
Description: The subword of a concatenation of two words within the second of the concatenated words. (Contributed by AV, 31-May-2018.) (Revised by Mario Carneiro/AV, 21-Oct-2018.)
Hypotheses
Ref Expression
swrdccatind.l  |-  ( ph  ->  ( # `  A
)  =  L )
swrdccatind.w  |-  ( ph  ->  ( A  e. Word  V  /\  B  e. Word  V ) )
swrdccatin2d.1  |-  ( ph  ->  M  e.  ( L ... N ) )
swrdccatin2d.2  |-  ( ph  ->  N  e.  ( L ... ( L  +  ( # `  B ) ) ) )
Assertion
Ref Expression
swrdccatin2d  |-  ( ph  ->  ( ( A ++  B
) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  L
) ,  ( N  -  L ) >.
) )

Proof of Theorem swrdccatin2d
StepHypRef Expression
1 swrdccatind.l . 2  |-  ( ph  ->  ( # `  A
)  =  L )
2 swrdccatind.w . . . . . . 7  |-  ( ph  ->  ( A  e. Word  V  /\  B  e. Word  V ) )
32adantl 466 . . . . . 6  |-  ( ( ( # `  A
)  =  L  /\  ph )  ->  ( A  e. Word  V  /\  B  e. Word  V ) )
4 swrdccatin2d.1 . . . . . . . . 9  |-  ( ph  ->  M  e.  ( L ... N ) )
5 swrdccatin2d.2 . . . . . . . . 9  |-  ( ph  ->  N  e.  ( L ... ( L  +  ( # `  B ) ) ) )
64, 5jca 532 . . . . . . . 8  |-  ( ph  ->  ( M  e.  ( L ... N )  /\  N  e.  ( L ... ( L  +  ( # `  B
) ) ) ) )
76adantl 466 . . . . . . 7  |-  ( ( ( # `  A
)  =  L  /\  ph )  ->  ( M  e.  ( L ... N
)  /\  N  e.  ( L ... ( L  +  ( # `  B
) ) ) ) )
8 oveq1 6303 . . . . . . . . . 10  |-  ( (
# `  A )  =  L  ->  ( (
# `  A ) ... N )  =  ( L ... N ) )
98eleq2d 2527 . . . . . . . . 9  |-  ( (
# `  A )  =  L  ->  ( M  e.  ( ( # `  A ) ... N
)  <->  M  e.  ( L ... N ) ) )
10 id 22 . . . . . . . . . . 11  |-  ( (
# `  A )  =  L  ->  ( # `  A )  =  L )
11 oveq1 6303 . . . . . . . . . . 11  |-  ( (
# `  A )  =  L  ->  ( (
# `  A )  +  ( # `  B
) )  =  ( L  +  ( # `  B ) ) )
1210, 11oveq12d 6314 . . . . . . . . . 10  |-  ( (
# `  A )  =  L  ->  ( (
# `  A ) ... ( ( # `  A
)  +  ( # `  B ) ) )  =  ( L ... ( L  +  ( # `
 B ) ) ) )
1312eleq2d 2527 . . . . . . . . 9  |-  ( (
# `  A )  =  L  ->  ( N  e.  ( ( # `  A ) ... (
( # `  A )  +  ( # `  B
) ) )  <->  N  e.  ( L ... ( L  +  ( # `  B
) ) ) ) )
149, 13anbi12d 710 . . . . . . . 8  |-  ( (
# `  A )  =  L  ->  ( ( M  e.  ( (
# `  A ) ... N )  /\  N  e.  ( ( # `  A
) ... ( ( # `  A )  +  (
# `  B )
) ) )  <->  ( M  e.  ( L ... N
)  /\  N  e.  ( L ... ( L  +  ( # `  B
) ) ) ) ) )
1514adantr 465 . . . . . . 7  |-  ( ( ( # `  A
)  =  L  /\  ph )  ->  ( ( M  e.  ( ( # `
 A ) ... N )  /\  N  e.  ( ( # `  A
) ... ( ( # `  A )  +  (
# `  B )
) ) )  <->  ( M  e.  ( L ... N
)  /\  N  e.  ( L ... ( L  +  ( # `  B
) ) ) ) ) )
167, 15mpbird 232 . . . . . 6  |-  ( ( ( # `  A
)  =  L  /\  ph )  ->  ( M  e.  ( ( # `  A
) ... N )  /\  N  e.  ( ( # `
 A ) ... ( ( # `  A
)  +  ( # `  B ) ) ) ) )
173, 16jca 532 . . . . 5  |-  ( ( ( # `  A
)  =  L  /\  ph )  ->  ( ( A  e. Word  V  /\  B  e. Word  V )  /\  ( M  e.  ( ( # `
 A ) ... N )  /\  N  e.  ( ( # `  A
) ... ( ( # `  A )  +  (
# `  B )
) ) ) ) )
1817ex 434 . . . 4  |-  ( (
# `  A )  =  L  ->  ( ph  ->  ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  ( M  e.  ( ( # `  A
) ... N )  /\  N  e.  ( ( # `
 A ) ... ( ( # `  A
)  +  ( # `  B ) ) ) ) ) ) )
19 eqid 2457 . . . . . 6  |-  ( # `  A )  =  (
# `  A )
2019swrdccatin2 12724 . . . . 5  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( M  e.  ( ( # `  A
) ... N )  /\  N  e.  ( ( # `
 A ) ... ( ( # `  A
)  +  ( # `  B ) ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  ( # `  A ) ) ,  ( N  -  ( # `  A
) ) >. )
) )
2120imp 429 . . . 4  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  ( M  e.  ( ( # `  A
) ... N )  /\  N  e.  ( ( # `
 A ) ... ( ( # `  A
)  +  ( # `  B ) ) ) ) )  ->  (
( A ++  B ) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  ( # `  A
) ) ,  ( N  -  ( # `  A ) ) >.
) )
2218, 21syl6 33 . . 3  |-  ( (
# `  A )  =  L  ->  ( ph  ->  ( ( A ++  B
) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  ( # `
 A ) ) ,  ( N  -  ( # `  A ) ) >. ) ) )
23 oveq2 6304 . . . . . 6  |-  ( (
# `  A )  =  L  ->  ( M  -  ( # `  A
) )  =  ( M  -  L ) )
24 oveq2 6304 . . . . . 6  |-  ( (
# `  A )  =  L  ->  ( N  -  ( # `  A
) )  =  ( N  -  L ) )
2523, 24opeq12d 4227 . . . . 5  |-  ( (
# `  A )  =  L  ->  <. ( M  -  ( # `  A
) ) ,  ( N  -  ( # `  A ) ) >.  =  <. ( M  -  L ) ,  ( N  -  L )
>. )
2625oveq2d 6312 . . . 4  |-  ( (
# `  A )  =  L  ->  ( B substr  <. ( M  -  ( # `
 A ) ) ,  ( N  -  ( # `  A ) ) >. )  =  ( B substr  <. ( M  -  L ) ,  ( N  -  L )
>. ) )
2726eqeq2d 2471 . . 3  |-  ( (
# `  A )  =  L  ->  ( ( ( A ++  B ) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  ( # `  A
) ) ,  ( N  -  ( # `  A ) ) >.
)  <->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  L ) ,  ( N  -  L )
>. ) ) )
2822, 27sylibd 214 . 2  |-  ( (
# `  A )  =  L  ->  ( ph  ->  ( ( A ++  B
) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  L
) ,  ( N  -  L ) >.
) ) )
291, 28mpcom 36 1  |-  ( ph  ->  ( ( A ++  B
) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  L
) ,  ( N  -  L ) >.
) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1395    e. wcel 1819   <.cop 4038   ` cfv 5594  (class class class)co 6296    + caddc 9512    - cmin 9824   ...cfz 11697   #chash 12408  Word cword 12538   ++ cconcat 12540   substr csubstr 12542
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-rep 4568  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-int 4289  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-recs 7060  df-rdg 7094  df-1o 7148  df-oadd 7152  df-er 7329  df-en 7536  df-dom 7537  df-sdom 7538  df-fin 7539  df-card 8337  df-cda 8565  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-nn 10557  df-2 10615  df-n0 10817  df-z 10886  df-uz 11107  df-fz 11698  df-fzo 11822  df-hash 12409  df-word 12546  df-concat 12548  df-substr 12550
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator