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

Theorem swrdccat3blem 12905
Description: Lemma for swrdccat3b 12906. (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 >. ) ++  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) )

Proof of Theorem swrdccat3blem
StepHypRef Expression
1 lencl 12737 . . . . . . . 8  |-  ( B  e. Word  V  ->  ( # `
 B )  e. 
NN0 )
2 nn0le0eq0 10922 . . . . . . . . 9  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  <->  ( # `  B
)  =  0 ) )
32biimpd 212 . . . . . . . 8  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  ->  ( # `  B
)  =  0 ) )
41, 3syl 17 . . . . . . 7  |-  ( B  e. Word  V  ->  (
( # `  B )  <_  0  ->  ( # `
 B )  =  0 ) )
54adantl 473 . . . . . 6  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  <_  0  ->  (
# `  B )  =  0 ) )
6 hasheq0 12582 . . . . . . . . . . 11  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  <->  B  =  (/) ) )
76biimpd 212 . . . . . . . . . 10  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  ->  B  =  (/) ) )
87adantl 473 . . . . . . . . 9  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  =  0  ->  B  =  (/) ) )
98imp 436 . . . . . . . 8  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  ( # `  B
)  =  0 )  ->  B  =  (/) )
10 lencl 12737 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
11 swrdccatin12.l . . . . . . . . . . . . . . . . . . 19  |-  L  =  ( # `  A
)
1211eqcomi 2480 . . . . . . . . . . . . . . . . . 18  |-  ( # `  A )  =  L
1312eleq1i 2540 . . . . . . . . . . . . . . . . 17  |-  ( (
# `  A )  e.  NN0  <->  L  e.  NN0 )
14 nn0re 10902 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  NN0  ->  L  e.  RR )
15 elfz2nn0 11911 . . . . . . . . . . . . . . . . . . 19  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  <->  ( M  e.  NN0  /\  ( L  +  0 )  e. 
NN0  /\  M  <_  ( L  +  0 ) ) )
16 recn 9647 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( L  e.  RR  ->  L  e.  CC )
1716addid1d 9851 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( L  +  0 )  =  L )
1817breq2d 4407 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  <->  M  <_  L ) )
19 nn0re 10902 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  |-  ( M  e.  NN0  ->  M  e.  RR )
2019anim1i 578 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  |-  ( ( M  e.  NN0  /\  L  e.  RR )  ->  ( M  e.  RR  /\  L  e.  RR ) )
2120ancoms 460 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( M  e.  RR  /\  L  e.  RR ) )
22 letri3 9737 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( M  e.  RR  /\  L  e.  RR )  ->  ( M  =  L  <-> 
( M  <_  L  /\  L  <_  M ) ) )
2321, 22syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( M  =  L  <-> 
( M  <_  L  /\  L  <_  M ) ) )
2423biimprd 231 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( ( M  <_  L  /\  L  <_  M
)  ->  M  =  L ) )
2524exp4b 618 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( M  e.  NN0  ->  ( M  <_  L  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2625com23 80 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  L  ->  ( M  e.  NN0  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2718, 26sylbid 223 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  ->  ( M  e.  NN0  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2827com3l 83 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  <_  ( L  + 
0 )  ->  ( M  e.  NN0  ->  ( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) ) )
2928impcom 437 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( M  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) )
30293adant2 1049 . . . . . . . . . . . . . . . . . . . 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 225 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  RR  ->  ( M  e.  ( 0 ... ( L  + 
0 ) )  -> 
( L  <_  M  ->  M  =  L ) ) )
3314, 32syl 17 . . . . . . . . . . . . . . . . 17  |-  ( L  e.  NN0  ->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  ( L  <_  M  ->  M  =  L ) ) )
3413, 33sylbi 200 . . . . . . . . . . . . . . . 16  |-  ( (
# `  A )  e.  NN0  ->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  ( L  <_  M  ->  M  =  L ) ) )
3510, 34syl 17 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( M  e.  ( 0 ... ( L  + 
0 ) )  -> 
( L  <_  M  ->  M  =  L ) ) )
3635imp 436 . . . . . . . . . . . . . 14  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( L  <_  M  ->  M  =  L ) )
37 elfznn0 11913 . . . . . . . . . . . . . . . 16  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  M  e.  NN0 )
38 swrd00 12828 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( (/) substr  <.
0 ,  0 >.
)  =  (/)
39 swrd00 12828 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( A substr  <. L ,  L >. )  =  (/)
4038, 39eqtr4i 2496 . . . . . . . . . . . . . . . . . . . . 21  |-  ( (/) substr  <.
0 ,  0 >.
)  =  ( A substr  <. L ,  L >. )
41 nn0cn 10903 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  NN0  ->  L  e.  CC )
4241subidd 9993 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  -  L )  =  0 )
4342opeq1d 4164 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. ( L  -  L ) ,  0 >.  =  <. 0 ,  0 >. )
4443oveq2d 6324 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( (/) substr  <.
( L  -  L
) ,  0 >.
)  =  ( (/) substr  <.
0 ,  0 >.
) )
4541addid1d 9851 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  +  0 )  =  L )
4645opeq2d 4165 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. L , 
( L  +  0 ) >.  =  <. L ,  L >. )
4746oveq2d 6324 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( A substr  <. L ,  ( L  +  0 ) >.
)  =  ( A substr  <. L ,  L >. ) )
4840, 44, 473eqtr4a 2531 . . . . . . . . . . . . . . . . . . . 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 2537 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  ( M  e.  NN0  <->  L  e.  NN0 ) )
51 oveq1 6315 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  =  L  ->  ( M  -  L )  =  ( L  -  L ) )
5251opeq1d 4164 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. ( M  -  L ) ,  0 >.  =  <. ( L  -  L ) ,  0 >. )
5352oveq2d 6324 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( (/) substr  <.
( L  -  L
) ,  0 >.
) )
54 opeq1 4158 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. M , 
( L  +  0 ) >.  =  <. L ,  ( L  + 
0 ) >. )
5554oveq2d 6324 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( A substr  <. M ,  ( L  +  0 )
>. )  =  ( A substr  <. L ,  ( L  +  0 )
>. ) )
5653, 55eqeq12d 2486 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  (
( (/) substr  <. ( M  -  L ) ,  0
>. )  =  ( A substr  <. M ,  ( L  +  0 )
>. )  <->  ( (/) substr  <. ( L  -  L ) ,  0 >. )  =  ( A substr  <. L , 
( L  +  0 ) >. ) ) )
5749, 50, 563imtr4d 276 . . . . . . . . . . . . . . . . . 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 17 . . . . . . . . . . . . . . 15  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  ( A  e. Word  V  ->  ( M  =  L  ->  (
(/) substr  <. ( M  -  L ) ,  0
>. )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) ) ) )
6160impcom 437 . . . . . . . . . . . . . 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 436 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  L  <_  M
)  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
64 swrdcl 12829 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  e. Word  V )
65 ccatrid 12782 . . . . . . . . . . . . . . . 16  |-  ( ( A substr  <. M ,  L >. )  e. Word  V  -> 
( ( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M ,  L >. ) )
6664, 65syl 17 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  (
( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M ,  L >. ) )
6713, 41sylbi 200 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  A )  e.  NN0  ->  L  e.  CC )
6810, 67syl 17 . . . . . . . . . . . . . . . . . 18  |-  ( A  e. Word  V  ->  L  e.  CC )
69 addid1 9831 . . . . . . . . . . . . . . . . . . 19  |-  ( L  e.  CC  ->  ( L  +  0 )  =  L )
7069eqcomd 2477 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  CC  ->  L  =  ( L  + 
0 ) )
7168, 70syl 17 . . . . . . . . . . . . . . . . 17  |-  ( A  e. Word  V  ->  L  =  ( L  + 
0 ) )
7271opeq2d 4165 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  <. M ,  L >.  =  <. M , 
( L  +  0 ) >. )
7372oveq2d 6324 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
7466, 73eqtrd 2505 . . . . . . . . . . . . . 14  |-  ( A  e. Word  V  ->  (
( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7574adantr 472 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( ( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) )
7675adantr 472 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  -.  L  <_  M )  ->  (
( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7763, 76ifeqda 3905 . . . . . . . . . . 11  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) ++  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7877ex 441 . . . . . . . . . 10  |-  ( A  e. Word  V  ->  ( M  e.  ( 0 ... ( L  + 
0 ) )  ->  if ( L  <_  M ,  ( (/) substr  <. ( M  -  L ) ,  0 >. ) ,  ( ( A substr  <. M ,  L >. ) ++  (/) ) )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) ) )
7978ad3antrrr 744 . . . . . . . . 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 >. ) ++  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
80 oveq2 6316 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  ( L  +  ( # `  B
) )  =  ( L  +  0 ) )
8180oveq2d 6324 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  (
0 ... ( L  +  ( # `  B ) ) )  =  ( 0 ... ( L  +  0 ) ) )
8281eleq2d 2534 . . . . . . . . . . . 12  |-  ( (
# `  B )  =  0  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B ) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
8382adantr 472 . . . . . . . . . . 11  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
84 simpr 468 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  B  =  (/) )
85 opeq2 4159 . . . . . . . . . . . . . . 15  |-  ( (
# `  B )  =  0  ->  <. ( M  -  L ) ,  ( # `  B
) >.  =  <. ( M  -  L ) ,  0 >. )
8685adantr 472 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  <. ( M  -  L
) ,  ( # `  B ) >.  =  <. ( M  -  L ) ,  0 >. )
8784, 86oveq12d 6326 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. )  =  (
(/) substr  <. ( M  -  L ) ,  0
>. ) )
88 oveq2 6316 . . . . . . . . . . . . . 14  |-  ( B  =  (/)  ->  ( ( A substr  <. M ,  L >. ) ++  B )  =  ( ( A substr  <. M ,  L >. ) ++  (/) ) )
8988adantl 473 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( ( A substr  <. M ,  L >. ) ++  B )  =  ( ( A substr  <. M ,  L >. ) ++  (/) ) )
9087, 89ifeq12d 3892 . . . . . . . . . . . 12  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) ++  B ) )  =  if ( L  <_  M , 
( (/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) ++  (/) ) ) )
9180opeq2d 4165 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  <. M , 
( L  +  (
# `  B )
) >.  =  <. M , 
( L  +  0 ) >. )
9291oveq2d 6324 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  ( A substr  <. M ,  ( L  +  ( # `  B ) ) >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
9392adantr 472 . . . . . . . . . . . 12  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( A substr  <. M , 
( L  +  (
# `  B )
) >. )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) )
9490, 93eqeq12d 2486 . . . . . . . . . . 11  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  (
# `  B ) >. ) ,  ( ( A substr  <. M ,  L >. ) ++  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. )  <->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) ++  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
9583, 94imbi12d 327 . . . . . . . . . 10  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( ( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  ->  if ( L  <_  M ,  ( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
)  <->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) ++  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) ) )
9695adantll 728 . . . . . . . . 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
)  <->  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  if ( L  <_  M ,  (
(/) substr  <. ( M  -  L ) ,  0
>. ) ,  ( ( A substr  <. M ,  L >. ) ++  (/) ) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) ) )
9779, 96mpbird 240 . . . . . . . 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
989, 97mpdan 681 . . . . . . 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
9998ex 441 . . . . . 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 >. ) ++  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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
101100com23 80 . . . 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
102101imp 436 . . 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 >. ) ++  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) ) )
103102adantr 472 . 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
10411eleq1i 2540 . . . . . . . 8  |-  ( L  e.  NN0  <->  ( # `  A
)  e.  NN0 )
105104, 14sylbir 218 . . . . . . 7  |-  ( (
# `  A )  e.  NN0  ->  L  e.  RR )
10610, 105syl 17 . . . . . 6  |-  ( A  e. Word  V  ->  L  e.  RR )
1071nn0red 10950 . . . . . 6  |-  ( B  e. Word  V  ->  ( # `
 B )  e.  RR )
108 leaddle0 10150 . . . . . 6  |-  ( ( L  e.  RR  /\  ( # `  B )  e.  RR )  -> 
( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
109106, 107, 108syl2an 485 . . . . 5  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
110 pm2.24 112 . . . . 5  |-  ( (
# `  B )  <_  0  ->  ( -.  ( # `  B )  <_  0  ->  if ( L  <_  M , 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. ) ,  ( ( A substr  <. M ,  L >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
111109, 110syl6bi 236 . . . 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
112111adantr 472 . . 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 >. ) ++  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) ) ) )
113112imp 436 . 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 >. ) ++  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) ) )
114103, 113pm2.61d 163 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 >. ) ++  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 189    /\ wa 376    /\ w3a 1007    = wceq 1452    e. wcel 1904   (/)c0 3722   ifcif 3872   <.cop 3965   class class class wbr 4395   ` cfv 5589  (class class class)co 6308   CCcc 9555   RRcr 9556   0cc0 9557    + caddc 9560    <_ cle 9694    - cmin 9880   NN0cn0 10893   ...cfz 11810   #chash 12553  Word cword 12703   ++ cconcat 12705   substr csubstr 12707
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-rep 4508  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rmo 2764  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-int 4227  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-we 4800  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-1o 7200  df-oadd 7204  df-er 7381  df-en 7588  df-dom 7589  df-sdom 7590  df-fin 7591  df-card 8391  df-cda 8616  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-nn 10632  df-2 10690  df-n0 10894  df-z 10962  df-uz 11183  df-fz 11811  df-fzo 11943  df-hash 12554  df-word 12711  df-concat 12713  df-substr 12715
This theorem is referenced by:  swrdccat3b  12906
  Copyright terms: Public domain W3C validator