Metamath Proof Explorer


Definition df-trls

Description: Define the set of all Trails (in an undirected graph).

According to Wikipedia ("Path (graph theory)", https://en.wikipedia.org/wiki/Path_(graph_theory) , 3-Oct-2017): "A trail is a walk in which all edges are distinct.

According to Bollobas: "... walk is called a trail if all its edges are distinct.", see Definition of Bollobas p. 5.

Therefore, a trail can be represented by an injective mapping f from { 1 , ... , n } and a mapping p from { 0 , ... , n }, where f enumerates the (indices of the) different edges, and p enumerates the vertices. So the trail is also represented by the following sequence: p(0) e(f(1)) p(1) e(f(2)) ... p(n-1) e(f(n)) p(n). (Contributed by Alexander van der Vekens and Mario Carneiro, 4-Oct-2017) (Revised by AV, 28-Dec-2020)

Ref Expression
Assertion df-trls
|- Trails = ( g e. _V |-> { <. f , p >. | ( f ( Walks ` g ) p /\ Fun `' f ) } )

Detailed syntax breakdown

Step Hyp Ref Expression
0 ctrls
 |-  Trails
1 vg
 |-  g
2 cvv
 |-  _V
3 vf
 |-  f
4 vp
 |-  p
5 3 cv
 |-  f
6 cwlks
 |-  Walks
7 1 cv
 |-  g
8 7 6 cfv
 |-  ( Walks ` g )
9 4 cv
 |-  p
10 5 9 8 wbr
 |-  f ( Walks ` g ) p
11 5 ccnv
 |-  `' f
12 11 wfun
 |-  Fun `' f
13 10 12 wa
 |-  ( f ( Walks ` g ) p /\ Fun `' f )
14 13 3 4 copab
 |-  { <. f , p >. | ( f ( Walks ` g ) p /\ Fun `' f ) }
15 1 2 14 cmpt
 |-  ( g e. _V |-> { <. f , p >. | ( f ( Walks ` g ) p /\ Fun `' f ) } )
16 0 15 wceq
 |-  Trails = ( g e. _V |-> { <. f , p >. | ( f ( Walks ` g ) p /\ Fun `' f ) } )