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

Theorem efgsfo 15300
Description: For any word, there is a sequence of extensions starting at a reduced word and ending at the target word, such that each word in the chain is an extension of the previous (inserting an element and its inverse at adjacent indexes somewhere in the sequence). (Contributed by Mario Carneiro, 27-Sep-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 ) ) )
Assertion
Ref Expression
efgsfo  |-  S : dom  S -onto-> W
Distinct variable groups:    y, z    t, n, v, w, y, z, m, x    m, M    x, n, M, t, v, w    k, m, t, x, T    k, n, v, w, y, z, W, m, t, x    .~ , m, t, x, y, z    m, I, n, t, v, w, x, y, z    D, m, t
Allowed substitution hints:    D( x, y, z, w, v, k, n)    .~ ( w, v, k, n)    S( x, y, z, w, v, t, k, m, n)    T( y,
z, w, v, n)    I( k)    M( y, z, k)

Proof of Theorem efgsfo
Dummy variables  a 
b  c  d  i  o are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 efgval.w . . . 4  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
2 efgval.r . . . 4  |-  .~  =  ( ~FG  `  I )
3 efgval2.m . . . 4  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
4 efgval2.t . . . 4  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
5 efgred.d . . . 4  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
6 efgred.s . . . 4  |-  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 ) ) )
71, 2, 3, 4, 5, 6efgsf 15290 . . 3  |-  S : { t  e.  (Word 
W  \  { (/) } )  |  ( ( t `
 0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t ) ) ( t `  k )  e.  ran  ( T `
 ( t `  ( k  -  1 ) ) ) ) } --> W
87fdmi 5538 . . . 4  |-  dom  S  =  { t  e.  (Word 
W  \  { (/) } )  |  ( ( t `
 0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t ) ) ( t `  k )  e.  ran  ( T `
 ( t `  ( k  -  1 ) ) ) ) }
98feq2i 5528 . . 3  |-  ( S : dom  S --> W  <->  S : { t  e.  (Word 
W  \  { (/) } )  |  ( ( t `
 0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t ) ) ( t `  k )  e.  ran  ( T `
 ( t `  ( k  -  1 ) ) ) ) } --> W )
107, 9mpbir 201 . 2  |-  S : dom  S --> W
11 frn 5539 . . . 4  |-  ( S : dom  S --> W  ->  ran  S  C_  W )
1210, 11ax-mp 8 . . 3  |-  ran  S  C_  W
13 fviss 5725 . . . . . . . . 9  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
141, 13eqsstri 3323 . . . . . . . 8  |-  W  C_ Word  ( I  X.  2o )
1514sseli 3289 . . . . . . 7  |-  ( c  e.  W  ->  c  e. Word  ( I  X.  2o ) )
16 lencl 11664 . . . . . . 7  |-  ( c  e. Word  ( I  X.  2o )  ->  ( # `  c )  e.  NN0 )
1715, 16syl 16 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  e. 
NN0 )
18 peano2nn0 10194 . . . . . 6  |-  ( (
# `  c )  e.  NN0  ->  ( ( # `
 c )  +  1 )  e.  NN0 )
1914sseli 3289 . . . . . . . . . . . 12  |-  ( a  e.  W  ->  a  e. Word  ( I  X.  2o ) )
20 lencl 11664 . . . . . . . . . . . 12  |-  ( a  e. Word  ( I  X.  2o )  ->  ( # `  a )  e.  NN0 )
2119, 20syl 16 . . . . . . . . . . 11  |-  ( a  e.  W  ->  ( # `
 a )  e. 
NN0 )
22 nn0nlt0 10182 . . . . . . . . . . . 12  |-  ( (
# `  a )  e.  NN0  ->  -.  ( # `
 a )  <  0 )
23 breq2 4159 . . . . . . . . . . . . 13  |-  ( b  =  0  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  0 ) )
2423notbid 286 . . . . . . . . . . . 12  |-  ( b  =  0  ->  ( -.  ( # `  a
)  <  b  <->  -.  ( # `
 a )  <  0 ) )
2522, 24syl5ibr 213 . . . . . . . . . . 11  |-  ( b  =  0  ->  (
( # `  a )  e.  NN0  ->  -.  ( # `
 a )  < 
b ) )
2621, 25syl5 30 . . . . . . . . . 10  |-  ( b  =  0  ->  (
a  e.  W  ->  -.  ( # `  a
)  <  b )
)
2726ralrimiv 2733 . . . . . . . . 9  |-  ( b  =  0  ->  A. a  e.  W  -.  ( # `
 a )  < 
b )
28 rabeq0 3594 . . . . . . . . 9  |-  ( { a  e.  W  | 
( # `  a )  <  b }  =  (/)  <->  A. a  e.  W  -.  ( # `  a )  <  b )
2927, 28sylibr 204 . . . . . . . 8  |-  ( b  =  0  ->  { a  e.  W  |  (
# `  a )  <  b }  =  (/) )
3029sseq1d 3320 . . . . . . 7  |-  ( b  =  0  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  (/)  C_  ran  S ) )
31 breq2 4159 . . . . . . . . 9  |-  ( b  =  d  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  d )
)
3231rabbidv 2893 . . . . . . . 8  |-  ( b  =  d  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  d } )
3332sseq1d 3320 . . . . . . 7  |-  ( b  =  d  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S ) )
34 breq2 4159 . . . . . . . . 9  |-  ( b  =  ( d  +  1 )  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  ( d  +  1 ) ) )
3534rabbidv 2893 . . . . . . . 8  |-  ( b  =  ( d  +  1 )  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  ( d  +  1 ) } )
3635sseq1d 3320 . . . . . . 7  |-  ( b  =  ( d  +  1 )  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( d  +  1 ) } 
C_  ran  S )
)
37 breq2 4159 . . . . . . . . 9  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( ( # `
 a )  < 
b  <->  ( # `  a
)  <  ( ( # `
 c )  +  1 ) ) )
3837rabbidv 2893 . . . . . . . 8  |-  ( b  =  ( ( # `  c )  +  1 )  ->  { a  e.  W  |  ( # `
 a )  < 
b }  =  {
a  e.  W  | 
( # `  a )  <  ( ( # `  c )  +  1 ) } )
3938sseq1d 3320 . . . . . . 7  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( {
a  e.  W  | 
( # `  a )  <  b }  C_  ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( ( # `
 c )  +  1 ) }  C_  ran  S ) )
40 0ss 3601 . . . . . . 7  |-  (/)  C_  ran  S
41 simpr 448 . . . . . . . . . 10  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { a  e.  W  |  (
# `  a )  <  d }  C_  ran  S )
42 fveq2 5670 . . . . . . . . . . . . 13  |-  ( a  =  c  ->  ( # `
 a )  =  ( # `  c
) )
4342eqeq1d 2397 . . . . . . . . . . . 12  |-  ( a  =  c  ->  (
( # `  a )  =  d  <->  ( # `  c
)  =  d ) )
4443cbvrabv 2900 . . . . . . . . . . 11  |-  { a  e.  W  |  (
# `  a )  =  d }  =  { c  e.  W  |  ( # `  c
)  =  d }
45 eliun 4041 . . . . . . . . . . . . . . 15  |-  ( c  e.  U_ x  e.  W  ran  ( T `
 x )  <->  E. x  e.  W  c  e.  ran  ( T `  x
) )
46 fveq2 5670 . . . . . . . . . . . . . . . . . 18  |-  ( x  =  b  ->  ( T `  x )  =  ( T `  b ) )
4746rneqd 5039 . . . . . . . . . . . . . . . . 17  |-  ( x  =  b  ->  ran  ( T `  x )  =  ran  ( T `
 b ) )
4847eleq2d 2456 . . . . . . . . . . . . . . . 16  |-  ( x  =  b  ->  (
c  e.  ran  ( T `  x )  <->  c  e.  ran  ( T `
 b ) ) )
4948cbvrexv 2878 . . . . . . . . . . . . . . 15  |-  ( E. x  e.  W  c  e.  ran  ( T `
 x )  <->  E. b  e.  W  c  e.  ran  ( T `  b
) )
5045, 49bitri 241 . . . . . . . . . . . . . 14  |-  ( c  e.  U_ x  e.  W  ran  ( T `
 x )  <->  E. b  e.  W  c  e.  ran  ( T `  b
) )
51 simpl1r 1009 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  { a  e.  W  |  ( # `  a )  <  d }  C_  ran  S )
52 simprl 733 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  b  e.  W
)
5314, 52sseldi 3291 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  b  e. Word  (
I  X.  2o ) )
54 lencl 11664 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( b  e. Word  ( I  X.  2o )  ->  ( # `  b )  e.  NN0 )
5553, 54syl 16 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  ( # `  b
)  e.  NN0 )
5655nn0red 10209 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  ( # `  b
)  e.  RR )
57 2rp 10551 . . . . . . . . . . . . . . . . . . . . 21  |-  2  e.  RR+
58 ltaddrp 10578 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( # `  b
)  e.  RR  /\  2  e.  RR+ )  -> 
( # `  b )  <  ( ( # `  b )  +  2 ) )
5956, 57, 58sylancl 644 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  ( # `  b
)  <  ( ( # `
 b )  +  2 ) )
601, 2, 3, 4efgtlen 15287 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  ->  ( # `  c
)  =  ( (
# `  b )  +  2 ) )
6160adantl 453 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  ( # `  c
)  =  ( (
# `  b )  +  2 ) )
62 simpl3 962 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  ( # `  c
)  =  d )
6361, 62eqtr3d 2423 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  ( ( # `  b )  +  2 )  =  d )
6459, 63breqtrd 4179 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  ( # `  b
)  <  d )
65 fveq2 5670 . . . . . . . . . . . . . . . . . . . . 21  |-  ( a  =  b  ->  ( # `
 a )  =  ( # `  b
) )
6665breq1d 4165 . . . . . . . . . . . . . . . . . . . 20  |-  ( a  =  b  ->  (
( # `  a )  <  d  <->  ( # `  b
)  <  d )
)
6766elrab 3037 . . . . . . . . . . . . . . . . . . 19  |-  ( b  e.  { a  e.  W  |  ( # `  a )  <  d } 
<->  ( b  e.  W  /\  ( # `  b
)  <  d )
)
6852, 64, 67sylanbrc 646 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  b  e.  {
a  e.  W  | 
( # `  a )  <  d } )
6951, 68sseldd 3294 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  b  e.  ran  S )
70 ffn 5533 . . . . . . . . . . . . . . . . . . 19  |-  ( S : dom  S --> W  ->  S  Fn  dom  S )
7110, 70ax-mp 8 . . . . . . . . . . . . . . . . . 18  |-  S  Fn  dom  S
72 fvelrnb 5715 . . . . . . . . . . . . . . . . . 18  |-  ( S  Fn  dom  S  -> 
( b  e.  ran  S  <->  E. o  e.  dom  S ( S `  o
)  =  b ) )
7371, 72ax-mp 8 . . . . . . . . . . . . . . . . 17  |-  ( b  e.  ran  S  <->  E. o  e.  dom  S ( S `
 o )  =  b )
7469, 73sylib 189 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  E. o  e.  dom  S ( S `  o
)  =  b )
75 simprrl 741 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  o  e.  dom  S )
761, 2, 3, 4, 5, 6efgsdm 15291 . . . . . . . . . . . . . . . . . . . . 21  |-  ( o  e.  dom  S  <->  ( o  e.  (Word  W  \  { (/)
} )  /\  (
o `  0 )  e.  D  /\  A. i  e.  ( 1..^ ( # `  o ) ) ( o `  i )  e.  ran  ( T `
 ( o `  ( i  -  1 ) ) ) ) )
7776simp1bi 972 . . . . . . . . . . . . . . . . . . . 20  |-  ( o  e.  dom  S  -> 
o  e.  (Word  W  \  { (/) } ) )
78 eldifi 3414 . . . . . . . . . . . . . . . . . . . 20  |-  ( o  e.  (Word  W  \  { (/) } )  -> 
o  e. Word  W )
7975, 77, 783syl 19 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  o  e. Word  W )
80 simpl2 961 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  c  e.  W )
81 simprlr 740 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  c  e.  ran  ( T `  b
) )
82 simprrr 742 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  ( S `  o )  =  b )
8382fveq2d 5674 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  ( T `  ( S `  o
) )  =  ( T `  b ) )
8483rneqd 5039 . . . . . . . . . . . . . . . . . . . . 21  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  ran  ( T `
 ( S `  o ) )  =  ran  ( T `  b ) )
8581, 84eleqtrrd 2466 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  c  e.  ran  ( T `  ( S `  o )
) )
861, 2, 3, 4, 5, 6efgsp1 15298 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( o  e.  dom  S  /\  c  e.  ran  ( T `  ( S `
 o ) ) )  ->  ( o concat  <" c "> )  e.  dom  S )
8775, 85, 86syl2anc 643 . . . . . . . . . . . . . . . . . . 19  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  ( o concat  <" c "> )  e.  dom  S )
881, 2, 3, 4, 5, 6efgsval2 15294 . . . . . . . . . . . . . . . . . . 19  |-  ( ( o  e. Word  W  /\  c  e.  W  /\  ( o concat  <" c "> )  e.  dom  S )  ->  ( S `  ( o concat  <" c "> ) )  =  c )
8979, 80, 87, 88syl3anc 1184 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  ( S `  ( o concat  <" c "> ) )  =  c )
90 fnfvelrn 5808 . . . . . . . . . . . . . . . . . . 19  |-  ( ( S  Fn  dom  S  /\  ( o concat  <" c "> )  e.  dom  S )  ->  ( S `  ( o concat  <" c "> ) )  e. 
ran  S )
9171, 87, 90sylancr 645 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  ( S `  ( o concat  <" c "> ) )  e. 
ran  S )
9289, 91eqeltrrd 2464 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) ) )  ->  c  e.  ran  S )
9392anassrs 630 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( ( d  e.  NN0  /\  { a  e.  W  |  (
# `  a )  <  d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  /\  ( o  e. 
dom  S  /\  ( S `  o )  =  b ) )  ->  c  e.  ran  S )
9474, 93rexlimddv 2779 . . . . . . . . . . . . . . 15  |-  ( ( ( ( d  e. 
NN0  /\  { a  e.  W  |  ( # `
 a )  < 
d }  C_  ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  /\  ( b  e.  W  /\  c  e.  ran  ( T `  b ) ) )  ->  c  e.  ran  S )
9594rexlimdvaa 2776 . . . . . . . . . . . . . 14  |-  ( ( ( d  e.  NN0  /\ 
{ a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  -> 
( E. b  e.  W  c  e.  ran  ( T `  b )  ->  c  e.  ran  S ) )
9650, 95syl5bi 209 . . . . . . . . . . . . 13  |-  ( ( ( d  e.  NN0  /\ 
{ a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  -> 
( c  e.  U_ x  e.  W  ran  ( T `  x )  ->  c  e.  ran  S ) )
97 eldif 3275 . . . . . . . . . . . . . . . . . . 19  |-  ( c  e.  ( W  \  U_ x  e.  W  ran  ( T `  x
) )  <->  ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `  x
) ) )
985eleq2i 2453 . . . . . . . . . . . . . . . . . . . 20  |-  ( c  e.  D  <->  c  e.  ( W  \  U_ x  e.  W  ran  ( T `
 x ) ) )
991, 2, 3, 4, 5, 6efgs1 15296 . . . . . . . . . . . . . . . . . . . 20  |-  ( c  e.  D  ->  <" c ">  e.  dom  S
)
10098, 99sylbir 205 . . . . . . . . . . . . . . . . . . 19  |-  ( c  e.  ( W  \  U_ x  e.  W  ran  ( T `  x
) )  ->  <" c ">  e.  dom  S
)
10197, 100sylbir 205 . . . . . . . . . . . . . . . . . 18  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  <" c ">  e.  dom  S
)
1021, 2, 3, 4, 5, 6efgsval 15292 . . . . . . . . . . . . . . . . . 18  |-  ( <" c ">  e.  dom  S  ->  ( S `  <" c "> )  =  (
<" c "> `  ( ( # `  <" c "> )  -  1 ) ) )
103101, 102syl 16 . . . . . . . . . . . . . . . . 17  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  =  ( <" c "> `  (
( # `  <" c "> )  -  1 ) ) )
104 s1len 11687 . . . . . . . . . . . . . . . . . . . . 21  |-  ( # `  <" c "> )  =  1
105104oveq1i 6032 . . . . . . . . . . . . . . . . . . . 20  |-  ( (
# `  <" c "> )  -  1 )  =  ( 1  -  1 )
106 1m1e0 10002 . . . . . . . . . . . . . . . . . . . 20  |-  ( 1  -  1 )  =  0
107105, 106eqtri 2409 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  <" c "> )  -  1 )  =  0
108107fveq2i 5673 . . . . . . . . . . . . . . . . . 18  |-  ( <" c "> `  ( ( # `  <" c "> )  -  1 ) )  =  ( <" c "> `  0 )
109108a1i 11 . . . . . . . . . . . . . . . . 17  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( <" c "> `  ( ( # `
 <" c "> )  -  1 ) )  =  (
<" c "> `  0 ) )
110 s1fv 11689 . . . . . . . . . . . . . . . . . 18  |-  ( c  e.  W  ->  ( <" c "> `  0 )  =  c )
111110adantr 452 . . . . . . . . . . . . . . . . 17  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( <" c "> `  0 )  =  c )
112103, 109, 1113eqtrd 2425 . . . . . . . . . . . . . . . 16  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  =  c )
113 fnfvelrn 5808 . . . . . . . . . . . . . . . . 17  |-  ( ( S  Fn  dom  S  /\  <" c ">  e.  dom  S
)  ->  ( S `  <" c "> )  e.  ran  S )
11471, 101, 113sylancr 645 . . . . . . . . . . . . . . . 16  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  e.  ran  S )
115112, 114eqeltrrd 2464 . . . . . . . . . . . . . . 15  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  c  e.  ran  S )
116115ex 424 . . . . . . . . . . . . . 14  |-  ( c  e.  W  ->  ( -.  c  e.  U_ x  e.  W  ran  ( T `
 x )  -> 
c  e.  ran  S
) )
1171163ad2ant2 979 . . . . . . . . . . . . 13  |-  ( ( ( d  e.  NN0  /\ 
{ a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  -> 
( -.  c  e. 
U_ x  e.  W  ran  ( T `  x
)  ->  c  e.  ran  S ) )
11896, 117pm2.61d 152 . . . . . . . . . . . 12  |-  ( ( ( d  e.  NN0  /\ 
{ a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  -> 
c  e.  ran  S
)
119118rabssdv 3368 . . . . . . . . . . 11  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { c  e.  W  |  (
# `  c )  =  d }  C_  ran  S )
12044, 119syl5eqss 3337 . . . . . . . . . 10  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { a  e.  W  |  (
# `  a )  =  d }  C_  ran  S )
12141, 120unssd 3468 . . . . . . . . 9  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  ( { a  e.  W  |  ( # `  a
)  <  d }  u.  { a  e.  W  |  ( # `  a
)  =  d } )  C_  ran  S )
122121ex 424 . . . . . . . 8  |-  ( d  e.  NN0  ->  ( { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S  ->  ( {
a  e.  W  | 
( # `  a )  <  d }  u.  { a  e.  W  | 
( # `  a )  =  d } ) 
C_  ran  S )
)
123 id 20 . . . . . . . . . . . . 13  |-  ( d  e.  NN0  ->  d  e. 
NN0 )
124 nn0leltp1 10267 . . . . . . . . . . . . 13  |-  ( ( ( # `  a
)  e.  NN0  /\  d  e.  NN0 )  -> 
( ( # `  a
)  <_  d  <->  ( # `  a
)  <  ( d  +  1 ) ) )
12521, 123, 124syl2anr 465 . . . . . . . . . . . 12  |-  ( ( d  e.  NN0  /\  a  e.  W )  ->  ( ( # `  a
)  <_  d  <->  ( # `  a
)  <  ( d  +  1 ) ) )
12621nn0red 10209 . . . . . . . . . . . . 13  |-  ( a  e.  W  ->  ( # `
 a )  e.  RR )
127 nn0re 10164 . . . . . . . . . . . . 13  |-  ( d  e.  NN0  ->  d  e.  RR )
128 leloe 9096 . . . . . . . . . . . . 13  |-  ( ( ( # `  a
)  e.  RR  /\  d  e.  RR )  ->  ( ( # `  a
)  <_  d  <->  ( ( # `
 a )  < 
d  \/  ( # `  a )  =  d ) ) )
129126, 127, 128syl2anr 465 . . . . . . . . . . . 12  |-  ( ( d  e.  NN0  /\  a  e.  W )  ->  ( ( # `  a
)  <_  d  <->  ( ( # `
 a )  < 
d  \/  ( # `  a )  =  d ) ) )
130125, 129bitr3d 247 . . . . . . . . . . 11  |-  ( ( d  e.  NN0  /\  a  e.  W )  ->  ( ( # `  a
)  <  ( d  +  1 )  <->  ( ( # `
 a )  < 
d  \/  ( # `  a )  =  d ) ) )
131130rabbidva 2892 . . . . . . . . . 10  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  {
a  e.  W  | 
( ( # `  a
)  <  d  \/  ( # `  a )  =  d ) } )
132 unrab 3557 . . . . . . . . . 10  |-  ( { a  e.  W  | 
( # `  a )  <  d }  u.  { a  e.  W  | 
( # `  a )  =  d } )  =  { a  e.  W  |  ( (
# `  a )  <  d  \/  ( # `  a )  =  d ) }
133131, 132syl6eqr 2439 . . . . . . . . 9  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  ( { a  e.  W  |  ( # `  a
)  <  d }  u.  { a  e.  W  |  ( # `  a
)  =  d } ) )
134133sseq1d 3320 . . . . . . . 8  |-  ( d  e.  NN0  ->  ( { a  e.  W  | 
( # `  a )  <  ( d  +  1 ) }  C_  ran  S  <->  ( { a  e.  W  |  (
# `  a )  <  d }  u.  {
a  e.  W  | 
( # `  a )  =  d } ) 
C_  ran  S )
)
135122, 134sylibrd 226 . . . . . . 7  |-  ( d  e.  NN0  ->  ( { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S  ->  { a  e.  W  |  ( # `
 a )  < 
( d  +  1 ) }  C_  ran  S ) )
13630, 33, 36, 39, 40, 135nn0ind 10300 . . . . . 6  |-  ( ( ( # `  c
)  +  1 )  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( ( # `  c
)  +  1 ) }  C_  ran  S )
13717, 18, 1363syl 19 . . . . 5  |-  ( c  e.  W  ->  { a  e.  W  |  (
# `  a )  <  ( ( # `  c
)  +  1 ) }  C_  ran  S )
138 id 20 . . . . . 6  |-  ( c  e.  W  ->  c  e.  W )
13917nn0red 10209 . . . . . . 7  |-  ( c  e.  W  ->  ( # `
 c )  e.  RR )
140139ltp1d 9875 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  < 
( ( # `  c
)  +  1 ) )
14142breq1d 4165 . . . . . . 7  |-  ( a  =  c  ->  (
( # `  a )  <  ( ( # `  c )  +  1 )  <->  ( # `  c
)  <  ( ( # `
 c )  +  1 ) ) )
142141elrab 3037 . . . . . 6  |-  ( c  e.  { a  e.  W  |  ( # `  a )  <  (
( # `  c )  +  1 ) }  <-> 
( c  e.  W  /\  ( # `  c
)  <  ( ( # `
 c )  +  1 ) ) )
143138, 140, 142sylanbrc 646 . . . . 5  |-  ( c  e.  W  ->  c  e.  { a  e.  W  |  ( # `  a
)  <  ( ( # `
 c )  +  1 ) } )
144137, 143sseldd 3294 . . . 4  |-  ( c  e.  W  ->  c  e.  ran  S )
145144ssriv 3297 . . 3  |-  W  C_  ran  S
14612, 145eqssi 3309 . 2  |-  ran  S  =  W
147 dffo2 5599 . 2  |-  ( S : dom  S -onto-> W  <->  ( S : dom  S --> W  /\  ran  S  =  W ) )
14810, 146, 147mpbir2an 887 1  |-  S : dom  S -onto-> W
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 177    \/ wo 358    /\ wa 359    /\ w3a 936    = wceq 1649    e. wcel 1717   A.wral 2651   E.wrex 2652   {crab 2655    \ cdif 3262    u. cun 3263    C_ wss 3265   (/)c0 3573   {csn 3759   <.cop 3762   <.cotp 3763   U_ciun 4037   class class class wbr 4155    e. cmpt 4209    _I cid 4436    X. cxp 4818   dom cdm 4820   ran crn 4821    Fn wfn 5391   -->wf 5392   -onto->wfo 5394   ` cfv 5396  (class class class)co 6022    e. cmpt2 6024   1oc1o 6655   2oc2o 6656   RRcr 8924   0cc0 8925   1c1 8926    + caddc 8928    < clt 9055    <_ cle 9056    - cmin 9225   2c2 9983   NN0cn0 10155   RR+crp 10546   ...cfz 10977  ..^cfzo 11067   #chash 11547  Word cword 11646   concat cconcat 11647   <"cs1 11648   splice csplice 11650   <"cs2 11734   ~FG cefg 15267
This theorem is referenced by:  efgredlemc  15306  efgrelexlemb  15311  efgredeu  15313  efgred2  15314
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 2370  ax-rep 4263  ax-sep 4273  ax-nul 4281  ax-pow 4320  ax-pr 4346  ax-un 4643  ax-cnex 8981  ax-resscn 8982  ax-1cn 8983  ax-icn 8984  ax-addcl 8985  ax-addrcl 8986  ax-mulcl 8987  ax-mulrcl 8988  ax-mulcom 8989  ax-addass 8990  ax-mulass 8991  ax-distr 8992  ax-i2m1 8993  ax-1ne0 8994  ax-1rid 8995  ax-rnegex 8996  ax-rrecex 8997  ax-cnre 8998  ax-pre-lttri 8999  ax-pre-lttrn 9000  ax-pre-ltadd 9001  ax-pre-mulgt0 9002
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 2244  df-mo 2245  df-clab 2376  df-cleq 2382  df-clel 2385  df-nfc 2514  df-ne 2554  df-nel 2555  df-ral 2656  df-rex 2657  df-reu 2658  df-rab 2660  df-v 2903  df-sbc 3107  df-csb 3197  df-dif 3268  df-un 3270  df-in 3272  df-ss 3279  df-pss 3281  df-nul 3574  df-if 3685  df-pw 3746  df-sn 3765  df-pr 3766  df-tp 3767  df-op 3768  df-ot 3769  df-uni 3960  df-int 3995  df-iun 4039  df-br 4156  df-opab 4210  df-mpt 4211  df-tr 4246  df-eprel 4437  df-id 4441  df-po 4446  df-so 4447  df-fr 4484  df-we 4486  df-ord 4527  df-on 4528  df-lim 4529  df-suc 4530  df-om 4788  df-xp 4826  df-rel 4827  df-cnv 4828  df-co 4829  df-dm 4830  df-rn 4831  df-res 4832  df-ima 4833  df-iota 5360  df-fun 5398  df-fn 5399  df-f 5400  df-f1 5401  df-fo 5402  df-f1o 5403  df-fv 5404  df-ov 6025  df-oprab 6026  df-mpt2 6027  df-1st 6290  df-2nd 6291  df-riota 6487  df-recs 6571  df-rdg 6606  df-1o 6662  df-2o 6663  df-oadd 6666  df-er 6843  df-map 6958  df-pm 6959  df-en 7048  df-dom 7049  df-sdom 7050  df-fin 7051  df-card 7761  df-pnf 9057  df-mnf 9058  df-xr 9059  df-ltxr 9060  df-le 9061  df-sub 9227  df-neg 9228  df-nn 9935  df-2 9992  df-n0 10156  df-z 10217  df-uz 10423  df-rp 10547  df-fz 10978  df-fzo 11068  df-hash 11548  df-word 11652  df-concat 11653  df-s1 11654  df-substr 11655  df-splice 11656  df-s2 11741
  Copyright terms: Public domain W3C validator