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

Theorem efgredlemd 15304
Description: The reduced word that forms the base of the sequence in efgsval 15291 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 15290 . . . . . . . 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 3276 . . . . 5  |-  ( ph  ->  C  e. Word  W )
12 efgredlem.2 . . . . . . . . . 10  |-  ( ph  ->  A  e.  dom  S
)
132, 3, 4, 5, 6, 7efgsdm 15290 . . . . . . . . . . 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 3276 . . . . . . . 8  |-  ( ph  ->  A  e. Word  W )
17 wrdf 11661 . . . . . . . 8  |-  ( A  e. Word  W  ->  A : ( 0..^ (
# `  A )
) --> W )
1816, 17syl 16 . . . . . . 7  |-  ( ph  ->  A : ( 0..^ ( # `  A
) ) --> W )
19 fzossfz 11088 . . . . . . . . 9  |-  ( 0..^ ( ( # `  A
)  -  1 ) )  C_  ( 0 ... ( ( # `  A )  -  1 ) )
20 lencl 11663 . . . . . . . . . . . 12  |-  ( A  e. Word  W  ->  ( # `
 A )  e. 
NN0 )
2116, 20syl 16 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  A
)  e.  NN0 )
2221nn0zd 10306 . . . . . . . . . 10  |-  ( ph  ->  ( # `  A
)  e.  ZZ )
23 fzoval 11072 . . . . . . . . . 10  |-  ( (
# `  A )  e.  ZZ  ->  ( 0..^ ( # `  A
) )  =  ( 0 ... ( (
# `  A )  -  1 ) ) )
2422, 23syl 16 . . . . . . . . 9  |-  ( ph  ->  ( 0..^ ( # `  A ) )  =  ( 0 ... (
( # `  A )  -  1 ) ) )
2519, 24syl5sseqr 3341 . . . . . . . 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 15300 . . . . . . . . . . 11  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
3231simpld 446 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
33 fzo0end 11116 . . . . . . . . . 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 2472 . . . . . . . 8  |-  ( ph  ->  K  e.  ( 0..^ ( ( # `  A
)  -  1 ) ) )
3625, 35sseldd 3293 . . . . . . 7  |-  ( ph  ->  K  e.  ( 0..^ ( # `  A
) ) )
3718, 36ffvelrnd 5811 . . . . . 6  |-  ( ph  ->  ( A `  K
)  e.  W )
3837s1cld 11684 . . . . 5  |-  ( ph  ->  <" ( A `
 K ) ">  e. Word  W )
39 eldifsn 3871 . . . . . . . 8  |-  ( C  e.  (Word  W  \  { (/) } )  <->  ( C  e. Word  W  /\  C  =/=  (/) ) )
40 lennncl 11664 . . . . . . . 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 11101 . . . . . 6  |-  ( 0  e.  ( 0..^ (
# `  C )
)  <->  ( # `  C
)  e.  NN )
4442, 43sylibr 204 . . . . 5  |-  ( ph  ->  0  e.  ( 0..^ ( # `  C
) ) )
45 ccatval1 11673 . . . . 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 15290 . . . . . . . . . . 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 3276 . . . . . . . 8  |-  ( ph  ->  B  e. Word  W )
51 wrdf 11661 . . . . . . . 8  |-  ( B  e. Word  W  ->  B : ( 0..^ (
# `  B )
) --> W )
5250, 51syl 16 . . . . . . 7  |-  ( ph  ->  B : ( 0..^ ( # `  B
) ) --> W )
53 fzossfz 11088 . . . . . . . . 9  |-  ( 0..^ ( ( # `  B
)  -  1 ) )  C_  ( 0 ... ( ( # `  B )  -  1 ) )
54 lencl 11663 . . . . . . . . . . . 12  |-  ( B  e. Word  W  ->  ( # `
 B )  e. 
NN0 )
5550, 54syl 16 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  B
)  e.  NN0 )
5655nn0zd 10306 . . . . . . . . . 10  |-  ( ph  ->  ( # `  B
)  e.  ZZ )
57 fzoval 11072 . . . . . . . . . 10  |-  ( (
# `  B )  e.  ZZ  ->  ( 0..^ ( # `  B
) )  =  ( 0 ... ( (
# `  B )  -  1 ) ) )
5856, 57syl 16 . . . . . . . . 9  |-  ( ph  ->  ( 0..^ ( # `  B ) )  =  ( 0 ... (
( # `  B )  -  1 ) ) )
5953, 58syl5sseqr 3341 . . . . . . . 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 11116 . . . . . . . . . 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 2472 . . . . . . . 8  |-  ( ph  ->  L  e.  ( 0..^ ( ( # `  B
)  -  1 ) ) )
6559, 64sseldd 3293 . . . . . . 7  |-  ( ph  ->  L  e.  ( 0..^ ( # `  B
) ) )
6652, 65ffvelrnd 5811 . . . . . 6  |-  ( ph  ->  ( B `  L
)  e.  W )
6766s1cld 11684 . . . . 5  |-  ( ph  ->  <" ( B `
 L ) ">  e. Word  W )
68 ccatval1 11673 . . . . 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 2423 . . 3  |-  ( ph  ->  ( ( C concat  <" ( A `  K ) "> ) `  0
)  =  ( ( C concat  <" ( B `
 L ) "> ) `  0
) )
71 fviss 5724 . . . . . . . . . 10  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
722, 71eqsstri 3322 . . . . . . . . 9  |-  W  C_ Word  ( I  X.  2o )
7372, 37sseldi 3290 . . . . . . . 8  |-  ( ph  ->  ( A `  K
)  e. Word  ( I  X.  2o ) )
74 lencl 11663 . . . . . . . 8  |-  ( ( A `  K )  e. Word  ( I  X.  2o )  ->  ( # `  ( A `  K
) )  e.  NN0 )
7573, 74syl 16 . . . . . . 7  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  NN0 )
7675nn0red 10208 . . . . . 6  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  RR )
77 2rp 10550 . . . . . 6  |-  2  e.  RR+
78 ltaddrp 10577 . . . . . 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 10208 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  A
)  e.  RR )
8180lem1d 9877 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  A
)  -  1 )  <_  ( # `  A
) )
82 fznn 11046 . . . . . . . . . . 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 15298 . . . . . . . . 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 15291 . . . . . . . 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 10170 . . . . . . . . . . . . . . . 16  |-  1  e.  NN0
90 nn0uz 10453 . . . . . . . . . . . . . . . 16  |-  NN0  =  ( ZZ>= `  0 )
9189, 90eleqtri 2460 . . . . . . . . . . . . . . 15  |-  1  e.  ( ZZ>= `  0 )
92 fzss1 11024 . . . . . . . . . . . . . . 15  |-  ( 1  e.  ( ZZ>= `  0
)  ->  ( 1 ... ( # `  A
) )  C_  (
0 ... ( # `  A
) ) )
9391, 92ax-mp 8 . . . . . . . . . . . . . 14  |-  ( 1 ... ( # `  A
) )  C_  (
0 ... ( # `  A
) )
9493, 84sseldi 3290 . . . . . . . . . . . . 13  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  ( 0 ... ( # `  A
) ) )
95 swrd0val 11696 . . . . . . . . . . . . 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 5673 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( A substr  <. 0 ,  ( ( # `  A
)  -  1 )
>. ) )  =  (
# `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )
98 swrd0len 11697 . . . . . . . . . . . 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 2422 . . . . . . . . . 10  |-  ( ph  ->  ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( ( # `  A
)  -  1 ) )
101100oveq1d 6036 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 )  =  ( ( ( # `  A
)  -  1 )  -  1 ) )
102101, 26syl6eqr 2438 . . . . . . . 8  |-  ( ph  ->  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 )  =  K )
103102fveq2d 5673 . . . . . . 7  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  ( ( # `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  - 
1 ) )  =  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) `  K ) )
104 fvres 5686 . . . . . . . 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 2424 . . . . . 6  |-  ( ph  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( A `  K
) )
107106fveq2d 5673 . . . . 5  |-  ( ph  ->  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  =  ( # `  ( A `  K )
) )
1082, 3, 4, 5, 6, 7efgsdmi 15292 . . . . . . . 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 5672 . . . . . . . . 9  |-  ( A `
 K )  =  ( A `  (
( ( # `  A
)  -  1 )  -  1 ) )
111110fveq2i 5672 . . . . . . . 8  |-  ( T `
 ( A `  K ) )  =  ( T `  ( A `  ( (
( # `  A )  -  1 )  - 
1 ) ) )
112111rneqi 5037 . . . . . . 7  |-  ran  ( T `  ( A `  K ) )  =  ran  ( T `  ( A `  ( ( ( # `  A
)  -  1 )  -  1 ) ) )
113109, 112syl6eleqr 2479 . . . . . 6  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  K ) ) )
1142, 3, 4, 5efgtlen 15286 . . . . . 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 4184 . . . 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 15303 . . . . . . . 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 15297 . . . . . . 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 15293 . . . . . 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 2423 . . . 4  |-  ( ph  ->  ( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( A `
 K ) "> ) ) )
133 fveq2 5669 . . . . . . . . 9  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( S `  a
)  =  ( S `
 ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ) )
134133fveq2d 5673 . . . . . . . 8  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( # `  ( S `
 a ) )  =  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) ) )
135134breq1d 4164 . . . . . . 7  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  <->  ( # `  ( S `  ( A  |`  ( 0..^ ( (
# `  A )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) ) )
136133eqeq1d 2396 . . . . . . . 8  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( ( S `  a )  =  ( S `  b )  <-> 
( S `  ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) )  =  ( S `  b
) ) )
137 fveq1 5668 . . . . . . . . 9  |-  ( a  =  ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) )  -> 
( a `  0
)  =  ( ( A  |`  ( 0..^ ( ( # `  A
)  -  1 ) ) ) `  0
) )
138137eqeq1d 2396 . . . . . . . 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 5669 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  ( S `  b )  =  ( S `  ( C concat  <" ( A `  K ) "> ) ) )
142141eqeq2d 2399 . . . . . . . 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 5668 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( A `  K ) "> )  ->  (
b `  0 )  =  ( ( C concat  <" ( A `  K ) "> ) `  0 )
)
144143eqeq2d 2399 . . . . . . . 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 3003 . . . . 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 3290 . . . . . . . 8  |-  ( ph  ->  ( B `  L
)  e. Word  ( I  X.  2o ) )
151 lencl 11663 . . . . . . . 8  |-  ( ( B `  L )  e. Word  ( I  X.  2o )  ->  ( # `  ( B `  L
) )  e.  NN0 )
152150, 151syl 16 . . . . . . 7  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  NN0 )
153152nn0red 10208 . . . . . 6  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  RR )
154 ltaddrp 10577 . . . . . 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 10208 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  B
)  e.  RR )
157156lem1d 9877 . . . . . . . . . 10  |-  ( ph  ->  ( ( # `  B
)  -  1 )  <_  ( # `  B
) )
158 fznn 11046 . . . . . . . . . . 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 15298 . . . . . . . . 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 15291 . . . . . . . 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 11024 . . . . . . . . . . . . . . 15  |-  ( 1  e.  ( ZZ>= `  0
)  ->  ( 1 ... ( # `  B
) )  C_  (
0 ... ( # `  B
) ) )
16691, 165ax-mp 8 . . . . . . . . . . . . . 14  |-  ( 1 ... ( # `  B
) )  C_  (
0 ... ( # `  B
) )
167166, 160sseldi 3290 . . . . . . . . . . . . 13  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  ( 0 ... ( # `  B
) ) )
168 swrd0val 11696 . . . . . . . . . . . . 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 5673 . . . . . . . . . . 11  |-  ( ph  ->  ( # `  ( B substr  <. 0 ,  ( ( # `  B
)  -  1 )
>. ) )  =  (
# `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )
171 swrd0len 11697 . . . . . . . . . . . 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 2422 . . . . . . . . . 10  |-  ( ph  ->  ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( ( # `  B
)  -  1 ) )
174173oveq1d 6036 . . . . . . . . 9  |-  ( ph  ->  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 )  =  ( ( ( # `  B
)  -  1 )  -  1 ) )
175174, 60syl6eqr 2438 . . . . . . . 8  |-  ( ph  ->  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 )  =  L )
176175fveq2d 5673 . . . . . . 7  |-  ( ph  ->  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  ( ( # `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  - 
1 ) )  =  ( ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) `  L ) )
177 fvres 5686 . . . . . . . 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 2424 . . . . . 6  |-  ( ph  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( B `  L
) )
180179fveq2d 5673 . . . . 5  |-  ( ph  ->  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  =  ( # `  ( B `  L )
) )
1812, 3, 4, 5, 6, 7efgsdmi 15292 . . . . . . . . 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 2462 . . . . . . 7  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
18460fveq2i 5672 . . . . . . . . 9  |-  ( B `
 L )  =  ( B `  (
( ( # `  B
)  -  1 )  -  1 ) )
185184fveq2i 5672 . . . . . . . 8  |-  ( T `
 ( B `  L ) )  =  ( T `  ( B `  ( (
( # `  B )  -  1 )  - 
1 ) ) )
186185rneqi 5037 . . . . . . 7  |-  ran  ( T `  ( B `  L ) )  =  ran  ( T `  ( B `  ( ( ( # `  B
)  -  1 )  -  1 ) ) )
187183, 186syl6eleqr 2479 . . . . . 6  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  L ) ) )
1882, 3, 4, 5efgtlen 15286 . . . . . 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 4184 . . . 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 15297 . . . . . . 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 15293 . . . . . 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 2423 . . . 4  |-  ( ph  ->  ( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  ( C concat  <" ( B `
 L ) "> ) ) )
197 fveq2 5669 . . . . . . . . 9  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( S `  a
)  =  ( S `
 ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) ) ) )
198197fveq2d 5673 . . . . . . . 8  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( # `  ( S `
 a ) )  =  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) ) )
199198breq1d 4164 . . . . . . 7  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  <->  ( # `  ( S `  ( B  |`  ( 0..^ ( (
# `  B )  -  1 ) ) ) ) )  < 
( # `  ( S `
 A ) ) ) )
200197eqeq1d 2396 . . . . . . . 8  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( ( S `  a )  =  ( S `  b )  <-> 
( S `  ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) )  =  ( S `  b
) ) )
201 fveq1 5668 . . . . . . . . 9  |-  ( a  =  ( B  |`  ( 0..^ ( ( # `  B )  -  1 ) ) )  -> 
( a `  0
)  =  ( ( B  |`  ( 0..^ ( ( # `  B
)  -  1 ) ) ) `  0
) )
202201eqeq1d 2396 . . . . . . . 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 5669 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  ( S `  b )  =  ( S `  ( C concat  <" ( B `  L ) "> ) ) )
206205eqeq2d 2399 . . . . . . . 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 5668 . . . . . . . . 9  |-  ( b  =  ( C concat  <" ( B `  L ) "> )  ->  (
b `  0 )  =  ( ( C concat  <" ( B `  L ) "> ) `  0 )
)
208207eqeq2d 2399 . . . . . . . 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 3003 . . . . 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 2430 . 2  |-  ( ph  ->  ( ( A  |`  ( 0..^ ( ( # `  A )  -  1 ) ) ) ` 
0 )  =  ( ( B  |`  (
0..^ ( ( # `  B )  -  1 ) ) ) ` 
0 ) )
215 lbfzo0 11101 . . . 4  |-  ( 0  e.  ( 0..^ ( ( # `  A
)  -  1 ) )  <->  ( ( # `  A )  -  1 )  e.  NN )
21632, 215sylibr 204 . . 3  |-  ( ph  ->  0  e.  ( 0..^ ( ( # `  A
)  -  1 ) ) )
217 fvres 5686 . . 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 11101 . . . 4  |-  ( 0  e.  ( 0..^ ( ( # `  B
)  -  1 ) )  <->  ( ( # `  B )  -  1 )  e.  NN )
22061, 219sylibr 204 . . 3  |-  ( ph  ->  0  e.  ( 0..^ ( ( # `  B
)  -  1 ) ) )
221 fvres 5686 . . 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 2428 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 1717    =/= wne 2551   A.wral 2650   {crab 2654    \ cdif 3261    C_ wss 3264   (/)c0 3572   {csn 3758   <.cop 3761   <.cotp 3762   U_ciun 4036   class class class wbr 4154    e. cmpt 4208    _I cid 4435    X. cxp 4817   dom cdm 4819   ran crn 4820    |` cres 4821   -->wf 5391   ` cfv 5395  (class class class)co 6021    e. cmpt2 6023   1oc1o 6654   2oc2o 6655   RRcr 8923   0cc0 8924   1c1 8925    + caddc 8927    < clt 9054    <_ cle 9055    - cmin 9224   NNcn 9933   2c2 9982   NN0cn0 10154   ZZcz 10215   ZZ>=cuz 10421   RR+crp 10545   ...cfz 10976  ..^cfzo 11066   #chash 11546  Word cword 11645   concat cconcat 11646   <"cs1 11647   substr csubstr 11648   splice csplice 11649   <"cs2 11733   ~FG cefg 15266
This theorem is referenced by:  efgredlemc  15305
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 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2369  ax-rep 4262  ax-sep 4272  ax-nul 4280  ax-pow 4319  ax-pr 4345  ax-un 4642  ax-cnex 8980  ax-resscn 8981  ax-1cn 8982  ax-icn 8983  ax-addcl 8984  ax-addrcl 8985  ax-mulcl 8986  ax-mulrcl 8987  ax-mulcom 8988  ax-addass 8989  ax-mulass 8990  ax-distr 8991  ax-i2m1 8992  ax-1ne0 8993  ax-1rid 8994  ax-rnegex 8995  ax-rrecex 8996  ax-cnre 8997  ax-pre-lttri 8998  ax-pre-lttrn 8999  ax-pre-ltadd 9000  ax-pre-mulgt0 9001
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 2243  df-mo 2244  df-clab 2375  df-cleq 2381  df-clel 2384  df-nfc 2513  df-ne 2553  df-nel 2554  df-ral 2655  df-rex 2656  df-reu 2657  df-rab 2659  df-v 2902  df-sbc 3106  df-csb 3196  df-dif 3267  df-un 3269  df-in 3271  df-ss 3278  df-pss 3280  df-nul 3573  df-if 3684  df-pw 3745  df-sn 3764  df-pr 3765  df-tp 3766  df-op 3767  df-ot 3768  df-uni 3959  df-int 3994  df-iun 4038  df-br 4155  df-opab 4209  df-mpt 4210  df-tr 4245  df-eprel 4436  df-id 4440  df-po 4445  df-so 4446  df-fr 4483  df-we 4485  df-ord 4526  df-on 4527  df-lim 4528  df-suc 4529  df-om 4787  df-xp 4825  df-rel 4826  df-cnv 4827  df-co 4828  df-dm 4829  df-rn 4830  df-res 4831  df-ima 4832  df-iota 5359  df-fun 5397  df-fn 5398  df-f 5399  df-f1 5400  df-fo 5401  df-f1o 5402  df-fv 5403  df-ov 6024  df-oprab 6025  df-mpt2 6026  df-1st 6289  df-2nd 6290  df-riota 6486  df-recs 6570  df-rdg 6605  df-1o 6661  df-2o 6662  df-oadd 6665  df-er 6842  df-map 6957  df-pm 6958  df-en 7047  df-dom 7048  df-sdom 7049  df-fin 7050  df-card 7760  df-pnf 9056  df-mnf 9057  df-xr 9058  df-ltxr 9059  df-le 9060  df-sub 9226  df-neg 9227  df-nn 9934  df-2 9991  df-n0 10155  df-z 10216  df-uz 10422  df-rp 10546  df-fz 10977  df-fzo 11067  df-hash 11547  df-word 11651  df-concat 11652  df-s1 11653  df-substr 11654  df-splice 11655  df-s2 11740
  Copyright terms: Public domain W3C validator