Metamath Proof Explorer


Definition df-upwlks

Description: Define the set of all walks (in a pseudograph), called "simple walks" in the following.

According to Wikipedia ("Path (graph theory)", https://en.wikipedia.org/wiki/Path_(graph_theory) , 3-Oct-2017): "A walk of length k in a graph is an alternating sequence of vertices and edges, v0 , e0 , v1 , e1 , v2 , ... , v(k-1) , e(k-1) , v(k) which begins and ends with vertices. If the graph is undirected, then the endpoints of e(i) are v(i) and v(i+1)."

According to Bollobas: " A walk W in a graph is an alternating sequence of vertices and edges x0 , e1 , x1 , e2 , ... , e(l) , x(l) where e(i) = x(i-1)x(i), 0Bollobas p. 4.

Therefore, a walk can be represented by two mappings f from { 1 , ... , n } and p from { 0 , ... , n }, where f enumerates the (indices of the) edges, and p enumerates the vertices. So the walk is represented by the following sequence: p(0) e(f(1)) p(1) e(f(2)) ... p(n-1) e(f(n)) p(n).

Although this definition is also applicable for arbitrary hypergraphs, it allows only walks consisting of not proper hyperedges (i.e. edges connecting at most two vertices). Therefore, it should be used for pseudographs only. (Contributed by Alexander van der Vekens and Mario Carneiro, 4-Oct-2017) (Revised by AV, 28-Dec-2020)

Ref Expression
Assertion df-upwlks
|- UPWalks = ( g e. _V |-> { <. f , p >. | ( f e. Word dom ( iEdg ` g ) /\ p : ( 0 ... ( # ` f ) ) --> ( Vtx ` g ) /\ A. k e. ( 0 ..^ ( # ` f ) ) ( ( iEdg ` g ) ` ( f ` k ) ) = { ( p ` k ) , ( p ` ( k + 1 ) ) } ) } )

Detailed syntax breakdown

Step Hyp Ref Expression
0 cupwlks
 |-  UPWalks
1 vg
 |-  g
2 cvv
 |-  _V
3 vf
 |-  f
4 vp
 |-  p
5 3 cv
 |-  f
6 ciedg
 |-  iEdg
7 1 cv
 |-  g
8 7 6 cfv
 |-  ( iEdg ` g )
9 8 cdm
 |-  dom ( iEdg ` g )
10 9 cword
 |-  Word dom ( iEdg ` g )
11 5 10 wcel
 |-  f e. Word dom ( iEdg ` g )
12 4 cv
 |-  p
13 cc0
 |-  0
14 cfz
 |-  ...
15 chash
 |-  #
16 5 15 cfv
 |-  ( # ` f )
17 13 16 14 co
 |-  ( 0 ... ( # ` f ) )
18 cvtx
 |-  Vtx
19 7 18 cfv
 |-  ( Vtx ` g )
20 17 19 12 wf
 |-  p : ( 0 ... ( # ` f ) ) --> ( Vtx ` g )
21 vk
 |-  k
22 cfzo
 |-  ..^
23 13 16 22 co
 |-  ( 0 ..^ ( # ` f ) )
24 21 cv
 |-  k
25 24 5 cfv
 |-  ( f ` k )
26 25 8 cfv
 |-  ( ( iEdg ` g ) ` ( f ` k ) )
27 24 12 cfv
 |-  ( p ` k )
28 caddc
 |-  +
29 c1
 |-  1
30 24 29 28 co
 |-  ( k + 1 )
31 30 12 cfv
 |-  ( p ` ( k + 1 ) )
32 27 31 cpr
 |-  { ( p ` k ) , ( p ` ( k + 1 ) ) }
33 26 32 wceq
 |-  ( ( iEdg ` g ) ` ( f ` k ) ) = { ( p ` k ) , ( p ` ( k + 1 ) ) }
34 33 21 23 wral
 |-  A. k e. ( 0 ..^ ( # ` f ) ) ( ( iEdg ` g ) ` ( f ` k ) ) = { ( p ` k ) , ( p ` ( k + 1 ) ) }
35 11 20 34 w3a
 |-  ( f e. Word dom ( iEdg ` g ) /\ p : ( 0 ... ( # ` f ) ) --> ( Vtx ` g ) /\ A. k e. ( 0 ..^ ( # ` f ) ) ( ( iEdg ` g ) ` ( f ` k ) ) = { ( p ` k ) , ( p ` ( k + 1 ) ) } )
36 35 3 4 copab
 |-  { <. f , p >. | ( f e. Word dom ( iEdg ` g ) /\ p : ( 0 ... ( # ` f ) ) --> ( Vtx ` g ) /\ A. k e. ( 0 ..^ ( # ` f ) ) ( ( iEdg ` g ) ` ( f ` k ) ) = { ( p ` k ) , ( p ` ( k + 1 ) ) } ) }
37 1 2 36 cmpt
 |-  ( g e. _V |-> { <. f , p >. | ( f e. Word dom ( iEdg ` g ) /\ p : ( 0 ... ( # ` f ) ) --> ( Vtx ` g ) /\ A. k e. ( 0 ..^ ( # ` f ) ) ( ( iEdg ` g ) ` ( f ` k ) ) = { ( p ` k ) , ( p ` ( k + 1 ) ) } ) } )
38 0 37 wceq
 |-  UPWalks = ( g e. _V |-> { <. f , p >. | ( f e. Word dom ( iEdg ` g ) /\ p : ( 0 ... ( # ` f ) ) --> ( Vtx ` g ) /\ A. k e. ( 0 ..^ ( # ` f ) ) ( ( iEdg ` g ) ` ( f ` k ) ) = { ( p ` k ) , ( p ` ( k + 1 ) ) } ) } )