Users' Mathboxes Mathbox for Alexander van der Vekens < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  wwlkextbij Structured version   Unicode version

Theorem wwlkextbij 30505
Description: There is a bijection between the extensions of a walk (as word) by an edge and the set of vertices being connected to the trailing vertex of the walk. (Contributed by Alexander van der Vekens, 21-Aug-2018.)
Assertion
Ref Expression
wwlkextbij  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  E. f 
f : { w  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E
) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E } )
Distinct variable groups:    f, E, w    f, N, w    f, V, w    f, W, w   
n, E    n, V    n, W, f
Allowed substitution hint:    N( n)

Proof of Theorem wwlkextbij
Dummy variables  t  x  p are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 fvex 5801 . . . 4  |-  ( ( V WWalksN  E ) `  ( N  +  1 ) )  e.  _V
21a1i 11 . . 3  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( ( V WWalksN  E ) `  ( N  +  1 ) )  e.  _V )
3 rabexg 4542 . . 3  |-  ( ( ( V WWalksN  E ) `  ( N  +  1 ) )  e.  _V  ->  { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) }  e.  _V )
4 mptexg 6048 . . 3  |-  ( { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  e.  _V  ->  ( x  e.  {
t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  |->  ( lastS  `  x
) )  e.  _V )
52, 3, 43syl 20 . 2  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( x  e.  { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) }  |->  ( lastS  `  x ) )  e. 
_V )
6 eqid 2451 . . . 4  |-  { w  e. Word  V  |  ( (
# `  w )  =  ( N  + 
2 )  /\  (
w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }  =  {
w  e. Word  V  | 
( ( # `  w
)  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }
7 preq2 4055 . . . . . 6  |-  ( n  =  p  ->  { ( lastS  `  W ) ,  n }  =  { ( lastS  `  W ) ,  p } )
87eleq1d 2520 . . . . 5  |-  ( n  =  p  ->  ( { ( lastS  `  W ) ,  n }  e.  ran  E  <->  { ( lastS  `  W
) ,  p }  e.  ran  E ) )
98cbvrabv 3069 . . . 4  |-  { n  e.  V  |  {
( lastS  `  W ) ,  n }  e.  ran  E }  =  { p  e.  V  |  {
( lastS  `  W ) ,  p }  e.  ran  E }
10 fveq2 5791 . . . . . . . 8  |-  ( t  =  w  ->  ( # `
 t )  =  ( # `  w
) )
1110eqeq1d 2453 . . . . . . 7  |-  ( t  =  w  ->  (
( # `  t )  =  ( N  + 
2 )  <->  ( # `  w
)  =  ( N  +  2 ) ) )
12 oveq1 6199 . . . . . . . 8  |-  ( t  =  w  ->  (
t substr  <. 0 ,  ( N  +  1 )
>. )  =  (
w substr  <. 0 ,  ( N  +  1 )
>. ) )
1312eqeq1d 2453 . . . . . . 7  |-  ( t  =  w  ->  (
( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  <-> 
( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W ) )
14 fveq2 5791 . . . . . . . . 9  |-  ( t  =  w  ->  ( lastS  `  t )  =  ( lastS  `  w ) )
1514preq2d 4061 . . . . . . . 8  |-  ( t  =  w  ->  { ( lastS  `  W ) ,  ( lastS  `  t ) }  =  { ( lastS  `  W ) ,  ( lastS  `  w
) } )
1615eleq1d 2520 . . . . . . 7  |-  ( t  =  w  ->  ( { ( lastS  `  W ) ,  ( lastS  `  t
) }  e.  ran  E  <->  { ( lastS  `  W ) ,  ( lastS  `  w
) }  e.  ran  E ) )
1711, 13, 163anbi123d 1290 . . . . . 6  |-  ( t  =  w  ->  (
( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E )  <->  ( ( # `  w )  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) ) )
1817cbvrabv 3069 . . . . 5  |-  { t  e. Word  V  |  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  =  {
w  e. Word  V  | 
( ( # `  w
)  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }
19 mpteq1 4472 . . . . 5  |-  ( { t  e. Word  V  | 
( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  =  {
w  e. Word  V  | 
( ( # `  w
)  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }  ->  (
x  e.  { t  e. Word  V  |  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  |->  ( lastS  `  x
) )  =  ( x  e.  { w  e. Word  V  |  ( (
# `  w )  =  ( N  + 
2 )  /\  (
w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }  |->  ( lastS  `  x
) ) )
2018, 19ax-mp 5 . . . 4  |-  ( x  e.  { t  e. Word  V  |  ( ( # `
 t )  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E
) }  |->  ( lastS  `  x
) )  =  ( x  e.  { w  e. Word  V  |  ( (
# `  w )  =  ( N  + 
2 )  /\  (
w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }  |->  ( lastS  `  x
) )
216, 9, 20wwlkextbij0 30504 . . 3  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( x  e.  { t  e. Word  V  |  ( ( # `  t )  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E
) }  |->  ( lastS  `  x
) ) : {
w  e. Word  V  | 
( ( # `  w
)  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E } )
22 eqid 2451 . . . . . . 7  |-  { t  e. Word  V  |  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  =  {
t  e. Word  V  | 
( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }
2322wwlkextwrd 30500 . . . . . 6  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  { t  e. Word  V  |  ( (
# `  t )  =  ( N  + 
2 )  /\  (
t substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  =  {
t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) } )
2423eqcomd 2459 . . . . 5  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  { t  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E
) }  =  {
t  e. Word  V  | 
( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) } )
2524mpteq1d 4473 . . . 4  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( x  e.  { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) }  |->  ( lastS  `  x ) )  =  ( x  e.  {
t  e. Word  V  | 
( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  |->  ( lastS  `  x
) ) )
266wwlkextwrd 30500 . . . . 5  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  { w  e. Word  V  |  ( (
# `  w )  =  ( N  + 
2 )  /\  (
w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) }  =  {
w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } )
2726eqcomd 2459 . . . 4  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  { w  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E
) }  =  {
w  e. Word  V  | 
( ( # `  w
)  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } )
28 eqidd 2452 . . . 4  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  { n  e.  V  |  {
( lastS  `  W ) ,  n }  e.  ran  E }  =  { n  e.  V  |  {
( lastS  `  W ) ,  n }  e.  ran  E } )
2925, 27, 28f1oeq123d 5738 . . 3  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( (
x  e.  { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  |->  ( lastS  `  x
) ) : {
w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E }  <->  ( x  e.  { t  e. Word  V  |  ( ( # `  t )  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E
) }  |->  ( lastS  `  x
) ) : {
w  e. Word  V  | 
( ( # `  w
)  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E } ) )
3021, 29mpbird 232 . 2  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  ( x  e.  { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) }  |->  ( lastS  `  x ) ) : { w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E } )
31 f1oeq1 5732 . . 3  |-  ( f  =  ( x  e. 
{ t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) }  |->  ( lastS  `  x ) )  -> 
( f : {
w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E }  <->  ( x  e.  { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) }  |->  ( lastS  `  x ) ) : { w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E } ) )
3231spcegv 3156 . 2  |-  ( ( x  e.  { t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) }  |->  ( lastS  `  x
) )  e.  _V  ->  ( ( x  e. 
{ t  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( t substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) }  |->  ( lastS  `  x ) ) : { w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E }  ->  E. f  f : {
w  e.  ( ( V WWalksN  E ) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E ) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E } ) )
335, 30, 32sylc 60 1  |-  ( W  e.  ( ( V WWalksN  E ) `  N
)  ->  E. f 
f : { w  e.  ( ( V WWalksN  E
) `  ( N  +  1 ) )  |  ( ( w substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E
) } -1-1-onto-> { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E } )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    /\ w3a 965    = wceq 1370   E.wex 1587    e. wcel 1758   {crab 2799   _Vcvv 3070   {cpr 3979   <.cop 3983    |-> cmpt 4450   ran crn 4941   -1-1-onto->wf1o 5517   ` cfv 5518  (class class class)co 6192   0cc0 9385   1c1 9386    + caddc 9388   2c2 10474   #chash 12206  Word cword 12325   lastS clsw 12326   substr csubstr 12329   WWalksN cwwlkn 30452
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-rep 4503  ax-sep 4513  ax-nul 4521  ax-pow 4570  ax-pr 4631  ax-un 6474  ax-cnex 9441  ax-resscn 9442  ax-1cn 9443  ax-icn 9444  ax-addcl 9445  ax-addrcl 9446  ax-mulcl 9447  ax-mulrcl 9448  ax-mulcom 9449  ax-addass 9450  ax-mulass 9451  ax-distr 9452  ax-i2m1 9453  ax-1ne0 9454  ax-1rid 9455  ax-rnegex 9456  ax-rrecex 9457  ax-cnre 9458  ax-pre-lttri 9459  ax-pre-lttrn 9460  ax-pre-ltadd 9461  ax-pre-mulgt0 9462
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rab 2804  df-v 3072  df-sbc 3287  df-csb 3389  df-dif 3431  df-un 3433  df-in 3435  df-ss 3442  df-pss 3444  df-nul 3738  df-if 3892  df-pw 3962  df-sn 3978  df-pr 3980  df-tp 3982  df-op 3984  df-uni 4192  df-int 4229  df-iun 4273  df-br 4393  df-opab 4451  df-mpt 4452  df-tr 4486  df-eprel 4732  df-id 4736  df-po 4741  df-so 4742  df-fr 4779  df-we 4781  df-ord 4822  df-on 4823  df-lim 4824  df-suc 4825  df-xp 4946  df-rel 4947  df-cnv 4948  df-co 4949  df-dm 4950  df-rn 4951  df-res 4952  df-ima 4953  df-iota 5481  df-fun 5520  df-fn 5521  df-f 5522  df-f1 5523  df-fo 5524  df-f1o 5525  df-fv 5526  df-riota 6153  df-ov 6195  df-oprab 6196  df-mpt2 6197  df-om 6579  df-1st 6679  df-2nd 6680  df-recs 6934  df-rdg 6968  df-1o 7022  df-oadd 7026  df-er 7203  df-map 7318  df-pm 7319  df-en 7413  df-dom 7414  df-sdom 7415  df-fin 7416  df-card 8212  df-pnf 9523  df-mnf 9524  df-xr 9525  df-ltxr 9526  df-le 9527  df-sub 9700  df-neg 9701  df-nn 10426  df-2 10483  df-n0 10683  df-z 10750  df-uz 10965  df-fz 11541  df-fzo 11652  df-hash 12207  df-word 12333  df-lsw 12334  df-concat 12335  df-s1 12336  df-substr 12337  df-wwlk 30453  df-wwlkn 30454
This theorem is referenced by:  wwlkexthasheq  30506
  Copyright terms: Public domain W3C validator