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

Theorem wwlkextsur 24858
Description: Lemma 3 for wwlkextbij 24860. (Contributed by Alexander van der Vekens, 7-Aug-2018.)
Hypotheses
Ref Expression
wwlkextbij.d  |-  D  =  { w  e. Word  V  |  ( ( # `  w )  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) }
wwlkextbij.r  |-  R  =  { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E }
wwlkextbij.f  |-  F  =  ( t  e.  D  |->  ( lastS  `  t )
)
Assertion
Ref Expression
wwlkextsur  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  F : D -onto-> R )
Distinct variable groups:    t, D    n, E, w    t, N, w    t, R    n, V, t, w    n, W, t, w
Allowed substitution hints:    D( w, n)    R( w, n)    E( t)    F( w, t, n)    N( n)

Proof of Theorem wwlkextsur
Dummy variables  i 
d  r are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 wwlknprop 24813 . . 3  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( ( V  e.  _V  /\  E  e.  _V )  /\  ( N  e.  NN0  /\  W  e. Word  V ) ) )
2 simprl 756 . . 3  |-  ( ( ( V  e.  _V  /\  E  e.  _V )  /\  ( N  e.  NN0  /\  W  e. Word  V ) )  ->  N  e.  NN0 )
3 wwlkextbij.d . . . 4  |-  D  =  { w  e. Word  V  |  ( ( # `  w )  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) }
4 wwlkextbij.r . . . 4  |-  R  =  { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E }
5 wwlkextbij.f . . . 4  |-  F  =  ( t  e.  D  |->  ( lastS  `  t )
)
63, 4, 5wwlkextfun 24856 . . 3  |-  ( N  e.  NN0  ->  F : D
--> R )
71, 2, 63syl 20 . 2  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  F : D
--> R )
8 preq2 4112 . . . . . 6  |-  ( n  =  r  ->  { ( lastS  `  W ) ,  n }  =  { ( lastS  `  W ) ,  r } )
98eleq1d 2526 . . . . 5  |-  ( n  =  r  ->  ( { ( lastS  `  W ) ,  n }  e.  ran  E  <->  { ( lastS  `  W
) ,  r }  e.  ran  E ) )
109, 4elrab2 3259 . . . 4  |-  ( r  e.  R  <->  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )
11 wwlknext 24851 . . . . . . . . . . 11  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  r  e.  V  /\  { ( lastS  `  W
) ,  r }  e.  ran  E )  ->  ( W ++  <" r "> )  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) ) )
12113expb 1197 . . . . . . . . . 10  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  ( W ++  <" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) ) )
13 wwlknimp 24814 . . . . . . . . . . . . . 14  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( W  e. Word  V  /\  ( # `  W )  =  ( N  +  1 )  /\  A. i  e.  ( 0..^ N ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E
) )
14 s1cl 12623 . . . . . . . . . . . . . . . . . . 19  |-  ( r  e.  V  ->  <" r ">  e. Word  V )
15 swrdccat1 12694 . . . . . . . . . . . . . . . . . . 19  |-  ( ( W  e. Word  V  /\  <" r ">  e. Word  V )  ->  (
( W ++  <" r "> ) substr  <. 0 ,  ( # `  W
) >. )  =  W )
1614, 15sylan2 474 . . . . . . . . . . . . . . . . . 18  |-  ( ( W  e. Word  V  /\  r  e.  V )  ->  ( ( W ++  <" r "> ) substr  <.
0 ,  ( # `  W ) >. )  =  W )
1716ex 434 . . . . . . . . . . . . . . . . 17  |-  ( W  e. Word  V  ->  (
r  e.  V  -> 
( ( W ++  <" r "> ) substr  <.
0 ,  ( # `  W ) >. )  =  W ) )
1817adantr 465 . . . . . . . . . . . . . . . 16  |-  ( ( W  e. Word  V  /\  ( # `  W )  =  ( N  + 
1 ) )  -> 
( r  e.  V  ->  ( ( W ++  <" r "> ) substr  <.
0 ,  ( # `  W ) >. )  =  W ) )
19 opeq2 4220 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( N  +  1 )  =  ( # `  W
)  ->  <. 0 ,  ( N  +  1 ) >.  =  <. 0 ,  ( # `  W
) >. )
2019eqcoms 2469 . . . . . . . . . . . . . . . . . . 19  |-  ( (
# `  W )  =  ( N  + 
1 )  ->  <. 0 ,  ( N  + 
1 ) >.  =  <. 0 ,  ( # `  W
) >. )
2120oveq2d 6312 . . . . . . . . . . . . . . . . . 18  |-  ( (
# `  W )  =  ( N  + 
1 )  ->  (
( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  ( ( W ++  <" r "> ) substr  <. 0 ,  ( # `  W
) >. ) )
2221eqeq1d 2459 . . . . . . . . . . . . . . . . 17  |-  ( (
# `  W )  =  ( N  + 
1 )  ->  (
( ( W ++  <" r "> ) substr  <.
0 ,  ( N  +  1 ) >.
)  =  W  <->  ( ( W ++  <" r "> ) substr  <. 0 ,  ( # `  W
) >. )  =  W ) )
2322adantl 466 . . . . . . . . . . . . . . . 16  |-  ( ( W  e. Word  V  /\  ( # `  W )  =  ( N  + 
1 ) )  -> 
( ( ( W ++ 
<" r "> ) substr  <. 0 ,  ( N  +  1 )
>. )  =  W  <->  ( ( W ++  <" r "> ) substr  <. 0 ,  ( # `  W
) >. )  =  W ) )
2418, 23sylibrd 234 . . . . . . . . . . . . . . 15  |-  ( ( W  e. Word  V  /\  ( # `  W )  =  ( N  + 
1 ) )  -> 
( r  e.  V  ->  ( ( W ++  <" r "> ) substr  <.
0 ,  ( N  +  1 ) >.
)  =  W ) )
25243adant3 1016 . . . . . . . . . . . . . 14  |-  ( ( W  e. Word  V  /\  ( # `  W )  =  ( N  + 
1 )  /\  A. i  e.  ( 0..^ N ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E )  ->  (
r  e.  V  -> 
( ( W ++  <" r "> ) substr  <.
0 ,  ( N  +  1 ) >.
)  =  W ) )
2613, 25syl 16 . . . . . . . . . . . . 13  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( r  e.  V  ->  ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W ) )
2726com12 31 . . . . . . . . . . . 12  |-  ( r  e.  V  ->  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W ) )
2827adantr 465 . . . . . . . . . . 11  |-  ( ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E )  ->  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W ) )
2928impcom 430 . . . . . . . . . 10  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  (
( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W )
30 lswccats1 12647 . . . . . . . . . . . . . . . . . . . 20  |-  ( ( W  e. Word  V  /\  r  e.  V )  ->  ( lastS  `  ( W ++  <" r "> ) )  =  r )
3130eqcomd 2465 . . . . . . . . . . . . . . . . . . 19  |-  ( ( W  e. Word  V  /\  r  e.  V )  ->  r  =  ( lastS  `  ( W ++  <" r "> ) ) )
3231ex 434 . . . . . . . . . . . . . . . . . 18  |-  ( W  e. Word  V  ->  (
r  e.  V  -> 
r  =  ( lastS  `  ( W ++  <" r "> ) ) ) )
3332adantl 466 . . . . . . . . . . . . . . . . 17  |-  ( ( N  e.  NN0  /\  W  e. Word  V )  ->  ( r  e.  V  ->  r  =  ( lastS  `  ( W ++  <" r "> ) ) ) )
3433adantl 466 . . . . . . . . . . . . . . . 16  |-  ( ( ( V  e.  _V  /\  E  e.  _V )  /\  ( N  e.  NN0  /\  W  e. Word  V ) )  ->  ( r  e.  V  ->  r  =  ( lastS  `  ( W ++  <" r "> ) ) ) )
351, 34syl 16 . . . . . . . . . . . . . . 15  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( r  e.  V  ->  r  =  ( lastS  `  ( W ++  <" r "> ) ) ) )
3635imp 429 . . . . . . . . . . . . . 14  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  r  e.  V )  ->  r  =  ( lastS  `  ( W ++ 
<" r "> ) ) )
3736preq2d 4118 . . . . . . . . . . . . 13  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  r  e.  V )  ->  { ( lastS  `  W ) ,  r }  =  { ( lastS  `  W ) ,  ( lastS  `  ( W ++  <" r "> ) ) } )
3837eleq1d 2526 . . . . . . . . . . . 12  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  r  e.  V )  ->  ( { ( lastS  `  W ) ,  r }  e.  ran  E  <->  { ( lastS  `  W
) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E ) )
3938biimpd 207 . . . . . . . . . . 11  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  r  e.  V )  ->  ( { ( lastS  `  W ) ,  r }  e.  ran  E  ->  { ( lastS  `  W ) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E ) )
4039impr 619 . . . . . . . . . 10  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  { ( lastS  `  W ) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E )
4112, 29, 40jca32 535 . . . . . . . . 9  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  (
( W ++  <" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  (
( ( W ++  <" r "> ) substr  <.
0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  ( W ++ 
<" r "> ) ) }  e.  ran  E ) ) )
4235com12 31 . . . . . . . . . . 11  |-  ( r  e.  V  ->  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  r  =  ( lastS  `  ( W ++  <" r "> )
) ) )
4342adantr 465 . . . . . . . . . 10  |-  ( ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E )  ->  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  r  =  ( lastS  `  ( W ++  <" r "> )
) ) )
4443impcom 430 . . . . . . . . 9  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  r  =  ( lastS  `  ( W ++ 
<" r "> ) ) )
45 ovex 6324 . . . . . . . . . . 11  |-  ( W ++ 
<" r "> )  e.  _V
4645a1i 11 . . . . . . . . . 10  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  ( W ++  <" r "> )  e.  _V )
47 eleq1 2529 . . . . . . . . . . . . . . 15  |-  ( d  =  ( W ++  <" r "> )  ->  ( d  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  <->  ( W ++  <" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) ) ) )
48 oveq1 6303 . . . . . . . . . . . . . . . . 17  |-  ( d  =  ( W ++  <" r "> )  ->  ( d substr  <. 0 ,  ( N  + 
1 ) >. )  =  ( ( W ++ 
<" r "> ) substr  <. 0 ,  ( N  +  1 )
>. ) )
4948eqeq1d 2459 . . . . . . . . . . . . . . . 16  |-  ( d  =  ( W ++  <" r "> )  ->  ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  <->  ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W ) )
50 fveq2 5872 . . . . . . . . . . . . . . . . . 18  |-  ( d  =  ( W ++  <" r "> )  ->  ( lastS  `  d )  =  ( lastS  `  ( W ++ 
<" r "> ) ) )
5150preq2d 4118 . . . . . . . . . . . . . . . . 17  |-  ( d  =  ( W ++  <" r "> )  ->  { ( lastS  `  W
) ,  ( lastS  `  d
) }  =  {
( lastS  `  W ) ,  ( lastS  `  ( W ++  <" r "> ) ) } )
5251eleq1d 2526 . . . . . . . . . . . . . . . 16  |-  ( d  =  ( W ++  <" r "> )  ->  ( { ( lastS  `  W
) ,  ( lastS  `  d
) }  e.  ran  E  <->  { ( lastS  `  W ) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E ) )
5349, 52anbi12d 710 . . . . . . . . . . . . . . 15  |-  ( d  =  ( W ++  <" r "> )  ->  ( ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  d ) }  e.  ran  E
)  <->  ( ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E ) ) )
5447, 53anbi12d 710 . . . . . . . . . . . . . 14  |-  ( d  =  ( W ++  <" r "> )  ->  ( ( d  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  d ) }  e.  ran  E
) )  <->  ( ( W ++  <" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  (
( ( W ++  <" r "> ) substr  <.
0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  ( W ++ 
<" r "> ) ) }  e.  ran  E ) ) ) )
5550eqeq2d 2471 . . . . . . . . . . . . . 14  |-  ( d  =  ( W ++  <" r "> )  ->  ( r  =  ( lastS  `  d )  <->  r  =  ( lastS  `  ( W ++  <" r "> )
) ) )
5654, 55anbi12d 710 . . . . . . . . . . . . 13  |-  ( d  =  ( W ++  <" r "> )  ->  ( ( ( d  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  d
) }  e.  ran  E ) )  /\  r  =  ( lastS  `  d ) )  <->  ( ( ( W ++  <" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  (
( ( W ++  <" r "> ) substr  <.
0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  ( W ++ 
<" r "> ) ) }  e.  ran  E ) )  /\  r  =  ( lastS  `  ( W ++  <" r "> ) ) ) ) )
5756bicomd 201 . . . . . . . . . . . 12  |-  ( d  =  ( W ++  <" r "> )  ->  ( ( ( ( W ++  <" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  (
( ( W ++  <" r "> ) substr  <.
0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  ( W ++ 
<" r "> ) ) }  e.  ran  E ) )  /\  r  =  ( lastS  `  ( W ++  <" r "> ) ) )  <-> 
( ( d  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  d ) }  e.  ran  E
) )  /\  r  =  ( lastS  `  d ) ) ) )
5857adantl 466 . . . . . . . . . . 11  |-  ( ( ( W  e.  ( ( V WWalksN  E ) `  N )  /\  (
r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E ) )  /\  d  =  ( W ++  <" r "> ) )  ->  (
( ( ( W ++ 
<" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  ( ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E ) )  /\  r  =  ( lastS  `  ( W ++  <" r "> ) ) )  <->  ( (
d  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  d
) }  e.  ran  E ) )  /\  r  =  ( lastS  `  d ) ) ) )
5958biimpd 207 . . . . . . . . . 10  |-  ( ( ( W  e.  ( ( V WWalksN  E ) `  N )  /\  (
r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E ) )  /\  d  =  ( W ++  <" r "> ) )  ->  (
( ( ( W ++ 
<" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  ( ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E ) )  /\  r  =  ( lastS  `  ( W ++  <" r "> ) ) )  -> 
( ( d  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  d ) }  e.  ran  E
) )  /\  r  =  ( lastS  `  d ) ) ) )
6046, 59spcimedv 3193 . . . . . . . . 9  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  (
( ( ( W ++ 
<" r "> )  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  ( ( ( W ++  <" r "> ) substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  ( W ++  <" r "> ) ) }  e.  ran  E ) )  /\  r  =  ( lastS  `  ( W ++  <" r "> ) ) )  ->  E. d ( ( d  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  d
) }  e.  ran  E ) )  /\  r  =  ( lastS  `  d ) ) ) )
6141, 44, 60mp2and 679 . . . . . . . 8  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  E. d
( ( d  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  d ) }  e.  ran  E
) )  /\  r  =  ( lastS  `  d ) ) )
62 oveq1 6303 . . . . . . . . . . . . 13  |-  ( w  =  d  ->  (
w substr  <. 0 ,  ( N  +  1 )
>. )  =  (
d substr  <. 0 ,  ( N  +  1 )
>. ) )
6362eqeq1d 2459 . . . . . . . . . . . 12  |-  ( w  =  d  ->  (
( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  <-> 
( d substr  <. 0 ,  ( N  +  1 ) >. )  =  W ) )
64 fveq2 5872 . . . . . . . . . . . . . 14  |-  ( w  =  d  ->  ( lastS  `  w )  =  ( lastS  `  d ) )
6564preq2d 4118 . . . . . . . . . . . . 13  |-  ( w  =  d  ->  { ( lastS  `  W ) ,  ( lastS  `  w ) }  =  { ( lastS  `  W ) ,  ( lastS  `  d
) } )
6665eleq1d 2526 . . . . . . . . . . . 12  |-  ( w  =  d  ->  ( { ( lastS  `  W ) ,  ( lastS  `  w
) }  e.  ran  E  <->  { ( lastS  `  W ) ,  ( lastS  `  d
) }  e.  ran  E ) )
6763, 66anbi12d 710 . . . . . . . . . . 11  |-  ( w  =  d  ->  (
( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E )  <->  ( (
d substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  d
) }  e.  ran  E ) ) )
6867elrab 3257 . . . . . . . . . 10  |-  ( d  e.  { w  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E
) }  <->  ( d  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  d ) }  e.  ran  E
) ) )
6968anbi1i 695 . . . . . . . . 9  |-  ( ( d  e.  { w  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E
) }  /\  r  =  ( lastS  `  d ) )  <->  ( ( d  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  d
) }  e.  ran  E ) )  /\  r  =  ( lastS  `  d ) ) )
7069exbii 1668 . . . . . . . 8  |-  ( E. d ( d  e. 
{ w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) }  /\  r  =  ( lastS  `  d
) )  <->  E. d
( ( d  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  /\  ( ( d substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  d ) }  e.  ran  E
) )  /\  r  =  ( lastS  `  d ) ) )
7161, 70sylibr 212 . . . . . . 7  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  E. d
( d  e.  {
w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }  /\  r  =  ( lastS  `  d ) ) )
72 df-rex 2813 . . . . . . 7  |-  ( E. d  e.  { w  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E
) } r  =  ( lastS  `  d )  <->  E. d ( d  e. 
{ w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) }  /\  r  =  ( lastS  `  d
) ) )
7371, 72sylibr 212 . . . . . 6  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  E. d  e.  { w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) } r  =  ( lastS  `  d
) )
743wwlkextwrd 24855 . . . . . . . 8  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  D  =  { w  e.  (
( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) } )
7574adantr 465 . . . . . . 7  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  D  =  { w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) } )
7675rexeqdv 3061 . . . . . 6  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  ( E. d  e.  D  r  =  ( lastS  `  d
)  <->  E. d  e.  {
w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } r  =  ( lastS  `  d )
) )
7773, 76mpbird 232 . . . . 5  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  E. d  e.  D  r  =  ( lastS  `  d ) )
78 fveq2 5872 . . . . . . . 8  |-  ( t  =  d  ->  ( lastS  `  t )  =  ( lastS  `  d ) )
79 fvex 5882 . . . . . . . 8  |-  ( lastS  `  d
)  e.  _V
8078, 5, 79fvmpt 5956 . . . . . . 7  |-  ( d  e.  D  ->  ( F `  d )  =  ( lastS  `  d ) )
8180eqeq2d 2471 . . . . . 6  |-  ( d  e.  D  ->  (
r  =  ( F `
 d )  <->  r  =  ( lastS  `  d ) ) )
8281rexbiia 2958 . . . . 5  |-  ( E. d  e.  D  r  =  ( F `  d )  <->  E. d  e.  D  r  =  ( lastS  `  d ) )
8377, 82sylibr 212 . . . 4  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  ( r  e.  V  /\  { ( lastS  `  W ) ,  r }  e.  ran  E
) )  ->  E. d  e.  D  r  =  ( F `  d ) )
8410, 83sylan2b 475 . . 3  |-  ( ( W  e.  ( ( V WWalksN  E ) `  N
)  /\  r  e.  R )  ->  E. d  e.  D  r  =  ( F `  d ) )
8584ralrimiva 2871 . 2  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  A. r  e.  R  E. d  e.  D  r  =  ( F `  d ) )
86 dffo3 6047 . 2  |-  ( F : D -onto-> R  <->  ( F : D --> R  /\  A. r  e.  R  E. d  e.  D  r  =  ( F `  d ) ) )
877, 85, 86sylanbrc 664 1  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  F : D -onto-> R )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 973    = wceq 1395   E.wex 1613    e. wcel 1819   A.wral 2807   E.wrex 2808   {crab 2811   _Vcvv 3109   {cpr 4034   <.cop 4038    |-> cmpt 4515   ran crn 5009   -->wf 5590   -onto->wfo 5592   ` cfv 5594  (class class class)co 6296   0cc0 9509   1c1 9510    + caddc 9512   2c2 10606   NN0cn0 10816  ..^cfzo 11821   #chash 12408  Word cword 12538   lastS clsw 12539   ++ cconcat 12540   <"cs1 12541   substr csubstr 12542   WWalksN cwwlkn 24805
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-rep 4568  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-int 4289  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-recs 7060  df-rdg 7094  df-1o 7148  df-oadd 7152  df-er 7329  df-map 7440  df-pm 7441  df-en 7536  df-dom 7537  df-sdom 7538  df-fin 7539  df-card 8337  df-cda 8565  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-nn 10557  df-2 10615  df-n0 10817  df-z 10886  df-uz 11107  df-rp 11246  df-fz 11698  df-fzo 11822  df-hash 12409  df-word 12546  df-lsw 12547  df-concat 12548  df-s1 12549  df-substr 12550  df-wwlk 24806  df-wwlkn 24807
This theorem is referenced by:  wwlkextbij0  24859
  Copyright terms: Public domain W3C validator