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

Theorem swrdccat3blem 12386
Description: Lemma for swrdccat3b 12387. (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 12249 . . . . . . . 8  |-  ( B  e. Word  V  ->  ( # `
 B )  e. 
NN0 )
2 nn0le0eq0 10608 . . . . . . . . 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 12131 . . . . . . . . . . 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 12249 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
11 swrdccatin12.l . . . . . . . . . . . . . . . . . . 19  |-  L  =  ( # `  A
)
1211eqcomi 2447 . . . . . . . . . . . . . . . . . 18  |-  ( # `  A )  =  L
1312eleq1i 2506 . . . . . . . . . . . . . . . . 17  |-  ( (
# `  A )  e.  NN0  <->  L  e.  NN0 )
14 nn0re 10588 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  NN0  ->  L  e.  RR )
15 elfz2nn0 11480 . . . . . . . . . . . . . . . . . . 19  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  <->  ( M  e.  NN0  /\  ( L  +  0 )  e. 
NN0  /\  M  <_  ( L  +  0 ) ) )
16 recn 9372 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( L  e.  RR  ->  L  e.  CC )
1716addid1d 9569 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( L  e.  RR  ->  ( L  +  0 )  =  L )
1817breq2d 4304 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  RR  ->  ( M  <_  ( L  + 
0 )  <->  M  <_  L ) )
19 nn0re 10588 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 9460 . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 1007 . . . . . . . . . . . . . . . . . . . 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 11481 . . . . . . . . . . . . . . . 16  |-  ( M  e.  ( 0 ... ( L  +  0 ) )  ->  M  e.  NN0 )
38 swrd00 12314 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( (/) substr  <.
0 ,  0 >.
)  =  (/)
39 swrd00 12314 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( A substr  <. L ,  L >. )  =  (/)
4038, 39eqtr4i 2466 . . . . . . . . . . . . . . . . . . . . 21  |-  ( (/) substr  <.
0 ,  0 >.
)  =  ( A substr  <. L ,  L >. )
41 nn0cn 10589 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( L  e.  NN0  ->  L  e.  CC )
4241subidd 9707 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  -  L )  =  0 )
4342opeq1d 4065 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. ( L  -  L ) ,  0 >.  =  <. 0 ,  0 >. )
4443oveq2d 6107 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( (/) substr  <.
( L  -  L
) ,  0 >.
)  =  ( (/) substr  <.
0 ,  0 >.
) )
4541addid1d 9569 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( L  e.  NN0  ->  ( L  +  0 )  =  L )
4645opeq2d 4066 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( L  e.  NN0  ->  <. L , 
( L  +  0 ) >.  =  <. L ,  L >. )
4746oveq2d 6107 . . . . . . . . . . . . . . . . . . . . 21  |-  ( L  e.  NN0  ->  ( A substr  <. L ,  ( L  +  0 ) >.
)  =  ( A substr  <. L ,  L >. ) )
4840, 44, 473eqtr4a 2501 . . . . . . . . . . . . . . . . . . . 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 2503 . . . . . . . . . . . . . . . . . . 19  |-  ( M  =  L  ->  ( M  e.  NN0  <->  L  e.  NN0 ) )
51 oveq1 6098 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( M  =  L  ->  ( M  -  L )  =  ( L  -  L ) )
5251opeq1d 4065 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. ( M  -  L ) ,  0 >.  =  <. ( L  -  L ) ,  0 >. )
5352oveq2d 6107 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( (/) substr  <.
( M  -  L
) ,  0 >.
)  =  ( (/) substr  <.
( L  -  L
) ,  0 >.
) )
54 opeq1 4059 . . . . . . . . . . . . . . . . . . . . 21  |-  ( M  =  L  ->  <. M , 
( L  +  0 ) >.  =  <. L ,  ( L  + 
0 ) >. )
5554oveq2d 6107 . . . . . . . . . . . . . . . . . . . 20  |-  ( M  =  L  ->  ( A substr  <. M ,  ( L  +  0 )
>. )  =  ( A substr  <. L ,  ( L  +  0 )
>. ) )
5653, 55eqeq12d 2457 . . . . . . . . . . . . . . . . . . 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 12315 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  e. Word  V )
65 ccatrid 12285 . . . . . . . . . . . . . . . 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 9549 . . . . . . . . . . . . . . . . . . 19  |-  ( L  e.  CC  ->  ( L  +  0 )  =  L )
7069eqcomd 2448 . . . . . . . . . . . . . . . . . 18  |-  ( L  e.  CC  ->  L  =  ( L  + 
0 ) )
7168, 70syl 16 . . . . . . . . . . . . . . . . 17  |-  ( A  e. Word  V  ->  L  =  ( L  + 
0 ) )
7271opeq2d 4066 . . . . . . . . . . . . . . . 16  |-  ( A  e. Word  V  ->  <. M ,  L >.  =  <. M , 
( L  +  0 ) >. )
7372oveq2d 6107 . . . . . . . . . . . . . . 15  |-  ( A  e. Word  V  ->  ( A substr  <. M ,  L >. )  =  ( A substr  <. M ,  ( L  +  0 ) >.
) )
7466, 73eqtrd 2475 . . . . . . . . . . . . . 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 3822 . . . . . . . . . . 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 6099 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  ( L  +  ( # `  B
) )  =  ( L  +  0 ) )
8180oveq2d 6107 . . . . . . . . . . . . 13  |-  ( (
# `  B )  =  0  ->  (
0 ... ( L  +  ( # `  B ) ) )  =  ( 0 ... ( L  +  0 ) ) )
8281eleq2d 2510 . . . . . . . . . . . 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 4060 . . . . . . . . . . . . . . 15  |-  ( (
# `  B )  =  0  ->  <. ( M  -  L ) ,  ( # `  B
) >.  =  <. ( M  -  L ) ,  0 >. )
8685adantr 465 . . . . . . . . . . . . . 14  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  ->  <. ( M  -  L
) ,  ( # `  B ) >.  =  <. ( M  -  L ) ,  0 >. )
8784, 86oveq12d 6109 . . . . . . . . . . . . 13  |-  ( ( ( # `  B
)  =  0  /\  B  =  (/) )  -> 
( B substr  <. ( M  -  L ) ,  ( # `  B
) >. )  =  (
(/) substr  <. ( M  -  L ) ,  0
>. ) )
88 oveq2 6099 . . . . . . . . . . . . . 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 3809 . . . . . . . . . . . 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 4066 . . . . . . . . . . . . . 14  |-  ( (
# `  B )  =  0  ->  <. M , 
( L  +  (
# `  B )
) >.  =  <. M , 
( L  +  0 ) >. )
9291oveq2d 6107 . . . . . . . . . . . . 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 2457 . . . . . . . . . . 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 2506 . . . . . . . 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 10588 . . . . . . 7  |-  ( (
# `  B )  e.  NN0  ->  ( # `  B
)  e.  RR )
1081, 107syl 16 . . . . . 6  |-  ( B  e. Word  V  ->  ( # `
 B )  e.  RR )
109 leaddle0 9854 . . . . . 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 965    = wceq 1369    e. wcel 1756   (/)c0 3637   ifcif 3791   <.cop 3883   class class class wbr 4292   ` cfv 5418  (class class class)co 6091   CCcc 9280   RRcr 9281   0cc0 9282    + caddc 9285    <_ cle 9419    - cmin 9595   NN0cn0 10579   ...cfz 11437   #chash 12103  Word cword 12221   concat cconcat 12223   substr csubstr 12225
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 4403  ax-sep 4413  ax-nul 4421  ax-pow 4470  ax-pr 4531  ax-un 6372  ax-cnex 9338  ax-resscn 9339  ax-1cn 9340  ax-icn 9341  ax-addcl 9342  ax-addrcl 9343  ax-mulcl 9344  ax-mulrcl 9345  ax-mulcom 9346  ax-addass 9347  ax-mulass 9348  ax-distr 9349  ax-i2m1 9350  ax-1ne0 9351  ax-1rid 9352  ax-rnegex 9353  ax-rrecex 9354  ax-cnre 9355  ax-pre-lttri 9356  ax-pre-lttrn 9357  ax-pre-ltadd 9358  ax-pre-mulgt0 9359
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 2568  df-ne 2608  df-nel 2609  df-ral 2720  df-rex 2721  df-reu 2722  df-rab 2724  df-v 2974  df-sbc 3187  df-csb 3289  df-dif 3331  df-un 3333  df-in 3335  df-ss 3342  df-pss 3344  df-nul 3638  df-if 3792  df-pw 3862  df-sn 3878  df-pr 3880  df-tp 3882  df-op 3884  df-uni 4092  df-int 4129  df-iun 4173  df-br 4293  df-opab 4351  df-mpt 4352  df-tr 4386  df-eprel 4632  df-id 4636  df-po 4641  df-so 4642  df-fr 4679  df-we 4681  df-ord 4722  df-on 4723  df-lim 4724  df-suc 4725  df-xp 4846  df-rel 4847  df-cnv 4848  df-co 4849  df-dm 4850  df-rn 4851  df-res 4852  df-ima 4853  df-iota 5381  df-fun 5420  df-fn 5421  df-f 5422  df-f1 5423  df-fo 5424  df-f1o 5425  df-fv 5426  df-riota 6052  df-ov 6094  df-oprab 6095  df-mpt2 6096  df-om 6477  df-1st 6577  df-2nd 6578  df-recs 6832  df-rdg 6866  df-1o 6920  df-oadd 6924  df-er 7101  df-en 7311  df-dom 7312  df-sdom 7313  df-fin 7314  df-card 8109  df-pnf 9420  df-mnf 9421  df-xr 9422  df-ltxr 9423  df-le 9424  df-sub 9597  df-neg 9598  df-nn 10323  df-n0 10580  df-z 10647  df-uz 10862  df-fz 11438  df-fzo 11549  df-hash 12104  df-word 12229  df-concat 12231  df-substr 12233
This theorem is referenced by:  swrdccat3b  12387
  Copyright terms: Public domain W3C validator