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

Theorem swrdccat3blem 12670
Description: Lemma for swrdccat3b 12671. (Contributed by AV, 30-May-2018.)
Hypothesis
Ref Expression
swrdccatin12.l  |-  L  =  ( # `  A
)
Assertion
Ref Expression
swrdccat3blem  |-  ( ( ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  M  e.  ( 0 ... ( L  +  ( # `  B
) ) ) )  /\  ( L  +  ( # `  B ) )  <_  L )  ->  if ( L  <_  M ,  ( B substr  <.
( M  -  L
) ,  ( # `  B ) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) )

Proof of Theorem swrdccat3blem
StepHypRef Expression
1 lencl 12515 . . . . . . . 8  |-  ( B  e. Word  V  ->  ( # `
 B )  e. 
NN0 )
2 nn0le0eq0 10813 . . . . . . . . 9  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  <->  ( # `  B
)  =  0 ) )
32biimpd 207 . . . . . . . 8  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  ->  ( # `  B
)  =  0 ) )
41, 3syl 16 . . . . . . 7  |-  ( B  e. Word  V  ->  (
( # `  B )  <_  0  ->  ( # `
 B )  =  0 ) )
54adantl 466 . . . . . 6  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  <_  0  ->  (
# `  B )  =  0 ) )
6 hasheq0 12388 . . . . . . . . . . 11  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  <->  B  =  (/) ) )
76biimpd 207 . . . . . . . . . 10  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  ->  B  =  (/) ) )
87adantl 466 . . . . . . . . 9  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  =  0  ->  B  =  (/) ) )
98imp 429 . . . . . . . 8  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  ( # `  B
)  =  0 )  ->  B  =  (/) )
10 lencl 12515 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
11 swrdccatin12.l . . . . . . . . . . . . . . . . . . 19  |-  L  =  ( # `  A
)
1211eqcomi 2473 . . . . . . . . . . . . . . . . . 18  |-  ( # `  A )  =  L
1312eleq1i 2537 . . . . . . . . . . . . . . . . 17  |-  ( (
# `  A )  e.  NN0  <->  L  e.  NN0 )
14 nn0re 10793 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  NN0  ->  L  e.  RR )
15 elfz2nn0 11757 . . . . . . . . . . . . . . . . . . 19  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  <->  ( M  e.  NN0  /\  ( L  +  0 )  e. 
NN0  /\  M  <_  ( L  +  0 ) ) )
16 recn 9571 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( L  e.  RR  ->  L  e.  CC )
1716addid1d 9768 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( L  +  0 )  =  L )
1817breq2d 4452 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  <->  M  <_  L ) )
19 nn0re 10793 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  |-  ( M  e.  NN0  ->  M  e.  RR )
2019anim1i 568 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  |-  ( ( M  e.  NN0  /\  L  e.  RR )  ->  ( M  e.  RR  /\  L  e.  RR ) )
2120ancoms 453 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( M  e.  RR  /\  L  e.  RR ) )
22 letri3 9659 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( M  e.  RR  /\  L  e.  RR )  ->  ( M  =  L  <-> 
( M  <_  L  /\  L  <_  M ) ) )
2321, 22syl 16 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( M  =  L  <-> 
( M  <_  L  /\  L  <_  M ) ) )
2423biimprd 223 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( ( M  <_  L  /\  L  <_  M
)  ->  M  =  L ) )
2524exp4b 607 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( M  e.  NN0  ->  ( M  <_  L  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2625com23 78 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  L  ->  ( M  e.  NN0  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2718, 26sylbid 215 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  ->  ( M  e.  NN0  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2827com3l 81 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  <_  ( L  + 
0 )  ->  ( M  e.  NN0  ->  ( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2928impcom 430 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( M  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) )
30293adant2 1010 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( M  e.  NN0  /\  ( L  +  0
)  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) )
3130com12 31 . . . . . . . . . . . . . . . . . . 19  |-  ( L  e.  RR  ->  (
( M  e.  NN0  /\  ( L  +  0 )  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  <_  M  ->  M  =  L ) ) )
3215, 31syl5bi 217 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  RR  ->  ( M  e.  ( 0 ... ( L  + 
0 ) )  -> 
( L  <_  M  ->  M  =  L ) ) )
3314, 32syl 16 . . . . . . . . . . . . . . . . 17  |-  ( L  e.  NN0  ->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  ( L  <_  M  ->  M  =  L ) ) )
3413, 33sylbi 195 . . . . . . . . . . . . . . . 16  |-  ( (
# `  A )  e.  NN0  ->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  ( L  <_  M  ->  M  =  L ) ) )
3510, 34syl 16 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( M  e.  ( 0 ... ( L  + 
0 ) )  -> 
( L  <_  M  ->  M  =  L ) ) )
3635imp 429 . . . . . . . . . . . . . 14  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( L  <_  M  ->  M  =  L ) )
37 elfznn0 11759 . . . . . . . . . . . . . . . 16  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  M  e.  NN0 )
38 swrd00 12595 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( (/) substr  <.
0 ,  0 >.
)  =  (/)
39 swrd00 12595 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( A substr  <. L ,  L >. )  =  (/)
4038, 39eqtr4i 2492 . . . . . . . . . . . . . . . . . . . . 21  |-  ( (/) substr  <.
0 ,  0 >.
)  =  ( A substr  <. L ,  L >. )
41 nn0cn 10794 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  NN0  ->  L  e.  CC )
4241subidd 9907 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  -  L )  =  0 )
4342opeq1d 4212 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. ( L  -  L ) ,  0 >.  =  <. 0 ,  0 >. )
4443oveq2d 6291 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( (/) substr  <.
( L  -  L
) ,  0 >.
)  =  ( (/) substr  <.
0 ,  0 >.
) )
4541addid1d 9768 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  +  0 )  =  L )
4645opeq2d 4213 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. L , 
( L  +  0 ) >.  =  <. L ,  L >. )
4746oveq2d 6291 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( A substr  <. L ,  ( L  +  0 ) >.
)  =  ( A substr  <. L ,  L >. ) )
4840, 44, 473eqtr4a 2527 . . . . . . . . . . . . . . . . . . . 20  |-  ( L  e.  NN0  ->  ( (/) substr  <.
( L  -  L
) ,  0 >.
)  =  ( A substr  <. L ,  ( L  +  0 ) >.
) )
4948a1i 11 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  ( L  e.  NN0  ->  ( (/) substr  <.
( L  -  L
) ,  0 >.
)  =  ( A substr  <. L ,  ( L  +  0 ) >.
) ) )
50 eleq1 2532 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  ( M  e.  NN0  <->  L  e.  NN0 ) )
51 oveq1 6282 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  =  L  ->  ( M  -  L )  =  ( L  -  L ) )
5251opeq1d 4212 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. ( M  -  L ) ,  0 >.  =  <. ( L  -  L ) ,  0 >. )
5352oveq2d 6291 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( (/) substr  <.
( L  -  L
) ,  0 >.
) )
54 opeq1 4206 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. M , 
( L  +  0 ) >.  =  <. L ,  ( L  + 
0 ) >. )
5554oveq2d 6291 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( A substr  <. M ,  ( L  +  0 )
>. )  =  ( A substr  <. L ,  ( L  +  0 )
>. ) )
5653, 55eqeq12d 2482 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  (
( (/) substr  <. ( M  -  L ) ,  0
>. )  =  ( A substr  <. M ,  ( L  +  0 )
>. )  <->  ( (/) substr  <. ( L  -  L ) ,  0 >. )  =  ( A substr  <. L , 
( L  +  0 ) >. ) ) )
5749, 50, 563imtr4d 268 . . . . . . . . . . . . . . . . . 18  |-  ( M  =  L  ->  ( M  e.  NN0  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) ) )
5857com12 31 . . . . . . . . . . . . . . . . 17  |-  ( M  e.  NN0  ->  ( M  =  L  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) ) )
5958a1d 25 . . . . . . . . . . . . . . . 16  |-  ( M  e.  NN0  ->  ( A  e. Word  V  ->  ( M  =  L  ->  (
(/) substr  <. ( M  -  L ) ,  0
>. )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) ) ) )
6037, 59syl 16 . . . . . . . . . . . . . . 15  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  ( A  e. Word  V  ->  ( M  =  L  ->  (
(/) substr  <. ( M  -  L ) ,  0
>. )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) ) ) )
6160impcom 430 . . . . . . . . . . . . . 14  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( M  =  L  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
6236, 61syld 44 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( L  <_  M  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
6362imp 429 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  L  <_  M
)  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
64 swrdcl 12596 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  e. Word  V )
65 ccatrid 12556 . . . . . . . . . . . . . . . 16  |-  ( ( A substr  <. M ,  L >. )  e. Word  V  -> 
( ( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M ,  L >. ) )
6664, 65syl 16 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  (
( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M ,  L >. ) )
6713, 41sylbi 195 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  A )  e.  NN0  ->  L  e.  CC )
6810, 67syl 16 . . . . . . . . . . . . . . . . . 18  |-  ( A  e. Word  V  ->  L  e.  CC )
69 addid1 9748 . . . . . . . . . . . . . . . . . . 19  |-  ( L  e.  CC  ->  ( L  +  0 )  =  L )
7069eqcomd 2468 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  CC  ->  L  =  ( L  + 
0 ) )
7168, 70syl 16 . . . . . . . . . . . . . . . . 17  |-  ( A  e. Word  V  ->  L  =  ( L  + 
0 ) )
7271opeq2d 4213 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  <. M ,  L >.  =  <. M , 
( L  +  0 ) >. )
7372oveq2d 6291 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
7466, 73eqtrd 2501 . . . . . . . . . . . . . 14  |-  ( A  e. Word  V  ->  (
( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7574adantr 465 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( ( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
7675adantr 465 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  -.  L  <_  M )  ->  (
( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7763, 76ifeqda 3965 . . . . . . . . . . 11  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) concat  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7877ex 434 . . . . . . . . . 10  |-  ( A  e. Word  V  ->  ( M  e.  ( 0 ... ( L  + 
0 ) )  ->  if ( L  <_  M ,  ( (/) substr  <. ( M  -  L ) ,  0 >. ) ,  ( ( A substr  <. M ,  L >. ) concat  (/) ) )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) ) )
7978ad3antrrr 729 . . . . . . . . 9  |-  ( ( ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  ( # `  B
)  =  0 )  /\  B  =  (/) )  ->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) concat  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
80 oveq2 6283 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  ( L  +  ( # `  B
) )  =  ( L  +  0 ) )
8180oveq2d 6291 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  (
0 ... ( L  +  ( # `  B ) ) )  =  ( 0 ... ( L  +  0 ) ) )
8281eleq2d 2530 . . . . . . . . . . . 12  |-  ( (
# `  B )  =  0  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B ) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
8382adantr 465 . . . . . . . . . . 11  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
84 simpr 461 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  B  =  (/) )
85 opeq2 4207 . . . . . . . . . . . . . . 15  |-  ( (
# `  B )  =  0  ->  <. ( M  -  L ) ,  ( # `  B
) >.  =  <. ( M  -  L ) ,  0 >. )
8685adantr 465 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  <. ( M  -  L
) ,  ( # `  B ) >.  =  <. ( M  -  L ) ,  0 >. )
8784, 86oveq12d 6293 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. )  =  (
(/) substr  <. ( M  -  L ) ,  0
>. ) )
88 oveq2 6283 . . . . . . . . . . . . . 14  |-  ( B  =  (/)  ->  ( ( A substr  <. M ,  L >. ) concat  B )  =  ( ( A substr  <. M ,  L >. ) concat  (/) ) )
8988adantl 466 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( ( A substr  <. M ,  L >. ) concat  B )  =  ( ( A substr  <. M ,  L >. ) concat  (/) ) )
9087, 89ifeq12d 3952 . . . . . . . . . . . 12  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  if ( L  <_  M , 
( (/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) concat  (/) ) ) )
9180opeq2d 4213 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  <. M , 
( L  +  (
# `  B )
) >.  =  <. M , 
( L  +  0 ) >. )
9291oveq2d 6291 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  ( A substr  <. M ,  ( L  +  ( # `  B ) ) >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
9392adantr 465 . . . . . . . . . . . 12  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( A substr  <. M , 
( L  +  (
# `  B )
) >. )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) )
9490, 93eqeq12d 2482 . . . . . . . . . . 11  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  (
# `  B ) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. )  <->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) concat  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
9583, 94imbi12d 320 . . . . . . . . . 10  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( ( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
)  <->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) concat  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) ) )
9695adantll 713 . . . . . . . . 9  |-  ( ( ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  ( # `  B
)  =  0 )  /\  B  =  (/) )  ->  ( ( M  e.  ( 0 ... ( L  +  (
# `  B )
) )  ->  if ( L  <_  M , 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
)  <->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) concat  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) ) )
9779, 96mpbird 232 . . . . . . . 8  |-  ( ( ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  ( # `  B
)  =  0 )  /\  B  =  (/) )  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
989, 97mpdan 668 . . . . . . 7  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  ( # `  B
)  =  0 )  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
9998ex 434 . . . . . 6  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  =  0  -> 
( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
1005, 99syld 44 . . . . 5  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  <_  0  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B ) ) )  ->  if ( L  <_  M , 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
101100com23 78 . . . 4  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  -> 
( ( # `  B
)  <_  0  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
102101imp 429 . . 3  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  M  e.  ( 0 ... ( L  +  ( # `  B
) ) ) )  ->  ( ( # `  B )  <_  0  ->  if ( L  <_  M ,  ( B substr  <.
( M  -  L
) ,  ( # `  B ) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) ) )
103102adantr 465 . 2  |-  ( ( ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  M  e.  ( 0 ... ( L  +  ( # `  B
) ) ) )  /\  ( L  +  ( # `  B ) )  <_  L )  ->  ( ( # `  B
)  <_  0  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
10411eleq1i 2537 . . . . . . . 8  |-  ( L  e.  NN0  <->  ( # `  A
)  e.  NN0 )
105104, 14sylbir 213 . . . . . . 7  |-  ( (
# `  A )  e.  NN0  ->  L  e.  RR )
10610, 105syl 16 . . . . . 6  |-  ( A  e. Word  V  ->  L  e.  RR )
107 nn0re 10793 . . . . . . 7  |-  ( (
# `  B )  e.  NN0  ->  ( # `  B
)  e.  RR )
1081, 107syl 16 . . . . . 6  |-  ( B  e. Word  V  ->  ( # `
 B )  e.  RR )
109 leaddle0 10056 . . . . . 6  |-  ( ( L  e.  RR  /\  ( # `  B )  e.  RR )  -> 
( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
110106, 108, 109syl2an 477 . . . . 5  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
111 pm2.24 109 . . . . 5  |-  ( (
# `  B )  <_  0  ->  ( -.  ( # `  B )  <_  0  ->  if ( L  <_  M , 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
112110, 111syl6bi 228 . . . 4  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( L  +  ( # `  B ) )  <_  L  ->  ( -.  ( # `  B
)  <_  0  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B )
)  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
113112adantr 465 . . 3  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  M  e.  ( 0 ... ( L  +  ( # `  B
) ) ) )  ->  ( ( L  +  ( # `  B
) )  <_  L  ->  ( -.  ( # `  B )  <_  0  ->  if ( L  <_  M ,  ( B substr  <.
( M  -  L
) ,  ( # `  B ) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) ) ) )
114113imp 429 . 2  |-  ( ( ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  M  e.  ( 0 ... ( L  +  ( # `  B
) ) ) )  /\  ( L  +  ( # `  B ) )  <_  L )  ->  ( -.  ( # `  B )  <_  0  ->  if ( L  <_  M ,  ( B substr  <.
( M  -  L
) ,  ( # `  B ) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) ) )
115103, 114pm2.61d 158 1  |-  ( ( ( ( A  e. Word  V  /\  B  e. Word  V
)  /\  M  e.  ( 0 ... ( L  +  ( # `  B
) ) ) )  /\  ( L  +  ( # `  B ) )  <_  L )  ->  if ( L  <_  M ,  ( B substr  <.
( M  -  L
) ,  ( # `  B ) >. ) ,  ( ( A substr  <. M ,  L >. ) concat  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 968    = wceq 1374    e. wcel 1762   (/)c0 3778   ifcif 3932   <.cop 4026   class class class wbr 4440   ` cfv 5579  (class class class)co 6275   CCcc 9479   RRcr 9480   0cc0 9481    + caddc 9484    <_ cle 9618    - cmin 9794   NN0cn0 10784   ...cfz 11661   #chash 12360  Word cword 12487   concat cconcat 12489   substr csubstr 12491
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1714  ax-7 1734  ax-8 1764  ax-9 1766  ax-10 1781  ax-11 1786  ax-12 1798  ax-13 1961  ax-ext 2438  ax-rep 4551  ax-sep 4561  ax-nul 4569  ax-pow 4618  ax-pr 4679  ax-un 6567  ax-cnex 9537  ax-resscn 9538  ax-1cn 9539  ax-icn 9540  ax-addcl 9541  ax-addrcl 9542  ax-mulcl 9543  ax-mulrcl 9544  ax-mulcom 9545  ax-addass 9546  ax-mulass 9547  ax-distr 9548  ax-i2m1 9549  ax-1ne0 9550  ax-1rid 9551  ax-rnegex 9552  ax-rrecex 9553  ax-cnre 9554  ax-pre-lttri 9555  ax-pre-lttrn 9556  ax-pre-ltadd 9557  ax-pre-mulgt0 9558
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 969  df-3an 970  df-tru 1377  df-ex 1592  df-nf 1595  df-sb 1707  df-eu 2272  df-mo 2273  df-clab 2446  df-cleq 2452  df-clel 2455  df-nfc 2610  df-ne 2657  df-nel 2658  df-ral 2812  df-rex 2813  df-reu 2814  df-rab 2816  df-v 3108  df-sbc 3325  df-csb 3429  df-dif 3472  df-un 3474  df-in 3476  df-ss 3483  df-pss 3485  df-nul 3779  df-if 3933  df-pw 4005  df-sn 4021  df-pr 4023  df-tp 4025  df-op 4027  df-uni 4239  df-int 4276  df-iun 4320  df-br 4441  df-opab 4499  df-mpt 4500  df-tr 4534  df-eprel 4784  df-id 4788  df-po 4793  df-so 4794  df-fr 4831  df-we 4833  df-ord 4874  df-on 4875  df-lim 4876  df-suc 4877  df-xp 4998  df-rel 4999  df-cnv 5000  df-co 5001  df-dm 5002  df-rn 5003  df-res 5004  df-ima 5005  df-iota 5542  df-fun 5581  df-fn 5582  df-f 5583  df-f1 5584  df-fo 5585  df-f1o 5586  df-fv 5587  df-riota 6236  df-ov 6278  df-oprab 6279  df-mpt2 6280  df-om 6672  df-1st 6774  df-2nd 6775  df-recs 7032  df-rdg 7066  df-1o 7120  df-oadd 7124  df-er 7301  df-en 7507  df-dom 7508  df-sdom 7509  df-fin 7510  df-card 8309  df-pnf 9619  df-mnf 9620  df-xr 9621  df-ltxr 9622  df-le 9623  df-sub 9796  df-neg 9797  df-nn 10526  df-n0 10785  df-z 10854  df-uz 11072  df-fz 11662  df-fzo 11782  df-hash 12361  df-word 12495  df-concat 12497  df-substr 12499
This theorem is referenced by:  swrdccat3b  12671
  Copyright terms: Public domain W3C validator