This repository contains the Lean formalization behind arXiv:2603.30013.
The repository has two reader-facing surfaces:
- the source tree on
main - the generated GitHub Pages site with the landing page, blueprint, and Lean docs
RequestProject/: active Lean modulesRequestProject.lean: package entrypointindex.html: landing page source for the published sitedocuments/short.tex: local synchronized TeX source used by the blueprint toolchainblueprint/src/: blueprint sourceblueprint/web/: checked-in published blueprint HTMLdocbuild/:doc-gen4configuration for project docs
From the repository root:
lake build
lake env lean scripts/print_axioms_check.leanThe axiom audit for the key endpoint theorems should report only:
propextClassical.choiceQuot.sound
GitHub Actions uses leanchecker as its kernel-replay audit:
lake env leanchecker RequestProject.HadamardCn3ShortMain
lake env leanchecker RequestProject.HadamardCn3Asymptotics
lake env leanchecker RequestProject.HadamardCn3WeakInvariance
lake env leanchecker RequestProject.HadamardCn3LocalGapResidual
lake env leanchecker RequestProject.HadamardCn3The repository also includes a separate comparator audit surface under
Comparator/:
Comparator/Challenge.lean: trusted challenge statements for the endpoint theoremsComparator/Solution.lean: wrappers that point those statements at the actual formal proofsComparator/comparator.json: comparator configuration
These files are kept for a self-hosted Linux comparator run. The GitHub-hosted
workflow was removed because comparator depends on landrun, and the
GitHub-hosted runner failed before theorem comparison with a permission denied
error from landrun while building Comparator.Challenge.
The default docs build is curated: it generates Lean docs only for the
RequestProject modules that are published on the Pages site.
python3 docbuild/scripts/rebuild_docs.pyFor the old exhaustive recursive doc-gen4 build, use:
python3 docbuild/scripts/rebuild_docs.py --mode fullThe published blueprint is served from blueprint/web/. To rebuild that local
HTML surface:
python3 -m venv blueprint/.venv
blueprint/.venv/bin/pip install --upgrade pip
blueprint/.venv/bin/pip install -r blueprint/requirements.txt
python3 blueprint/scripts/build_real_blueprint.pyTo preview the same site layout used for GitHub Pages:
python3 docbuild/scripts/rebuild_docs.py
python3 blueprint/scripts/build_real_blueprint.py
python3 scripts/assemble_pages_site.py
cd .site
python3 -m http.server 8005Then open:
/for the landing page/blueprint/web/for the blueprint/docs/for the Lean docs
If you want to inspect the formalized paper statements first, start with:
RequestProject/HadamardCn3.leanRequestProject/HadamardCn3ShortMain.leanRequestProject/HadamardCn3Asymptotics.leanRequestProject/HadamardCn3WeakInvariance.leanRequestProject/HadamardCn3PaperSpec.lean
HadamardCn3ShortMain.lean is the count-facing endpoint file. It defines the
literal count of partial Hadamard matrices and states the two final count
theorems:
thm_main_introcor_uniform
HadamardCn3Asymptotics.lean contains the normalized-count and integral bridge
used to reach those endpoint theorems.
MOOrefers to the Mossel-O'Donnell-Oleszkiewicz invariance principle; see Mossel, O'Donnell, Oleszkiewicz, Noise stability of functions with low influences: Invariance and optimality, Annals of Mathematics 171 (2010), 295-341.- The
mainbranch is intended to stay source-only and reviewable. - Generated HTML belongs to the GitHub Pages deployment output, not normal source history.