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

Theorem efgredlemd 15368
Description: The reduced word that forms the base of the sequence in efgsval 15355 is uniquely determined, given the ending representation. (Contributed by Mario Carneiro, 1-Oct-2015.)
Hypotheses
Ref Expression
efgval.w  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
efgval.r  |-  .~  =  ( ~FG  `  I )
efgval2.m  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
efgval2.t  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
efgred.d  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
efgred.s  |-  S  =  ( m  e.  {
t  e.  (Word  W  \  { (/) } )  |  ( ( t ` 
0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t
) ) ( t `
 k )  e. 
ran  ( T `  ( t `  (
k  -  1 ) ) ) ) } 
|->  ( m `  (
( # `  m )  -  1 ) ) )
efgredlem.1  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
efgredlem.2  |-  ( ph  ->  A  e.  dom  S
)
efgredlem.3  |-  ( ph  ->  B  e.  dom  S
)
efgredlem.4  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
efgredlem.5  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
efgredlemb.k  |-  K  =  ( ( ( # `  A )  -  1 )  -  1 )
efgredlemb.l  |-  L  =  ( ( ( # `  B )  -  1 )  -  1 )
efgredlemb.p  |-  ( ph  ->  P  e.  ( 0 ... ( # `  ( A `  K )
) ) )
efgredlemb.q  |-  ( ph  ->  Q  e.  ( 0 ... ( # `  ( B `  L )
) ) )
efgredlemb.u  |-  ( ph  ->  U  e.  ( I  X.  2o ) )
efgredlemb.v  |-  ( ph  ->  V  e.  ( I  X.  2o ) )
efgredlemb.6  |-  ( ph  ->  ( S `  A
)  =  ( P ( T `  ( A `  K )
) U ) )
efgredlemb.7  |-  ( ph  ->  ( S `  B
)  =  ( Q ( T `  ( B `  L )
) V ) )
efgredlemb.8  |-  ( ph  ->  -.  ( A `  K )  =  ( B `  L ) )
efgredlemd.9  |-  ( ph  ->  P  e.  ( ZZ>= `  ( Q  +  2
) ) )
efgredlemd.c  |-  ( ph  ->  C  e.  dom  S
)
efgredlemd.sc  |-  ( ph  ->  ( S `  C
)  =  ( ( ( B `  L
) substr  <. 0 ,  Q >. ) concat  ( ( A `
 K ) substr  <. ( Q  +  2 ) ,  ( # `  ( A `  K )
) >. ) ) )
Assertion
Ref Expression
efgredlemd  |-  ( ph  ->  ( A `  0
)  =  ( B `
 0 ) )
Distinct variable groups:    a, b, A    y, a, z, b    L, a, b    K, a, b    t, n, v, w, y, z, P   
m, a, n, t, v, w, x, M, b    U, n, v, w, y, z    k, a, T, b, m, t, x    n, V, v, w, y, z    Q, n, t, v, w, y, z    W, a, b    k, n, v, w, y, z, W, m, t, x    .~ , a, b, m, t, x, y, z    B, a, b    C, a, b, k, m, n, t, v, w, x, y, z    S, a, b    I,
a, b, m, n, t, v, w, x, y, z    D, a, b, m, t
Allowed substitution hints:    ph( x, y, z, w, v, t, k, m, n, a, b)    A( x, y, z, w, v, t, k, m, n)    B( x, y, z, w, v, t, k, m, n)    D( x, y, z, w, v, k, n)    P( x, k, m, a, b)    Q( x, k, m, a, b)    .~ ( w, v, k, n)    S( x, y, z, w, v, t, k, m, n)    T( y, z, w, v, n)    U( x, t, k, m, a, b)    I( k)    K( x, y, z, w, v, t, k, m, n)    L( x, y, z, w, v, t, k, m, n)    M( y, z, k)    V( x, t, k, m, a, b)

Proof of Theorem efgredlemd
Dummy variable  i is distinct from all other variables.
StepHypRef Expression
1 efgredlemd.c . . . . . . 7  |-  ( ph  ->  C  e.  dom  S
)
2 efgval.w . . . . . . . . 9  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
3 efgval.r . . . . . . . . 9  |-  .~  =  ( ~FG  `  I )
4 efgval2.m . . . . . . . . 9  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
5 efgval2.t . . . . . . . . 9  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
6 efgred.d . . . . . . . . 9  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
7 efgred.s . . . . . . . . 9  |-  S  =  ( m  e.  {
t  e.  (Word  W  \  { (/) } )  |  ( ( t ` 
0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t
) ) ( t `
 k )  e. 
ran  ( T `  ( t `  (
k  -  1 ) ) ) ) } 
|->  ( m `  (
( # `  m )  -  1 ) ) )
82, 3, 4, 5, 6, 7efgsdm 15354 . . . . . . . 8  |-  ( C  e.  dom  S  <->  ( C  e.  (Word  W  \  { (/)
} )  /\  ( C `  0 )  e.  D  /\  A. i  e.  ( 1..^ ( # `  C ) ) ( C `  i )  e.  ran  ( T `
 ( C `  ( i  -  1 ) ) ) ) )
98simp1bi 972 . . . . . . 7  |-  ( C  e.  dom  S  ->  C  e.  (Word  W  \  { (/) } ) )
101, 9syl 16 . . . . . 6  |-  ( ph  ->  C  e.  (Word  W  \  { (/) } ) )
1110eldifad 3324 . . . . 5  |-  ( ph  ->  C  e. Word  W )
12 efgredlem.2 . . . . . . . . . 10  |-  ( ph  ->  A  e.  dom  S
)
132, 3, 4, 5, 6, 7efgsdm 15354 . . . . . . . . . . 11  |-  ( A  e.  dom  S  <->  ( A  e.  (Word  W  \  { (/)
} )  /\  ( A `  0 )  e.  D  /\  A. i  e.  ( 1..^ ( # `  A ) ) ( A `  i )  e.  ran  ( T `
 ( A `  ( i  -  1 ) ) ) ) )
1413simp1bi 972 . . . . . . . . . 10  |-  ( A  e.  dom  S  ->  A  e.  (Word  W  \  { (/) } ) )
1512, 14syl 16 . . . . . . . . 9  |-  ( ph  ->  A  e.  (Word  W  \  { (/) } ) )
1615eldifad 3324 . . . . . . . 8  |-  ( ph  ->  A  e. Word  W )
17 wrdf 11725 . . . . . . . 8  |-  ( A  e. Word  W  ->  A : ( 0..^ (
# `  A )
) --> W )
1816, 17syl 16 . . . . . . 7  |-  ( ph  ->  A : ( 0..^ ( # `  A
) ) --> W )
19 fzossfz 11149 . . . . . . . . 9  |-  ( 0..^ ( ( # `  A
)  -  1 ) )  C_  ( 0 ... ( ( # `  A )  -  1 ) )
20 lencl 11727 . . . . . . . . . . . 12  |-  ( A  e. Word  W  ->  ( # `
 A )  e. 
NN0 )
2116, 20syl 16 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  A
)  e.  NN0 )
2221nn0zd 10365 . . . . . . . . . 10  |-  ( ph  ->  ( # `  A
)  e.  ZZ )
23 fzoval 11133 . . . . . . . . . 10  |-  ( (
# `  A )  e.  ZZ  ->  ( 0..^ ( # `  A
) )  =  ( 0 ... ( (
# `  A )  -  1 ) ) )
2422, 23syl 16 . . . . . . . . 9  |-  ( ph  ->  ( 0..^ ( # `  A ) )  =  ( 0 ... (
( # `  A )  -  1 ) ) )
2519, 24syl5sseqr 3389 . . . . . . . 8  |-  ( ph  ->  ( 0..^ ( (
# `  A )  -  1 ) ) 
C_  ( 0..^ (
# `  A )
) )
26 efgredlemb.k . . . . . . . . 9  |-  K  =  ( ( ( # `  A )  -  1 )  -  1 )
27 efgredlem.1 . . . . . . . . . . . 12  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
28 efgredlem.3 . . . . . . . . . . . 12  |-  ( ph  ->  B  e.  dom  S
)
29 efgredlem.4 . . . . . . . . . . . 12  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
30 efgredlem.5 . . . . . . . . . . . 12  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
312, 3, 4, 5, 6, 7, 27, 12, 28, 29, 30efgredlema 15364 . . . . . . . . . . 11  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
3231simpld 446 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
33 fzo0end 11180 . . . . . . . . . 10  |-  ( ( ( # `  A
)  -  1 )  e.  NN  ->  (
( ( # `  A
)  -  1 )  -  1 )  e.  ( 0..^ ( (
# `  A )  -  1 ) ) )
3432, 33syl 16 . . . . . . . . 9  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  -  1 )  e.  ( 0..^ ( ( # `  A
)  -  1 ) ) )
3526, 34syl5eqel 2519 . . . . . . . 8  |-  ( ph  ->  K  e.  ( 0..^ ( ( # `  A
)  -  1 ) ) )
3625, 35sseldd 3341 . . . . . . 7  |-  ( ph  ->  K  e.  ( 0..^ ( # `  A
) ) )
3718, 36ffvelrnd 5863 . . . . . 6  |-  ( ph  ->  ( A `  K
)  e.  W )
3837s1cld 11748 . . . . 5  |-  ( ph  ->  <" ( A `
 K ) ">  e. Word  W )
39 eldifsn 3919 . . . . . . . 8  |-  ( C  e.  (Word  W  \  { (/) } )  <->  ( C  e. Word  W  /\  C  =/=  (/) ) )
40 lennncl 11728 . . . . . . . 8  |-  ( ( C  e. Word  W  /\  C  =/=  (/) )  ->  ( # `
 C )  e.  NN )
4139, 40sylbi 188 . . . . . . 7  |-  ( C  e.  (Word  W  \  { (/) } )  -> 
( # `  C )  e.  NN )
4210, 41syl 16 . . . . . 6  |-  ( ph  ->  ( # `  C
)  e.  NN )
43 lbfzo0 11162 . . . . . 6  |-  ( 0  e.  ( 0..^ (
# `  C )
)  <->  ( # `  C
)  e.  NN )
4442, 43sylibr 204 . . . . 5  |-  ( ph  ->  0  e.  ( 0..^ ( # `  C
) ) )
45 ccatval1 11737 . . . . 5  |-  ( ( C  e. Word  W  /\  <" ( A `  K ) ">  e. Word  W  /\  0  e.  ( 0..^ ( # `  C ) ) )  ->  ( ( C concat  <" ( A `  K ) "> ) `  0 )  =  ( C ` 
0 ) )
4611, 38, 44, 45syl3anc 1184 . . . 4  |-  ( ph  ->  ( ( C concat  <" ( A `  K ) "> ) `  0
)  =  ( C `
 0 ) )
472, 3, 4, 5, 6, 7efgsdm 15354 . . . . . . . . . . 11  |-  ( B  e.  dom  S  <->  ( B  e.  (Word  W  \  { (/)
} )  /\  ( B `  0 )  e.  D  /\  A. i  e.  ( 1..^ ( # `  B ) ) ( B `  i )  e.  ran  ( T `
 ( B `  ( i  -  1 ) ) ) ) )
4847simp1bi 972 . . . . . . . . . 10  |-  ( B  e.  dom  S  ->  B  e.  (Word  W  \  { (/) } ) )
4928, 48syl 16 . . . . . . . . 9  |-  ( ph  ->  B  e.  (Word  W  \  { (/) } ) )
5049eldifad 3324 . . . . . . . 8  |-  ( ph  ->  B  e. Word  W )
51 wrdf 11725 . . . . . . . 8  |-  ( B  e. Word  W  ->  B : ( 0..^ (
# `  B )
) --> W )
5250, 51syl 16 . . . . . . 7  |-  ( ph  ->  B : ( 0..^ ( # `  B
) ) --> W )
53 fzossfz 11149 . . . . . . . . 9  |-  ( 0..^ ( ( # `  B
)  -  1 ) )  C_  ( 0 ... ( ( # `  B )  -  1 ) )
54 lencl 11727 . . . . . . . . . . . 12  |-  ( B  e. Word  W  ->  ( # `
 B )  e. 
NN0 )
5550, 54syl 16 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  B
)  e.  NN0 )
5655nn0zd 10365 . . . . . . . . . 10  |-  ( ph  ->  ( # `  B
)  e.  ZZ )
57 fzoval 11133 . . . . . . . . . 10  |-  ( (
# `  B )  e.  ZZ  ->  ( 0..^ ( # `  B
) )  =  ( 0 ... ( (
# `  B )  -  1 ) ) )
5856, 57syl 16 . . . . . . . . 9  |-  ( ph  ->  ( 0..^ ( # `  B ) )  =  ( 0 ... (
( # `  B )  -  1 ) ) )
5953, 58syl5sseqr 3389 . . . . . . . 8  |-  ( ph  ->  ( 0..^ ( (
# `  B )  -  1 ) ) 
C_  ( 0..^ (
# `  B )
) )
60 efgredlemb.l . . . . . . . . 9  |-  L  =  ( ( ( # `  B )  -  1 )  -  1 )
6131simprd 450 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  NN )
62 fzo0end 11180 . . . . . . . . . 10  |-  ( ( ( # `  B
)  -  1 )  e.  NN  ->  (
( ( # `  B
)  -  1 )  -  1 )  e.  ( 0..^ ( (
# `  B )  -  1 ) ) )
6361, 62syl 16 . . . . . . . . 9  |-  ( ph  ->  ( ( ( # `  B )  -  1 )  -  1 )  e.  ( 0..^ ( ( # `  B
)  -  1 ) ) )
6460, 63syl5eqel 2519 . . . . . . . 8  |-  ( ph  ->  L  e.  ( 0..^ ( ( # `  B
)  -  1 ) ) )
6559, 64sseldd 3341 . . . . . . 7  |-  ( ph  ->  L  e.  ( 0..^ ( # `  B
) ) )
6652, 65ffvelrnd 5863 . . . . . 6  |-  ( ph  ->  ( B `  L
)  e.  W )
6766s1cld 11748 . . . . 5  |-  ( ph  ->  <" ( B `
 L ) ">  e. Word  W )
68 ccatval1 11737 . . . . 5  |-  ( ( C  e. Word  W  /\  <" ( B `  L ) ">  e. Word  W  /\  0  e.  ( 0..^ ( # `  C ) ) )  ->  ( ( C concat  <" ( B `  L ) "> ) `  0 )  =  ( C ` 
0 ) )
6911, 67, 44, 68syl3anc 1184 . . . 4  |-  ( ph  ->  ( ( C concat  <" ( B `  L ) "> ) `  0
)  =  ( C `
 0 ) )
7046, 69eqtr4d 2470 . . 3  |-  ( ph  ->  ( ( C concat  <" ( A `  K ) "> ) `  0
)  =  ( ( C concat  <" ( B `
 L ) "> ) `  0
) )
71 fviss 5776 . . . . . . . . . 10  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
722, 71eqsstri 3370 . . . . . . . . 9  |-  W  C_ Word  ( I  X.  2o )
7372, 37sseldi 3338 . . . . . . . 8  |-  ( ph  ->  ( A `  K
)  e. Word  ( I  X.  2o ) )
74 lencl 11727 . . . . . . . 8  |-  ( ( A `  K )  e. Word  ( I  X.  2o )  ->  ( # `  ( A `  K
) )  e.  NN0 )
7573, 74syl 16 . . . . . . 7  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  NN0 )
7675nn0red 10267 . . . . . 6  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  RR )
77 2rp 10609 . . . . . 6  |-  2  e.  RR+
78 ltaddrp 10636 . . . . . 6  |-  ( ( ( # `  ( A `  K )
)  e.  RR  /\  2  e.  RR+ )  -> 
( # `  ( A `
 K ) )  <  ( ( # `  ( A `  K
) )  +  2 ) )
7976, 77, 78sylancl 644 . . . . 5  |-  ( ph  ->  ( # `  ( A `  K )
)  <  ( ( # `
 ( A `  K ) )  +  2 ) )
8021nn0red 10267 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  A
)  e.  RR )
8180lem1d 9936 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  A
)  -  1 )  <_  ( # `  A
) )
82 fznn 11107 . . . . . . . . . . 11  |-  ( (
# `  A )  e.  ZZ  ->  ( (
( # `  A )  -  1 )  e.  ( 1 ... ( # `
 A ) )  <-> 
( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  A
)  -  1 )  <_  ( # `  A
) ) ) )
8322, 82syl 16 . . . . . . . . . 10  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  ( 1 ... ( # `  A
) )  <->  ( (
( # `  A )  -  1 )  e.  NN  /\  ( (
# `  A )  -  1 )  <_ 
( # `  A ) ) ) )
8432, 81, 83mpbir2and 889 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  ( 1 ... ( # `  A
) ) )
852, 3, 4, 5, 6, 7efgsres 15362 . . . . . . . . 9  |-  ( ( A  e.  dom  S  /\  ( ( # `  A
)  -  1 )  e.  ( 1 ... ( # `  A
) ) )  -> 
( A  |`  (
0..^ ( ( # `  A )  -  1 ) ) )  e. 
dom  S )
8612, 84, 85syl2anc 643 . . . . . . . 8  |-  ( ph  ->  ( A  |`  (
0..^ ( ( # `  A )  -  1 ) ) )  e. 
dom  S )
872, 3, 4, 5, 6, 7efgsval 15355 . . . . . . . 8  |-  ( ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) )  e.  dom  S  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 ) ) )
8886, 87syl 16 . . . . . . 7  |-  ( ph  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 ) ) )
89 1nn0 10229 . . . . . . . . . . . . . . . 16  |-  1  e.  NN0
90 nn0uz 10512 . . . . . . . . . . . . . . . 16  |-  NN0  =  ( ZZ>= `  0 )
9189, 90eleqtri 2507 . . . . . . . . . . . . . . 15  |-  1  e.  ( ZZ>= `  0 )
92 fzss1 11083 . . . . . . . . . . . . . . 15  |-  ( 1  e.  ( ZZ>= `  0
)  ->  ( 1 ... ( # `  A
) )  C_  (
0 ... ( # `  A
) ) )
9391, 92ax-mp 8 . . . . . . . . . . . . . 14  |-  ( 1 ... ( # `  A
) )  C_  (
0 ... ( # `  A
) )
9493, 84sseldi 3338 . . . . . . . . . . . . 13  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  ( 0 ... ( # `  A
) ) )
95 swrd0val 11760 . . . . . . . . . . . . 13  |-  ( ( A  e. Word  W  /\  ( ( # `  A
)  -  1 )  e.  ( 0 ... ( # `  A
) ) )  -> 
( A substr  <. 0 ,  ( ( # `  A
)  -  1 )
>. )  =  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )
9616, 94, 95syl2anc 643 . . . . . . . . . . . 12  |-  ( ph  ->  ( A substr  <. 0 ,  ( ( # `  A )  -  1 ) >. )  =  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )
9796fveq2d 5724 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( A substr  <. 0 ,  ( ( # `  A
)  -  1 )
>. ) )  =  (
# `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )
98 swrd0len 11761 . . . . . . . . . . . 12  |-  ( ( A  e. Word  W  /\  ( ( # `  A
)  -  1 )  e.  ( 0 ... ( # `  A
) ) )  -> 
( # `  ( A substr  <. 0 ,  ( (
# `  A )  -  1 ) >.
) )  =  ( ( # `  A
)  -  1 ) )
9916, 94, 98syl2anc 643 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( A substr  <. 0 ,  ( ( # `  A
)  -  1 )
>. ) )  =  ( ( # `  A
)  -  1 ) )
10097, 99eqtr3d 2469 . . . . . . . . . 10  |-  ( ph  ->  ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( ( # `  A
)  -  1 ) )
101100oveq1d 6088 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 )  =  ( ( ( # `  A
)  -  1 )  -  1 ) )
102101, 26syl6eqr 2485 . . . . . . . 8  |-  ( ph  ->  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 )  =  K )
103102fveq2d 5724 . . . . . . 7  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 ) )  =  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  K ) )
104 fvres 5737 . . . . . . . 8  |-  ( K  e.  ( 0..^ ( ( # `  A
)  -  1 ) )  ->  ( ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) `  K
)  =  ( A `
 K ) )
10535, 104syl 16 . . . . . . 7  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  K )  =  ( A `  K ) )
10688, 103, 1053eqtrd 2471 . . . . . 6  |-  ( ph  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( A `  K
) )
107106fveq2d 5724 . . . . 5  |-  ( ph  ->  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  =  ( # `  ( A `  K )
) )
1082, 3, 4, 5, 6, 7efgsdmi 15356 . . . . . . . 8  |-  ( ( A  e.  dom  S  /\  ( ( # `  A
)  -  1 )  e.  NN )  -> 
( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
10912, 32, 108syl2anc 643 . . . . . . 7  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
11026fveq2i 5723 . . . . . . . . 9  |-  ( A `
 K )  =  ( A `  (
( ( # `  A
)  -  1 )  -  1 ) )
111110fveq2i 5723 . . . . . . . 8  |-  ( T `
 ( A `  K ) )  =  ( T `  ( A `  ( (
( # `  A )  -  1 )  - 
1 ) ) )
112111rneqi 5088 . . . . . . 7  |-  ran  ( T `  ( A `  K ) )  =  ran  ( T `  ( A `  ( ( ( # `  A
)  -  1 )  -  1 ) ) )
113109, 112syl6eleqr 2526 . . . . . 6  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  K ) ) )
1142, 3, 4, 5efgtlen 15350 . . . . . 6  |-  ( ( ( A `  K
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( A `  K ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
11537, 113, 114syl2anc 643 . . . . 5  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
11679, 107, 1153brtr4d 4234 . . . 4  |-  ( ph  ->  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) )
117 efgredlemb.p . . . . . . . . 9  |-  ( ph  ->  P  e.  ( 0 ... ( # `  ( A `  K )
) ) )
118 efgredlemb.q . . . . . . . . 9  |-  ( ph  ->  Q  e.  ( 0 ... ( # `  ( B `  L )
) ) )
119 efgredlemb.u . . . . . . . . 9  |-  ( ph  ->  U  e.  ( I  X.  2o ) )
120 efgredlemb.v . . . . . . . . 9  |-  ( ph  ->  V  e.  ( I  X.  2o ) )
121 efgredlemb.6 . . . . . . . . 9  |-  ( ph  ->  ( S `  A
)  =  ( P ( T `  ( A `  K )
) U ) )
122 efgredlemb.7 . . . . . . . . 9  |-  ( ph  ->  ( S `  B
)  =  ( Q ( T `  ( B `  L )
) V ) )
123 efgredlemb.8 . . . . . . . . 9  |-  ( ph  ->  -.  ( A `  K )  =  ( B `  L ) )
124 efgredlemd.9 . . . . . . . . 9  |-  ( ph  ->  P  e.  ( ZZ>= `  ( Q  +  2
) ) )
125 efgredlemd.sc . . . . . . . . 9  |-  ( ph  ->  ( S `  C
)  =  ( ( ( B `  L
) substr  <. 0 ,  Q >. ) concat  ( ( A `
 K ) substr  <. ( Q  +  2 ) ,  ( # `  ( A `  K )
) >. ) ) )
1262, 3, 4, 5, 6, 7, 27, 12, 28, 29, 30, 26, 60, 117, 118, 119, 120, 121, 122, 123, 124, 1, 125efgredleme 15367 . . . . . . . 8  |-  ( ph  ->  ( ( A `  K )  e.  ran  ( T `  ( S `
 C ) )  /\  ( B `  L )  e.  ran  ( T `  ( S `
 C ) ) ) )
127126simpld 446 . . . . . . 7  |-  ( ph  ->  ( A `  K
)  e.  ran  ( T `  ( S `  C ) ) )
1282, 3, 4, 5, 6, 7efgsp1 15361 . . . . . . 7  |-  ( ( C  e.  dom  S  /\  ( A `  K
)  e.  ran  ( T `  ( S `  C ) ) )  ->  ( C concat  <" ( A `  K ) "> )  e.  dom  S )
1291, 127, 128syl2anc 643 . . . . . 6  |-  ( ph  ->  ( C concat  <" ( A `  K ) "> )  e.  dom  S )
1302, 3, 4, 5, 6, 7efgsval2 15357 . . . . . 6  |-  ( ( C  e. Word  W  /\  ( A `  K )  e.  W  /\  ( C concat  <" ( A `
 K ) "> )  e.  dom  S )  ->  ( S `  ( C concat  <" ( A `  K ) "> ) )  =  ( A `  K
) )
13111, 37, 129, 130syl3anc 1184 . . . . 5  |-  ( ph  ->  ( S `  ( C concat  <" ( A `
 K ) "> ) )  =  ( A `  K
) )
132106, 131eqtr4d 2470 . . . 4  |-  ( ph  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `
 K ) "> ) ) )
133 fveq2 5720 . . . . . . . . 9  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( S `  a
)  =  ( S `
 ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ) )
134133fveq2d 5724 . . . . . . . 8  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( # `  ( S `
 a ) )  =  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) ) )
135134breq1d 4214 . . . . . . 7  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  <->  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) ) )
136133eqeq1d 2443 . . . . . . . 8  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( S `  a )  =  ( S `  b )  <-> 
( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  b
) ) )
137 fveq1 5719 . . . . . . . . 9  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( a `  0
)  =  ( ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) `  0
) )
138137eqeq1d 2443 . . . . . . . 8  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( a ` 
0 )  =  ( b `  0 )  <-> 
( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( b `  0 ) ) )
139136, 138imbi12d 312 . . . . . . 7  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( ( S `
 a )  =  ( S `  b
)  ->  ( a `  0 )  =  ( b `  0
) )  <->  ( ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) )  =  ( S `  b )  ->  ( ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) `  0 )  =  ( b ` 
0 ) ) ) )
140135, 139imbi12d 312 . . . . . 6  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( ( # `  ( S `  a
) )  <  ( # `
 ( S `  A ) )  -> 
( ( S `  a )  =  ( S `  b )  ->  ( a ` 
0 )  =  ( b `  0 ) ) )  <->  ( ( # `
 ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) ) )  <  ( # `  ( S `  A )
)  ->  ( ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) )  =  ( S `  b )  ->  ( ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) `  0 )  =  ( b ` 
0 ) ) ) ) )
141 fveq2 5720 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  ( S `  b )  =  ( S `  ( C concat  <" ( A `  K ) "> ) ) )
142141eqeq2d 2446 . . . . . . . 8  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  (
( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  b
)  <->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `
 K ) "> ) ) ) )
143 fveq1 5719 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  (
b `  0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0 )
)
144143eqeq2d 2446 . . . . . . . 8  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  (
( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( b `  0 )  <-> 
( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0
) ) )
145142, 144imbi12d 312 . . . . . . 7  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  (
( ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  b
)  ->  ( ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) `  0
)  =  ( b `
 0 ) )  <-> 
( ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `
 K ) "> ) )  -> 
( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0
) ) ) )
146145imbi2d 308 . . . . . 6  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  (
( ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) )  ->  ( ( S `
 ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) )  =  ( S `  b )  ->  (
( A  |`  (
0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( b `  0 ) ) )  <->  ( ( # `
 ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) ) )  <  ( # `  ( S `  A )
)  ->  ( ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `  K ) "> ) )  ->  (
( A  |`  (
0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0
) ) ) ) )
147140, 146rspc2va 3051 . . . . 5  |-  ( ( ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  e. 
dom  S  /\  ( C concat  <" ( A `
 K ) "> )  e.  dom  S )  /\  A. a  e.  dom  S A. b  e.  dom  S ( (
# `  ( S `  a ) )  < 
( # `  ( S `
 A ) )  ->  ( ( S `
 a )  =  ( S `  b
)  ->  ( a `  0 )  =  ( b `  0
) ) ) )  ->  ( ( # `  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) ) )  <  ( # `  ( S `  A )
)  ->  ( ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `  K ) "> ) )  ->  (
( A  |`  (
0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0
) ) ) )
14886, 129, 27, 147syl21anc 1183 . . . 4  |-  ( ph  ->  ( ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) )  ->  ( ( S `
 ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `  K ) "> ) )  -> 
( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0
) ) ) )
149116, 132, 148mp2d 43 . . 3  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0
) )
15072, 66sseldi 3338 . . . . . . . 8  |-  ( ph  ->  ( B `  L
)  e. Word  ( I  X.  2o ) )
151 lencl 11727 . . . . . . . 8  |-  ( ( B `  L )  e. Word  ( I  X.  2o )  ->  ( # `  ( B `  L
) )  e.  NN0 )
152150, 151syl 16 . . . . . . 7  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  NN0 )
153152nn0red 10267 . . . . . 6  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  RR )
154 ltaddrp 10636 . . . . . 6  |-  ( ( ( # `  ( B `  L )
)  e.  RR  /\  2  e.  RR+ )  -> 
( # `  ( B `
 L ) )  <  ( ( # `  ( B `  L
) )  +  2 ) )
155153, 77, 154sylancl 644 . . . . 5  |-  ( ph  ->  ( # `  ( B `  L )
)  <  ( ( # `
 ( B `  L ) )  +  2 ) )
15655nn0red 10267 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  B
)  e.  RR )
157156lem1d 9936 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  B
)  -  1 )  <_  ( # `  B
) )
158 fznn 11107 . . . . . . . . . . 11  |-  ( (
# `  B )  e.  ZZ  ->  ( (
( # `  B )  -  1 )  e.  ( 1 ... ( # `
 B ) )  <-> 
( ( ( # `  B )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  <_  ( # `  B
) ) ) )
15956, 158syl 16 . . . . . . . . . 10  |-  ( ph  ->  ( ( ( # `  B )  -  1 )  e.  ( 1 ... ( # `  B
) )  <->  ( (
( # `  B )  -  1 )  e.  NN  /\  ( (
# `  B )  -  1 )  <_ 
( # `  B ) ) ) )
16061, 157, 159mpbir2and 889 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  ( 1 ... ( # `  B
) ) )
1612, 3, 4, 5, 6, 7efgsres 15362 . . . . . . . . 9  |-  ( ( B  e.  dom  S  /\  ( ( # `  B
)  -  1 )  e.  ( 1 ... ( # `  B
) ) )  -> 
( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) )  e. 
dom  S )
16228, 160, 161syl2anc 643 . . . . . . . 8  |-  ( ph  ->  ( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) )  e. 
dom  S )
1632, 3, 4, 5, 6, 7efgsval 15355 . . . . . . . 8  |-  ( ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) )  e.  dom  S  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 ) ) )
164162, 163syl 16 . . . . . . 7  |-  ( ph  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 ) ) )
165 fzss1 11083 . . . . . . . . . . . . . . 15  |-  ( 1  e.  ( ZZ>= `  0
)  ->  ( 1 ... ( # `  B
) )  C_  (
0 ... ( # `  B
) ) )
16691, 165ax-mp 8 . . . . . . . . . . . . . 14  |-  ( 1 ... ( # `  B
) )  C_  (
0 ... ( # `  B
) )
167166, 160sseldi 3338 . . . . . . . . . . . . 13  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  ( 0 ... ( # `  B
) ) )
168 swrd0val 11760 . . . . . . . . . . . . 13  |-  ( ( B  e. Word  W  /\  ( ( # `  B
)  -  1 )  e.  ( 0 ... ( # `  B
) ) )  -> 
( B substr  <. 0 ,  ( ( # `  B
)  -  1 )
>. )  =  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )
16950, 167, 168syl2anc 643 . . . . . . . . . . . 12  |-  ( ph  ->  ( B substr  <. 0 ,  ( ( # `  B )  -  1 ) >. )  =  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )
170169fveq2d 5724 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( B substr  <. 0 ,  ( ( # `  B
)  -  1 )
>. ) )  =  (
# `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )
171 swrd0len 11761 . . . . . . . . . . . 12  |-  ( ( B  e. Word  W  /\  ( ( # `  B
)  -  1 )  e.  ( 0 ... ( # `  B
) ) )  -> 
( # `  ( B substr  <. 0 ,  ( (
# `  B )  -  1 ) >.
) )  =  ( ( # `  B
)  -  1 ) )
17250, 167, 171syl2anc 643 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( B substr  <. 0 ,  ( ( # `  B
)  -  1 )
>. ) )  =  ( ( # `  B
)  -  1 ) )
173170, 172eqtr3d 2469 . . . . . . . . . 10  |-  ( ph  ->  ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( ( # `  B
)  -  1 ) )
174173oveq1d 6088 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 )  =  ( ( ( # `  B
)  -  1 )  -  1 ) )
175174, 60syl6eqr 2485 . . . . . . . 8  |-  ( ph  ->  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 )  =  L )
176175fveq2d 5724 . . . . . . 7  |-  ( ph  ->  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 ) )  =  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  L ) )
177 fvres 5737 . . . . . . . 8  |-  ( L  e.  ( 0..^ ( ( # `  B
)  -  1 ) )  ->  ( ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) `  L
)  =  ( B `
 L ) )
17864, 177syl 16 . . . . . . 7  |-  ( ph  ->  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  L )  =  ( B `  L ) )
179164, 176, 1783eqtrd 2471 . . . . . 6  |-  ( ph  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( B `  L
) )
180179fveq2d 5724 . . . . 5  |-  ( ph  ->  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  =  ( # `  ( B `  L )
) )
1812, 3, 4, 5, 6, 7efgsdmi 15356 . . . . . . . . 9  |-  ( ( B  e.  dom  S  /\  ( ( # `  B
)  -  1 )  e.  NN )  -> 
( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
18228, 61, 181syl2anc 643 . . . . . . . 8  |-  ( ph  ->  ( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
18329, 182eqeltrd 2509 . . . . . . 7  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
18460fveq2i 5723 . . . . . . . . 9  |-  ( B `
 L )  =  ( B `  (
( ( # `  B
)  -  1 )  -  1 ) )
185184fveq2i 5723 . . . . . . . 8  |-  ( T `
 ( B `  L ) )  =  ( T `  ( B `  ( (
( # `  B )  -  1 )  - 
1 ) ) )
186185rneqi 5088 . . . . . . 7  |-  ran  ( T `  ( B `  L ) )  =  ran  ( T `  ( B `  ( ( ( # `  B
)  -  1 )  -  1 ) ) )
187183, 186syl6eleqr 2526 . . . . . 6  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  L ) ) )
1882, 3, 4, 5efgtlen 15350 . . . . . 6  |-  ( ( ( B `  L
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( B `  L ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
18966, 187, 188syl2anc 643 . . . . 5  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
190155, 180, 1893brtr4d 4234 . . . 4  |-  ( ph  ->  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) )
191126simprd 450 . . . . . . 7  |-  ( ph  ->  ( B `  L
)  e.  ran  ( T `  ( S `  C ) ) )
1922, 3, 4, 5, 6, 7efgsp1 15361 . . . . . . 7  |-  ( ( C  e.  dom  S  /\  ( B `  L
)  e.  ran  ( T `  ( S `  C ) ) )  ->  ( C concat  <" ( B `  L ) "> )  e.  dom  S )
1931, 191, 192syl2anc 643 . . . . . 6  |-  ( ph  ->  ( C concat  <" ( B `  L ) "> )  e.  dom  S )
1942, 3, 4, 5, 6, 7efgsval2 15357 . . . . . 6  |-  ( ( C  e. Word  W  /\  ( B `  L )  e.  W  /\  ( C concat  <" ( B `
 L ) "> )  e.  dom  S )  ->  ( S `  ( C concat  <" ( B `  L ) "> ) )  =  ( B `  L
) )
19511, 66, 193, 194syl3anc 1184 . . . . 5  |-  ( ph  ->  ( S `  ( C concat  <" ( B `
 L ) "> ) )  =  ( B `  L
) )
196179, 195eqtr4d 2470 . . . 4  |-  ( ph  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `
 L ) "> ) ) )
197 fveq2 5720 . . . . . . . . 9  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( S `  a
)  =  ( S `
 ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ) )
198197fveq2d 5724 . . . . . . . 8  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( # `  ( S `
 a ) )  =  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) ) )
199198breq1d 4214 . . . . . . 7  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  <->  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) ) )
200197eqeq1d 2443 . . . . . . . 8  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( S `  a )  =  ( S `  b )  <-> 
( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  b
) ) )
201 fveq1 5719 . . . . . . . . 9  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( a `  0
)  =  ( ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) `  0
) )
202201eqeq1d 2443 . . . . . . . 8  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( a ` 
0 )  =  ( b `  0 )  <-> 
( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( b `  0 ) ) )
203200, 202imbi12d 312 . . . . . . 7  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( ( S `
 a )  =  ( S `  b
)  ->  ( a `  0 )  =  ( b `  0
) )  <->  ( ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) )  =  ( S `  b )  ->  ( ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) `  0 )  =  ( b ` 
0 ) ) ) )
204199, 203imbi12d 312 . . . . . 6  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( ( # `  ( S `  a
) )  <  ( # `
 ( S `  A ) )  -> 
( ( S `  a )  =  ( S `  b )  ->  ( a ` 
0 )  =  ( b `  0 ) ) )  <->  ( ( # `
 ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) ) )  <  ( # `  ( S `  A )
)  ->  ( ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) )  =  ( S `  b )  ->  ( ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) `  0 )  =  ( b ` 
0 ) ) ) ) )
205 fveq2 5720 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  ( S `  b )  =  ( S `  ( C concat  <" ( B `  L ) "> ) ) )
206205eqeq2d 2446 . . . . . . . 8  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  (
( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  b
)  <->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `
 L ) "> ) ) ) )
207 fveq1 5719 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  (
b `  0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0 )
)
208207eqeq2d 2446 . . . . . . . 8  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  (
( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( b `  0 )  <-> 
( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0
) ) )
209206, 208imbi12d 312 . . . . . . 7  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  (
( ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  b
)  ->  ( ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) `  0
)  =  ( b `
 0 ) )  <-> 
( ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `
 L ) "> ) )  -> 
( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0
) ) ) )
210209imbi2d 308 . . . . . 6  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  (
( ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) )  ->  ( ( S `
 ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) )  =  ( S `  b )  ->  (
( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( b `  0 ) ) )  <->  ( ( # `
 ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) ) )  <  ( # `  ( S `  A )
)  ->  ( ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `  L ) "> ) )  ->  (
( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0
) ) ) ) )
211204, 210rspc2va 3051 . . . . 5  |-  ( ( ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  e. 
dom  S  /\  ( C concat  <" ( B `
 L ) "> )  e.  dom  S )  /\  A. a  e.  dom  S A. b  e.  dom  S ( (
# `  ( S `  a ) )  < 
( # `  ( S `
 A ) )  ->  ( ( S `
 a )  =  ( S `  b
)  ->  ( a `  0 )  =  ( b `  0
) ) ) )  ->  ( ( # `  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) ) )  <  ( # `  ( S `  A )
)  ->  ( ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `  L ) "> ) )  ->  (
( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0
) ) ) )
212162, 193, 27, 211syl21anc 1183 . . . 4  |-  ( ph  ->  ( ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) )  ->  ( ( S `
 ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `  L ) "> ) )  -> 
( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0
) ) ) )
213190, 196, 212mp2d 43 . . 3  |-  ( ph  ->  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0
) )
21470, 149, 2133eqtr4d 2477 . 2  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 ) )
215 lbfzo0 11162 . . . 4  |-  ( 0  e.  ( 0..^ ( ( # `  A
)  -  1 ) )  <->  ( ( # `  A )  -  1 )  e.  NN )
21632, 215sylibr 204 . . 3  |-  ( ph  ->  0  e.  ( 0..^ ( ( # `  A
)  -  1 ) ) )
217 fvres 5737 . . 3  |-  ( 0  e.  ( 0..^ ( ( # `  A
)  -  1 ) )  ->  ( ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) `  0
)  =  ( A `
 0 ) )
218216, 217syl 16 . 2  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( A `  0 ) )
219 lbfzo0 11162 . . . 4  |-  ( 0  e.  ( 0..^ ( ( # `  B
)  -  1 ) )  <->  ( ( # `  B )  -  1 )  e.  NN )
22061, 219sylibr 204 . . 3  |-  ( ph  ->  0  e.  ( 0..^ ( ( # `  B
)  -  1 ) ) )
221 fvres 5737 . . 3  |-  ( 0  e.  ( 0..^ ( ( # `  B
)  -  1 ) )  ->  ( ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) `  0
)  =  ( B `
 0 ) )
222220, 221syl 16 . 2  |-  ( ph  ->  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 )  =  ( B `  0 ) )
223214, 218, 2223eqtr3d 2475 1  |-  ( ph  ->  ( A `  0
)  =  ( B `
 0 ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1652    e. wcel 1725    =/= wne 2598   A.wral 2697   {crab 2701    \ cdif 3309    C_ wss 3312   (/)c0 3620   {csn 3806   <.cop 3809   <.cotp 3810   U_ciun 4085   class class class wbr 4204    e. cmpt 4258    _I cid 4485    X. cxp 4868   dom cdm 4870   ran crn 4871    |` cres 4872   -->wf 5442   ` cfv 5446  (class class class)co 6073    e. cmpt2 6075   1oc1o 6709   2oc2o 6710   RRcr 8981   0cc0 8982   1c1 8983    + caddc 8985    < clt 9112    <_ cle 9113    - cmin 9283   NNcn 9992   2c2 10041   NN0cn0 10213   ZZcz 10274   ZZ>=cuz 10480   RR+crp 10604   ...cfz 11035  ..^cfzo 11127   #chash 11610  Word cword 11709   concat cconcat 11710   <"cs1 11711   substr csubstr 11712   splice csplice 11713   <"cs2 11797   ~FG cefg 15330
This theorem is referenced by:  efgredlemc  15369
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2416  ax-rep 4312  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4693  ax-cnex 9038  ax-resscn 9039  ax-1cn 9040  ax-icn 9041  ax-addcl 9042  ax-addrcl 9043  ax-mulcl 9044  ax-mulrcl 9045  ax-mulcom 9046  ax-addass 9047  ax-mulass 9048  ax-distr 9049  ax-i2m1 9050  ax-1ne0 9051  ax-1rid 9052  ax-rnegex 9053  ax-rrecex 9054  ax-cnre 9055  ax-pre-lttri 9056  ax-pre-lttrn 9057  ax-pre-ltadd 9058  ax-pre-mulgt0 9059
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-nel 2601  df-ral 2702  df-rex 2703  df-reu 2704  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-pss 3328  df-nul 3621  df-if 3732  df-pw 3793  df-sn 3812  df-pr 3813  df-tp 3814  df-op 3815  df-ot 3816  df-uni 4008  df-int 4043  df-iun 4087  df-br 4205  df-opab 4259  df-mpt 4260  df-tr 4295  df-eprel 4486  df-id 4490  df-po 4495  df-so 4496  df-fr 4533  df-we 4535  df-ord 4576  df-on 4577  df-lim 4578  df-suc 4579  df-om 4838  df-xp 4876  df-rel 4877  df-cnv 4878  df-co 4879  df-dm 4880  df-rn 4881  df-res 4882  df-ima 4883  df-iota 5410  df-fun 5448  df-fn 5449  df-f 5450  df-f1 5451  df-fo 5452  df-f1o 5453  df-fv 5454  df-ov 6076  df-oprab 6077  df-mpt2 6078  df-1st 6341  df-2nd 6342  df-riota 6541  df-recs 6625  df-rdg 6660  df-1o 6716  df-2o 6717  df-oadd 6720  df-er 6897  df-map 7012  df-pm 7013  df-en 7102  df-dom 7103  df-sdom 7104  df-fin 7105  df-card 7818  df-pnf 9114  df-mnf 9115  df-xr 9116  df-ltxr 9117  df-le 9118  df-sub 9285  df-neg 9286  df-nn 9993  df-2 10050  df-n0 10214  df-z 10275  df-uz 10481  df-rp 10605  df-fz 11036  df-fzo 11128  df-hash 11611  df-word 11715  df-concat 11716  df-s1 11717  df-substr 11718  df-splice 11719  df-s2 11804
  Copyright terms: Public domain W3C validator