graph_leaf_count
def
The number of leaves of a simple graph on a finite vertex type is the number of vertices with degree 1.
Statement
open Classical in noncomputable def graph_leaf_count {V : Type*} [Fintype V] (H : SimpleGraph V) : ℕ
- Defined in
- arXiv:2611.19473, Section 2
- Verified
- 20 Nov 2026
- Axioms
- none listed
- Used by 1
- twin_star_leaf_countFor any natural number d ≥ 2, the number of leaves graph_leaf_count of the twin-star graph TS_d on Fin d ⊕ Fin d is equal to 2 * d - 2.
Read back from the Lean
Given a finite type V and a simple graph H on V, graph_leaf_count H is defined to be the number (cardinality) of vertices v : V whose degree in H is equal to 1.
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 Classical in /-- The number of leaves (vertices of degree 1) in a finite simple graph. -/ noncomputable def graph_leaf_count {V : Type*} [Fintype V] (H : SimpleGraph V) : ℕ := by classical exact (Finset.univ.filter (fun v => H.degree v = 1)).card