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

Theorem swrdccatin1 12372
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 concat  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 6097 . . . . . . 7  |-  ( (
# `  A )  =  0  ->  (
0 ... ( # `  A
) )  =  ( 0 ... 0 ) )
21eleq2d 2508 . . . . . 6  |-  ( (
# `  A )  =  0  ->  ( N  e.  ( 0 ... ( # `  A
) )  <->  N  e.  ( 0 ... 0
) ) )
3 elfz1eq 11460 . . . . . . 7  |-  ( N  e.  ( 0 ... 0 )  ->  N  =  0 )
4 elfz1eq 11460 . . . . . . . . 9  |-  ( M  e.  ( 0 ... 0 )  ->  M  =  0 )
5 swrd00 12312 . . . . . . . . . . 11  |-  ( ( A concat  B ) substr  <. 0 ,  0 >. )  =  (/)
6 swrd00 12312 . . . . . . . . . . 11  |-  ( A substr  <. 0 ,  0 >.
)  =  (/)
75, 6eqtr4i 2464 . . . . . . . . . 10  |-  ( ( A concat  B ) substr  <. 0 ,  0 >. )  =  ( A substr  <. 0 ,  0 >. )
8 opeq1 4057 . . . . . . . . . . 11  |-  ( M  =  0  ->  <. M , 
0 >.  =  <. 0 ,  0 >. )
98oveq2d 6105 . . . . . . . . . 10  |-  ( M  =  0  ->  (
( A concat  B ) substr  <. M ,  0 >. )  =  ( ( A concat  B ) substr  <. 0 ,  0 >. ) )
108oveq2d 6105 . . . . . . . . . 10  |-  ( M  =  0  ->  ( A substr  <. M ,  0
>. )  =  ( A substr  <. 0 ,  0
>. ) )
117, 9, 103eqtr4a 2499 . . . . . . . . 9  |-  ( M  =  0  ->  (
( A concat  B ) substr  <. M ,  0 >. )  =  ( A substr  <. M , 
0 >. ) )
124, 11syl 16 . . . . . . . 8  |-  ( M  e.  ( 0 ... 0 )  ->  (
( A concat  B ) substr  <. M ,  0 >. )  =  ( A substr  <. M , 
0 >. ) )
13 oveq2 6097 . . . . . . . . . 10  |-  ( N  =  0  ->  (
0 ... N )  =  ( 0 ... 0
) )
1413eleq2d 2508 . . . . . . . . 9  |-  ( N  =  0  ->  ( M  e.  ( 0 ... N )  <->  M  e.  ( 0 ... 0
) ) )
15 opeq2 4058 . . . . . . . . . . 11  |-  ( N  =  0  ->  <. M ,  N >.  =  <. M , 
0 >. )
1615oveq2d 6105 . . . . . . . . . 10  |-  ( N  =  0  ->  (
( A concat  B ) substr  <. M ,  N >. )  =  ( ( A concat  B ) substr  <. M , 
0 >. ) )
1715oveq2d 6105 . . . . . . . . . 10  |-  ( N  =  0  ->  ( A substr  <. M ,  N >. )  =  ( A substr  <. M ,  0 >.
) )
1816, 17eqeq12d 2455 . . . . . . . . 9  |-  ( N  =  0  ->  (
( ( A concat  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. )  <-> 
( ( A concat  B
) substr  <. M ,  0
>. )  =  ( A substr  <. M ,  0
>. ) ) )
1914, 18imbi12d 320 . . . . . . . 8  |-  ( N  =  0  ->  (
( M  e.  ( 0 ... N )  ->  ( ( A concat  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) )  <->  ( M  e.  ( 0 ... 0
)  ->  ( ( A concat  B ) substr  <. M , 
0 >. )  =  ( A substr  <. M ,  0
>. ) ) ) )
2012, 19mpbiri 233 . . . . . . 7  |-  ( N  =  0  ->  ( M  e.  ( 0 ... N )  -> 
( ( A concat  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
213, 20syl 16 . . . . . 6  |-  ( N  e.  ( 0 ... 0 )  ->  ( M  e.  ( 0 ... N )  -> 
( ( A concat  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
222, 21syl6bi 228 . . . . 5  |-  ( (
# `  A )  =  0  ->  ( N  e.  ( 0 ... ( # `  A
) )  ->  ( M  e.  ( 0 ... N )  -> 
( ( A concat  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) ) )
2322com23 78 . . . 4  |-  ( (
# `  A )  =  0  ->  ( M  e.  ( 0 ... N )  -> 
( N  e.  ( 0 ... ( # `  A ) )  -> 
( ( A concat  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) ) )
2423impd 431 . . 3  |-  ( (
# `  A )  =  0  ->  (
( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A ) ) )  ->  ( ( A concat  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 concat  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) ) )
26 ccatcl 12272 . . . . . . . 8  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( A concat  B )  e. Word  V )
2726adantl 466 . . . . . . 7  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( A concat  B )  e. Word  V )
2827adantr 465 . . . . . 6  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( A concat  B
)  e. Word  V )
29 simprl 755 . . . . . 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 12277 . . . . . . . . . 10  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( N  e.  ( 0 ... ( # `  A ) )  ->  N  e.  ( 0 ... ( # `  ( A concat  B ) ) ) ) )
3130adantl 466 . . . . . . . . 9  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( N  e.  ( 0 ... ( # `
 A ) )  ->  N  e.  ( 0 ... ( # `  ( A concat  B ) ) ) ) )
3231com12 31 . . . . . . . 8  |-  ( N  e.  ( 0 ... ( # `  A
) )  ->  (
( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  ->  N  e.  ( 0 ... ( # `
 ( A concat  B
) ) ) ) )
3332adantl 466 . . . . . . 7  |-  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( ( -.  ( # `
 A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  N  e.  ( 0 ... ( # `  ( A concat  B ) ) ) ) )
3433impcom 430 . . . . . 6  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  N  e.  ( 0 ... ( # `  ( A concat  B ) ) ) )
35 swrdvalfn 12330 . . . . . 6  |-  ( ( ( A concat  B )  e. Word  V  /\  M  e.  ( 0 ... N
)  /\  N  e.  ( 0 ... ( # `
 ( A concat  B
) ) ) )  ->  ( ( A concat  B ) substr  <. M ,  N >. )  Fn  (
0..^ ( N  -  M ) ) )
3628, 29, 34, 35syl3anc 1218 . . . . 5  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( ( A concat  B ) substr  <. M ,  N >. )  Fn  (
0..^ ( N  -  M ) ) )
37 3anass 969 . . . . . . . . 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 625 . . . . . . . 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 727 . . . . . . 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 429 . . . . . 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 12330 . . . . . 6  |-  ( ( A  e. Word  V  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( A substr  <. M ,  N >. )  Fn  (
0..^ ( N  -  M ) ) )
4240, 41syl 16 . . . . 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 755 . . . . . . . 8  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  A  e. Word  V )
4443ad2antrr 725 . . . . . . 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 756 . . . . . . . 8  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  B  e. Word  V )
4645ad2antrr 725 . . . . . . 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 11585 . . . . . . . . . 10  |-  ( k  e.  ( 0..^ ( N  -  M ) )  <->  ( k  e. 
NN0  /\  ( N  -  M )  e.  NN  /\  k  <  ( N  -  M ) ) )
48 elfz2nn0 11478 . . . . . . . . . . . . . 14  |-  ( M  e.  ( 0 ... N )  <->  ( M  e.  NN0  /\  N  e. 
NN0  /\  M  <_  N ) )
49 nn0addcl 10613 . . . . . . . . . . . . . . . 16  |-  ( ( k  e.  NN0  /\  M  e.  NN0 )  -> 
( k  +  M
)  e.  NN0 )
5049expcom 435 . . . . . . . . . . . . . . 15  |-  ( M  e.  NN0  ->  ( k  e.  NN0  ->  ( k  +  M )  e. 
NN0 ) )
51503ad2ant1 1009 . . . . . . . . . . . . . 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 727 . . . . . . . . . . . 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 31 . . . . . . . . . . 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 1009 . . . . . . . . . 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 430 . . . . . . . 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 12247 . . . . . . . . . . . 12  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
59 df-ne 2606 . . . . . . . . . . . . 13  |-  ( (
# `  A )  =/=  0  <->  -.  ( # `  A
)  =  0 )
60 elnnne0 10591 . . . . . . . . . . . . . 14  |-  ( (
# `  A )  e.  NN  <->  ( ( # `  A )  e.  NN0  /\  ( # `  A
)  =/=  0 ) )
6160simplbi2 625 . . . . . . . . . . . . 13  |-  ( (
# `  A )  e.  NN0  ->  ( ( # `
 A )  =/=  0  ->  ( # `  A
)  e.  NN ) )
6259, 61syl5bir 218 . . . . . . . . . . . 12  |-  ( (
# `  A )  e.  NN0  ->  ( -.  ( # `  A )  =  0  ->  ( # `
 A )  e.  NN ) )
6358, 62syl 16 . . . . . . . . . . 11  |-  ( A  e. Word  V  ->  ( -.  ( # `  A
)  =  0  -> 
( # `  A )  e.  NN ) )
6463adantr 465 . . . . . . . . . 10  |-  ( ( A  e. Word  V  /\  B  e. Word  V )  ->  ( -.  ( # `  A )  =  0  ->  ( # `  A
)  e.  NN ) )
6564impcom 430 . . . . . . . . 9  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( # `  A
)  e.  NN )
6665ad2antrr 725 . . . . . . . 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 11478 . . . . . . . . . . . . . . . 16  |-  ( N  e.  ( 0 ... ( # `  A
) )  <->  ( N  e.  NN0  /\  ( # `  A )  e.  NN0  /\  N  <_  ( # `  A
) ) )
68 nn0re 10586 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( k  e.  NN0  ->  k  e.  RR )
6968ad2antrl 727 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  k  e.  RR )
70 nn0re 10586 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( M  e.  NN0  ->  M  e.  RR )
7170adantl 466 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( k  e.  NN0  /\  M  e.  NN0 )  ->  M  e.  RR )
7271adantl 466 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  M  e.  RR )
73 nn0re 10586 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( N  e.  NN0  ->  N  e.  RR )
7473ad2antrr 725 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  N  e.  RR )
7569, 72, 74ltaddsubd 9937 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( (
k  +  M )  <  N  <->  k  <  ( N  -  M ) ) )
76 nn0re 10586 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( ( k  +  M )  e.  NN0  ->  ( k  +  M )  e.  RR )
7749, 76syl 16 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( ( k  e.  NN0  /\  M  e.  NN0 )  -> 
( k  +  M
)  e.  RR )
7877adantl 466 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( k  +  M )  e.  RR )
79 nn0re 10586 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  RR )
8079adantl 466 . . . . . . . . . . . . . . . . . . . . . . . . . . 27  |-  ( ( N  e.  NN0  /\  ( # `  A )  e.  NN0 )  -> 
( # `  A )  e.  RR )
8180adantr 465 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( # `  A
)  e.  RR )
82 ltletr 9464 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( k  +  M
)  e.  RR  /\  N  e.  RR  /\  ( # `
 A )  e.  RR )  ->  (
( ( k  +  M )  <  N  /\  N  <_  ( # `  A ) )  -> 
( k  +  M
)  <  ( # `  A
) ) )
8378, 74, 81, 82syl3anc 1218 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( (
( k  +  M
)  <  N  /\  N  <_  ( # `  A
) )  ->  (
k  +  M )  <  ( # `  A
) ) )
8483expd 436 . . . . . . . . . . . . . . . . . . . . . . . 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 434 . . . . . . . . . . . . . . . . . . . . . 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 1184 . . . . . . . . . . . . . . . . . . . 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 440 . . . . . . . . . . . . . . . . . 18  |-  ( ( k  e.  NN0  /\  k  <  ( N  -  M ) )  -> 
( M  e.  NN0  ->  ( ( N  e. 
NN0  /\  ( # `  A
)  e.  NN0  /\  N  <_  ( # `  A
) )  ->  (
k  +  M )  <  ( # `  A
) ) ) )
91903adant2 1007 . . . . . . . . . . . . . . . . 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 31 . . . . . . . . . . . . . 14  |-  ( M  e.  NN0  ->  ( N  e.  ( 0 ... ( # `  A
) )  ->  (
( k  e.  NN0  /\  ( N  -  M
)  e.  NN  /\  k  <  ( N  -  M ) )  -> 
( k  +  M
)  <  ( # `  A
) ) ) )
95943ad2ant1 1009 . . . . . . . . . . . . 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 433 . . . . . . . . . 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 429 . . . . . . . 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 11585 . . . . . . . 8  |-  ( ( k  +  M )  e.  ( 0..^ (
# `  A )
)  <->  ( ( k  +  M )  e. 
NN0  /\  ( # `  A
)  e.  NN  /\  ( k  +  M
)  <  ( # `  A
) ) )
10257, 66, 100, 101syl3anbrc 1172 . . . . . . 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 12274 . . . . . . 7  |-  ( ( A  e. Word  V  /\  B  e. Word  V  /\  (
k  +  M )  e.  ( 0..^ (
# `  A )
) )  ->  (
( A concat  B ) `  ( k  +  M
) )  =  ( A `  ( k  +  M ) ) )
10444, 46, 102, 103syl3anc 1218 . . . . . 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 concat  B ) `  (
k  +  M ) )  =  ( A `
 ( k  +  M ) ) )
10527ad2antrr 725 . . . . . . . 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 concat  B
)  e. Word  V )
10629adantr 465 . . . . . . . 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 465 . . . . . . . 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 concat  B ) ) ) )
108105, 106, 1073jca 1168 . . . . . . 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 concat  B )  e. Word  V  /\  M  e.  (
0 ... N )  /\  N  e.  ( 0 ... ( # `  ( A concat  B ) ) ) ) )
109 swrdfv 12318 . . . . . . 7  |-  ( ( ( ( A concat  B
)  e. Word  V  /\  M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  ( A concat  B ) ) ) )  /\  k  e.  ( 0..^ ( N  -  M ) ) )  ->  ( (
( A concat  B ) substr  <. M ,  N >. ) `
 k )  =  ( ( A concat  B
) `  ( k  +  M ) ) )
110108, 109sylancom 667 . . . . . 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 concat  B ) substr  <. M ,  N >. ) `  k )  =  ( ( A concat  B ) `
 ( k  +  M ) ) )
111 swrdfv 12318 . . . . . . 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 471 . . . . . 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 2483 . . . . 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 concat  B ) substr  <. M ,  N >. ) `  k )  =  ( ( A substr  <. M ,  N >. ) `  k
) )
11436, 42, 113eqfnfvd 5798 . . . 4  |-  ( ( ( -.  ( # `  A )  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V
) )  /\  ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) ) )  ->  ( ( A concat  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) )
115114ex 434 . . 3  |-  ( ( -.  ( # `  A
)  =  0  /\  ( A  e. Word  V  /\  B  e. Word  V ) )  ->  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( ( A concat  B
) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
116115ex 434 . 2  |-  ( -.  ( # `  A
)  =  0  -> 
( ( A  e. Word  V  /\  B  e. Word  V
)  ->  ( ( M  e.  ( 0 ... N )  /\  N  e.  ( 0 ... ( # `  A
) ) )  -> 
( ( A concat  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 concat  B ) substr  <. M ,  N >. )  =  ( A substr  <. M ,  N >. ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756    =/= wne 2604   (/)c0 3635   <.cop 3881   class class class wbr 4290    Fn wfn 5411   ` cfv 5416  (class class class)co 6089   RRcr 9279   0cc0 9280    + caddc 9283    < clt 9416    <_ cle 9417    - cmin 9593   NNcn 10320   NN0cn0 10577   ...cfz 11435  ..^cfzo 11546   #chash 12101  Word cword 12219   concat cconcat 12221   substr csubstr 12223
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 2422  ax-rep 4401  ax-sep 4411  ax-nul 4419  ax-pow 4468  ax-pr 4529  ax-un 6370  ax-cnex 9336  ax-resscn 9337  ax-1cn 9338  ax-icn 9339  ax-addcl 9340  ax-addrcl 9341  ax-mulcl 9342  ax-mulrcl 9343  ax-mulcom 9344  ax-addass 9345  ax-mulass 9346  ax-distr 9347  ax-i2m1 9348  ax-1ne0 9349  ax-1rid 9350  ax-rnegex 9351  ax-rrecex 9352  ax-cnre 9353  ax-pre-lttri 9354  ax-pre-lttrn 9355  ax-pre-ltadd 9356  ax-pre-mulgt0 9357
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 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rab 2722  df-v 2972  df-sbc 3185  df-csb 3287  df-dif 3329  df-un 3331  df-in 3333  df-ss 3340  df-pss 3342  df-nul 3636  df-if 3790  df-pw 3860  df-sn 3876  df-pr 3878  df-tp 3880  df-op 3882  df-uni 4090  df-int 4127  df-iun 4171  df-br 4291  df-opab 4349  df-mpt 4350  df-tr 4384  df-eprel 4630  df-id 4634  df-po 4639  df-so 4640  df-fr 4677  df-we 4679  df-ord 4720  df-on 4721  df-lim 4722  df-suc 4723  df-xp 4844  df-rel 4845  df-cnv 4846  df-co 4847  df-dm 4848  df-rn 4849  df-res 4850  df-ima 4851  df-iota 5379  df-fun 5418  df-fn 5419  df-f 5420  df-f1 5421  df-fo 5422  df-f1o 5423  df-fv 5424  df-riota 6050  df-ov 6092  df-oprab 6093  df-mpt2 6094  df-om 6475  df-1st 6575  df-2nd 6576  df-recs 6830  df-rdg 6864  df-1o 6918  df-oadd 6922  df-er 7099  df-en 7309  df-dom 7310  df-sdom 7311  df-fin 7312  df-card 8107  df-pnf 9418  df-mnf 9419  df-xr 9420  df-ltxr 9421  df-le 9422  df-sub 9595  df-neg 9596  df-nn 10321  df-n0 10578  df-z 10645  df-uz 10860  df-fz 11436  df-fzo 11547  df-hash 12102  df-word 12227  df-concat 12229  df-substr 12231
This theorem is referenced by:  swrdccat3  12381  swrdccatin1d  12388
  Copyright terms: Public domain W3C validator