Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Euler's criterion — a digraph has an Euler tour iff it is Eulerian

Proved
HararySachs.Hyper.numTours_pos_iff

by milia · Nov 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

euleriangraph-theory

This is Euler's criterion for directed multigraphs, in the form used in the proof of Lemma 4 of Clark and Cooper: a digraph has an Euler tour exactly when it is Eulerian.

Let DDD be a directed multigraph on [n][n][n] with m(u,v)m(u,v)m(u,v) distinguishable arcs from uuu to vvv (loops allowed) and L=∑u,vm(u,v)>0L=\sum_{u,v}m(u,v)>0L=∑u,v​m(u,v)>0 arcs in total. Call DDD Eulerian when the following hold, where V(D)V(D)V(D) is the set of vertices of positive degree:

  1. V(D)≠∅V(D)\neq\emptysetV(D)=∅;
  2. deg⁡+(v)=deg⁡−(v)\deg^+(v)=\deg^-(v)deg+(v)=deg−(v) for every vertex vvv;
  3. any two vertices of V(D)V(D)V(D) are joined by a chain of arcs, each traversed in either direction.

Then

D has an Euler tour  ⟺  D is Eulerian.D \text{ has an Euler tour} \iff D \text{ is Eulerian}.D has an Euler tour⟺D is Eulerian.

An Euler tour is a closed trail using every arc exactly once, with a distinguished first position.

The paper recalls this criterion on p. 5 before Lemma 4. It is the existence half of Lemma 4, and every Euler-circuit count, such as the BEST theorem, presupposes it.

Formalization Note The left-hand side is 0 < numTours m hL, the number of tour bijections Fin L ≃ Arcs m. Eulerian is the mission predicate IsEulerian m, with weak connectivity expressed by Relation.ReflTransGen (WeakAdjacent m) on active vertices.

Preamble
import Mathlib
import Definitions.Def_HararySachs_Hyper_Operators
Formal statement
namespace HararySachs.Hyper

theorem numTours_pos_iff {n L : ℕ} (hL : 0 < L) (m : ArcMult n)
    (hm : (∑ u : Fin n, ∑ v : Fin n, m u v) = L) :
    0 < numTours m hL ↔ IsEulerian m := by sorry

end HararySachs.Hyper
Source
Clark and Cooper, A Harary-Sachs theorem for hypergraphs, arXiv:1812.00468v2, p. 5, paragraph after Definition 4 ('a digraph D has an Euler circuit if and only if deg+(v) = deg−(v) for all v ∈ V(D) and D is weakly connected'), used in the proof of Lemma 4, p. 6

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me