Metamath Proof Explorer


Definition df-spths

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

According to Wikipedia ("Path (graph theory)", https://en.wikipedia.org/wiki/Path_(graph_theory) , 3-Oct-2017): "A path is a trail in which all vertices (except possibly the first and last) are distinct. ... use the term simple path to refer to a path which contains no repeated vertices."

Therefore, a simple path can be represented by an injective mapping f from { 1 , ... , n } and an injective mapping p from { 0 , ... , n }, where f enumerates the (indices of the) different edges, and p enumerates the vertices. So the simple path 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, 20-Oct-2017) (Revised by AV, 9-Jan-2021)

Ref Expression
Assertion df-spths SPaths = ( 𝑔 ∈ V ↦ { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Trails ‘ 𝑔 ) 𝑝 ∧ Fun 𝑝 ) } )

Detailed syntax breakdown

Step Hyp Ref Expression
0 cspths SPaths
1 vg 𝑔
2 cvv V
3 vf 𝑓
4 vp 𝑝
5 3 cv 𝑓
6 ctrls Trails
7 1 cv 𝑔
8 7 6 cfv ( Trails ‘ 𝑔 )
9 4 cv 𝑝
10 5 9 8 wbr 𝑓 ( Trails ‘ 𝑔 ) 𝑝
11 9 ccnv 𝑝
12 11 wfun Fun 𝑝
13 10 12 wa ( 𝑓 ( Trails ‘ 𝑔 ) 𝑝 ∧ Fun 𝑝 )
14 13 3 4 copab { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Trails ‘ 𝑔 ) 𝑝 ∧ Fun 𝑝 ) }
15 1 2 14 cmpt ( 𝑔 ∈ V ↦ { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Trails ‘ 𝑔 ) 𝑝 ∧ Fun 𝑝 ) } )
16 0 15 wceq SPaths = ( 𝑔 ∈ V ↦ { ⟨ 𝑓 , 𝑝 ⟩ ∣ ( 𝑓 ( Trails ‘ 𝑔 ) 𝑝 ∧ Fun 𝑝 ) } )