star_forest
def
The disjoint union of $q$ stars with sizes given by $n : \text{Fin } q \to \mathbb{N}$, on vertices $\Sigma (i : \text{Fin } q), \text{Option}(\text{Fin}(n(i)))$.
Statement
def star_forest {q : ℕ} (n : Fin q → ℕ) : SimpleGraph ((i : Fin q) × Option (Fin (n i)))- Defined in
- arXiv:2610.25958
- Verified
- 22 Oct 2026
- Axioms
- none listed
- Built on 1
- star_graph_k1The star graph $K_{1,n}$ with $n$ leaves, centered at
none, on vertex typeOption (Fin n).
- star_graph_k1The star graph $K_{1,n}$ with $n$ leaves, centered at
Read back from the Lean
star_forest defines a SimpleGraph on the vertex type (i : Fin q) × Option (Fin (n i)), parameterized by a natural number q (implicit) and a function n : Fin q → ℕ.
The graph is constructed via SimpleGraph.fromRel applied to the relation between vertices u and v defined as: there exists a proof h : u.1 = v.1 such that u.2 is adjacent to h ▸ v.2 in star_graph_k1 (n u.1) (the star graph on Option (Fin (n u.1)) with center none).
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
/-- Disjoint union of q star graphs with leaf counts given by n : Fin q → ℕ. -/ def star_forest {q : ℕ} (n : Fin q → ℕ) : SimpleGraph ((i : Fin q) × Option (Fin (n i))) := SimpleGraph.fromRel fun u v => ∃ h : u.1 = v.1, (star_graph_k1 (n u.1)).Adj u.2 (h ▸ v.2)