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

Theorem efgsfo 15363
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 15353 . . 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 5588 . . . 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 5578 . . 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 5589 . . . 4  |-  ( S : dom  S --> W  ->  ran  S  C_  W )
1210, 11ax-mp 8 . . 3  |-  ran  S  C_  W
13 fviss 5776 . . . . . . . . 9  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
141, 13eqsstri 3370 . . . . . . . 8  |-  W  C_ Word  ( I  X.  2o )
1514sseli 3336 . . . . . . 7  |-  ( c  e.  W  ->  c  e. Word  ( I  X.  2o ) )
16 lencl 11727 . . . . . . 7  |-  ( c  e. Word  ( I  X.  2o )  ->  ( # `  c )  e.  NN0 )
1715, 16syl 16 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  e. 
NN0 )
18 peano2nn0 10252 . . . . . 6  |-  ( (
# `  c )  e.  NN0  ->  ( ( # `
 c )  +  1 )  e.  NN0 )
1914sseli 3336 . . . . . . . . . . . 12  |-  ( a  e.  W  ->  a  e. Word  ( I  X.  2o ) )
20 lencl 11727 . . . . . . . . . . . 12  |-  ( a  e. Word  ( I  X.  2o )  ->  ( # `  a )  e.  NN0 )
2119, 20syl 16 . . . . . . . . . . 11  |-  ( a  e.  W  ->  ( # `
 a )  e. 
NN0 )
22 nn0nlt0 10240 . . . . . . . . . . . 12  |-  ( (
# `  a )  e.  NN0  ->  -.  ( # `
 a )  <  0 )
23 breq2 4208 . . . . . . . . . . . . 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 2780 . . . . . . . . 9  |-  ( b  =  0  ->  A. a  e.  W  -.  ( # `
 a )  < 
b )
28 rabeq0 3641 . . . . . . . . 9  |-  ( { a  e.  W  | 
( # `  a )  <  b }  =  (/)  <->  A. a  e.  W  -.  ( # `  a )  <  b )
2927, 28sylibr 204 . . . . . . . 8  |-  ( b  =  0  ->  { a  e.  W  |  (
# `  a )  <  b }  =  (/) )
3029sseq1d 3367 . . . . . . 7  |-  ( b  =  0  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  (/)  C_  ran  S ) )
31 breq2 4208 . . . . . . . . 9  |-  ( b  =  d  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  d )
)
3231rabbidv 2940 . . . . . . . 8  |-  ( b  =  d  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  d } )
3332sseq1d 3367 . . . . . . 7  |-  ( b  =  d  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S ) )
34 breq2 4208 . . . . . . . . 9  |-  ( b  =  ( d  +  1 )  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  ( d  +  1 ) ) )
3534rabbidv 2940 . . . . . . . 8  |-  ( b  =  ( d  +  1 )  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  ( d  +  1 ) } )
3635sseq1d 3367 . . . . . . 7  |-  ( b  =  ( d  +  1 )  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( d  +  1 ) } 
C_  ran  S )
)
37 breq2 4208 . . . . . . . . 9  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( ( # `
 a )  < 
b  <->  ( # `  a
)  <  ( ( # `
 c )  +  1 ) ) )
3837rabbidv 2940 . . . . . . . 8  |-  ( b  =  ( ( # `  c )  +  1 )  ->  { a  e.  W  |  ( # `
 a )  < 
b }  =  {
a  e.  W  | 
( # `  a )  <  ( ( # `  c )  +  1 ) } )
3938sseq1d 3367 . . . . . . 7  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( {
a  e.  W  | 
( # `  a )  <  b }  C_  ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( ( # `
 c )  +  1 ) }  C_  ran  S ) )
40 0ss 3648 . . . . . . 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 5720 . . . . . . . . . . . . 13  |-  ( a  =  c  ->  ( # `
 a )  =  ( # `  c
) )
4342eqeq1d 2443 . . . . . . . . . . . 12  |-  ( a  =  c  ->  (
( # `  a )  =  d  <->  ( # `  c
)  =  d ) )
4443cbvrabv 2947 . . . . . . . . . . 11  |-  { a  e.  W  |  (
# `  a )  =  d }  =  { c  e.  W  |  ( # `  c
)  =  d }
45 eliun 4089 . . . . . . . . . . . . . . 15  |-  ( c  e.  U_ x  e.  W  ran  ( T `
 x )  <->  E. x  e.  W  c  e.  ran  ( T `  x
) )
46 fveq2 5720 . . . . . . . . . . . . . . . . . 18  |-  ( x  =  b  ->  ( T `  x )  =  ( T `  b ) )
4746rneqd 5089 . . . . . . . . . . . . . . . . 17  |-  ( x  =  b  ->  ran  ( T `  x )  =  ran  ( T `
 b ) )
4847eleq2d 2502 . . . . . . . . . . . . . . . 16  |-  ( x  =  b  ->  (
c  e.  ran  ( T `  x )  <->  c  e.  ran  ( T `
 b ) ) )
4948cbvrexv 2925 . . . . . . . . . . . . . . 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 3338 . . . . . . . . . . . . . . . . . . . . . . 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 11727 . . . . . . . . . . . . . . . . . . . . . . 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 10267 . . . . . . . . . . . . . . . . . . . . 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 10609 . . . . . . . . . . . . . . . . . . . . 21  |-  2  e.  RR+
58 ltaddrp 10636 . . . . . . . . . . . . . . . . . . . . 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 15350 . . . . . . . . . . . . . . . . . . . . . 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 2469 . . . . . . . . . . . . . . . . . . . 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 4228 . . . . . . . . . . . . . . . . . . 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 5720 . . . . . . . . . . . . . . . . . . . . 21  |-  ( a  =  b  ->  ( # `
 a )  =  ( # `  b
) )
6665breq1d 4214 . . . . . . . . . . . . . . . . . . . 20  |-  ( a  =  b  ->  (
( # `  a )  <  d  <->  ( # `  b
)  <  d )
)
6766elrab 3084 . . . . . . . . . . . . . . . . . . 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 3341 . . . . . . . . . . . . . . . . 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 5583 . . . . . . . . . . . . . . . . . . 19  |-  ( S : dom  S --> W  ->  S  Fn  dom  S )
7110, 70ax-mp 8 . . . . . . . . . . . . . . . . . 18  |-  S  Fn  dom  S
72 fvelrnb 5766 . . . . . . . . . . . . . . . . . 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 15354 . . . . . . . . . . . . . . . . . . . . 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 3461 . . . . . . . . . . . . . . . . . . . 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 5724 . . . . . . . . . . . . . . . . . . . . . 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 5089 . . . . . . . . . . . . . . . . . . . . 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 2512 . . . . . . . . . . . . . . . . . . . 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 15361 . . . . . . . . . . . . . . . . . . . 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 15357 . . . . . . . . . . . . . . . . . . 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 5859 . . . . . . . . . . . . . . . . . . 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 2510 . . . . . . . . . . . . . . . . 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 2826 . . . . . . . . . . . . . . 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 2823 . . . . . . . . . . . . . 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 3322 . . . . . . . . . . . . . . . . . . 19  |-  ( c  e.  ( W  \  U_ x  e.  W  ran  ( T `  x
) )  <->  ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `  x
) ) )
985eleq2i 2499 . . . . . . . . . . . . . . . . . . . 20  |-  ( c  e.  D  <->  c  e.  ( W  \  U_ x  e.  W  ran  ( T `
 x ) ) )
991, 2, 3, 4, 5, 6efgs1 15359 . . . . . . . . . . . . . . . . . . . 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 15355 . . . . . . . . . . . . . . . . . 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 11750 . . . . . . . . . . . . . . . . . . . . 21  |-  ( # `  <" c "> )  =  1
105104oveq1i 6083 . . . . . . . . . . . . . . . . . . . 20  |-  ( (
# `  <" c "> )  -  1 )  =  ( 1  -  1 )
106 1m1e0 10060 . . . . . . . . . . . . . . . . . . . 20  |-  ( 1  -  1 )  =  0
107105, 106eqtri 2455 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  <" c "> )  -  1 )  =  0
108107fveq2i 5723 . . . . . . . . . . . . . . . . . 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 11752 . . . . . . . . . . . . . . . . . 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 2471 . . . . . . . . . . . . . . . 16  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  =  c )
113 fnfvelrn 5859 . . . . . . . . . . . . . . . . 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 2510 . . . . . . . . . . . . . . 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 3415 . . . . . . . . . . 11  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { c  e.  W  |  (
# `  c )  =  d }  C_  ran  S )
12044, 119syl5eqss 3384 . . . . . . . . . 10  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { a  e.  W  |  (
# `  a )  =  d }  C_  ran  S )
12141, 120unssd 3515 . . . . . . . . 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 10325 . . . . . . . . . . . . 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 10267 . . . . . . . . . . . . 13  |-  ( a  e.  W  ->  ( # `
 a )  e.  RR )
127 nn0re 10222 . . . . . . . . . . . . 13  |-  ( d  e.  NN0  ->  d  e.  RR )
128 leloe 9153 . . . . . . . . . . . . 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 2939 . . . . . . . . . 10  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  {
a  e.  W  | 
( ( # `  a
)  <  d  \/  ( # `  a )  =  d ) } )
132 unrab 3604 . . . . . . . . . 10  |-  ( { a  e.  W  | 
( # `  a )  <  d }  u.  { a  e.  W  | 
( # `  a )  =  d } )  =  { a  e.  W  |  ( (
# `  a )  <  d  \/  ( # `  a )  =  d ) }
133131, 132syl6eqr 2485 . . . . . . . . 9  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  ( { a  e.  W  |  ( # `  a
)  <  d }  u.  { a  e.  W  |  ( # `  a
)  =  d } ) )
134133sseq1d 3367 . . . . . . . 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 10358 . . . . . 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 10267 . . . . . . 7  |-  ( c  e.  W  ->  ( # `
 c )  e.  RR )
140139ltp1d 9933 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  < 
( ( # `  c
)  +  1 ) )
14142breq1d 4214 . . . . . . 7  |-  ( a  =  c  ->  (
( # `  a )  <  ( ( # `  c )  +  1 )  <->  ( # `  c
)  <  ( ( # `
 c )  +  1 ) ) )
142141elrab 3084 . . . . . 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 3341 . . . 4  |-  ( c  e.  W  ->  c  e.  ran  S )
145144ssriv 3344 . . 3  |-  W  C_  ran  S
14612, 145eqssi 3356 . 2  |-  ran  S  =  W
147 dffo2 5649 . 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 1652    e. wcel 1725   A.wral 2697   E.wrex 2698   {crab 2701    \ cdif 3309    u. cun 3310    C_ wss 3312   (/)c0 3620   {csn 3806   <.cop 3809   <.cotp 3810   U_ciun 4085   class class class wbr 4204    e. cmpt 4258    _I cid 4485    X. cxp 4868   dom cdm 4870   ran crn 4871    Fn wfn 5441   -->wf 5442   -onto->wfo 5444   ` cfv 5446  (class class class)co 6073    e. cmpt2 6075   1oc1o 6709   2oc2o 6710   RRcr 8981   0cc0 8982   1c1 8983    + caddc 8985    < clt 9112    <_ cle 9113    - cmin 9283   2c2 10041   NN0cn0 10213   RR+crp 10604   ...cfz 11035  ..^cfzo 11127   #chash 11610  Word cword 11709   concat cconcat 11710   <"cs1 11711   splice csplice 11713   <"cs2 11797   ~FG cefg 15330
This theorem is referenced by:  efgredlemc  15369  efgrelexlemb  15374  efgredeu  15376  efgred2  15377
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2416  ax-rep 4312  ax-sep 4322  ax-nul 4330  ax-pow 4369  ax-pr 4395  ax-un 4693  ax-cnex 9038  ax-resscn 9039  ax-1cn 9040  ax-icn 9041  ax-addcl 9042  ax-addrcl 9043  ax-mulcl 9044  ax-mulrcl 9045  ax-mulcom 9046  ax-addass 9047  ax-mulass 9048  ax-distr 9049  ax-i2m1 9050  ax-1ne0 9051  ax-1rid 9052  ax-rnegex 9053  ax-rrecex 9054  ax-cnre 9055  ax-pre-lttri 9056  ax-pre-lttrn 9057  ax-pre-ltadd 9058  ax-pre-mulgt0 9059
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2284  df-mo 2285  df-clab 2422  df-cleq 2428  df-clel 2431  df-nfc 2560  df-ne 2600  df-nel 2601  df-ral 2702  df-rex 2703  df-reu 2704  df-rab 2706  df-v 2950  df-sbc 3154  df-csb 3244  df-dif 3315  df-un 3317  df-in 3319  df-ss 3326  df-pss 3328  df-nul 3621  df-if 3732  df-pw 3793  df-sn 3812  df-pr 3813  df-tp 3814  df-op 3815  df-ot 3816  df-uni 4008  df-int 4043  df-iun 4087  df-br 4205  df-opab 4259  df-mpt 4260  df-tr 4295  df-eprel 4486  df-id 4490  df-po 4495  df-so 4496  df-fr 4533  df-we 4535  df-ord 4576  df-on 4577  df-lim 4578  df-suc 4579  df-om 4838  df-xp 4876  df-rel 4877  df-cnv 4878  df-co 4879  df-dm 4880  df-rn 4881  df-res 4882  df-ima 4883  df-iota 5410  df-fun 5448  df-fn 5449  df-f 5450  df-f1 5451  df-fo 5452  df-f1o 5453  df-fv 5454  df-ov 6076  df-oprab 6077  df-mpt2 6078  df-1st 6341  df-2nd 6342  df-riota 6541  df-recs 6625  df-rdg 6660  df-1o 6716  df-2o 6717  df-oadd 6720  df-er 6897  df-map 7012  df-pm 7013  df-en 7102  df-dom 7103  df-sdom 7104  df-fin 7105  df-card 7818  df-pnf 9114  df-mnf 9115  df-xr 9116  df-ltxr 9117  df-le 9118  df-sub 9285  df-neg 9286  df-nn 9993  df-2 10050  df-n0 10214  df-z 10275  df-uz 10481  df-rp 10605  df-fz 11036  df-fzo 11128  df-hash 11611  df-word 11715  df-concat 11716  df-s1 11717  df-substr 11718  df-splice 11719  df-s2 11804
  Copyright terms: Public domain W3C validator