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

Theorem efgsfo 15064
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 15054 . . 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 5410 . . . 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 5400 . . 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 5411 . . . 4  |-  ( S : dom  S --> W  ->  ran  S  C_  W )
1210, 11ax-mp 8 . . 3  |-  ran  S  C_  W
13 fviss 5596 . . . . . . . . 9  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
141, 13eqsstri 3221 . . . . . . . 8  |-  W  C_ Word  ( I  X.  2o )
1514sseli 3189 . . . . . . 7  |-  ( c  e.  W  ->  c  e. Word  ( I  X.  2o ) )
16 lencl 11437 . . . . . . 7  |-  ( c  e. Word  ( I  X.  2o )  ->  ( # `  c )  e.  NN0 )
1715, 16syl 15 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  e. 
NN0 )
18 peano2nn0 10020 . . . . . 6  |-  ( (
# `  c )  e.  NN0  ->  ( ( # `
 c )  +  1 )  e.  NN0 )
1914sseli 3189 . . . . . . . . . . . 12  |-  ( a  e.  W  ->  a  e. Word  ( I  X.  2o ) )
20 lencl 11437 . . . . . . . . . . . 12  |-  ( a  e. Word  ( I  X.  2o )  ->  ( # `  a )  e.  NN0 )
2119, 20syl 15 . . . . . . . . . . 11  |-  ( a  e.  W  ->  ( # `
 a )  e. 
NN0 )
22 nn0nlt0 10008 . . . . . . . . . . . 12  |-  ( (
# `  a )  e.  NN0  ->  -.  ( # `
 a )  <  0 )
23 breq2 4043 . . . . . . . . . . . . 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 2638 . . . . . . . . 9  |-  ( b  =  0  ->  A. a  e.  W  -.  ( # `
 a )  < 
b )
28 rabeq0 3489 . . . . . . . . 9  |-  ( { a  e.  W  | 
( # `  a )  <  b }  =  (/)  <->  A. a  e.  W  -.  ( # `  a )  <  b )
2927, 28sylibr 203 . . . . . . . 8  |-  ( b  =  0  ->  { a  e.  W  |  (
# `  a )  <  b }  =  (/) )
3029sseq1d 3218 . . . . . . 7  |-  ( b  =  0  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  (/)  C_  ran  S ) )
31 breq2 4043 . . . . . . . . 9  |-  ( b  =  d  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  d )
)
3231rabbidv 2793 . . . . . . . 8  |-  ( b  =  d  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  d } )
3332sseq1d 3218 . . . . . . 7  |-  ( b  =  d  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  d }  C_ 
ran  S ) )
34 breq2 4043 . . . . . . . . 9  |-  ( b  =  ( d  +  1 )  ->  (
( # `  a )  <  b  <->  ( # `  a
)  <  ( d  +  1 ) ) )
3534rabbidv 2793 . . . . . . . 8  |-  ( b  =  ( d  +  1 )  ->  { a  e.  W  |  (
# `  a )  <  b }  =  {
a  e.  W  | 
( # `  a )  <  ( d  +  1 ) } )
3635sseq1d 3218 . . . . . . 7  |-  ( b  =  ( d  +  1 )  ->  ( { a  e.  W  |  ( # `  a
)  <  b }  C_ 
ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( d  +  1 ) } 
C_  ran  S )
)
37 breq2 4043 . . . . . . . . 9  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( ( # `
 a )  < 
b  <->  ( # `  a
)  <  ( ( # `
 c )  +  1 ) ) )
3837rabbidv 2793 . . . . . . . 8  |-  ( b  =  ( ( # `  c )  +  1 )  ->  { a  e.  W  |  ( # `
 a )  < 
b }  =  {
a  e.  W  | 
( # `  a )  <  ( ( # `  c )  +  1 ) } )
3938sseq1d 3218 . . . . . . 7  |-  ( b  =  ( ( # `  c )  +  1 )  ->  ( {
a  e.  W  | 
( # `  a )  <  b }  C_  ran  S  <->  { a  e.  W  |  ( # `  a
)  <  ( ( # `
 c )  +  1 ) }  C_  ran  S ) )
40 0ss 3496 . . . . . . 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 5541 . . . . . . . . . . . . 13  |-  ( a  =  c  ->  ( # `
 a )  =  ( # `  c
) )
4342eqeq1d 2304 . . . . . . . . . . . 12  |-  ( a  =  c  ->  (
( # `  a )  =  d  <->  ( # `  c
)  =  d ) )
4443cbvrabv 2800 . . . . . . . . . . 11  |-  { a  e.  W  |  (
# `  a )  =  d }  =  { c  e.  W  |  ( # `  c
)  =  d }
45 eliun 3925 . . . . . . . . . . . . . . 15  |-  ( c  e.  U_ x  e.  W  ran  ( T `
 x )  <->  E. x  e.  W  c  e.  ran  ( T `  x
) )
46 fveq2 5541 . . . . . . . . . . . . . . . . . 18  |-  ( x  =  b  ->  ( T `  x )  =  ( T `  b ) )
4746rneqd 4922 . . . . . . . . . . . . . . . . 17  |-  ( x  =  b  ->  ran  ( T `  x )  =  ran  ( T `
 b ) )
4847eleq2d 2363 . . . . . . . . . . . . . . . 16  |-  ( x  =  b  ->  (
c  e.  ran  ( T `  x )  <->  c  e.  ran  ( T `
 b ) ) )
4948cbvrexv 2778 . . . . . . . . . . . . . . 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 3191 . . . . . . . . . . . . . . . . . . . . . . . 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 11437 . . . . . . . . . . . . . . . . . . . . . . . 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 10035 . . . . . . . . . . . . . . . . . . . . . 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 10375 . . . . . . . . . . . . . . . . . . . . . 22  |-  2  e.  RR+
58 ltaddrp 10402 . . . . . . . . . . . . . . . . . . . . . 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 15051 . . . . . . . . . . . . . . . . . . . . . . 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 2330 . . . . . . . . . . . . . . . . . . . . 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 4063 . . . . . . . . . . . . . . . . . . . 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 5541 . . . . . . . . . . . . . . . . . . . . . 22  |-  ( a  =  b  ->  ( # `
 a )  =  ( # `  b
) )
6665breq1d 4049 . . . . . . . . . . . . . . . . . . . . 21  |-  ( a  =  b  ->  (
( # `  a )  <  d  <->  ( # `  b
)  <  d )
)
6766elrab 2936 . . . . . . . . . . . . . . . . . . . 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 3194 . . . . . . . . . . . . . . . . . 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 5405 . . . . . . . . . . . . . . . . . . . 20  |-  ( S : dom  S --> W  ->  S  Fn  dom  S )
7110, 70ax-mp 8 . . . . . . . . . . . . . . . . . . 19  |-  S  Fn  dom  S
72 fvelrnb 5586 . . . . . . . . . . . . . . . . . . 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 15055 . . . . . . . . . . . . . . . . . . . . . . . 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 3311 . . . . . . . . . . . . . . . . . . . . . . 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 5545 . . . . . . . . . . . . . . . . . . . . . . . . 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 4922 . . . . . . . . . . . . . . . . . . . . . . . 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 2373 . . . . . . . . . . . . . . . . . . . . . . 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 15062 . . . . . . . . . . . . . . . . . . . . . . 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 15058 . . . . . . . . . . . . . . . . . . . . . 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 5678 . . . . . . . . . . . . . . . . . . . . . 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 2371 . . . . . . . . . . . . . . . . . . . 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 2680 . . . . . . . . . . . . . . . . 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 2680 . . . . . . . . . . . . . 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 3175 . . . . . . . . . . . . . . . . . . 19  |-  ( c  e.  ( W  \  U_ x  e.  W  ran  ( T `  x
) )  <->  ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `  x
) ) )
1015eleq2i 2360 . . . . . . . . . . . . . . . . . . . 20  |-  ( c  e.  D  <->  c  e.  ( W  \  U_ x  e.  W  ran  ( T `
 x ) ) )
1021, 2, 3, 4, 5, 6efgs1 15060 . . . . . . . . . . . . . . . . . . . 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 15056 . . . . . . . . . . . . . . . . . 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 11460 . . . . . . . . . . . . . . . . . . . . 21  |-  ( # `  <" c "> )  =  1
108107oveq1i 5884 . . . . . . . . . . . . . . . . . . . 20  |-  ( (
# `  <" c "> )  -  1 )  =  ( 1  -  1 )
109 1m1e0 9830 . . . . . . . . . . . . . . . . . . . 20  |-  ( 1  -  1 )  =  0
110108, 109eqtri 2316 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  <" c "> )  -  1 )  =  0
111110fveq2i 5544 . . . . . . . . . . . . . . . . . 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 11462 . . . . . . . . . . . . . . . . . 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 2332 . . . . . . . . . . . . . . . 16  |-  ( ( c  e.  W  /\  -.  c  e.  U_ x  e.  W  ran  ( T `
 x ) )  ->  ( S `  <" c "> )  =  c )
116 fnfvelrn 5678 . . . . . . . . . . . . . . . . 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 2371 . . . . . . . . . . . . . . 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 3266 . . . . . . . . . . 11  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { c  e.  W  |  (
# `  c )  =  d }  C_  ran  S )
12344, 122syl5eqss 3235 . . . . . . . . . 10  |-  ( ( d  e.  NN0  /\  { a  e.  W  | 
( # `  a )  <  d }  C_  ran  S )  ->  { a  e.  W  |  (
# `  a )  =  d }  C_  ran  S )
12441, 123unssd 3364 . . . . . . . . 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 10091 . . . . . . . . . . . . 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 10035 . . . . . . . . . . . . 13  |-  ( a  e.  W  ->  ( # `
 a )  e.  RR )
130 nn0re 9990 . . . . . . . . . . . . 13  |-  ( d  e.  NN0  ->  d  e.  RR )
131 leloe 8924 . . . . . . . . . . . . 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 2792 . . . . . . . . . 10  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  {
a  e.  W  | 
( ( # `  a
)  <  d  \/  ( # `  a )  =  d ) } )
135 unrab 3452 . . . . . . . . . 10  |-  ( { a  e.  W  | 
( # `  a )  <  d }  u.  { a  e.  W  | 
( # `  a )  =  d } )  =  { a  e.  W  |  ( (
# `  a )  <  d  \/  ( # `  a )  =  d ) }
136134, 135syl6eqr 2346 . . . . . . . . 9  |-  ( d  e.  NN0  ->  { a  e.  W  |  (
# `  a )  <  ( d  +  1 ) }  =  ( { a  e.  W  |  ( # `  a
)  <  d }  u.  { a  e.  W  |  ( # `  a
)  =  d } ) )
137136sseq1d 3218 . . . . . . . 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 10124 . . . . . 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 10035 . . . . . . 7  |-  ( c  e.  W  ->  ( # `
 c )  e.  RR )
143142ltp1d 9703 . . . . . 6  |-  ( c  e.  W  ->  ( # `
 c )  < 
( ( # `  c
)  +  1 ) )
14442breq1d 4049 . . . . . . 7  |-  ( a  =  c  ->  (
( # `  a )  <  ( ( # `  c )  +  1 )  <->  ( # `  c
)  <  ( ( # `
 c )  +  1 ) ) )
145144elrab 2936 . . . . . 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 3194 . . . 4  |-  ( c  e.  W  ->  c  e.  ran  S )
148147ssriv 3197 . . 3  |-  W  C_  ran  S
14912, 148eqssi 3208 . 2  |-  ran  S  =  W
150 dffo2 5471 . 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 1632    e. wcel 1696   A.wral 2556   E.wrex 2557   {crab 2560    \ cdif 3162    u. cun 3163    C_ wss 3165   (/)c0 3468   {csn 3653   <.cop 3656   <.cotp 3657   U_ciun 3921   class class class wbr 4039    e. cmpt 4093    _I cid 4320    X. cxp 4703   dom cdm 4705   ran crn 4706    Fn wfn 5266   -->wf 5267   -onto->wfo 5269   ` cfv 5271  (class class class)co 5874    e. cmpt2 5876   1oc1o 6488   2oc2o 6489   RRcr 8752   0cc0 8753   1c1 8754    + caddc 8756    < clt 8883    <_ cle 8884    - cmin 9053   2c2 9811   NN0cn0 9981   RR+crp 10370   ...cfz 10798  ..^cfzo 10886   #chash 11353  Word cword 11419   concat cconcat 11420   <"cs1 11421   splice csplice 11423   <"cs2 11507   ~FG cefg 15031
This theorem is referenced by:  efgredlemc  15070  efgrelexlemb  15075  efgredeu  15077  efgred2  15078
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-rep 4147  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830
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 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-ot 3663  df-uni 3844  df-int 3879  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-1st 6138  df-2nd 6139  df-riota 6320  df-recs 6404  df-rdg 6439  df-1o 6495  df-2o 6496  df-oadd 6499  df-er 6676  df-map 6790  df-pm 6791  df-en 6880  df-dom 6881  df-sdom 6882  df-fin 6883  df-card 7588  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-nn 9763  df-2 9820  df-n0 9982  df-z 10041  df-uz 10247  df-rp 10371  df-fz 10799  df-fzo 10887  df-hash 11354  df-word 11425  df-concat 11426  df-s1 11427  df-substr 11428  df-splice 11429  df-s2 11514
  Copyright terms: Public domain W3C validator