is_geodesic
def
A walk p from u to v in a simple graph G is a geodesic if it is a simple path whose length equals the graph distance dist(u, v).
Statement
def is_geodesic {V : Type*} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) : Prop
- Defined in
- arXiv:2610.36821 Section 1
- Verified
- 28 Oct 2026
- Axioms
- none listed
- Used by 2
- is_k_geodetic_botThe empty graph on any vertex type V is K-geodetic for every natural number K.
- is_k_geodeticA simple graph G is K-geodetic if for every pair of distinct vertices u and v, the number of geodesics connecting u and v is at most K.
Read back from the Lean
Given a type V, a simple graph G on V, vertices u, v : V, and a walk p : G.Walk u v from u to v, is_geodesic p is defined as the proposition that p is a path (i.e. visits no vertex more than once) and the length of p equals the graph distance G.dist u v between u and v.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- A walk in a simple graph is a geodesic if it is a path whose length equals the graph distance between its endpoints. -/ def is_geodesic {V : Type*} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) : Prop := p.IsPath ∧ p.length = G.dist u v