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

Theorem wlknwwlknvbij 25157
Description: There is a bijection between the set of walks of a fixed length and the set of walks represented by words of the same length and starting at the same vertex. (Contributed by Alexander van der Vekens, 30-Sep-2018.)
Assertion
Ref Expression
wlknwwlknvbij  |-  ( ( V USGrph  E  /\  N  e. 
NN0  /\  X  e.  V )  ->  E. f 
f : { p  e.  ( V Walks  E )  |  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } )
Distinct variable groups:    f, E, p, w    f, N, p, w    f, V, p, w    f, X, p, w

Proof of Theorem wlknwwlknvbij
Dummy variables  q 
s  t are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 ovex 6306 . . . . 5  |-  ( V Walks 
E )  e.  _V
21mptrabex 6125 . . . 4  |-  ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  p ) )  e.  _V
32resex 5137 . . 3  |-  ( ( p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |->  ( 2nd `  p
) )  |`  { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X } )  e. 
_V
4 eqid 2402 . . . 4  |-  ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  p ) )  =  ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  p ) )
5 fveq2 5849 . . . . . . . . 9  |-  ( q  =  t  ->  ( 1st `  q )  =  ( 1st `  t
) )
65fveq2d 5853 . . . . . . . 8  |-  ( q  =  t  ->  ( # `
 ( 1st `  q
) )  =  (
# `  ( 1st `  t ) ) )
76eqeq1d 2404 . . . . . . 7  |-  ( q  =  t  ->  (
( # `  ( 1st `  q ) )  =  N  <->  ( # `  ( 1st `  t ) )  =  N ) )
87cbvrabv 3058 . . . . . 6  |-  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  =  { t  e.  ( V Walks  E
)  |  ( # `  ( 1st `  t
) )  =  N }
9 eqid 2402 . . . . . 6  |-  ( ( V WWalksN  E ) `  N
)  =  ( ( V WWalksN  E ) `  N
)
10 fveq2 5849 . . . . . . 7  |-  ( p  =  s  ->  ( 2nd `  p )  =  ( 2nd `  s
) )
1110cbvmptv 4487 . . . . . 6  |-  ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  p ) )  =  ( s  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  s ) )
128, 9, 11wlknwwlknbij 25130 . . . . 5  |-  ( ( V USGrph  E  /\  N  e. 
NN0 )  ->  (
p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |->  ( 2nd `  p
) ) : {
q  e.  ( V Walks 
E )  |  (
# `  ( 1st `  q ) )  =  N } -1-1-onto-> ( ( V WWalksN  E
) `  N )
)
13123adant3 1017 . . . 4  |-  ( ( V USGrph  E  /\  N  e. 
NN0  /\  X  e.  V )  ->  (
p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |->  ( 2nd `  p
) ) : {
q  e.  ( V Walks 
E )  |  (
# `  ( 1st `  q ) )  =  N } -1-1-onto-> ( ( V WWalksN  E
) `  N )
)
14 fveq1 5848 . . . . . 6  |-  ( w  =  ( 2nd `  p
)  ->  ( w `  0 )  =  ( ( 2nd `  p
) `  0 )
)
1514eqeq1d 2404 . . . . 5  |-  ( w  =  ( 2nd `  p
)  ->  ( (
w `  0 )  =  X  <->  ( ( 2nd `  p ) `  0
)  =  X ) )
16153ad2ant3 1020 . . . 4  |-  ( ( ( V USGrph  E  /\  N  e.  NN0  /\  X  e.  V )  /\  p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  /\  w  =  ( 2nd `  p ) )  -> 
( ( w ` 
0 )  =  X  <-> 
( ( 2nd `  p
) `  0 )  =  X ) )
174, 13, 16f1oresrab 6042 . . 3  |-  ( ( V USGrph  E  /\  N  e. 
NN0  /\  X  e.  V )  ->  (
( p  e.  {
q  e.  ( V Walks 
E )  |  (
# `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  p ) )  |`  { p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X } ) : { p  e.  {
q  e.  ( V Walks 
E )  |  (
# `  ( 1st `  q ) )  =  N }  |  ( ( 2nd `  p
) `  0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } )
18 f1oeq1 5790 . . . 4  |-  ( f  =  ( ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  p ) )  |`  { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X } )  -> 
( f : {
p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X }  <->  ( (
p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |->  ( 2nd `  p
) )  |`  { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X } ) : { p  e.  {
q  e.  ( V Walks 
E )  |  (
# `  ( 1st `  q ) )  =  N }  |  ( ( 2nd `  p
) `  0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } ) )
1918spcegv 3145 . . 3  |-  ( ( ( p  e.  {
q  e.  ( V Walks 
E )  |  (
# `  ( 1st `  q ) )  =  N }  |->  ( 2nd `  p ) )  |`  { p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X } )  e. 
_V  ->  ( ( ( p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |->  ( 2nd `  p
) )  |`  { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X } ) : { p  e.  {
q  e.  ( V Walks 
E )  |  (
# `  ( 1st `  q ) )  =  N }  |  ( ( 2nd `  p
) `  0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X }  ->  E. f  f : {
p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } ) )
203, 17, 19mpsyl 62 . 2  |-  ( ( V USGrph  E  /\  N  e. 
NN0  /\  X  e.  V )  ->  E. f 
f : { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } )
21 df-rab 2763 . . . . 5  |-  { p  e.  ( V Walks  E )  |  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) }  =  { p  |  ( p  e.  ( V Walks  E )  /\  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) ) }
22 anass 647 . . . . . . 7  |-  ( ( ( p  e.  ( V Walks  E )  /\  ( # `  ( 1st `  p ) )  =  N )  /\  (
( 2nd `  p
) `  0 )  =  X )  <->  ( p  e.  ( V Walks  E )  /\  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) ) )
2322bicomi 202 . . . . . 6  |-  ( ( p  e.  ( V Walks 
E )  /\  (
( # `  ( 1st `  p ) )  =  N  /\  ( ( 2nd `  p ) `
 0 )  =  X ) )  <->  ( (
p  e.  ( V Walks 
E )  /\  ( # `
 ( 1st `  p
) )  =  N )  /\  ( ( 2nd `  p ) `
 0 )  =  X ) )
2423abbii 2536 . . . . 5  |-  { p  |  ( p  e.  ( V Walks  E )  /\  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) ) }  =  {
p  |  ( ( p  e.  ( V Walks 
E )  /\  ( # `
 ( 1st `  p
) )  =  N )  /\  ( ( 2nd `  p ) `
 0 )  =  X ) }
25 fveq2 5849 . . . . . . . . . . . 12  |-  ( q  =  p  ->  ( 1st `  q )  =  ( 1st `  p
) )
2625fveq2d 5853 . . . . . . . . . . 11  |-  ( q  =  p  ->  ( # `
 ( 1st `  q
) )  =  (
# `  ( 1st `  p ) ) )
2726eqeq1d 2404 . . . . . . . . . 10  |-  ( q  =  p  ->  (
( # `  ( 1st `  q ) )  =  N  <->  ( # `  ( 1st `  p ) )  =  N ) )
2827elrab 3207 . . . . . . . . 9  |-  ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  <->  ( p  e.  ( V Walks  E )  /\  ( # `  ( 1st `  p ) )  =  N ) )
2928anbi1i 693 . . . . . . . 8  |-  ( ( p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  /\  ( ( 2nd `  p ) `
 0 )  =  X )  <->  ( (
p  e.  ( V Walks 
E )  /\  ( # `
 ( 1st `  p
) )  =  N )  /\  ( ( 2nd `  p ) `
 0 )  =  X ) )
3029bicomi 202 . . . . . . 7  |-  ( ( ( p  e.  ( V Walks  E )  /\  ( # `  ( 1st `  p ) )  =  N )  /\  (
( 2nd `  p
) `  0 )  =  X )  <->  ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  /\  ( ( 2nd `  p
) `  0 )  =  X ) )
3130abbii 2536 . . . . . 6  |-  { p  |  ( ( p  e.  ( V Walks  E
)  /\  ( # `  ( 1st `  p ) )  =  N )  /\  ( ( 2nd `  p
) `  0 )  =  X ) }  =  { p  |  (
p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  /\  ( ( 2nd `  p ) `
 0 )  =  X ) }
32 df-rab 2763 . . . . . 6  |-  { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X }  =  {
p  |  ( p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  /\  ( ( 2nd `  p
) `  0 )  =  X ) }
3331, 32eqtr4i 2434 . . . . 5  |-  { p  |  ( ( p  e.  ( V Walks  E
)  /\  ( # `  ( 1st `  p ) )  =  N )  /\  ( ( 2nd `  p
) `  0 )  =  X ) }  =  { p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X }
3421, 24, 333eqtri 2435 . . . 4  |-  { p  e.  ( V Walks  E )  |  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) }  =  { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X }
35 f1oeq2 5791 . . . 4  |-  ( { p  e.  ( V Walks 
E )  |  ( ( # `  ( 1st `  p ) )  =  N  /\  (
( 2nd `  p
) `  0 )  =  X ) }  =  { p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X }  ->  (
f : { p  e.  ( V Walks  E )  |  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X }  <->  f : { p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } ) )
3634, 35mp1i 13 . . 3  |-  ( ( V USGrph  E  /\  N  e. 
NN0  /\  X  e.  V )  ->  (
f : { p  e.  ( V Walks  E )  |  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X }  <->  f : { p  e.  { q  e.  ( V Walks  E
)  |  ( # `  ( 1st `  q
) )  =  N }  |  ( ( 2nd `  p ) `
 0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } ) )
3736exbidv 1735 . 2  |-  ( ( V USGrph  E  /\  N  e. 
NN0  /\  X  e.  V )  ->  ( E. f  f : { p  e.  ( V Walks  E )  |  ( ( # `  ( 1st `  p ) )  =  N  /\  (
( 2nd `  p
) `  0 )  =  X ) } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X }  <->  E. f 
f : { p  e.  { q  e.  ( V Walks  E )  |  ( # `  ( 1st `  q ) )  =  N }  | 
( ( 2nd `  p
) `  0 )  =  X } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } ) )
3820, 37mpbird 232 1  |-  ( ( V USGrph  E  /\  N  e. 
NN0  /\  X  e.  V )  ->  E. f 
f : { p  e.  ( V Walks  E )  |  ( ( # `  ( 1st `  p
) )  =  N  /\  ( ( 2nd `  p ) `  0
)  =  X ) } -1-1-onto-> { w  e.  ( ( V WWalksN  E ) `  N )  |  ( w `  0 )  =  X } )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 367    /\ w3a 974    = wceq 1405   E.wex 1633    e. wcel 1842   {cab 2387   {crab 2758   _Vcvv 3059   class class class wbr 4395    |-> cmpt 4453    |` cres 4825   -1-1-onto->wf1o 5568   ` cfv 5569  (class class class)co 6278   1stc1st 6782   2ndc2nd 6783   0cc0 9522   NN0cn0 10836   #chash 12452   USGrph cusg 24747   Walks cwalk 24915   WWalksN cwwlkn 25095
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1639  ax-4 1652  ax-5 1725  ax-6 1771  ax-7 1814  ax-8 1844  ax-9 1846  ax-10 1861  ax-11 1866  ax-12 1878  ax-13 2026  ax-ext 2380  ax-rep 4507  ax-sep 4517  ax-nul 4525  ax-pow 4572  ax-pr 4630  ax-un 6574  ax-cnex 9578  ax-resscn 9579  ax-1cn 9580  ax-icn 9581  ax-addcl 9582  ax-addrcl 9583  ax-mulcl 9584  ax-mulrcl 9585  ax-mulcom 9586  ax-addass 9587  ax-mulass 9588  ax-distr 9589  ax-i2m1 9590  ax-1ne0 9591  ax-1rid 9592  ax-rnegex 9593  ax-rrecex 9594  ax-cnre 9595  ax-pre-lttri 9596  ax-pre-lttrn 9597  ax-pre-ltadd 9598  ax-pre-mulgt0 9599
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 975  df-3an 976  df-tru 1408  df-fal 1411  df-ex 1634  df-nf 1638  df-sb 1764  df-eu 2242  df-mo 2243  df-clab 2388  df-cleq 2394  df-clel 2397  df-nfc 2552  df-ne 2600  df-nel 2601  df-ral 2759  df-rex 2760  df-reu 2761  df-rmo 2762  df-rab 2763  df-v 3061  df-sbc 3278  df-csb 3374  df-dif 3417  df-un 3419  df-in 3421  df-ss 3428  df-pss 3430  df-nul 3739  df-if 3886  df-pw 3957  df-sn 3973  df-pr 3975  df-tp 3977  df-op 3979  df-uni 4192  df-int 4228  df-iun 4273  df-br 4396  df-opab 4454  df-mpt 4455  df-tr 4490  df-eprel 4734  df-id 4738  df-po 4744  df-so 4745  df-fr 4782  df-we 4784  df-xp 4829  df-rel 4830  df-cnv 4831  df-co 4832  df-dm 4833  df-rn 4834  df-res 4835  df-ima 4836  df-pred 5367  df-ord 5413  df-on 5414  df-lim 5415  df-suc 5416  df-iota 5533  df-fun 5571  df-fn 5572  df-f 5573  df-f1 5574  df-fo 5575  df-f1o 5576  df-fv 5577  df-riota 6240  df-ov 6281  df-oprab 6282  df-mpt2 6283  df-om 6684  df-1st 6784  df-2nd 6785  df-wrecs 7013  df-recs 7075  df-rdg 7113  df-1o 7167  df-oadd 7171  df-er 7348  df-map 7459  df-pm 7460  df-en 7555  df-dom 7556  df-sdom 7557  df-fin 7558  df-card 8352  df-cda 8580  df-pnf 9660  df-mnf 9661  df-xr 9662  df-ltxr 9663  df-le 9664  df-sub 9843  df-neg 9844  df-nn 10577  df-2 10635  df-n0 10837  df-z 10906  df-uz 11128  df-fz 11727  df-fzo 11855  df-hash 12453  df-word 12591  df-usgra 24750  df-wlk 24925  df-wwlk 25096  df-wwlkn 25097
This theorem is referenced by:  rusgranumwwlkg  25376
  Copyright terms: Public domain W3C validator