LeanPool.AsymptoticTrianglePacking.Internal — hypergraph foundations and the handshake identity #
Standalone, Mathlib-only. Destined for a Mathlib PR. Foundation for the Rödl-nibble project.
A r-uniform hypergraph on a vertex type V is modelled as a Finset (Finset V) all of whose
edges have cardinality r.
Goals of this module:
- A1 — definitions:
degree,codegree,IsMatching. - A2 — the handshake identity
∑_v degree v = r * H.cardand the codegree double-count.
Everything here must be placeholder-free and axiom-clean [propext, Classical.choice, Quot.sound].
The degree of a vertex v in a hypergraph H: the number of edges containing v.
Equations
- Hypergraph.degree H v = {e ∈ H | v ∈ e}.card
Instances For
A2 — handshake identity. For an r-uniform hypergraph,
∑_v degree v = r * |H|. Proof idea: double count the set of incidences
{(v, e) : v ∈ e ∈ H}; summing over v gives ∑ degree, while summing over
e gives ∑_{e} |e| = r|H|.
A2' — codegree double-count. ∑_v (degree H v).choose 2 = ∑ over unordered pairs …
stated here in the convenient ordered form: the number of (edge, ordered pair-in-edge) incidences
equals ∑_e |e|*(|e|-1) = r*(r-1)*|H| for an r-uniform hypergraph.