Trails and Eulerian trails #
This module contains additional theory about trails, including Eulerian trails (also known as Eulerian circuits).
Main definitions #
SimpleGraph.Walk.IsEulerianis the predicate that a trail is an Eulerian trail.SimpleGraph.Walk.IsTrail.even_countP_edges_iffgives a condition on the number of edges in a trail that can be incident to a given vertex.SimpleGraph.Walk.IsEulerian.even_degree_iffgives a condition on the degrees of vertices when there exists an Eulerian trail.SimpleGraph.Walk.IsEulerian.card_odd_degreegives the possible numbers of odd-degree vertices when there exists an Eulerian trail.
TODO #
- Prove that there exists an Eulerian trail when the conclusion to
SimpleGraph.Walk.IsEulerian.card_odd_degreeholds.
Tags #
Eulerian trails
@[reducible, inline]
abbrev
SimpleGraph.Walk.IsTrail.edgesFinset
{V : Type u_1}
{G : SimpleGraph V}
{u v : V}
{p : G.Walk u v}
(h : p.IsTrail)
:
The edges of a trail as a finset, since each edge in a trail appears exactly once.
Equations
Instances For
theorem
SimpleGraph.Walk.IsTrail.even_countP_edges_iff
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(ht : p.IsTrail)
(x : V)
:
def
SimpleGraph.Walk.IsEulerian
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
(p : G.Walk u v)
:
An Eulerian trail (also known as an "Eulerian path") is a walk
p that visits every edge exactly once. The lemma SimpleGraph.Walk.IsEulerian.IsTrail shows
that these are trails.
Combine with p.IsCircuit to get an Eulerian circuit (also known as an "Eulerian cycle").
Equations
Instances For
theorem
SimpleGraph.Walk.IsEulerian.isTrail
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(h : p.IsEulerian)
:
p.IsTrail
theorem
SimpleGraph.Walk.IsEulerian.mem_edges_iff
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(h : p.IsEulerian)
{e : Sym2 V}
:
def
SimpleGraph.Walk.IsEulerian.fintypeEdgeSet
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(h : p.IsEulerian)
:
The edge set of an Eulerian graph is finite.
Equations
Instances For
theorem
SimpleGraph.Walk.IsTrail.isEulerian_of_forall_mem
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(h : p.IsTrail)
(hc : ∀ e ∈ G.edgeSet, e ∈ p.edges)
:
theorem
SimpleGraph.Walk.isEulerian_iff
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
(p : G.Walk u v)
:
theorem
SimpleGraph.Walk.IsTrail.isEulerian_iff
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(hp : p.IsTrail)
:
theorem
SimpleGraph.Walk.IsEulerian.edgeSet_eq
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(h : p.IsEulerian)
:
theorem
SimpleGraph.Walk.IsEulerian.edgesFinset_eq
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
[Fintype ↑G.edgeSet]
{u v : V}
{p : G.Walk u v}
(h : p.IsEulerian)
:
theorem
SimpleGraph.Walk.IsEulerian.even_degree_iff
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{x u v : V}
{p : G.Walk u v}
(ht : p.IsEulerian)
[Fintype V]
[DecidableRel G.Adj]
:
theorem
SimpleGraph.Walk.IsEulerian.card_filter_odd_degree
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
[Fintype V]
[DecidableRel G.Adj]
{u v : V}
{p : G.Walk u v}
(ht : p.IsEulerian)
{s : Finset V}
(h : s = {v : V | Odd (G.degree v)})
:
theorem
SimpleGraph.Walk.IsEulerian.card_odd_degree
{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
[Fintype V]
[DecidableRel G.Adj]
{u v : V}
{p : G.Walk u v}
(ht : p.IsEulerian)
: