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

Theorem efgsfo 15326
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 15316 . . 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 5555 . . . 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 5545 . . 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 5556 . . . 4  |-  ( S : dom  S --> W  ->  ran  S  C_  W )
1210, 11ax-mp 8 . . 3  |-  ran  S  C_  W
13 fviss 5743 . . . . . . . . 9  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
141, 13eqsstri 3338 . . . . . . . 8  |-  W  C_ Word  ( I  X.  2o )
1514sseli 3304 . . . . . . 7  |-  ( c  e.  W  ->  c  e. Word  ( I  X.  2o ) )
16 lencl 11690 . . . . . . 7  |-  ( c  e. Word  ( I  X.  2o )  ->  ( # `  c )  e.  NN0 )
1715, 16syl 16 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  e. 
NN0 )
18 peano2nn0 10216 . . . . . 6  |-  ( (
# `  c )  e.  NN0  ->  ( ( # `
 c )  +  1 )  e.  NN0 )
1914sseli 3304 . . . . . . . . . . . 12  |-  ( a  e.  W  ->  a  e. Word  ( I  X.  2o ) )
20 lencl 11690 . . . . . . . . . . . 12  |-  ( a  e. Word  ( I  X.  2o )  ->  ( # `  a )  e.  NN0 )
2119, 20syl 16 . . . . . . . . . . 11  |-  ( a  e.  W  ->  ( # `
 a )  e. 
NN0 )
22 nn0nlt0 10204 . . . . . . . . . . . 12  |-  ( (
# `  a )  e.  NN0  ->  -.  ( # `
 a )  <  0 )
23 breq2 4176 . . . . . . . . . . . . 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 2748 . . . . . . . . 9  |-  ( b  =  0  ->  A. a  e.  W  -.  ( # `
 a )  < 
b )
28 rabeq0 3609 . . . . . . . . 9  |-  ( { a  e.  W  | 
( # `  a )  <  b }  =  (/)  <->  A. a  e.  W  -.  ( # `  a )  <  b )
2927, 28sylibr 204 . . . . . . . 8  |-  ( b  =  0  ->  { a  e.  W  |  (
# `  a )  <  b }  =  (/) )
3029sseq1d 3335 . . . . . . 7  |-  ( b  =  0  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  (/)  C_  ran  S ) )
31 breq2 4176 . . . . . . . . 9  |-  ( b  =  d  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  d )
)
3231rabbidv 2908 . . . . . . . 8  |-  ( b  =  d  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  d } )
3332sseq1d 3335 . . . . . . 7  |-  ( b  =  d  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S ) )
34 breq2 4176 . . . . . . . . 9  |-  ( b  =  ( d  +  1 )  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  ( d  +  1 ) ) )
3534rabbidv 2908 . . . . . . . 8  |-  ( b  =  ( d  +  1 )  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  ( d  +  1 ) } )
3635sseq1d 3335 . . . . . . 7  |-  ( b  =  ( d  +  1 )  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( d  +  1 ) } 
C_  ran  S )
)
37 breq2 4176 . . . . . . . . 9  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( ( # `
 a )  < 
b  <->  ( # `  a
)  <  ( ( # `
 c )  +  1 ) ) )
3837rabbidv 2908 . . . . . . . 8  |-  ( b  =  ( ( # `  c )  +  1 )  ->  { a  e.  W  |  ( # `
 a )  < 
b }  =  {
a  e.  W  | 
( # `  a )  <  ( ( # `  c )  +  1 ) } )
3938sseq1d 3335 . . . . . . 7  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( {
a  e.  W  | 
( # `  a )  <  b }  C_  ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( ( # `
 c )  +  1 ) }  C_  ran  S ) )
40 0ss 3616 . . . . . . 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 5687 . . . . . . . . . . . . 13  |-  ( a  =  c  ->  ( # `
 a )  =  ( # `  c
) )
4342eqeq1d 2412 . . . . . . . . . . . 12  |-  ( a  =  c  ->  (
( # `  a )  =  d  <->  ( # `  c
)  =  d ) )
4443cbvrabv 2915 . . . . . . . . . . 11  |-  { a  e.  W  |  (
# `  a )  =  d }  =  { c  e.  W  |  ( # `  c
)  =  d }
45 eliun 4057 . . . . . . . . . . . . . . 15  |-  ( c  e.  U_ x  e.  W  ran  ( T `
 x )  <->  E. x  e.  W  c  e.  ran  ( T `  x
) )
46 fveq2 5687 . . . . . . . . . . . . . . . . . 18  |-  ( x  =  b  ->  ( T `  x )  =  ( T `  b ) )
4746rneqd 5056 . . . . . . . . . . . . . . . . 17  |-  ( x  =  b  ->  ran  ( T `  x )  =  ran  ( T `
 b ) )
4847eleq2d 2471 . . . . . . . . . . . . . . . 16  |-  ( x  =  b  ->  (
c  e.  ran  ( T `  x )  <->  c  e.  ran  ( T `
 b ) ) )
4948cbvrexv 2893 . . . . . . . . . . . . . . 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 3306 . . . . . . . . . . . . . . . . . . . . . . 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 11690 . . . . . . . . . . . . . . . . . . . . . . 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 10231 . . . . . . . . . . . . . . . . . . . . 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 10573 . . . . . . . . . . . . . . . . . . . . 21  |-  2  e.  RR+
58 ltaddrp 10600 . . . . . . . . . . . . . . . . . . . . 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 15313 . . . . . . . . . . . . . . . . . . . . . 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 2438 . . . . . . . . . . . . . . . . . . . 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 4196 . . . . . . . . . . . . . . . . . . 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 5687 . . . . . . . . . . . . . . . . . . . . 21  |-  ( a  =  b  ->  ( # `
 a )  =  ( # `  b
) )
6665breq1d 4182 . . . . . . . . . . . . . . . . . . . 20  |-  ( a  =  b  ->  (
( # `  a )  <  d  <->  ( # `  b
)  <  d )
)
6766elrab 3052 . . . . . . . . . . . . . . . . . . 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 3309 . . . . . . . . . . . . . . . . 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 5550 . . . . . . . . . . . . . . . . . . 19  |-  ( S : dom  S --> W  ->  S  Fn  dom  S )
7110, 70ax-mp 8 . . . . . . . . . . . . . . . . . 18  |-  S  Fn  dom  S
72 fvelrnb 5733 . . . . . . . . . . . . . . . . . 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 15317 . . . . . . . . . . . . . . . . . . . . 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 3429 . . . . . . . . . . . . . . . . . . . 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 5691 . . . . . . . . . . . . . . . . . . . . . 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 5056 . . . . . . . . . . . . . . . . . . . . 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 2481 . . . . . . . . . . . . . . . . . . . 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 15324 . . . . . . . . . . . . . . . . . . . 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 15320 . . . . . . . . . . . . . . . . . . 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 5826 . . . . . . . . . . . . . . . . . . 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 2479 . . . . . . . . . . . . . . . . 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 2794 . . . . . . . . . . . . . . 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 2791 . . . . . . . . . . . . . 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 3290 . . . . . . . . . . . . . . . . . . 19  |-  ( c  e.  ( W  \  U_ x  e.  W  ran  ( T `  x
) )  <->  ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `  x
) ) )
985eleq2i 2468 . . . . . . . . . . . . . . . . . . . 20  |-  ( c  e.  D  <->  c  e.  ( W  \  U_ x  e.  W  ran  ( T `
 x ) ) )
991, 2, 3, 4, 5, 6efgs1 15322 . . . . . . . . . . . . . . . . . . . 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 15318 . . . . . . . . . . . . . . . . . 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 11713 . . . . . . . . . . . . . . . . . . . . 21  |-  ( # `  <" c "> )  =  1
105104oveq1i 6050 . . . . . . . . . . . . . . . . . . . 20  |-  ( (
# `  <" c "> )  -  1 )  =  ( 1  -  1 )
106 1m1e0 10024 . . . . . . . . . . . . . . . . . . . 20  |-  ( 1  -  1 )  =  0
107105, 106eqtri 2424 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  <" c "> )  -  1 )  =  0
108107fveq2i 5690 . . . . . . . . . . . . . . . . . 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 11715 . . . . . . . . . . . . . . . . . 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 2440 . . . . . . . . . . . . . . . 16  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  =  c )
113 fnfvelrn 5826 . . . . . . . . . . . . . . . . 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 2479 . . . . . . . . . . . . . . 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 3383 . . . . . . . . . . 11  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { c  e.  W  |  (
# `  c )  =  d }  C_  ran  S )
12044, 119syl5eqss 3352 . . . . . . . . . 10  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { a  e.  W  |  (
# `  a )  =  d }  C_  ran  S )
12141, 120unssd 3483 . . . . . . . . 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 10289 . . . . . . . . . . . . 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 10231 . . . . . . . . . . . . 13  |-  ( a  e.  W  ->  ( # `
 a )  e.  RR )
127 nn0re 10186 . . . . . . . . . . . . 13  |-  ( d  e.  NN0  ->  d  e.  RR )
128 leloe 9117 . . . . . . . . . . . . 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 2907 . . . . . . . . . 10  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  {
a  e.  W  | 
( ( # `  a
)  <  d  \/  ( # `  a )  =  d ) } )
132 unrab 3572 . . . . . . . . . 10  |-  ( { a  e.  W  | 
( # `  a )  <  d }  u.  { a  e.  W  | 
( # `  a )  =  d } )  =  { a  e.  W  |  ( (
# `  a )  <  d  \/  ( # `  a )  =  d ) }
133131, 132syl6eqr 2454 . . . . . . . . 9  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  ( { a  e.  W  |  ( # `  a
)  <  d }  u.  { a  e.  W  |  ( # `  a
)  =  d } ) )
134133sseq1d 3335 . . . . . . . 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 10322 . . . . . 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 10231 . . . . . . 7  |-  ( c  e.  W  ->  ( # `
 c )  e.  RR )
140139ltp1d 9897 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  < 
( ( # `  c
)  +  1 ) )
14142breq1d 4182 . . . . . . 7  |-  ( a  =  c  ->  (
( # `  a )  <  ( ( # `  c )  +  1 )  <->  ( # `  c
)  <  ( ( # `
 c )  +  1 ) ) )
142141elrab 3052 . . . . . 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 3309 . . . 4  |-  ( c  e.  W  ->  c  e.  ran  S )
145144ssriv 3312 . . 3  |-  W  C_  ran  S
14612, 145eqssi 3324 . 2  |-  ran  S  =  W
147 dffo2 5616 . 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 1721   A.wral 2666   E.wrex 2667   {crab 2670    \ cdif 3277    u. cun 3278    C_ wss 3280   (/)c0 3588   {csn 3774   <.cop 3777   <.cotp 3778   U_ciun 4053   class class class wbr 4172    e. cmpt 4226    _I cid 4453    X. cxp 4835   dom cdm 4837   ran crn 4838    Fn wfn 5408   -->wf 5409   -onto->wfo 5411   ` cfv 5413  (class class class)co 6040    e. cmpt2 6042   1oc1o 6676   2oc2o 6677   RRcr 8945   0cc0 8946   1c1 8947    + caddc 8949    < clt 9076    <_ cle 9077    - cmin 9247   2c2 10005   NN0cn0 10177   RR+crp 10568   ...cfz 10999  ..^cfzo 11090   #chash 11573  Word cword 11672   concat cconcat 11673   <"cs1 11674   splice csplice 11676   <"cs2 11760   ~FG cefg 15293
This theorem is referenced by:  efgredlemc  15332  efgrelexlemb  15337  efgredeu  15339  efgred2  15340
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2385  ax-rep 4280  ax-sep 4290  ax-nul 4298  ax-pow 4337  ax-pr 4363  ax-un 4660  ax-cnex 9002  ax-resscn 9003  ax-1cn 9004  ax-icn 9005  ax-addcl 9006  ax-addrcl 9007  ax-mulcl 9008  ax-mulrcl 9009  ax-mulcom 9010  ax-addass 9011  ax-mulass 9012  ax-distr 9013  ax-i2m1 9014  ax-1ne0 9015  ax-1rid 9016  ax-rnegex 9017  ax-rrecex 9018  ax-cnre 9019  ax-pre-lttri 9020  ax-pre-lttrn 9021  ax-pre-ltadd 9022  ax-pre-mulgt0 9023
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2258  df-mo 2259  df-clab 2391  df-cleq 2397  df-clel 2400  df-nfc 2529  df-ne 2569  df-nel 2570  df-ral 2671  df-rex 2672  df-reu 2673  df-rab 2675  df-v 2918  df-sbc 3122  df-csb 3212  df-dif 3283  df-un 3285  df-in 3287  df-ss 3294  df-pss 3296  df-nul 3589  df-if 3700  df-pw 3761  df-sn 3780  df-pr 3781  df-tp 3782  df-op 3783  df-ot 3784  df-uni 3976  df-int 4011  df-iun 4055  df-br 4173  df-opab 4227  df-mpt 4228  df-tr 4263  df-eprel 4454  df-id 4458  df-po 4463  df-so 4464  df-fr 4501  df-we 4503  df-ord 4544  df-on 4545  df-lim 4546  df-suc 4547  df-om 4805  df-xp 4843  df-rel 4844  df-cnv 4845  df-co 4846  df-dm 4847  df-rn 4848  df-res 4849  df-ima 4850  df-iota 5377  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-ov 6043  df-oprab 6044  df-mpt2 6045  df-1st 6308  df-2nd 6309  df-riota 6508  df-recs 6592  df-rdg 6627  df-1o 6683  df-2o 6684  df-oadd 6687  df-er 6864  df-map 6979  df-pm 6980  df-en 7069  df-dom 7070  df-sdom 7071  df-fin 7072  df-card 7782  df-pnf 9078  df-mnf 9079  df-xr 9080  df-ltxr 9081  df-le 9082  df-sub 9249  df-neg 9250  df-nn 9957  df-2 10014  df-n0 10178  df-z 10239  df-uz 10445  df-rp 10569  df-fz 11000  df-fzo 11091  df-hash 11574  df-word 11678  df-concat 11679  df-s1 11680  df-substr 11681  df-splice 11682  df-s2 11767
  Copyright terms: Public domain W3C validator