Holevo Additivity Gap in Lean 4

Lean explorer

Sources and trust

About these pages.

A mathematical reader guide connected to this repository’s exact formal sources.

The explanatory organization follows QMDL: an introduction, concepts, result explanations, a proof route, and links in both directions between mathematics and Lean. The formal source explorer also follows the structure of the Fermat’s Last Theorem documentation. The project’s explanations, design, and generator are original material. Mathematical notation uses a locally bundled KaTeX 0.19.0 distribution under the MIT license; its original license is retained.

The mathematical chapters, concept entries, all 25 result explanations, and seven proof-stage explanations are handwritten documentation. Every attached Lean declaration is validated against the actual export. The machine-readable explanation map records these reading correspondences and source hashes. It does not assert formal equivalence of the prose and proof terms.

What is shown, and how

Result correspondenceThe 25 records and 49 exact declaration references are read from metadata/results.json. Status and scope notes are carried through unchanged.
Quoted headersA conservative lexical recognizer quotes a unique literal declaration header before its outer :=. It hides comments and strings while locating syntax, then quotes the original source text. Ambiguous syntax falls back to full source.
Elaborated declarationsAll 9,107 project constants are exported from the actual Lean environment into metadata/declarations.json. Individual pages display a readable elaborated type, with universe parameters separately listed, and link to the exact full source module. A shared kernel expression DAG preserves every kernel-relevant argument, universe, binder and name component, while omitting kernel-irrelevant metadata annotations.
Source contextA literal source header does not expand namespace variables, implicit instances, notation, imports, or local settings. Its display is distinguished from the complete exported type. An exact declaration line is linked only when available from source extraction or trustworthy declaration metadata.
Import relationshipsDirect imports are read from literal import commands. Reverse links cover all 366 proof modules and three aggregate entry points. These remain distinct from individual constant references.
Constant dependenciesType and stored-value expressions provide exact direct constant-reference lists. Reverse project links are computed from those lists. The proof overview gives mathematical labels to selected theorems, with each arrow backed by an actual proof/definition-reference path. Intermediate helpers and redundant arrows are omitted; their paths remain inspectable. A detailed view retains direct type and proof/definition references. No minimality or informal-proof equivalence is asserted.
SearchSearch indexes every one of the 9,107 exported project constants, all result names and paper labels, and all source modules. Names flagged by Lean’s internal, internal-detail or private predicates can be included explicitly; these flags do not identify every generated constant.
Export freshnessThe generator verifies the exported SHA-256 provenance against every proof source, aggregate entry point, toolchain and dependency manifest before generating pages. A stale source blocks the documentation build. This checks provenance consistency; it does not independently re-execute the exporter or prove metadata integrity.
Repository documentsA small offline Markdown renderer displays committed prose. Exact Markdown files are available when typography or formula syntax needs checking.
Verification evidenceThe retained successful GitHub CI run certifies a full project-source rebuild and Lean audit at its recorded commit. Separate portable records certify Comparator API comparison, Lean replay, and independent Nanoda checking for five configurations and six theorem roots. These checks ran unsandboxed; their input hashes are verified when building this site.
Offline useOpen html/index.html directly after cloning, or visit the GitHub Pages site. Search and dependency data are local JavaScript assets, so no server, CDN, telemetry, or network request is required to browse.
LicensingNo blanket open-source license has been selected for project-owned code or the manuscript. Copyright and original third-party attribution are preserved.

Complete kernel type expressions

Every elaborated type is preserved as a shared kernel expression DAG: names, universes, binders and all arguments are retained; kernel-irrelevant metadata annotations are omitted. This canonical JSON is a machine expression representation, distinct from Lean source text. It is stored losslessly as gzip/base64, with byte counts and SHA-256 hashes. The generator stream-checks each payload and validates its node references before publishing a complete .expr.json.gz artifact. Declaration pages show readable Lean types and decode at most a 64,000-character JSON preview on expansion; modern browsers also offer the entire decoded JSON download. Compressed downloads remain available without browser gzip support.

Rebuild the documentation

Python 3 is the only dependency. From the repository root:

python3 tools/docs-site/build.py
python3 tools/docs-site/build.py --check

The freshness check compares generated bytes and validates every local file link, HTML anchor, search target, and source download. It is a documentation check; proof verification uses the separate commands on the verification page.

The generator records input hashes, counts, and extraction results in generation.json. Generation is deterministic. Downloadable execution records retain their original timestamps and paths.

Proof verification · Copyright · Third-party notices