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

Theorem swrdccatin1 12658
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 6283 . . . . . . 7  |-  ( (
# `  A )  =  0  ->  (
0 ... ( # `  A
) )  =  ( 0 ... 0 ) )
21eleq2d 2530 . . . . . 6  |-  ( (
# `  A )  =  0  ->  ( N  e.  ( 0 ... ( # `  A
) )  <->  N  e.  ( 0 ... 0
) ) )
3 elfz1eq 11686 . . . . . . 7  |-  ( N  e.  ( 0 ... 0 )  ->  N  =  0 )
4 elfz1eq 11686 . . . . . . . . 9  |-  ( M  e.  ( 0 ... 0 )  ->  M  =  0 )
5 swrd00 12595 . . . . . . . . . . 11  |-  ( ( A concat  B ) substr  <. 0 ,  0 >. )  =  (/)
6 swrd00 12595 . . . . . . . . . . 11  |-  ( A substr  <. 0 ,  0 >.
)  =  (/)
75, 6eqtr4i 2492 . . . . . . . . . 10  |-  ( ( A concat  B ) substr  <. 0 ,  0 >. )  =  ( A substr  <. 0 ,  0 >. )
8 opeq1 4206 . . . . . . . . . . 11  |-  ( M  =  0  ->  <. M , 
0 >.  =  <. 0 ,  0 >. )
98oveq2d 6291 . . . . . . . . . 10  |-  ( M  =  0  ->  (
( A concat  B ) substr  <. M ,  0 >. )  =  ( ( A concat  B ) substr  <. 0 ,  0 >. ) )
108oveq2d 6291 . . . . . . . . . 10  |-  ( M  =  0  ->  ( A substr  <. M ,  0
>. )  =  ( A substr  <. 0 ,  0
>. ) )
117, 9, 103eqtr4a 2527 . . . . . . . . 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 6283 . . . . . . . . . 10  |-  ( N  =  0  ->  (
0 ... N )  =  ( 0 ... 0
) )
1413eleq2d 2530 . . . . . . . . 9  |-  ( N  =  0  ->  ( M  e.  ( 0 ... N )  <->  M  e.  ( 0 ... 0
) ) )
15 opeq2 4207 . . . . . . . . . . 11  |-  ( N  =  0  ->  <. M ,  N >.  =  <. M , 
0 >. )
1615oveq2d 6291 . . . . . . . . . 10  |-  ( N  =  0  ->  (
( A concat  B ) substr  <. M ,  N >. )  =  ( ( A concat  B ) substr  <. M , 
0 >. ) )
1715oveq2d 6291 . . . . . . . . . 10  |-  ( N  =  0  ->  ( A substr  <. M ,  N >. )  =  ( A substr  <. M ,  0 >.
) )
1816, 17eqeq12d 2482 . . . . . . . . 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 12545 . . . . . . . 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 12550 . . . . . . . . . 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 12613 . . . . . 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 1223 . . . . 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 972 . . . . . . . . 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 12613 . . . . . 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 11820 . . . . . . . . . 10  |-  ( k  e.  ( 0..^ ( N  -  M ) )  <->  ( k  e. 
NN0  /\  ( N  -  M )  e.  NN  /\  k  <  ( N  -  M ) ) )
48 elfz2nn0 11757 . . . . . . . . . . . . . 14  |-  ( M  e.  ( 0 ... N )  <->  ( M  e.  NN0  /\  N  e. 
NN0  /\  M  <_  N ) )
49 nn0addcl 10820 . . . . . . . . . . . . . . . 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 1012 . . . . . . . . . . . . . 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 1012 . . . . . . . . . 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 12515 . . . . . . . . . . . 12  |-  ( A  e. Word  V  ->  ( # `
 A )  e. 
NN0 )
59 df-ne 2657 . . . . . . . . . . . . 13  |-  ( (
# `  A )  =/=  0  <->  -.  ( # `  A
)  =  0 )
60 elnnne0 10798 . . . . . . . . . . . . . 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 11757 . . . . . . . . . . . . . . . 16  |-  ( N  e.  ( 0 ... ( # `  A
) )  <->  ( N  e.  NN0  /\  ( # `  A )  e.  NN0  /\  N  <_  ( # `  A
) ) )
68 nn0re 10793 . . . . . . . . . . . . . . . . . . . . . . . . . 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 10793 . . . . . . . . . . . . . . . . . . . . . . . . . . 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 10793 . . . . . . . . . . . . . . . . . . . . . . . . . 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 10141 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( N  e.  NN0  /\  ( # `  A
)  e.  NN0 )  /\  ( k  e.  NN0  /\  M  e.  NN0 )
)  ->  ( (
k  +  M )  <  N  <->  k  <  ( N  -  M ) ) )
76 nn0re 10793 . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 10793 . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 9665 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( k  +  M
)  e.  RR  /\  N  e.  RR  /\  ( # `
 A )  e.  RR )  ->  (
( ( k  +  M )  <  N  /\  N  <_  ( # `  A ) )  -> 
( k  +  M
)  <  ( # `  A
) ) )
8378, 74, 81, 82syl3anc 1223 . . . . . . . . . . . . . . . . . . . . . . . . 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 1188 . . . . . . . . . . . . . . . . . . . 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 1010 . . . . . . . . . . . . . . . . 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 1012 . . . . . . . . . . . . 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 11820 . . . . . . . 8  |-  ( ( k  +  M )  e.  ( 0..^ (
# `  A )
)  <->  ( ( k  +  M )  e. 
NN0  /\  ( # `  A
)  e.  NN  /\  ( k  +  M
)  <  ( # `  A
) ) )
10257, 66, 100, 101syl3anbrc 1175 . . . . . . 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 12547 . . . . . . 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 1223 . . . . . 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 1171 . . . . . . 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 12601 . . . . . . 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 12601 . . . . . . 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 2511 . . . . 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 5969 . . . 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 968    = wceq 1374    e. wcel 1762    =/= wne 2655   (/)c0 3778   <.cop 4026   class class class wbr 4440    Fn wfn 5574   ` cfv 5579  (class class class)co 6275   RRcr 9480   0cc0 9481    + caddc 9484    < clt 9617    <_ cle 9618    - cmin 9794   NNcn 10525   NN0cn0 10784   ...cfz 11661  ..^cfzo 11781   #chash 12360  Word cword 12487   concat cconcat 12489   substr csubstr 12491
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1714  ax-7 1734  ax-8 1764  ax-9 1766  ax-10 1781  ax-11 1786  ax-12 1798  ax-13 1961  ax-ext 2438  ax-rep 4551  ax-sep 4561  ax-nul 4569  ax-pow 4618  ax-pr 4679  ax-un 6567  ax-cnex 9537  ax-resscn 9538  ax-1cn 9539  ax-icn 9540  ax-addcl 9541  ax-addrcl 9542  ax-mulcl 9543  ax-mulrcl 9544  ax-mulcom 9545  ax-addass 9546  ax-mulass 9547  ax-distr 9548  ax-i2m1 9549  ax-1ne0 9550  ax-1rid 9551  ax-rnegex 9552  ax-rrecex 9553  ax-cnre 9554  ax-pre-lttri 9555  ax-pre-lttrn 9556  ax-pre-ltadd 9557  ax-pre-mulgt0 9558
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 969  df-3an 970  df-tru 1377  df-ex 1592  df-nf 1595  df-sb 1707  df-eu 2272  df-mo 2273  df-clab 2446  df-cleq 2452  df-clel 2455  df-nfc 2610  df-ne 2657  df-nel 2658  df-ral 2812  df-rex 2813  df-reu 2814  df-rab 2816  df-v 3108  df-sbc 3325  df-csb 3429  df-dif 3472  df-un 3474  df-in 3476  df-ss 3483  df-pss 3485  df-nul 3779  df-if 3933  df-pw 4005  df-sn 4021  df-pr 4023  df-tp 4025  df-op 4027  df-uni 4239  df-int 4276  df-iun 4320  df-br 4441  df-opab 4499  df-mpt 4500  df-tr 4534  df-eprel 4784  df-id 4788  df-po 4793  df-so 4794  df-fr 4831  df-we 4833  df-ord 4874  df-on 4875  df-lim 4876  df-suc 4877  df-xp 4998  df-rel 4999  df-cnv 5000  df-co 5001  df-dm 5002  df-rn 5003  df-res 5004  df-ima 5005  df-iota 5542  df-fun 5581  df-fn 5582  df-f 5583  df-f1 5584  df-fo 5585  df-f1o 5586  df-fv 5587  df-riota 6236  df-ov 6278  df-oprab 6279  df-mpt2 6280  df-om 6672  df-1st 6774  df-2nd 6775  df-recs 7032  df-rdg 7066  df-1o 7120  df-oadd 7124  df-er 7301  df-en 7507  df-dom 7508  df-sdom 7509  df-fin 7510  df-card 8309  df-pnf 9619  df-mnf 9620  df-xr 9621  df-ltxr 9622  df-le 9623  df-sub 9796  df-neg 9797  df-nn 10526  df-n0 10785  df-z 10854  df-uz 11072  df-fz 11662  df-fzo 11782  df-hash 12361  df-word 12495  df-concat 12497  df-substr 12499
This theorem is referenced by:  swrdccat3  12667  swrdccatin1d  12674
  Copyright terms: Public domain W3C validator