graph_average_degree
def
The average degree of a finite simple graph G is the real number 2 * |E(G)| / |V(G)|.
Statement
open scoped Classical in noncomputable def graph_average_degree {V : Type*} [Fintype V] (G : SimpleGraph V) : ℝ
- Defined in
- arXiv:2611.05034
- Verified
- 04 Nov 2026
- Axioms
- none listed
Read back from the Lean
Given a finite type V and a simple graph G on V, graph_average_degree G is defined as the real number (2 * |E(G)|) / |V|, where |E(G)| is the cardinality of the edge finset of G and |V| is the cardinality of 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
open scoped Classical in /-- The average degree of a finite simple graph G, defined as the real number 2 * |E(G)| / |V(G)|. -/ noncomputable def graph_average_degree {V : Type*} [Fintype V] (G : SimpleGraph V) : ℝ := (2 * G.edgeFinset.card : ℝ) / Fintype.card V