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

Theorem efgsfo 15048
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 15038 . . 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 5394 . . . 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 5384 . . 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 200 . 2  |-  S : dom  S --> W
11 frn 5395 . . . 4  |-  ( S : dom  S --> W  ->  ran  S  C_  W )
1210, 11ax-mp 8 . . 3  |-  ran  S  C_  W
13 fviss 5580 . . . . . . . . 9  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
141, 13eqsstri 3208 . . . . . . . 8  |-  W  C_ Word  ( I  X.  2o )
1514sseli 3176 . . . . . . 7  |-  ( c  e.  W  ->  c  e. Word  ( I  X.  2o ) )
16 lencl 11421 . . . . . . 7  |-  ( c  e. Word  ( I  X.  2o )  ->  ( # `  c )  e.  NN0 )
1715, 16syl 15 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  e. 
NN0 )
18 peano2nn0 10004 . . . . . 6  |-  ( (
# `  c )  e.  NN0  ->  ( ( # `
 c )  +  1 )  e.  NN0 )
1914sseli 3176 . . . . . . . . . . . 12  |-  ( a  e.  W  ->  a  e. Word  ( I  X.  2o ) )
20 lencl 11421 . . . . . . . . . . . 12  |-  ( a  e. Word  ( I  X.  2o )  ->  ( # `  a )  e.  NN0 )
2119, 20syl 15 . . . . . . . . . . 11  |-  ( a  e.  W  ->  ( # `
 a )  e. 
NN0 )
22 nn0nlt0 9992 . . . . . . . . . . . 12  |-  ( (
# `  a )  e.  NN0  ->  -.  ( # `
 a )  <  0 )
23 breq2 4027 . . . . . . . . . . . . 13  |-  ( b  =  0  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  0 ) )
2423notbid 285 . . . . . . . . . . . 12  |-  ( b  =  0  ->  ( -.  ( # `  a
)  <  b  <->  -.  ( # `
 a )  <  0 ) )
2522, 24syl5ibr 212 . . . . . . . . . . 11  |-  ( b  =  0  ->  (
( # `  a )  e.  NN0  ->  -.  ( # `
 a )  < 
b ) )
2621, 25syl5 28 . . . . . . . . . 10  |-  ( b  =  0  ->  (
a  e.  W  ->  -.  ( # `  a
)  <  b )
)
2726ralrimiv 2625 . . . . . . . . 9  |-  ( b  =  0  ->  A. a  e.  W  -.  ( # `
 a )  < 
b )
28 rabeq0 3476 . . . . . . . . 9  |-  ( { a  e.  W  | 
( # `  a )  <  b }  =  (/)  <->  A. a  e.  W  -.  ( # `  a )  <  b )
2927, 28sylibr 203 . . . . . . . 8  |-  ( b  =  0  ->  { a  e.  W  |  (
# `  a )  <  b }  =  (/) )
3029sseq1d 3205 . . . . . . 7  |-  ( b  =  0  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  (/)  C_  ran  S ) )
31 breq2 4027 . . . . . . . . 9  |-  ( b  =  d  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  d )
)
3231rabbidv 2780 . . . . . . . 8  |-  ( b  =  d  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  d } )
3332sseq1d 3205 . . . . . . 7  |-  ( b  =  d  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S ) )
34 breq2 4027 . . . . . . . . 9  |-  ( b  =  ( d  +  1 )  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  ( d  +  1 ) ) )
3534rabbidv 2780 . . . . . . . 8  |-  ( b  =  ( d  +  1 )  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  ( d  +  1 ) } )
3635sseq1d 3205 . . . . . . 7  |-  ( b  =  ( d  +  1 )  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( d  +  1 ) } 
C_  ran  S )
)
37 breq2 4027 . . . . . . . . 9  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( ( # `
 a )  < 
b  <->  ( # `  a
)  <  ( ( # `
 c )  +  1 ) ) )
3837rabbidv 2780 . . . . . . . 8  |-  ( b  =  ( ( # `  c )  +  1 )  ->  { a  e.  W  |  ( # `
 a )  < 
b }  =  {
a  e.  W  | 
( # `  a )  <  ( ( # `  c )  +  1 ) } )
3938sseq1d 3205 . . . . . . 7  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( {
a  e.  W  | 
( # `  a )  <  b }  C_  ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( ( # `
 c )  +  1 ) }  C_  ran  S ) )
40 0ss 3483 . . . . . . 7  |-  (/)  C_  ran  S
41 simpr 447 . . . . . . . . . 10  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { a  e.  W  |  (
# `  a )  <  d }  C_  ran  S )
42 fveq2 5525 . . . . . . . . . . . . 13  |-  ( a  =  c  ->  ( # `
 a )  =  ( # `  c
) )
4342eqeq1d 2291 . . . . . . . . . . . 12  |-  ( a  =  c  ->  (
( # `  a )  =  d  <->  ( # `  c
)  =  d ) )
4443cbvrabv 2787 . . . . . . . . . . 11  |-  { a  e.  W  |  (
# `  a )  =  d }  =  { c  e.  W  |  ( # `  c
)  =  d }
45 eliun 3909 . . . . . . . . . . . . . . 15  |-  ( c  e.  U_ x  e.  W  ran  ( T `
 x )  <->  E. x  e.  W  c  e.  ran  ( T `  x
) )
46 fveq2 5525 . . . . . . . . . . . . . . . . . 18  |-  ( x  =  b  ->  ( T `  x )  =  ( T `  b ) )
4746rneqd 4906 . . . . . . . . . . . . . . . . 17  |-  ( x  =  b  ->  ran  ( T `  x )  =  ran  ( T `
 b ) )
4847eleq2d 2350 . . . . . . . . . . . . . . . 16  |-  ( x  =  b  ->  (
c  e.  ran  ( T `  x )  <->  c  e.  ran  ( T `
 b ) ) )
4948cbvrexv 2765 . . . . . . . . . . . . . . 15  |-  ( E. x  e.  W  c  e.  ran  ( T `
 x )  <->  E. b  e.  W  c  e.  ran  ( T `  b
) )
5045, 49bitri 240 . . . . . . . . . . . . . 14  |-  ( c  e.  U_ x  e.  W  ran  ( T `
 x )  <->  E. b  e.  W  c  e.  ran  ( T `  b
) )
51 simpl1r 1007 . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  { a  e.  W  |  ( # `  a )  <  d }  C_  ran  S )
52 simprl 732 . . . . . . . . . . . . . . . . . . . 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  e.  W
)
5314, 52sseldi 3178 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( ( 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 11421 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( b  e. Word  ( I  X.  2o )  ->  ( # `  b )  e.  NN0 )
5553, 54syl 15 . . . . . . . . . . . . . . . . . . . . . . 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.  NN0 )
5655nn0red 10019 . . . . . . . . . . . . . . . . . . . . . 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.  RR )
57 2rp 10359 . . . . . . . . . . . . . . . . . . . . . 22  |-  2  e.  RR+
58 ltaddrp 10386 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( ( # `  b
)  e.  RR  /\  2  e.  RR+ )  -> 
( # `  b )  <  ( ( # `  b )  +  2 ) )
5956, 57, 58sylancl 643 . . . . . . . . . . . . . . . . . . . . 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
)  <  ( ( # `
 b )  +  2 ) )
601, 2, 3, 4efgtlen 15035 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( b  e.  W  /\  c  e.  ran  ( T `
 b ) )  ->  ( # `  c
)  =  ( (
# `  b )  +  2 ) )
6160adantl 452 . . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  ( # `  c
)  =  ( (
# `  b )  +  2 ) )
62 simpl3 960 . . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  ( # `  c
)  =  d )
6361, 62eqtr3d 2317 . . . . . . . . . . . . . . . . . . . . 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 )  +  2 )  =  d )
6459, 63breqtrd 4047 . . . . . . . . . . . . . . . . . . . 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
)  <  d )
65 fveq2 5525 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( a  =  b  ->  ( # `
 a )  =  ( # `  b
) )
6665breq1d 4033 . . . . . . . . . . . . . . . . . . . . 21  |-  ( a  =  b  ->  (
( # `  a )  <  d  <->  ( # `  b
)  <  d )
)
6766elrab 2923 . . . . . . . . . . . . . . . . . . . 20  |-  ( b  e.  { a  e.  W  |  ( # `  a )  <  d } 
<->  ( b  e.  W  /\  ( # `  b
)  <  d )
)
6852, 64, 67sylanbrc 645 . . . . . . . . . . . . . . . . . . 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.  {
a  e.  W  | 
( # `  a )  <  d } )
6951, 68sseldd 3181 . . . . . . . . . . . . . . . . . 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.  ran  S )
70 ffn 5389 . . . . . . . . . . . . . . . . . . . 20  |-  ( S : dom  S --> W  ->  S  Fn  dom  S )
7110, 70ax-mp 8 . . . . . . . . . . . . . . . . . . 19  |-  S  Fn  dom  S
72 fvelrnb 5570 . . . . . . . . . . . . . . . . . . 19  |-  ( S  Fn  dom  S  -> 
( b  e.  ran  S  <->  E. o  e.  dom  S ( S `  o
)  =  b ) )
7371, 72ax-mp 8 . . . . . . . . . . . . . . . . . 18  |-  ( b  e.  ran  S  <->  E. o  e.  dom  S ( S `
 o )  =  b )
7469, 73sylib 188 . . . . . . . . . . . . . . . . 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 ) ) )  ->  E. o  e.  dom  S ( S `  o
)  =  b )
75 simprrl 740 . . . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  o  e.  dom  S )
761, 2, 3, 4, 5, 6efgsdm 15039 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( 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 970 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( o  e.  dom  S  -> 
o  e.  (Word  W  \  { (/) } ) )
78 eldifi 3298 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( o  e.  (Word  W  \  { (/) } )  -> 
o  e. Word  W )
7975, 77, 783syl 18 . . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  o  e. Word  W )
80 simpl2 959 . . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  c  e.  W )
81 simprlr 739 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( ( 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 741 . . . . . . . . . . . . . . . . . . . . . . . . . 26  |-  ( ( ( ( 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 5529 . . . . . . . . . . . . . . . . . . . . . . . . 25  |-  ( ( ( ( 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 4906 . . . . . . . . . . . . . . . . . . . . . . . 24  |-  ( ( ( ( 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 2360 . . . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  c  e.  ran  ( T `  ( S `  o )
) )
861, 2, 3, 4, 5, 6efgsp1 15046 . . . . . . . . . . . . . . . . . . . . . . 23  |-  ( ( o  e.  dom  S  /\  c  e.  ran  ( T `  ( S `
 o ) ) )  ->  ( o concat  <" c "> )  e.  dom  S )
8775, 85, 86syl2anc 642 . . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  ( o concat  <" c "> )  e.  dom  S )
881, 2, 3, 4, 5, 6efgsval2 15042 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( o  e. Word  W  /\  c  e.  W  /\  ( o concat  <" c "> )  e.  dom  S )  ->  ( S `  ( o concat  <" c "> ) )  =  c )
8979, 80, 87, 88syl3anc 1182 . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  ( S `  ( o concat  <" c "> ) )  =  c )
90 fnfvelrn 5662 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( ( S  Fn  dom  S  /\  ( o concat  <" c "> )  e.  dom  S )  ->  ( S `  ( o concat  <" c "> ) )  e. 
ran  S )
9171, 87, 90sylancr 644 . . . . . . . . . . . . . . . . . . . . 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 ) ) )  ->  ( S `  ( o concat  <" c "> ) )  e. 
ran  S )
9289, 91eqeltrrd 2358 . . . . . . . . . . . . . . . . . . . 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  S )
9392anassrs 629 . . . . . . . . . . . . . . . . . . 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.  ran  S )
9493expr 598 . . . . . . . . . . . . . . . . . 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  ->  c  e. 
ran  S ) )
9594rexlimdva 2667 . . . . . . . . . . . . . . . . 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 ) ) )  ->  ( E. o  e.  dom  S ( S `
 o )  =  b  ->  c  e.  ran  S ) )
9674, 95mpd 14 . . . . . . . . . . . . . . . 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 ) ) )  ->  c  e.  ran  S )
9796expr 598 . . . . . . . . . . . . . . 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
) )
9897rexlimdva 2667 . . . . . . . . . . . . . 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 ) )
9950, 98syl5bi 208 . . . . . . . . . . . . 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 ) )
100 eldif 3162 . . . . . . . . . . . . . . . . . . 19  |-  ( c  e.  ( W  \  U_ x  e.  W  ran  ( T `  x
) )  <->  ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `  x
) ) )
1015eleq2i 2347 . . . . . . . . . . . . . . . . . . . 20  |-  ( c  e.  D  <->  c  e.  ( W  \  U_ x  e.  W  ran  ( T `
 x ) ) )
1021, 2, 3, 4, 5, 6efgs1 15044 . . . . . . . . . . . . . . . . . . . 20  |-  ( c  e.  D  ->  <" c ">  e.  dom  S
)
103101, 102sylbir 204 . . . . . . . . . . . . . . . . . . 19  |-  ( c  e.  ( W  \  U_ x  e.  W  ran  ( T `  x
) )  ->  <" c ">  e.  dom  S
)
104100, 103sylbir 204 . . . . . . . . . . . . . . . . . 18  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  <" c ">  e.  dom  S
)
1051, 2, 3, 4, 5, 6efgsval 15040 . . . . . . . . . . . . . . . . . 18  |-  ( <" c ">  e.  dom  S  ->  ( S `  <" c "> )  =  (
<" c "> `  ( ( # `  <" c "> )  -  1 ) ) )
106104, 105syl 15 . . . . . . . . . . . . . . . . 17  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  =  ( <" c "> `  (
( # `  <" c "> )  -  1 ) ) )
107 s1len 11444 . . . . . . . . . . . . . . . . . . . . 21  |-  ( # `  <" c "> )  =  1
108107oveq1i 5868 . . . . . . . . . . . . . . . . . . . 20  |-  ( (
# `  <" c "> )  -  1 )  =  ( 1  -  1 )
109 1m1e0 9814 . . . . . . . . . . . . . . . . . . . 20  |-  ( 1  -  1 )  =  0
110108, 109eqtri 2303 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  <" c "> )  -  1 )  =  0
111110fveq2i 5528 . . . . . . . . . . . . . . . . . 18  |-  ( <" c "> `  ( ( # `  <" c "> )  -  1 ) )  =  ( <" c "> `  0 )
112111a1i 10 . . . . . . . . . . . . . . . . 17  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( <" c "> `  ( ( # `
 <" c "> )  -  1 ) )  =  (
<" c "> `  0 ) )
113 s1fv 11446 . . . . . . . . . . . . . . . . . 18  |-  ( c  e.  W  ->  ( <" c "> `  0 )  =  c )
114113adantr 451 . . . . . . . . . . . . . . . . 17  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( <" c "> `  0 )  =  c )
115106, 112, 1143eqtrd 2319 . . . . . . . . . . . . . . . 16  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  =  c )
116 fnfvelrn 5662 . . . . . . . . . . . . . . . . 17  |-  ( ( S  Fn  dom  S  /\  <" c ">  e.  dom  S
)  ->  ( S `  <" c "> )  e.  ran  S )
11771, 104, 116sylancr 644 . . . . . . . . . . . . . . . 16  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  e.  ran  S )
118115, 117eqeltrrd 2358 . . . . . . . . . . . . . . 15  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  c  e.  ran  S )
119118ex 423 . . . . . . . . . . . . . 14  |-  ( c  e.  W  ->  ( -.  c  e.  U_ x  e.  W  ran  ( T `
 x )  -> 
c  e.  ran  S
) )
1201193ad2ant2 977 . . . . . . . . . . . . 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 ) )
12199, 120pm2.61d 150 . . . . . . . . . . . 12  |-  ( ( ( d  e.  NN0  /\ 
{ a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S )  /\  c  e.  W  /\  ( # `  c )  =  d )  -> 
c  e.  ran  S
)
122121rabssdv 3253 . . . . . . . . . . 11  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { c  e.  W  |  (
# `  c )  =  d }  C_  ran  S )
12344, 122syl5eqss 3222 . . . . . . . . . 10  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { a  e.  W  |  (
# `  a )  =  d }  C_  ran  S )
12441, 123unssd 3351 . . . . . . . . 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 )
125124ex 423 . . . . . . . 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 )
)
126 id 19 . . . . . . . . . . . . 13  |-  ( d  e.  NN0  ->  d  e. 
NN0 )
127 nn0leltp1 10075 . . . . . . . . . . . . 13  |-  ( ( ( # `  a
)  e.  NN0  /\  d  e.  NN0 )  -> 
( ( # `  a
)  <_  d  <->  ( # `  a
)  <  ( d  +  1 ) ) )
12821, 126, 127syl2anr 464 . . . . . . . . . . . 12  |-  ( ( d  e.  NN0  /\  a  e.  W )  ->  ( ( # `  a
)  <_  d  <->  ( # `  a
)  <  ( d  +  1 ) ) )
12921nn0red 10019 . . . . . . . . . . . . 13  |-  ( a  e.  W  ->  ( # `
 a )  e.  RR )
130 nn0re 9974 . . . . . . . . . . . . 13  |-  ( d  e.  NN0  ->  d  e.  RR )
131 leloe 8908 . . . . . . . . . . . . 13  |-  ( ( ( # `  a
)  e.  RR  /\  d  e.  RR )  ->  ( ( # `  a
)  <_  d  <->  ( ( # `
 a )  < 
d  \/  ( # `  a )  =  d ) ) )
132129, 130, 131syl2anr 464 . . . . . . . . . . . 12  |-  ( ( d  e.  NN0  /\  a  e.  W )  ->  ( ( # `  a
)  <_  d  <->  ( ( # `
 a )  < 
d  \/  ( # `  a )  =  d ) ) )
133128, 132bitr3d 246 . . . . . . . . . . 11  |-  ( ( d  e.  NN0  /\  a  e.  W )  ->  ( ( # `  a
)  <  ( d  +  1 )  <->  ( ( # `
 a )  < 
d  \/  ( # `  a )  =  d ) ) )
134133rabbidva 2779 . . . . . . . . . 10  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  {
a  e.  W  | 
( ( # `  a
)  <  d  \/  ( # `  a )  =  d ) } )
135 unrab 3439 . . . . . . . . . 10  |-  ( { a  e.  W  | 
( # `  a )  <  d }  u.  { a  e.  W  | 
( # `  a )  =  d } )  =  { a  e.  W  |  ( (
# `  a )  <  d  \/  ( # `  a )  =  d ) }
136134, 135syl6eqr 2333 . . . . . . . . 9  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  ( { a  e.  W  |  ( # `  a
)  <  d }  u.  { a  e.  W  |  ( # `  a
)  =  d } ) )
137136sseq1d 3205 . . . . . . . 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 )
)
138125, 137sylibrd 225 . . . . . . 7  |-  ( d  e.  NN0  ->  ( { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S  ->  { a  e.  W  |  ( # `
 a )  < 
( d  +  1 ) }  C_  ran  S ) )
13930, 33, 36, 39, 40, 138nn0ind 10108 . . . . . 6  |-  ( ( ( # `  c
)  +  1 )  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( ( # `  c
)  +  1 ) }  C_  ran  S )
14017, 18, 1393syl 18 . . . . 5  |-  ( c  e.  W  ->  { a  e.  W  |  (
# `  a )  <  ( ( # `  c
)  +  1 ) }  C_  ran  S )
141 id 19 . . . . . 6  |-  ( c  e.  W  ->  c  e.  W )
14217nn0red 10019 . . . . . . 7  |-  ( c  e.  W  ->  ( # `
 c )  e.  RR )
143142ltp1d 9687 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  < 
( ( # `  c
)  +  1 ) )
14442breq1d 4033 . . . . . . 7  |-  ( a  =  c  ->  (
( # `  a )  <  ( ( # `  c )  +  1 )  <->  ( # `  c
)  <  ( ( # `
 c )  +  1 ) ) )
145144elrab 2923 . . . . . 6  |-  ( c  e.  { a  e.  W  |  ( # `  a )  <  (
( # `  c )  +  1 ) }  <-> 
( c  e.  W  /\  ( # `  c
)  <  ( ( # `
 c )  +  1 ) ) )
146141, 143, 145sylanbrc 645 . . . . 5  |-  ( c  e.  W  ->  c  e.  { a  e.  W  |  ( # `  a
)  <  ( ( # `
 c )  +  1 ) } )
147140, 146sseldd 3181 . . . 4  |-  ( c  e.  W  ->  c  e.  ran  S )
148147ssriv 3184 . . 3  |-  W  C_  ran  S
14912, 148eqssi 3195 . 2  |-  ran  S  =  W
150 dffo2 5455 . 2  |-  ( S : dom  S -onto-> W  <->  ( S : dom  S --> W  /\  ran  S  =  W ) )
15110, 149, 150mpbir2an 886 1  |-  S : dom  S -onto-> W
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    \/ wo 357    /\ wa 358    /\ w3a 934    = wceq 1623    e. wcel 1684   A.wral 2543   E.wrex 2544   {crab 2547    \ cdif 3149    u. cun 3150    C_ wss 3152   (/)c0 3455   {csn 3640   <.cop 3643   <.cotp 3644   U_ciun 3905   class class class wbr 4023    e. cmpt 4077    _I cid 4304    X. cxp 4687   dom cdm 4689   ran crn 4690    Fn wfn 5250   -->wf 5251   -onto->wfo 5253   ` cfv 5255  (class class class)co 5858    e. cmpt2 5860   1oc1o 6472   2oc2o 6473   RRcr 8736   0cc0 8737   1c1 8738    + caddc 8740    < clt 8867    <_ cle 8868    - cmin 9037   2c2 9795   NN0cn0 9965   RR+crp 10354   ...cfz 10782  ..^cfzo 10870   #chash 11337  Word cword 11403   concat cconcat 11404   <"cs1 11405   splice csplice 11407   <"cs2 11491   ~FG cefg 15015
This theorem is referenced by:  efgredlemc  15054  efgrelexlemb  15059  efgredeu  15061  efgred2  15062
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-ot 3650  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-2o 6480  df-oadd 6483  df-er 6660  df-map 6774  df-pm 6775  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-card 7572  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-nn 9747  df-2 9804  df-n0 9966  df-z 10025  df-uz 10231  df-rp 10355  df-fz 10783  df-fzo 10871  df-hash 11338  df-word 11409  df-concat 11410  df-s1 11411  df-substr 11412  df-splice 11413  df-s2 11498
  Copyright terms: Public domain W3C validator