Users' Mathboxes Mathbox for Alexander van der Vekens < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  swrdccat3blem Structured version   Unicode version

Theorem swrdccat3blem 28252
Description: Lemma for swrdccat3b 28253. (Contributed by Alexander van der Vekens, 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 11740 . . . . . . . 8  |-  ( B  e. Word  V  ->  ( # `
 B )  e. 
NN0 )
2 nn0le0eq0 10255 . . . . . . . . 9  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  <->  ( # `  B
)  =  0 ) )
32biimpd 200 . . . . . . . 8  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  ->  ( # `  B
)  =  0 ) )
41, 3syl 16 . . . . . . 7  |-  ( B  e. Word  V  ->  (
( # `  B )  <_  0  ->  ( # `
 B )  =  0 ) )
54adantl 454 . . . . . 6  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  <_  0  ->  (
# `  B )  =  0 ) )
6 hasheq0 11649 . . . . . . . . . . 11  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  <->  B  =  (/) ) )
76biimpd 200 . . . . . . . . . 10  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  ->  B  =  (/) ) )
87adantl 454 . . . . . . . . 9  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  =  0  ->  B  =  (/) ) )
98imp 420 . . . . . . . 8  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  ( # `  B
)  =  0 )  ->  B  =  (/) )
10 lencl 11740 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
11 swrdccatin12.l . . . . . . . . . . . . . . . . . . 19  |-  L  =  ( # `  A
)
1211eqcomi 2442 . . . . . . . . . . . . . . . . . 18  |-  ( # `  A )  =  L
1312eleq1i 2501 . . . . . . . . . . . . . . . . 17  |-  ( (
# `  A )  e.  NN0  <->  L  e.  NN0 )
14 nn0re 10235 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  NN0  ->  L  e.  RR )
15 elfz2nn0 11087 . . . . . . . . . . . . . . . . . . 19  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  <->  ( M  e.  NN0  /\  ( L  +  0 )  e. 
NN0  /\  M  <_  ( L  +  0 ) ) )
16 recn 9085 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( L  e.  RR  ->  L  e.  CC )
1716addid1d 9271 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( L  +  0 )  =  L )
1817breq2d 4227 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  <->  M  <_  L ) )
19 nn0re 10235 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  |-  ( M  e.  NN0  ->  M  e.  RR )
2019anim1i 553 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  |-  ( ( M  e.  NN0  /\  L  e.  RR )  ->  ( M  e.  RR  /\  L  e.  RR ) )
2120ancoms 441 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( M  e.  RR  /\  L  e.  RR ) )
22 letri3 9165 . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 216 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( ( M  <_  L  /\  L  <_  M
)  ->  M  =  L ) )
2524exp4b 592 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( M  e.  NN0  ->  ( M  <_  L  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2625com23 75 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  L  ->  ( M  e.  NN0  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2718, 26sylbid 208 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  ->  ( M  e.  NN0  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2827com3l 78 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  <_  ( L  + 
0 )  ->  ( M  e.  NN0  ->  ( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2928impcom 421 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( M  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) )
30293adant2 977 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( M  e.  NN0  /\  ( L  +  0
)  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) )
3130com12 30 . . . . . . . . . . . . . . . . . . 19  |-  ( L  e.  RR  ->  (
( M  e.  NN0  /\  ( L  +  0 )  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  <_  M  ->  M  =  L ) ) )
3215, 31syl5bi 210 . . . . . . . . . . . . . . . . . 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 189 . . . . . . . . . . . . . . . 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 420 . . . . . . . . . . . . . 14  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( L  <_  M  ->  M  =  L ) )
37 elfznn0 11088 . . . . . . . . . . . . . . . 16  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  M  e.  NN0 )
38 swrd00 11770 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( (/) substr  <.
0 ,  0 >.
)  =  (/)
39 swrd00 11770 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( A substr  <. L ,  L >. )  =  (/)
4038, 39eqtr4i 2461 . . . . . . . . . . . . . . . . . . . . 21  |-  ( (/) substr  <.
0 ,  0 >.
)  =  ( A substr  <. L ,  L >. )
41 nn0cn 10236 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  NN0  ->  L  e.  CC )
4241subidd 9404 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  -  L )  =  0 )
4342opeq1d 3992 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. ( L  -  L ) ,  0 >.  =  <. 0 ,  0 >. )
4443oveq2d 6100 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( (/) substr  <.
( L  -  L
) ,  0 >.
)  =  ( (/) substr  <.
0 ,  0 >.
) )
4541addid1d 9271 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  +  0 )  =  L )
4645opeq2d 3993 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. L , 
( L  +  0 ) >.  =  <. L ,  L >. )
4746oveq2d 6100 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( A substr  <. L ,  ( L  +  0 ) >.
)  =  ( A substr  <. L ,  L >. ) )
4840, 44, 473eqtr4a 2496 . . . . . . . . . . . . . . . . . . . 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 2498 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  ( M  e.  NN0  <->  L  e.  NN0 ) )
51 oveq1 6091 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  =  L  ->  ( M  -  L )  =  ( L  -  L ) )
5251opeq1d 3992 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. ( M  -  L ) ,  0 >.  =  <. ( L  -  L ) ,  0 >. )
5352oveq2d 6100 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( (/) substr  <.
( L  -  L
) ,  0 >.
) )
54 opeq1 3986 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. M , 
( L  +  0 ) >.  =  <. L ,  ( L  + 
0 ) >. )
5554oveq2d 6100 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( A substr  <. M ,  ( L  +  0 )
>. )  =  ( A substr  <. L ,  ( L  +  0 )
>. ) )
5653, 55eqeq12d 2452 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  (
( (/) substr  <. ( M  -  L ) ,  0
>. )  =  ( A substr  <. M ,  ( L  +  0 )
>. )  <->  ( (/) substr  <. ( L  -  L ) ,  0 >. )  =  ( A substr  <. L , 
( L  +  0 ) >. ) ) )
5749, 50, 563imtr4d 261 . . . . . . . . . . . . . . . . . 18  |-  ( M  =  L  ->  ( M  e.  NN0  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) ) )
5857com12 30 . . . . . . . . . . . . . . . . 17  |-  ( M  e.  NN0  ->  ( M  =  L  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) ) )
5958a1d 24 . . . . . . . . . . . . . . . 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 421 . . . . . . . . . . . . . 14  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( M  =  L  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
6236, 61syld 43 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( L  <_  M  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
6362imp 420 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  L  <_  M
)  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
64 swrdcl 11771 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  e. Word  V )
65 ccatrid 11754 . . . . . . . . . . . . . . . 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 189 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  A )  e.  NN0  ->  L  e.  CC )
6810, 67syl 16 . . . . . . . . . . . . . . . . . 18  |-  ( A  e. Word  V  ->  L  e.  CC )
69 addid1 9251 . . . . . . . . . . . . . . . . . . 19  |-  ( L  e.  CC  ->  ( L  +  0 )  =  L )
7069eqcomd 2443 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  CC  ->  L  =  ( L  + 
0 ) )
7168, 70syl 16 . . . . . . . . . . . . . . . . 17  |-  ( A  e. Word  V  ->  L  =  ( L  + 
0 ) )
7271opeq2d 3993 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  <. M ,  L >.  =  <. M , 
( L  +  0 ) >. )
7372oveq2d 6100 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
7466, 73eqtrd 2470 . . . . . . . . . . . . . 14  |-  ( A  e. Word  V  ->  (
( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7574adantr 453 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( ( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
7675adantr 453 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  -.  L  <_  M )  ->  (
( A substr  <. M ,  L >. ) concat  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7763, 76ifeqda 28066 . . . . . . . . . . 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 425 . . . . . . . . . 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 712 . . . . . . . . 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 6092 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  ( L  +  ( # `  B
) )  =  ( L  +  0 ) )
8180oveq2d 6100 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  (
0 ... ( L  +  ( # `  B ) ) )  =  ( 0 ... ( L  +  0 ) ) )
8281eleq2d 2505 . . . . . . . . . . . 12  |-  ( (
# `  B )  =  0  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B ) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
8382adantr 453 . . . . . . . . . . 11  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
84 simpr 449 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  B  =  (/) )
85 opeq2 3987 . . . . . . . . . . . . . . 15  |-  ( (
# `  B )  =  0  ->  <. ( M  -  L ) ,  ( # `  B
) >.  =  <. ( M  -  L ) ,  0 >. )
8685adantr 453 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  <. ( M  -  L
) ,  ( # `  B ) >.  =  <. ( M  -  L ) ,  0 >. )
8784, 86oveq12d 6102 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. )  =  (
(/) substr  <. ( M  -  L ) ,  0
>. ) )
88 oveq2 6092 . . . . . . . . . . . . . 14  |-  ( B  =  (/)  ->  ( ( A substr  <. M ,  L >. ) concat  B )  =  ( ( A substr  <. M ,  L >. ) concat  (/) ) )
8988adantl 454 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( ( A substr  <. M ,  L >. ) concat  B )  =  ( ( A substr  <. M ,  L >. ) concat  (/) ) )
9087, 89ifeq12d 3757 . . . . . . . . . . . 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 3993 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  <. M , 
( L  +  (
# `  B )
) >.  =  <. M , 
( L  +  0 ) >. )
9291oveq2d 6100 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  ( A substr  <. M ,  ( L  +  ( # `  B ) ) >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
9392adantr 453 . . . . . . . . . . . 12  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( A substr  <. M , 
( L  +  (
# `  B )
) >. )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) )
9490, 93eqeq12d 2452 . . . . . . . . . . 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 313 . . . . . . . . . 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 696 . . . . . . . . 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 225 . . . . . . . 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 651 . . . . . . 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 425 . . . . . 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 43 . . . . 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 75 . . . 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 420 . . 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 453 . 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 2501 . . . . . . . 8  |-  ( L  e.  NN0  <->  ( # `  A
)  e.  NN0 )
105104, 14sylbir 206 . . . . . . 7  |-  ( (
# `  A )  e.  NN0  ->  L  e.  RR )
10610, 105syl 16 . . . . . 6  |-  ( A  e. Word  V  ->  L  e.  RR )
107 nn0re 10235 . . . . . . 7  |-  ( (
# `  B )  e.  NN0  ->  ( # `  B
)  e.  RR )
1081, 107syl 16 . . . . . 6  |-  ( B  e. Word  V  ->  ( # `
 B )  e.  RR )
109 leaddle0 28116 . . . . . 6  |-  ( ( L  e.  RR  /\  ( # `  B )  e.  RR )  -> 
( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
110106, 108, 109syl2an 465 . . . . 5  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
111 pm2.24 104 . . . . 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 221 . . . 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 453 . . 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 420 . 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 153 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 set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 178    /\ wa 360    /\ w3a 937    = wceq 1653    e. wcel 1726   (/)c0 3630   ifcif 3741   <.cop 3819   class class class wbr 4215   ` cfv 5457  (class class class)co 6084   CCcc 8993   RRcr 8994   0cc0 8995    + caddc 8998    <_ cle 9126    - cmin 9296   NN0cn0 10226   ...cfz 11048   #chash 11623  Word cword 11722   concat cconcat 11723   substr csubstr 11725
This theorem is referenced by:  swrdccat3b  28253
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-rep 4323  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704  ax-cnex 9051  ax-resscn 9052  ax-1cn 9053  ax-icn 9054  ax-addcl 9055  ax-addrcl 9056  ax-mulcl 9057  ax-mulrcl 9058  ax-mulcom 9059  ax-addass 9060  ax-mulass 9061  ax-distr 9062  ax-i2m1 9063  ax-1ne0 9064  ax-1rid 9065  ax-rnegex 9066  ax-rrecex 9067  ax-cnre 9068  ax-pre-lttri 9069  ax-pre-lttrn 9070  ax-pre-ltadd 9071  ax-pre-mulgt0 9072
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-int 4053  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-tr 4306  df-eprel 4497  df-id 4501  df-po 4506  df-so 4507  df-fr 4544  df-we 4546  df-ord 4587  df-on 4588  df-lim 4589  df-suc 4590  df-om 4849  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-1st 6352  df-2nd 6353  df-riota 6552  df-recs 6636  df-rdg 6671  df-1o 6727  df-oadd 6731  df-er 6908  df-en 7113  df-dom 7114  df-sdom 7115  df-fin 7116  df-card 7831  df-pnf 9127  df-mnf 9128  df-xr 9129  df-ltxr 9130  df-le 9131  df-sub 9298  df-neg 9299  df-nn 10006  df-n0 10227  df-z 10288  df-uz 10494  df-fz 11049  df-fzo 11141  df-hash 11624  df-word 11728  df-concat 11729  df-substr 11731
  Copyright terms: Public domain W3C validator