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

Theorem swrdccatin1 12671
Description: The subword of a concatenation of two words within the first of the concatenated words. (Contributed by Alexander van der Vekens, 28-Mar-2018.)
Assertion
Ref Expression
swrdccatin1  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( M  e.  ( 0 ... N
)  /\  N  e.  ( 0 ... ( # `
 A ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )

Proof of Theorem swrdccatin1
Dummy variable  k is distinct from all other variables.
StepHypRef Expression
1 oveq2 6242 . . . . . . 7  |-  ( (
# `  A )  =  0  ->  (
0 ... ( # `  A
) )  =  ( 0 ... 0 ) )
21eleq2d 2472 . . . . . 6  |-  ( (
# `  A )  =  0  ->  ( N  e.  ( 0 ... ( # `  A
) )  <->  N  e.  ( 0 ... 0
) ) )
3 elfz1eq 11668 . . . . . . 7  |-  ( N  e.  ( 0 ... 0 )  ->  N  =  0 )
4 elfz1eq 11668 . . . . . . . . 9  |-  ( M  e.  ( 0 ... 0 )  ->  M  =  0 )
5 swrd00 12606 . . . . . . . . . . 11  |-  ( ( A ++  B ) substr  <. 0 ,  0 >. )  =  (/)
6 swrd00 12606 . . . . . . . . . . 11  |-  ( A substr  <. 0 ,  0 >.
)  =  (/)
75, 6eqtr4i 2434 . . . . . . . . . 10  |-  ( ( A ++  B ) substr  <. 0 ,  0 >. )  =  ( A substr  <. 0 ,  0 >. )
8 opeq1 4158 . . . . . . . . . . 11  |-  ( M  =  0  ->  <. M , 
0 >.  =  <. 0 ,  0 >. )
98oveq2d 6250 . . . . . . . . . 10  |-  ( M  =  0  ->  (
( A ++  B ) substr  <. M ,  0 >.
)  =  ( ( A ++  B ) substr  <. 0 ,  0 >. ) )
108oveq2d 6250 . . . . . . . . . 10  |-  ( M  =  0  ->  ( A substr  <. M ,  0
>. )  =  ( A substr  <. 0 ,  0
>. ) )
117, 9, 103eqtr4a 2469 . . . . . . . . 9  |-  ( M  =  0  ->  (
( A ++  B ) substr  <. M ,  0 >.
)  =  ( A substr  <. M ,  0 >.
) )
124, 11syl 17 . . . . . . . 8  |-  ( M  e.  ( 0 ... 0 )  ->  (
( A ++  B ) substr  <. M ,  0 >.
)  =  ( A substr  <. M ,  0 >.
) )
13 oveq2 6242 . . . . . . . . . 10  |-  ( N  =  0  ->  (
0 ... N )  =  ( 0 ... 0
) )
1413eleq2d 2472 . . . . . . . . 9  |-  ( N  =  0  ->  ( M  e.  ( 0 ... N )  <->  M  e.  ( 0 ... 0
) ) )
15 opeq2 4159 . . . . . . . . . . 11  |-  ( N  =  0  ->  <. M ,  N >.  =  <. M , 
0 >. )
1615oveq2d 6250 . . . . . . . . . 10  |-  ( N  =  0  ->  (
( A ++  B ) substr  <. M ,  N >. )  =  ( ( A ++  B ) substr  <. M , 
0 >. ) )
1715oveq2d 6250 . . . . . . . . . 10  |-  ( N  =  0  ->  ( A substr  <. M ,  N >. )  =  ( A substr  <. M ,  0 >.
) )
1816, 17eqeq12d 2424 . . . . . . . . 9  |-  ( N  =  0  ->  (
( ( A ++  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. )  <-> 
( ( A ++  B
) substr  <. M ,  0
>. )  =  ( A substr  <. M ,  0
>. ) ) )
1914, 18imbi12d 318 . . . . . . . 8  |-  ( N  =  0  ->  (
( M  e.  ( 0 ... N )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) )  <->  ( M  e.  ( 0 ... 0
)  ->  ( ( A ++  B ) substr  <. M , 
0 >. )  =  ( A substr  <. M ,  0
>. ) ) ) )
2012, 19mpbiri 233 . . . . . . 7  |-  ( N  =  0  ->  ( M  e.  ( 0 ... N )  -> 
( ( A ++  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
213, 20syl 17 . . . . . 6  |-  ( N  e.  ( 0 ... 0 )  ->  ( M  e.  ( 0 ... N )  -> 
( ( A ++  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
222, 21syl6bi 228 . . . . 5  |-  ( (
# `  A )  =  0  ->  ( N  e.  ( 0 ... ( # `  A
) )  ->  ( M  e.  ( 0 ... N )  -> 
( ( A ++  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) ) )
2322com23 78 . . . 4  |-  ( (
# `  A )  =  0  ->  ( M  e.  ( 0 ... N )  -> 
( N  e.  ( 0 ... ( # `  A ) )  -> 
( ( A ++  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) ) )
2423impd 429 . . 3  |-  ( (
# `  A )  =  0  ->  (
( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
2524a1d 25 . 2  |-  ( (
# `  A )  =  0  ->  (
( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `
 A ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) ) )
26 ccatcl 12554 . . . . . . . 8  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( A ++  B )  e. Word  V )
2726adantl 464 . . . . . . 7  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( A ++  B )  e. Word  V
)
2827adantr 463 . . . . . 6  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( A ++  B
)  e. Word  V )
29 simprl 756 . . . . . 6  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  M  e.  ( 0 ... N ) )
30 elfzelfzccat 12559 . . . . . . . . . 10  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( N  e.  ( 0 ... ( # `  A ) )  ->  N  e.  ( 0 ... ( # `  ( A ++  B ) ) ) ) )
3130adantl 464 . . . . . . . . 9  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( N  e.  ( 0 ... ( # `
 A ) )  ->  N  e.  ( 0 ... ( # `  ( A ++  B ) ) ) ) )
3231com12 29 . . . . . . . 8  |-  ( N  e.  ( 0 ... ( # `  A
) )  ->  (
( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  ->  N  e.  ( 0 ... ( # `
 ( A ++  B
) ) ) ) )
3332adantl 464 . . . . . . 7  |-  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  N  e.  ( 0 ... ( # `  ( A ++  B ) ) ) ) )
3433impcom 428 . . . . . 6  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  N  e.  ( 0 ... ( # `  ( A ++  B ) ) ) )
35 swrdvalfn 12614 . . . . . 6  |-  ( ( ( A ++  B )  e. Word  V  /\  M  e.  ( 0 ... N
)  /\  N  e.  ( 0 ... ( # `
 ( A ++  B
) ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  Fn  (
0..^ ( N  -  M ) ) )
3628, 29, 34, 35syl3anc 1230 . . . . 5  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  Fn  (
0..^ ( N  -  M ) ) )
37 3anass 978 . . . . . . . . 9  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  <->  ( A  e. Word  V  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `
 A ) ) ) ) )
3837simplbi2 623 . . . . . . . 8  |-  ( A  e. Word  V  ->  (
( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A ) ) )  ->  ( A  e. Word  V  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A ) ) ) ) )
3938ad2antrl 726 . . . . . . 7  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( A  e. Word  V  /\  M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) ) )
4039imp 427 . . . . . 6  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( A  e. Word  V  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A ) ) ) )
41 swrdvalfn 12614 . . . . . 6  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( A substr  <. M ,  N >. )  Fn  (
0..^ ( N  -  M ) ) )
4240, 41syl 17 . . . . 5  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( A substr  <. M ,  N >. )  Fn  (
0..^ ( N  -  M ) ) )
43 simprl 756 . . . . . . . 8  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  A  e. Word  V )
4443ad2antrr 724 . . . . . . 7  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  A  e. Word  V
)
45 simprr 758 . . . . . . . 8  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  B  e. Word  V )
4645ad2antrr 724 . . . . . . 7  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  B  e. Word  V
)
47 elfzo0 11808 . . . . . . . . . 10  |-  ( k  e.  ( 0..^ ( N  -  M ) )  <->  ( k  e. 
NN0  /\  ( N  -  M )  e.  NN  /\  k  <  ( N  -  M ) ) )
48 elfz2nn0 11741 . . . . . . . . . . . . . 14  |-  ( M  e.  ( 0 ... N )  <->  ( M  e.  NN0  /\  N  e. 
NN0  /\  M  <_  N ) )
49 nn0addcl 10792 . . . . . . . . . . . . . . . 16  |-  ( ( k  e.  NN0  /\  M  e.  NN0 )  -> 
( k  +  M
)  e.  NN0 )
5049expcom 433 . . . . . . . . . . . . . . 15  |-  ( M  e.  NN0  ->  ( k  e.  NN0  ->  ( k  +  M )  e. 
NN0 ) )
51503ad2ant1 1018 . . . . . . . . . . . . . 14  |-  ( ( M  e.  NN0  /\  N  e.  NN0  /\  M  <_  N )  ->  (
k  e.  NN0  ->  ( k  +  M )  e.  NN0 ) )
5248, 51sylbi 195 . . . . . . . . . . . . 13  |-  ( M  e.  ( 0 ... N )  ->  (
k  e.  NN0  ->  ( k  +  M )  e.  NN0 ) )
5352ad2antrl 726 . . . . . . . . . . . 12  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( k  e. 
NN0  ->  ( k  +  M )  e.  NN0 ) )
5453com12 29 . . . . . . . . . . 11  |-  ( k  e.  NN0  ->  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( k  +  M )  e.  NN0 ) )
55543ad2ant1 1018 . . . . . . . . . 10  |-  ( ( k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `
 A ) ) ) )  ->  (
k  +  M )  e.  NN0 ) )
5647, 55sylbi 195 . . . . . . . . 9  |-  ( k  e.  ( 0..^ ( N  -  M ) )  ->  ( (
( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( k  +  M )  e.  NN0 ) )
5756impcom 428 . . . . . . . 8  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( k  +  M )  e.  NN0 )
58 lencl 12521 . . . . . . . . . . . 12  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
59 df-ne 2600 . . . . . . . . . . . . 13  |-  ( (
# `  A )  =/=  0  <->  -.  ( # `  A
)  =  0 )
60 elnnne0 10770 . . . . . . . . . . . . . 14  |-  ( (
# `  A )  e.  NN  <->  ( ( # `  A )  e.  NN0  /\  ( # `  A
)  =/=  0 ) )
6160simplbi2 623 . . . . . . . . . . . . 13  |-  ( (
# `  A )  e.  NN0  ->  ( ( # `
 A )  =/=  0  ->  ( # `  A
)  e.  NN ) )
6259, 61syl5bir 218 . . . . . . . . . . . 12  |-  ( (
# `  A )  e.  NN0  ->  ( -.  ( # `  A )  =  0  ->  ( # `
 A )  e.  NN ) )
6358, 62syl 17 . . . . . . . . . . 11  |-  ( A  e. Word  V  ->  ( -.  ( # `  A
)  =  0  -> 
( # `  A )  e.  NN ) )
6463adantr 463 . . . . . . . . . 10  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( -.  ( # `  A )  =  0  ->  ( # `  A
)  e.  NN ) )
6564impcom 428 . . . . . . . . 9  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( # `  A
)  e.  NN )
6665ad2antrr 724 . . . . . . . 8  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( # `  A
)  e.  NN )
67 elfz2nn0 11741 . . . . . . . . . . . . . . . 16  |-  ( N  e.  ( 0 ... ( # `  A
) )  <->  ( N  e.  NN0  /\  ( # `  A )  e.  NN0  /\  N  <_  ( # `  A
) ) )
68 nn0re 10765 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( k  e.  NN0  ->  k  e.  RR )
6968ad2antrl 726 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  k  e.  RR )
70 nn0re 10765 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( M  e.  NN0  ->  M  e.  RR )
7170adantl 464 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( k  e.  NN0  /\  M  e.  NN0 )  ->  M  e.  RR )
7271adantl 464 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  M  e.  RR )
73 nn0re 10765 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( N  e.  NN0  ->  N  e.  RR )
7473ad2antrr 724 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  N  e.  RR )
7569, 72, 74ltaddsubd 10112 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( (
k  +  M )  <  N  <->  k  <  ( N  -  M ) ) )
76 nn0re 10765 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( k  +  M )  e.  NN0  ->  ( k  +  M )  e.  RR )
7749, 76syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( ( k  e.  NN0  /\  M  e.  NN0 )  -> 
( k  +  M
)  e.  RR )
7877adantl 464 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( k  +  M )  e.  RR )
79 nn0re 10765 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  RR )
8079adantl 464 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( ( N  e.  NN0  /\  ( # `  A )  e.  NN0 )  -> 
( # `  A )  e.  RR )
8180adantr 463 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( # `  A
)  e.  RR )
82 ltletr 9627 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( k  +  M
)  e.  RR  /\  N  e.  RR  /\  ( # `
 A )  e.  RR )  ->  (
( ( k  +  M )  <  N  /\  N  <_  ( # `  A ) )  -> 
( k  +  M
)  <  ( # `  A
) ) )
8378, 74, 81, 82syl3anc 1230 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( (
( k  +  M
)  <  N  /\  N  <_  ( # `  A
) )  ->  (
k  +  M )  <  ( # `  A
) ) )
8483expd 434 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( (
k  +  M )  <  N  ->  ( N  <_  ( # `  A
)  ->  ( k  +  M )  <  ( # `
 A ) ) ) )
8575, 84sylbird 235 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( k  <  ( N  -  M
)  ->  ( N  <_  ( # `  A
)  ->  ( k  +  M )  <  ( # `
 A ) ) ) )
8685ex 432 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( N  e.  NN0  /\  ( # `  A )  e.  NN0 )  -> 
( ( k  e. 
NN0  /\  M  e.  NN0 )  ->  ( k  <  ( N  -  M
)  ->  ( N  <_  ( # `  A
)  ->  ( k  +  M )  <  ( # `
 A ) ) ) ) )
8786com24 87 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( N  e.  NN0  /\  ( # `  A )  e.  NN0 )  -> 
( N  <_  ( # `
 A )  -> 
( k  <  ( N  -  M )  ->  ( ( k  e. 
NN0  /\  M  e.  NN0 )  ->  ( k  +  M )  <  ( # `
 A ) ) ) ) )
88873impia 1194 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( N  e.  NN0  /\  ( # `  A )  e.  NN0  /\  N  <_ 
( # `  A ) )  ->  ( k  <  ( N  -  M
)  ->  ( (
k  e.  NN0  /\  M  e.  NN0 )  -> 
( k  +  M
)  <  ( # `  A
) ) ) )
8988com13 80 . . . . . . . . . . . . . . . . . . 19  |-  ( ( k  e.  NN0  /\  M  e.  NN0 )  -> 
( k  <  ( N  -  M )  ->  ( ( N  e. 
NN0  /\  ( # `  A
)  e.  NN0  /\  N  <_  ( # `  A
) )  ->  (
k  +  M )  <  ( # `  A
) ) ) )
9089impancom 438 . . . . . . . . . . . . . . . . . 18  |-  ( ( k  e.  NN0  /\  k  <  ( N  -  M ) )  -> 
( M  e.  NN0  ->  ( ( N  e. 
NN0  /\  ( # `  A
)  e.  NN0  /\  N  <_  ( # `  A
) )  ->  (
k  +  M )  <  ( # `  A
) ) ) )
91903adant2 1016 . . . . . . . . . . . . . . . . 17  |-  ( ( k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( M  e.  NN0  ->  ( ( N  e. 
NN0  /\  ( # `  A
)  e.  NN0  /\  N  <_  ( # `  A
) )  ->  (
k  +  M )  <  ( # `  A
) ) ) )
9291com13 80 . . . . . . . . . . . . . . . 16  |-  ( ( N  e.  NN0  /\  ( # `  A )  e.  NN0  /\  N  <_ 
( # `  A ) )  ->  ( M  e.  NN0  ->  ( (
k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( k  +  M
)  <  ( # `  A
) ) ) )
9367, 92sylbi 195 . . . . . . . . . . . . . . 15  |-  ( N  e.  ( 0 ... ( # `  A
) )  ->  ( M  e.  NN0  ->  (
( k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( k  +  M
)  <  ( # `  A
) ) ) )
9493com12 29 . . . . . . . . . . . . . 14  |-  ( M  e.  NN0  ->  ( N  e.  ( 0 ... ( # `  A
) )  ->  (
( k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( k  +  M
)  <  ( # `  A
) ) ) )
95943ad2ant1 1018 . . . . . . . . . . . . 13  |-  ( ( M  e.  NN0  /\  N  e.  NN0  /\  M  <_  N )  ->  ( N  e.  ( 0 ... ( # `  A
) )  ->  (
( k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( k  +  M
)  <  ( # `  A
) ) ) )
9648, 95sylbi 195 . . . . . . . . . . . 12  |-  ( M  e.  ( 0 ... N )  ->  ( N  e.  ( 0 ... ( # `  A
) )  ->  (
( k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( k  +  M
)  <  ( # `  A
) ) ) )
9796a1i 11 . . . . . . . . . . 11  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( M  e.  ( 0 ... N
)  ->  ( N  e.  ( 0 ... ( # `
 A ) )  ->  ( ( k  e.  NN0  /\  ( N  -  M )  e.  NN  /\  k  < 
( N  -  M
) )  ->  (
k  +  M )  <  ( # `  A
) ) ) ) )
9897imp32 431 . . . . . . . . . 10  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( ( k  e.  NN0  /\  ( N  -  M )  e.  NN  /\  k  < 
( N  -  M
) )  ->  (
k  +  M )  <  ( # `  A
) ) )
9947, 98syl5bi 217 . . . . . . . . 9  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( k  e.  ( 0..^ ( N  -  M ) )  ->  ( k  +  M )  <  ( # `
 A ) ) )
10099imp 427 . . . . . . . 8  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( k  +  M )  <  ( # `
 A ) )
101 elfzo0 11808 . . . . . . . 8  |-  ( ( k  +  M )  e.  ( 0..^ (
# `  A )
)  <->  ( ( k  +  M )  e. 
NN0  /\  ( # `  A
)  e.  NN  /\  ( k  +  M
)  <  ( # `  A
) ) )
10257, 66, 100, 101syl3anbrc 1181 . . . . . . 7  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( k  +  M )  e.  ( 0..^ ( # `  A
) ) )
103 ccatval1 12556 . . . . . . 7  |-  ( ( A  e. Word  V  /\  B  e. Word  V  /\  (
k  +  M )  e.  ( 0..^ (
# `  A )
) )  ->  (
( A ++  B ) `
 ( k  +  M ) )  =  ( A `  (
k  +  M ) ) )
10444, 46, 102, 103syl3anc 1230 . . . . . 6  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( ( A ++  B ) `  (
k  +  M ) )  =  ( A `
 ( k  +  M ) ) )
10527ad2antrr 724 . . . . . . . 8  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( A ++  B
)  e. Word  V )
10629adantr 463 . . . . . . . 8  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  M  e.  ( 0 ... N ) )
10734adantr 463 . . . . . . . 8  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  N  e.  ( 0 ... ( # `  ( A ++  B ) ) ) )
108105, 106, 1073jca 1177 . . . . . . 7  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( ( A ++  B )  e. Word  V  /\  M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  ( A ++  B ) ) ) ) )
109 swrdfv 12612 . . . . . . 7  |-  ( ( ( ( A ++  B
)  e. Word  V  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  ( A ++  B ) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( (
( A ++  B ) substr  <. M ,  N >. ) `
 k )  =  ( ( A ++  B
) `  ( k  +  M ) ) )
110108, 109sylancom 665 . . . . . 6  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( ( ( A ++  B ) substr  <. M ,  N >. ) `  k )  =  ( ( A ++  B ) `
 ( k  +  M ) ) )
111 swrdfv 12612 . . . . . . 7  |-  ( ( ( A  e. Word  V  /\  M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  /\  k  e.  ( 0..^ ( N  -  M
) ) )  -> 
( ( A substr  <. M ,  N >. ) `  k
)  =  ( A `
 ( k  +  M ) ) )
11240, 111sylan 469 . . . . . 6  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( ( A substr  <. M ,  N >. ) `
 k )  =  ( A `  (
k  +  M ) ) )
113104, 110, 1123eqtr4d 2453 . . . . 5  |-  ( ( ( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  /\  ( M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( ( ( A ++  B ) substr  <. M ,  N >. ) `  k )  =  ( ( A substr  <. M ,  N >. ) `  k
) )
11436, 42, 113eqfnfvd 5918 . . . 4  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) )
115114ex 432 . . 3  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( ( A ++  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
116115ex 432 . 2  |-  ( -.  ( # `  A
)  =  0  -> 
( ( A  e. Word  V  /\  B  e. Word  V
)  ->  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( ( A ++  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) ) )
11725, 116pm2.61i 164 1  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( ( M  e.  ( 0 ... N
)  /\  N  e.  ( 0 ... ( # `
 A ) ) )  ->  ( ( A ++  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 367    /\ w3a 974    = wceq 1405    e. wcel 1842    =/= wne 2598   (/)c0 3737   <.cop 3977   class class class wbr 4394    Fn wfn 5520   ` cfv 5525  (class class class)co 6234   RRcr 9441   0cc0 9442    + caddc 9445    < clt 9578    <_ cle 9579    - cmin 9761   NNcn 10496   NN0cn0 10756   ...cfz 11643  ..^cfzo 11767   #chash 12359  Word cword 12490   ++ cconcat 12492   substr csubstr 12494
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 4506  ax-sep 4516  ax-nul 4524  ax-pow 4571  ax-pr 4629  ax-un 6530  ax-cnex 9498  ax-resscn 9499  ax-1cn 9500  ax-icn 9501  ax-addcl 9502  ax-addrcl 9503  ax-mulcl 9504  ax-mulrcl 9505  ax-mulcom 9506  ax-addass 9507  ax-mulass 9508  ax-distr 9509  ax-i2m1 9510  ax-1ne0 9511  ax-1rid 9512  ax-rnegex 9513  ax-rrecex 9514  ax-cnre 9515  ax-pre-lttri 9516  ax-pre-lttrn 9517  ax-pre-ltadd 9518  ax-pre-mulgt0 9519
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 2758  df-rex 2759  df-reu 2760  df-rmo 2761  df-rab 2762  df-v 3060  df-sbc 3277  df-csb 3373  df-dif 3416  df-un 3418  df-in 3420  df-ss 3427  df-pss 3429  df-nul 3738  df-if 3885  df-pw 3956  df-sn 3972  df-pr 3974  df-tp 3976  df-op 3978  df-uni 4191  df-int 4227  df-iun 4272  df-br 4395  df-opab 4453  df-mpt 4454  df-tr 4489  df-eprel 4733  df-id 4737  df-po 4743  df-so 4744  df-fr 4781  df-we 4783  df-ord 4824  df-on 4825  df-lim 4826  df-suc 4827  df-xp 4948  df-rel 4949  df-cnv 4950  df-co 4951  df-dm 4952  df-rn 4953  df-res 4954  df-ima 4955  df-iota 5489  df-fun 5527  df-fn 5528  df-f 5529  df-f1 5530  df-fo 5531  df-f1o 5532  df-fv 5533  df-riota 6196  df-ov 6237  df-oprab 6238  df-mpt2 6239  df-om 6639  df-1st 6738  df-2nd 6739  df-recs 6999  df-rdg 7033  df-1o 7087  df-oadd 7091  df-er 7268  df-en 7475  df-dom 7476  df-sdom 7477  df-fin 7478  df-card 8272  df-cda 8500  df-pnf 9580  df-mnf 9581  df-xr 9582  df-ltxr 9583  df-le 9584  df-sub 9763  df-neg 9764  df-nn 10497  df-2 10555  df-n0 10757  df-z 10826  df-uz 11046  df-fz 11644  df-fzo 11768  df-hash 12360  df-word 12498  df-concat 12500  df-substr 12502
This theorem is referenced by:  swrdccat3  12680  swrdccatin1d  12687  pfxccat3  37893  pfxccatpfx1  37894
  Copyright terms: Public domain W3C validator