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

Theorem efgredlemd 15331
Description: The reduced word that forms the base of the sequence in efgsval 15318 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 15317 . . . . . . . 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 3292 . . . . 5  |-  ( ph  ->  C  e. Word  W )
12 efgredlem.2 . . . . . . . . . 10  |-  ( ph  ->  A  e.  dom  S
)
132, 3, 4, 5, 6, 7efgsdm 15317 . . . . . . . . . . 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 3292 . . . . . . . 8  |-  ( ph  ->  A  e. Word  W )
17 wrdf 11688 . . . . . . . 8  |-  ( A  e. Word  W  ->  A : ( 0..^ (
# `  A )
) --> W )
1816, 17syl 16 . . . . . . 7  |-  ( ph  ->  A : ( 0..^ ( # `  A
) ) --> W )
19 fzossfz 11112 . . . . . . . . 9  |-  ( 0..^ ( ( # `  A
)  -  1 ) )  C_  ( 0 ... ( ( # `  A )  -  1 ) )
20 lencl 11690 . . . . . . . . . . . 12  |-  ( A  e. Word  W  ->  ( # `
 A )  e. 
NN0 )
2116, 20syl 16 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  A
)  e.  NN0 )
2221nn0zd 10329 . . . . . . . . . 10  |-  ( ph  ->  ( # `  A
)  e.  ZZ )
23 fzoval 11096 . . . . . . . . . 10  |-  ( (
# `  A )  e.  ZZ  ->  ( 0..^ ( # `  A
) )  =  ( 0 ... ( (
# `  A )  -  1 ) ) )
2422, 23syl 16 . . . . . . . . 9  |-  ( ph  ->  ( 0..^ ( # `  A ) )  =  ( 0 ... (
( # `  A )  -  1 ) ) )
2519, 24syl5sseqr 3357 . . . . . . . 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 15327 . . . . . . . . . . 11  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
3231simpld 446 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
33 fzo0end 11143 . . . . . . . . . 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 2488 . . . . . . . 8  |-  ( ph  ->  K  e.  ( 0..^ ( ( # `  A
)  -  1 ) ) )
3625, 35sseldd 3309 . . . . . . 7  |-  ( ph  ->  K  e.  ( 0..^ ( # `  A
) ) )
3718, 36ffvelrnd 5830 . . . . . 6  |-  ( ph  ->  ( A `  K
)  e.  W )
3837s1cld 11711 . . . . 5  |-  ( ph  ->  <" ( A `
 K ) ">  e. Word  W )
39 eldifsn 3887 . . . . . . . 8  |-  ( C  e.  (Word  W  \  { (/) } )  <->  ( C  e. Word  W  /\  C  =/=  (/) ) )
40 lennncl 11691 . . . . . . . 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 11125 . . . . . 6  |-  ( 0  e.  ( 0..^ (
# `  C )
)  <->  ( # `  C
)  e.  NN )
4442, 43sylibr 204 . . . . 5  |-  ( ph  ->  0  e.  ( 0..^ ( # `  C
) ) )
45 ccatval1 11700 . . . . 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 15317 . . . . . . . . . . 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 3292 . . . . . . . 8  |-  ( ph  ->  B  e. Word  W )
51 wrdf 11688 . . . . . . . 8  |-  ( B  e. Word  W  ->  B : ( 0..^ (
# `  B )
) --> W )
5250, 51syl 16 . . . . . . 7  |-  ( ph  ->  B : ( 0..^ ( # `  B
) ) --> W )
53 fzossfz 11112 . . . . . . . . 9  |-  ( 0..^ ( ( # `  B
)  -  1 ) )  C_  ( 0 ... ( ( # `  B )  -  1 ) )
54 lencl 11690 . . . . . . . . . . . 12  |-  ( B  e. Word  W  ->  ( # `
 B )  e. 
NN0 )
5550, 54syl 16 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  B
)  e.  NN0 )
5655nn0zd 10329 . . . . . . . . . 10  |-  ( ph  ->  ( # `  B
)  e.  ZZ )
57 fzoval 11096 . . . . . . . . . 10  |-  ( (
# `  B )  e.  ZZ  ->  ( 0..^ ( # `  B
) )  =  ( 0 ... ( (
# `  B )  -  1 ) ) )
5856, 57syl 16 . . . . . . . . 9  |-  ( ph  ->  ( 0..^ ( # `  B ) )  =  ( 0 ... (
( # `  B )  -  1 ) ) )
5953, 58syl5sseqr 3357 . . . . . . . 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 11143 . . . . . . . . . 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 2488 . . . . . . . 8  |-  ( ph  ->  L  e.  ( 0..^ ( ( # `  B
)  -  1 ) ) )
6559, 64sseldd 3309 . . . . . . 7  |-  ( ph  ->  L  e.  ( 0..^ ( # `  B
) ) )
6652, 65ffvelrnd 5830 . . . . . 6  |-  ( ph  ->  ( B `  L
)  e.  W )
6766s1cld 11711 . . . . 5  |-  ( ph  ->  <" ( B `
 L ) ">  e. Word  W )
68 ccatval1 11700 . . . . 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 2439 . . 3  |-  ( ph  ->  ( ( C concat  <" ( A `  K ) "> ) `  0
)  =  ( ( C concat  <" ( B `
 L ) "> ) `  0
) )
71 fviss 5743 . . . . . . . . . 10  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
722, 71eqsstri 3338 . . . . . . . . 9  |-  W  C_ Word  ( I  X.  2o )
7372, 37sseldi 3306 . . . . . . . 8  |-  ( ph  ->  ( A `  K
)  e. Word  ( I  X.  2o ) )
74 lencl 11690 . . . . . . . 8  |-  ( ( A `  K )  e. Word  ( I  X.  2o )  ->  ( # `  ( A `  K
) )  e.  NN0 )
7573, 74syl 16 . . . . . . 7  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  NN0 )
7675nn0red 10231 . . . . . 6  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  RR )
77 2rp 10573 . . . . . 6  |-  2  e.  RR+
78 ltaddrp 10600 . . . . . 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 10231 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  A
)  e.  RR )
8180lem1d 9900 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  A
)  -  1 )  <_  ( # `  A
) )
82 fznn 11070 . . . . . . . . . . 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 15325 . . . . . . . . 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 15318 . . . . . . . 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 10193 . . . . . . . . . . . . . . . 16  |-  1  e.  NN0
90 nn0uz 10476 . . . . . . . . . . . . . . . 16  |-  NN0  =  ( ZZ>= `  0 )
9189, 90eleqtri 2476 . . . . . . . . . . . . . . 15  |-  1  e.  ( ZZ>= `  0 )
92 fzss1 11047 . . . . . . . . . . . . . . 15  |-  ( 1  e.  ( ZZ>= `  0
)  ->  ( 1 ... ( # `  A
) )  C_  (
0 ... ( # `  A
) ) )
9391, 92ax-mp 8 . . . . . . . . . . . . . 14  |-  ( 1 ... ( # `  A
) )  C_  (
0 ... ( # `  A
) )
9493, 84sseldi 3306 . . . . . . . . . . . . 13  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  ( 0 ... ( # `  A
) ) )
95 swrd0val 11723 . . . . . . . . . . . . 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 5691 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( A substr  <. 0 ,  ( ( # `  A
)  -  1 )
>. ) )  =  (
# `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )
98 swrd0len 11724 . . . . . . . . . . . 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 2438 . . . . . . . . . 10  |-  ( ph  ->  ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( ( # `  A
)  -  1 ) )
101100oveq1d 6055 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 )  =  ( ( ( # `  A
)  -  1 )  -  1 ) )
102101, 26syl6eqr 2454 . . . . . . . 8  |-  ( ph  ->  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 )  =  K )
103102fveq2d 5691 . . . . . . 7  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 ) )  =  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  K ) )
104 fvres 5704 . . . . . . . 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 2440 . . . . . 6  |-  ( ph  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( A `  K
) )
107106fveq2d 5691 . . . . 5  |-  ( ph  ->  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  =  ( # `  ( A `  K )
) )
1082, 3, 4, 5, 6, 7efgsdmi 15319 . . . . . . . 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 5690 . . . . . . . . 9  |-  ( A `
 K )  =  ( A `  (
( ( # `  A
)  -  1 )  -  1 ) )
111110fveq2i 5690 . . . . . . . 8  |-  ( T `
 ( A `  K ) )  =  ( T `  ( A `  ( (
( # `  A )  -  1 )  - 
1 ) ) )
112111rneqi 5055 . . . . . . 7  |-  ran  ( T `  ( A `  K ) )  =  ran  ( T `  ( A `  ( ( ( # `  A
)  -  1 )  -  1 ) ) )
113109, 112syl6eleqr 2495 . . . . . 6  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  K ) ) )
1142, 3, 4, 5efgtlen 15313 . . . . . 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 4202 . . . 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 15330 . . . . . . . 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 15324 . . . . . . 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 15320 . . . . . 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 2439 . . . 4  |-  ( ph  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `
 K ) "> ) ) )
133 fveq2 5687 . . . . . . . . 9  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( S `  a
)  =  ( S `
 ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ) )
134133fveq2d 5691 . . . . . . . 8  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( # `  ( S `
 a ) )  =  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) ) )
135134breq1d 4182 . . . . . . 7  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  <->  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) ) )
136133eqeq1d 2412 . . . . . . . 8  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( S `  a )  =  ( S `  b )  <-> 
( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  b
) ) )
137 fveq1 5686 . . . . . . . . 9  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( a `  0
)  =  ( ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) `  0
) )
138137eqeq1d 2412 . . . . . . . 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 5687 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  ( S `  b )  =  ( S `  ( C concat  <" ( A `  K ) "> ) ) )
142141eqeq2d 2415 . . . . . . . 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 5686 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  (
b `  0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0 )
)
144143eqeq2d 2415 . . . . . . . 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 3019 . . . . 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 3306 . . . . . . . 8  |-  ( ph  ->  ( B `  L
)  e. Word  ( I  X.  2o ) )
151 lencl 11690 . . . . . . . 8  |-  ( ( B `  L )  e. Word  ( I  X.  2o )  ->  ( # `  ( B `  L
) )  e.  NN0 )
152150, 151syl 16 . . . . . . 7  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  NN0 )
153152nn0red 10231 . . . . . 6  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  RR )
154 ltaddrp 10600 . . . . . 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 10231 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  B
)  e.  RR )
157156lem1d 9900 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  B
)  -  1 )  <_  ( # `  B
) )
158 fznn 11070 . . . . . . . . . . 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 15325 . . . . . . . . 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 15318 . . . . . . . 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 11047 . . . . . . . . . . . . . . 15  |-  ( 1  e.  ( ZZ>= `  0
)  ->  ( 1 ... ( # `  B
) )  C_  (
0 ... ( # `  B
) ) )
16691, 165ax-mp 8 . . . . . . . . . . . . . 14  |-  ( 1 ... ( # `  B
) )  C_  (
0 ... ( # `  B
) )
167166, 160sseldi 3306 . . . . . . . . . . . . 13  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  ( 0 ... ( # `  B
) ) )
168 swrd0val 11723 . . . . . . . . . . . . 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 5691 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( B substr  <. 0 ,  ( ( # `  B
)  -  1 )
>. ) )  =  (
# `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )
171 swrd0len 11724 . . . . . . . . . . . 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 2438 . . . . . . . . . 10  |-  ( ph  ->  ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( ( # `  B
)  -  1 ) )
174173oveq1d 6055 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 )  =  ( ( ( # `  B
)  -  1 )  -  1 ) )
175174, 60syl6eqr 2454 . . . . . . . 8  |-  ( ph  ->  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 )  =  L )
176175fveq2d 5691 . . . . . . 7  |-  ( ph  ->  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 ) )  =  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  L ) )
177 fvres 5704 . . . . . . . 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 2440 . . . . . 6  |-  ( ph  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( B `  L
) )
180179fveq2d 5691 . . . . 5  |-  ( ph  ->  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  =  ( # `  ( B `  L )
) )
1812, 3, 4, 5, 6, 7efgsdmi 15319 . . . . . . . . 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 2478 . . . . . . 7  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
18460fveq2i 5690 . . . . . . . . 9  |-  ( B `
 L )  =  ( B `  (
( ( # `  B
)  -  1 )  -  1 ) )
185184fveq2i 5690 . . . . . . . 8  |-  ( T `
 ( B `  L ) )  =  ( T `  ( B `  ( (
( # `  B )  -  1 )  - 
1 ) ) )
186185rneqi 5055 . . . . . . 7  |-  ran  ( T `  ( B `  L ) )  =  ran  ( T `  ( B `  ( ( ( # `  B
)  -  1 )  -  1 ) ) )
187183, 186syl6eleqr 2495 . . . . . 6  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  L ) ) )
1882, 3, 4, 5efgtlen 15313 . . . . . 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 4202 . . . 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 15324 . . . . . . 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 15320 . . . . . 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 2439 . . . 4  |-  ( ph  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `
 L ) "> ) ) )
197 fveq2 5687 . . . . . . . . 9  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( S `  a
)  =  ( S `
 ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ) )
198197fveq2d 5691 . . . . . . . 8  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( # `  ( S `
 a ) )  =  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) ) )
199198breq1d 4182 . . . . . . 7  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  <->  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) ) )
200197eqeq1d 2412 . . . . . . . 8  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( S `  a )  =  ( S `  b )  <-> 
( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  b
) ) )
201 fveq1 5686 . . . . . . . . 9  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( a `  0
)  =  ( ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) `  0
) )
202201eqeq1d 2412 . . . . . . . 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 5687 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  ( S `  b )  =  ( S `  ( C concat  <" ( B `  L ) "> ) ) )
206205eqeq2d 2415 . . . . . . . 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 5686 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  (
b `  0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0 )
)
208207eqeq2d 2415 . . . . . . . 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 3019 . . . . 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 2446 . 2  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 ) )
215 lbfzo0 11125 . . . 4  |-  ( 0  e.  ( 0..^ ( ( # `  A
)  -  1 ) )  <->  ( ( # `  A )  -  1 )  e.  NN )
21632, 215sylibr 204 . . 3  |-  ( ph  ->  0  e.  ( 0..^ ( ( # `  A
)  -  1 ) ) )
217 fvres 5704 . . 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 11125 . . . 4  |-  ( 0  e.  ( 0..^ ( ( # `  B
)  -  1 ) )  <->  ( ( # `  B )  -  1 )  e.  NN )
22061, 219sylibr 204 . . 3  |-  ( ph  ->  0  e.  ( 0..^ ( ( # `  B
)  -  1 ) ) )
221 fvres 5704 . . 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 2444 1  |-  ( ph  ->  ( A `  0
)  =  ( B `
 0 ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1649    e. wcel 1721    =/= wne 2567   A.wral 2666   {crab 2670    \ cdif 3277    C_ wss 3280   (/)c0 3588   {csn 3774   <.cop 3777   <.cotp 3778   U_ciun 4053   class class class wbr 4172    e. cmpt 4226    _I cid 4453    X. cxp 4835   dom cdm 4837   ran crn 4838    |` cres 4839   -->wf 5409   ` cfv 5413  (class class class)co 6040    e. cmpt2 6042   1oc1o 6676   2oc2o 6677   RRcr 8945   0cc0 8946   1c1 8947    + caddc 8949    < clt 9076    <_ cle 9077    - cmin 9247   NNcn 9956   2c2 10005   NN0cn0 10177   ZZcz 10238   ZZ>=cuz 10444   RR+crp 10568   ...cfz 10999  ..^cfzo 11090   #chash 11573  Word cword 11672   concat cconcat 11673   <"cs1 11674   substr csubstr 11675   splice csplice 11676   <"cs2 11760   ~FG cefg 15293
This theorem is referenced by:  efgredlemc  15332
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2385  ax-rep 4280  ax-sep 4290  ax-nul 4298  ax-pow 4337  ax-pr 4363  ax-un 4660  ax-cnex 9002  ax-resscn 9003  ax-1cn 9004  ax-icn 9005  ax-addcl 9006  ax-addrcl 9007  ax-mulcl 9008  ax-mulrcl 9009  ax-mulcom 9010  ax-addass 9011  ax-mulass 9012  ax-distr 9013  ax-i2m1 9014  ax-1ne0 9015  ax-1rid 9016  ax-rnegex 9017  ax-rrecex 9018  ax-cnre 9019  ax-pre-lttri 9020  ax-pre-lttrn 9021  ax-pre-ltadd 9022  ax-pre-mulgt0 9023
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2258  df-mo 2259  df-clab 2391  df-cleq 2397  df-clel 2400  df-nfc 2529  df-ne 2569  df-nel 2570  df-ral 2671  df-rex 2672  df-reu 2673  df-rab 2675  df-v 2918  df-sbc 3122  df-csb 3212  df-dif 3283  df-un 3285  df-in 3287  df-ss 3294  df-pss 3296  df-nul 3589  df-if 3700  df-pw 3761  df-sn 3780  df-pr 3781  df-tp 3782  df-op 3783  df-ot 3784  df-uni 3976  df-int 4011  df-iun 4055  df-br 4173  df-opab 4227  df-mpt 4228  df-tr 4263  df-eprel 4454  df-id 4458  df-po 4463  df-so 4464  df-fr 4501  df-we 4503  df-ord 4544  df-on 4545  df-lim 4546  df-suc 4547  df-om 4805  df-xp 4843  df-rel 4844  df-cnv 4845  df-co 4846  df-dm 4847  df-rn 4848  df-res 4849  df-ima 4850  df-iota 5377  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-ov 6043  df-oprab 6044  df-mpt2 6045  df-1st 6308  df-2nd 6309  df-riota 6508  df-recs 6592  df-rdg 6627  df-1o 6683  df-2o 6684  df-oadd 6687  df-er 6864  df-map 6979  df-pm 6980  df-en 7069  df-dom 7070  df-sdom 7071  df-fin 7072  df-card 7782  df-pnf 9078  df-mnf 9079  df-xr 9080  df-ltxr 9081  df-le 9082  df-sub 9249  df-neg 9250  df-nn 9957  df-2 10014  df-n0 10178  df-z 10239  df-uz 10445  df-rp 10569  df-fz 11000  df-fzo 11091  df-hash 11574  df-word 11678  df-concat 11679  df-s1 11680  df-substr 11681  df-splice 11682  df-s2 11767
  Copyright terms: Public domain W3C validator