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

Theorem swrdccatin2d 12403
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 concat  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 6110 . . . . . . . . . 10  |-  ( (
# `  A )  =  L  ->  ( (
# `  A ) ... N )  =  ( L ... N ) )
98eleq2d 2510 . . . . . . . . 9  |-  ( (
# `  A )  =  L  ->  ( M  e.  ( ( # `  A ) ... N
)  <->  M  e.  ( L ... N ) ) )
10 id 22 . . . . . . . . . . 11  |-  ( (
# `  A )  =  L  ->  ( # `  A )  =  L )
11 oveq1 6110 . . . . . . . . . . 11  |-  ( (
# `  A )  =  L  ->  ( (
# `  A )  +  ( # `  B
) )  =  ( L  +  ( # `  B ) ) )
1210, 11oveq12d 6121 . . . . . . . . . 10  |-  ( (
# `  A )  =  L  ->  ( (
# `  A ) ... ( ( # `  A
)  +  ( # `  B ) ) )  =  ( L ... ( L  +  ( # `
 B ) ) ) )
1312eleq2d 2510 . . . . . . . . 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 2443 . . . . . 6  |-  ( # `  A )  =  (
# `  A )
2019swrdccatin2 12390 . . . . 5  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( M  e.  ( ( # `  A
) ... N )  /\  N  e.  ( ( # `
 A ) ... ( ( # `  A
)  +  ( # `  B ) ) ) )  ->  ( ( A concat  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 concat  B ) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  ( # `  A
) ) ,  ( N  -  ( # `  A ) ) >.
) )
2218, 21syl6 33 . . 3  |-  ( (
# `  A )  =  L  ->  ( ph  ->  ( ( A concat  B
) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  ( # `
 A ) ) ,  ( N  -  ( # `  A ) ) >. ) ) )
23 oveq2 6111 . . . . . 6  |-  ( (
# `  A )  =  L  ->  ( M  -  ( # `  A
) )  =  ( M  -  L ) )
24 oveq2 6111 . . . . . 6  |-  ( (
# `  A )  =  L  ->  ( N  -  ( # `  A
) )  =  ( N  -  L ) )
2523, 24opeq12d 4079 . . . . 5  |-  ( (
# `  A )  =  L  ->  <. ( M  -  ( # `  A
) ) ,  ( N  -  ( # `  A ) ) >.  =  <. ( M  -  L ) ,  ( N  -  L )
>. )
2625oveq2d 6119 . . . 4  |-  ( (
# `  A )  =  L  ->  ( B substr  <. ( M  -  ( # `
 A ) ) ,  ( N  -  ( # `  A ) ) >. )  =  ( B substr  <. ( M  -  L ) ,  ( N  -  L )
>. ) )
2726eqeq2d 2454 . . 3  |-  ( (
# `  A )  =  L  ->  ( ( ( A concat  B ) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  ( # `  A
) ) ,  ( N  -  ( # `  A ) ) >.
)  <->  ( ( A concat  B ) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  L ) ,  ( N  -  L )
>. ) ) )
2822, 27sylibd 214 . 2  |-  ( (
# `  A )  =  L  ->  ( ph  ->  ( ( A concat  B
) substr  <. M ,  N >. )  =  ( B substr  <. ( M  -  L
) ,  ( N  -  L ) >.
) ) )
291, 28mpcom 36 1  |-  ( ph  ->  ( ( A concat  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 1369    e. wcel 1756   <.cop 3895   ` cfv 5430  (class class class)co 6103    + caddc 9297    - cmin 9607   ...cfz 11449   #chash 12115  Word cword 12233   concat cconcat 12235   substr csubstr 12237
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-rep 4415  ax-sep 4425  ax-nul 4433  ax-pow 4482  ax-pr 4543  ax-un 6384  ax-cnex 9350  ax-resscn 9351  ax-1cn 9352  ax-icn 9353  ax-addcl 9354  ax-addrcl 9355  ax-mulcl 9356  ax-mulrcl 9357  ax-mulcom 9358  ax-addass 9359  ax-mulass 9360  ax-distr 9361  ax-i2m1 9362  ax-1ne0 9363  ax-1rid 9364  ax-rnegex 9365  ax-rrecex 9366  ax-cnre 9367  ax-pre-lttri 9368  ax-pre-lttrn 9369  ax-pre-ltadd 9370  ax-pre-mulgt0 9371
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2620  df-nel 2621  df-ral 2732  df-rex 2733  df-reu 2734  df-rab 2736  df-v 2986  df-sbc 3199  df-csb 3301  df-dif 3343  df-un 3345  df-in 3347  df-ss 3354  df-pss 3356  df-nul 3650  df-if 3804  df-pw 3874  df-sn 3890  df-pr 3892  df-tp 3894  df-op 3896  df-uni 4104  df-int 4141  df-iun 4185  df-br 4305  df-opab 4363  df-mpt 4364  df-tr 4398  df-eprel 4644  df-id 4648  df-po 4653  df-so 4654  df-fr 4691  df-we 4693  df-ord 4734  df-on 4735  df-lim 4736  df-suc 4737  df-xp 4858  df-rel 4859  df-cnv 4860  df-co 4861  df-dm 4862  df-rn 4863  df-res 4864  df-ima 4865  df-iota 5393  df-fun 5432  df-fn 5433  df-f 5434  df-f1 5435  df-fo 5436  df-f1o 5437  df-fv 5438  df-riota 6064  df-ov 6106  df-oprab 6107  df-mpt2 6108  df-om 6489  df-1st 6589  df-2nd 6590  df-recs 6844  df-rdg 6878  df-1o 6932  df-oadd 6936  df-er 7113  df-en 7323  df-dom 7324  df-sdom 7325  df-fin 7326  df-card 8121  df-pnf 9432  df-mnf 9433  df-xr 9434  df-ltxr 9435  df-le 9436  df-sub 9609  df-neg 9610  df-nn 10335  df-n0 10592  df-z 10659  df-uz 10874  df-fz 11450  df-fzo 11561  df-hash 12116  df-word 12241  df-concat 12243  df-substr 12245
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator