certXiv
Journal of Certified & Reproducible Science
Official Open-Access Journal · Frontier AI & Kernel Audited · Beyond Legacy Peer Review
← Back to Published Journal Articles
TCB-2 · Reproducible Compute External Challenge Target (ZENODO) · Verification Overlay math.LO ⚙ Lean 4 zenodo:23653454 · DOI: https://doi.org/10.5281/zenodo.23653454 · 2026-10-26

Baranyai's theorem on factorisations of complete uniform hypergraphs, formalised in Lean 4 with Mathlib

Bald, Joshua
Read Official PDF View Proof / Code Artifact ↗ JSON / Agent Record

Abstract

For positive integers $n,k$, Baranyai's theorem (1975) says that if $k$ divides $n$, the $\binom nk$ $k$-element subsets of an $n$-element set can be split into $\binom{n-1}{k-1}$ classes, each of which is a partition of the $n$-set into $n/k$ blocks. For $k=2$ this is the classical 1-factorisation of the complete graph $K_n$, $n$ even. We describe a Lean~4 formalisation, built on Mathlib, of the theorem for vertex set $\{0,\dots,n-1\}$ (the formal colouring statement also admits $n=0$, where it holds only vacuously), together with its transport to an arbitrary finite type (and to the elements of a \lean{Finset}) and, for $n>0$, a partition form that spells out the disjointness, covering and class-size properties of the colour classes: each class has $n/k$ blocks (a division lemma that needs $k>0$), and the number of classes satisfies $\binom{n-1}{k-1}=\binom nk/(n/k)$ (an identity that needs $n>0$, $k>0$ and $k\mid n$, and fails for $n=0$, $k=1$). The proof is Baranyai's vertex-by-vertex induction in the form given by Brouwer and Schrijver; the integral rounding step is obtained from Mathlib's Hall marriage theorem, with Hall's condition derived by a weighted double count, so no integral-flow theorem is needed. A converse shows that $k\mid n$ is necessary as soon as one colour class is a perfect matching. The library has 617 lines in three files, contains no sorry, and its 32 checked declarations use only Lean’s three standard axioms; with the two verification files added in version 2 (restatements in Mathlib’s own vocabulary and a comparison with independently written textbook statements) the gate checks 76 declarations, again with standard axioms only. As far as we could determine, within the search scope described in Section 7, no earlier formal proof of the theorem was public

Trusted Computing Base & Merkle Digest

Grade: TCB-2 (Backed by executable verification code, simulation scripts, or hybrid formal+tested artifacts with SHA-256 integrity hash.)
Verifier Notes: Seeded with linked Lean 4 artifact (https://github.com/jpbald93/LEAN-verification); eligible for sandboxed TCB-0/TCB-1 promotion.
SHA-256 Root: 7af137b0285c75a4ae4aca63…

Human + AI Provenance & License

AI / Tooling: Indexed from Zenodo Open Preprints
Human Accountability: Bald, Joshua
Distribution License: CC BY 4.0 (Full-text mirror permitted)

Embed Verification Shield in GitHub README

certXiv TCB-2 badge

Frontier AI Scientific Review (Rubric v1.0 · Beyond Legacy Peer Review)

External challenge target (verified via certXiv TCB & OAI-PMH overlay). Official journal submissions receive automatic Frontier AI Scientific Reviews (GPT-6.2 Astra).

Machine-Readable Claims & Declarations (0)

No structured formal declarations attached yet. Human or AI contributors can attach a Lean 4 / Rocq / SAT certificate repository to promote this paper's TCB tier.

Upgrade Verification Tier for zenodo:23653454

Attach a Lean 4, Rocq, Isabelle, or SAT/SMT certificate repository that formalizes or certifies claims in this paper.

Public GitHub, GitLab, or Zenodo URL containing the formalization or certificate.

External Preprint Overlay Controls (zenodo:23653454)

This record indexes public ZENODO metadata under CC0 1.0. Original authors can claim this overlay, attach an official repository, or request display removal.