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

Theorem swrdccat3blem 12776
Description: Lemma for swrdccat3b 12777. (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 12614 . . . . . . . 8  |-  ( B  e. Word  V  ->  ( # `
 B )  e. 
NN0 )
2 nn0le0eq0 10865 . . . . . . . . 9  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  <->  ( # `  B
)  =  0 ) )
32biimpd 207 . . . . . . . 8  |-  ( (
# `  B )  e.  NN0  ->  ( ( # `
 B )  <_ 
0  ->  ( # `  B
)  =  0 ) )
41, 3syl 17 . . . . . . 7  |-  ( B  e. Word  V  ->  (
( # `  B )  <_  0  ->  ( # `
 B )  =  0 ) )
54adantl 464 . . . . . 6  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  <_  0  ->  (
# `  B )  =  0 ) )
6 hasheq0 12481 . . . . . . . . . . 11  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  <->  B  =  (/) ) )
76biimpd 207 . . . . . . . . . 10  |-  ( B  e. Word  V  ->  (
( # `  B )  =  0  ->  B  =  (/) ) )
87adantl 464 . . . . . . . . 9  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( # `  B
)  =  0  ->  B  =  (/) ) )
98imp 427 . . . . . . . 8  |-  ( ( ( A  e. Word  V  /\  B  e. Word  V )  /\  ( # `  B
)  =  0 )  ->  B  =  (/) )
10 lencl 12614 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
11 swrdccatin12.l . . . . . . . . . . . . . . . . . . 19  |-  L  =  ( # `  A
)
1211eqcomi 2415 . . . . . . . . . . . . . . . . . 18  |-  ( # `  A )  =  L
1312eleq1i 2479 . . . . . . . . . . . . . . . . 17  |-  ( (
# `  A )  e.  NN0  <->  L  e.  NN0 )
14 nn0re 10845 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  NN0  ->  L  e.  RR )
15 elfz2nn0 11824 . . . . . . . . . . . . . . . . . . 19  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  <->  ( M  e.  NN0  /\  ( L  +  0 )  e. 
NN0  /\  M  <_  ( L  +  0 ) ) )
16 recn 9612 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( L  e.  RR  ->  L  e.  CC )
1716addid1d 9814 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( L  +  0 )  =  L )
1817breq2d 4407 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  <->  M  <_  L ) )
19 nn0re 10845 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  |-  ( M  e.  NN0  ->  M  e.  RR )
2019anim1i 566 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  |-  ( ( M  e.  NN0  /\  L  e.  RR )  ->  ( M  e.  RR  /\  L  e.  RR ) )
2120ancoms 451 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( M  e.  RR  /\  L  e.  RR ) )
22 letri3 9701 . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 223 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( L  e.  RR  /\  M  e.  NN0 )  -> 
( ( M  <_  L  /\  L  <_  M
)  ->  M  =  L ) )
2524exp4b 605 . . . . . . . . . . . . . . . . . . . . . . . . 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 428 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( M  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) )
30293adant2 1016 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( M  e.  NN0  /\  ( L  +  0
)  e.  NN0  /\  M  <_  ( L  + 
0 ) )  -> 
( L  e.  RR  ->  ( L  <_  M  ->  M  =  L ) ) )
3130com12 29 . . . . . . . . . . . . . . . . . . 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 17 . . . . . . . . . . . . . . . . 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 17 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( M  e.  ( 0 ... ( L  + 
0 ) )  -> 
( L  <_  M  ->  M  =  L ) ) )
3635imp 427 . . . . . . . . . . . . . 14  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( L  <_  M  ->  M  =  L ) )
37 elfznn0 11826 . . . . . . . . . . . . . . . 16  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  M  e.  NN0 )
38 swrd00 12699 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( (/) substr  <.
0 ,  0 >.
)  =  (/)
39 swrd00 12699 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( A substr  <. L ,  L >. )  =  (/)
4038, 39eqtr4i 2434 . . . . . . . . . . . . . . . . . . . . 21  |-  ( (/) substr  <.
0 ,  0 >.
)  =  ( A substr  <. L ,  L >. )
41 nn0cn 10846 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  NN0  ->  L  e.  CC )
4241subidd 9955 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  -  L )  =  0 )
4342opeq1d 4165 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. ( L  -  L ) ,  0 >.  =  <. 0 ,  0 >. )
4443oveq2d 6294 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( (/) substr  <.
( L  -  L
) ,  0 >.
)  =  ( (/) substr  <.
0 ,  0 >.
) )
4541addid1d 9814 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  +  0 )  =  L )
4645opeq2d 4166 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. L , 
( L  +  0 ) >.  =  <. L ,  L >. )
4746oveq2d 6294 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( A substr  <. L ,  ( L  +  0 ) >.
)  =  ( A substr  <. L ,  L >. ) )
4840, 44, 473eqtr4a 2469 . . . . . . . . . . . . . . . . . . . 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 2474 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  ( M  e.  NN0  <->  L  e.  NN0 ) )
51 oveq1 6285 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  =  L  ->  ( M  -  L )  =  ( L  -  L ) )
5251opeq1d 4165 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. ( M  -  L ) ,  0 >.  =  <. ( L  -  L ) ,  0 >. )
5352oveq2d 6294 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( (/) substr  <.
( L  -  L
) ,  0 >.
) )
54 opeq1 4159 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. M , 
( L  +  0 ) >.  =  <. L ,  ( L  + 
0 ) >. )
5554oveq2d 6294 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( A substr  <. M ,  ( L  +  0 )
>. )  =  ( A substr  <. L ,  ( L  +  0 )
>. ) )
5653, 55eqeq12d 2424 . . . . . . . . . . . . . . . . . . 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 29 . . . . . . . . . . . . . . . . 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 428 . . . . . . . . . . . . . 14  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( M  =  L  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
6236, 61syld 42 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( L  <_  M  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) ) )
6362imp 427 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  L  <_  M
)  ->  ( (/) substr  <. ( M  -  L ) ,  0 >. )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
64 swrdcl 12700 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  e. Word  V )
65 ccatrid 12658 . . . . . . . . . . . . . . . 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 195 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  A )  e.  NN0  ->  L  e.  CC )
6810, 67syl 17 . . . . . . . . . . . . . . . . . 18  |-  ( A  e. Word  V  ->  L  e.  CC )
69 addid1 9794 . . . . . . . . . . . . . . . . . . 19  |-  ( L  e.  CC  ->  ( L  +  0 )  =  L )
7069eqcomd 2410 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  CC  ->  L  =  ( L  + 
0 ) )
7168, 70syl 17 . . . . . . . . . . . . . . . . 17  |-  ( A  e. Word  V  ->  L  =  ( L  + 
0 ) )
7271opeq2d 4166 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  <. M ,  L >.  =  <. M , 
( L  +  0 ) >. )
7372oveq2d 6294 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
7466, 73eqtrd 2443 . . . . . . . . . . . . . 14  |-  ( A  e. Word  V  ->  (
( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7574adantr 463 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... ( L  + 
0 ) ) )  ->  ( ( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) )
7675adantr 463 . . . . . . . . . . . 12  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... ( L  + 
0 ) ) )  /\  -.  L  <_  M )  ->  (
( A substr  <. M ,  L >. ) ++  (/) )  =  ( A substr  <. M , 
( L  +  0 ) >. ) )
7763, 76ifeqda 3918 . . . . . . . . . . 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 432 . . . . . . . . . 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 728 . . . . . . . . 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 6286 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  ( L  +  ( # `  B
) )  =  ( L  +  0 ) )
8180oveq2d 6294 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  (
0 ... ( L  +  ( # `  B ) ) )  =  ( 0 ... ( L  +  0 ) ) )
8281eleq2d 2472 . . . . . . . . . . . 12  |-  ( (
# `  B )  =  0  ->  ( M  e.  ( 0 ... ( L  +  ( # `  B ) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
8382adantr 463 . . . . . . . . . . 11  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( M  e.  ( 0 ... ( L  +  ( # `  B
) ) )  <->  M  e.  ( 0 ... ( L  +  0 ) ) ) )
84 simpr 459 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  B  =  (/) )
85 opeq2 4160 . . . . . . . . . . . . . . 15  |-  ( (
# `  B )  =  0  ->  <. ( M  -  L ) ,  ( # `  B
) >.  =  <. ( M  -  L ) ,  0 >. )
8685adantr 463 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  <. ( M  -  L
) ,  ( # `  B ) >.  =  <. ( M  -  L ) ,  0 >. )
8784, 86oveq12d 6296 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. )  =  (
(/) substr  <. ( M  -  L ) ,  0
>. ) )
88 oveq2 6286 . . . . . . . . . . . . . 14  |-  ( B  =  (/)  ->  ( ( A substr  <. M ,  L >. ) ++  B )  =  ( ( A substr  <. M ,  L >. ) ++  (/) ) )
8988adantl 464 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( ( A substr  <. M ,  L >. ) ++  B )  =  ( ( A substr  <. M ,  L >. ) ++  (/) ) )
9087, 89ifeq12d 3905 . . . . . . . . . . . 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 4166 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  <. M , 
( L  +  (
# `  B )
) >.  =  <. M , 
( L  +  0 ) >. )
9291oveq2d 6294 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  ( A substr  <. M ,  ( L  +  ( # `  B ) ) >.
)  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
9392adantr 463 . . . . . . . . . . . 12  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( A substr  <. M , 
( L  +  (
# `  B )
) >. )  =  ( A substr  <. M ,  ( L  +  0 )
>. ) )
9490, 93eqeq12d 2424 . . . . . . . . . . 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 318 . . . . . . . . . 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 712 . . . . . . . . 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 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) )
989, 97mpdan 666 . . . . . . 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 432 . . . . . 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 42 . . . . 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 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
102101imp 427 . . 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 463 . 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 2479 . . . . . . . 8  |-  ( L  e.  NN0  <->  ( # `  A
)  e.  NN0 )
105104, 14sylbir 213 . . . . . . 7  |-  ( (
# `  A )  e.  NN0  ->  L  e.  RR )
10610, 105syl 17 . . . . . 6  |-  ( A  e. Word  V  ->  L  e.  RR )
1071nn0red 10894 . . . . . 6  |-  ( B  e. Word  V  ->  ( # `
 B )  e.  RR )
108 leaddle0 10108 . . . . . 6  |-  ( ( L  e.  RR  /\  ( # `  B )  e.  RR )  -> 
( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
109106, 107, 108syl2an 475 . . . . 5  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( L  +  ( # `  B ) )  <_  L  <->  ( # `  B
)  <_  0 ) )
110 pm2.24 109 . . . . 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 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 >. ) ++  B ) )  =  ( A substr  <. M ,  ( L  +  ( # `  B
) ) >. )
) ) )
112111adantr 463 . . 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 427 . 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 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 >. ) ++  B ) )  =  ( A substr  <. M , 
( L  +  (
# `  B )
) >. ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 367    /\ w3a 974    = wceq 1405    e. wcel 1842   (/)c0 3738   ifcif 3885   <.cop 3978   class class class wbr 4395   ` cfv 5569  (class class class)co 6278   CCcc 9520   RRcr 9521   0cc0 9522    + caddc 9525    <_ cle 9659    - cmin 9841   NN0cn0 10836   ...cfz 11726   #chash 12452  Word cword 12583   ++ cconcat 12585   substr csubstr 12587
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1639  ax-4 1652  ax-5 1725  ax-6 1771  ax-7 1814  ax-8 1844  ax-9 1846  ax-10 1861  ax-11 1866  ax-12 1878  ax-13 2026  ax-ext 2380  ax-rep 4507  ax-sep 4517  ax-nul 4525  ax-pow 4572  ax-pr 4630  ax-un 6574  ax-cnex 9578  ax-resscn 9579  ax-1cn 9580  ax-icn 9581  ax-addcl 9582  ax-addrcl 9583  ax-mulcl 9584  ax-mulrcl 9585  ax-mulcom 9586  ax-addass 9587  ax-mulass 9588  ax-distr 9589  ax-i2m1 9590  ax-1ne0 9591  ax-1rid 9592  ax-rnegex 9593  ax-rrecex 9594  ax-cnre 9595  ax-pre-lttri 9596  ax-pre-lttrn 9597  ax-pre-ltadd 9598  ax-pre-mulgt0 9599
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 975  df-3an 976  df-tru 1408  df-ex 1634  df-nf 1638  df-sb 1764  df-eu 2242  df-mo 2243  df-clab 2388  df-cleq 2394  df-clel 2397  df-nfc 2552  df-ne 2600  df-nel 2601  df-ral 2759  df-rex 2760  df-reu 2761  df-rmo 2762  df-rab 2763  df-v 3061  df-sbc 3278  df-csb 3374  df-dif 3417  df-un 3419  df-in 3421  df-ss 3428  df-pss 3430  df-nul 3739  df-if 3886  df-pw 3957  df-sn 3973  df-pr 3975  df-tp 3977  df-op 3979  df-uni 4192  df-int 4228  df-iun 4273  df-br 4396  df-opab 4454  df-mpt 4455  df-tr 4490  df-eprel 4734  df-id 4738  df-po 4744  df-so 4745  df-fr 4782  df-we 4784  df-xp 4829  df-rel 4830  df-cnv 4831  df-co 4832  df-dm 4833  df-rn 4834  df-res 4835  df-ima 4836  df-pred 5367  df-ord 5413  df-on 5414  df-lim 5415  df-suc 5416  df-iota 5533  df-fun 5571  df-fn 5572  df-f 5573  df-f1 5574  df-fo 5575  df-f1o 5576  df-fv 5577  df-riota 6240  df-ov 6281  df-oprab 6282  df-mpt2 6283  df-om 6684  df-1st 6784  df-2nd 6785  df-wrecs 7013  df-recs 7075  df-rdg 7113  df-1o 7167  df-oadd 7171  df-er 7348  df-en 7555  df-dom 7556  df-sdom 7557  df-fin 7558  df-card 8352  df-cda 8580  df-pnf 9660  df-mnf 9661  df-xr 9662  df-ltxr 9663  df-le 9664  df-sub 9843  df-neg 9844  df-nn 10577  df-2 10635  df-n0 10837  df-z 10906  df-uz 11128  df-fz 11727  df-fzo 11855  df-hash 12453  df-word 12591  df-concat 12593  df-substr 12595
This theorem is referenced by:  swrdccat3b  12777
  Copyright terms: Public domain W3C validator