Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

build #888
Log
Raw
$ lake build Note: This linter can be disabled with `set_option linter.unusedSectionVars false` ✔ [32213/32265] Built PoincareLib.Topology.Manifold.Smoothing.Rigidity.Surfaces.Cuts.OriginalOwnerIntersection (1.9s) ✖ [32214/32265] Building PoincareLib.Topology.Manifold.Smoothing.Rigidity.Surfaces.Cuts.PrimalRimLiftCoverage (2.7s) trace: .> LEAN_PATH=/opt/proof/.lake/packages/Cli/.lake/build/lib/lean:/opt/proof/.lake/packages/batteries/.lake/build/lib/lean:/opt/proof/.lake/packages/Qq/.lake/build/lib/lean:/opt/proof/.lake/packages/aesop/.lake/build/lib/lean:/opt/proof/.lake/packages/proofwidgets/.lake/build/lib/lean:/opt/proof/.lake/packages/importGraph/.lake/build/lib/lean:/opt/proof/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/opt/proof/.lake/packages/plausible/.lake/build/lib/lean:/opt/proof/.lake/packages/mathlib/.lake/build/lib/lean:/opt/proof/.lake/packages/lean4export/.lake/build/lib/lean:/opt/proof/.lake/packages/Comparator/.lake/build/lib/lean:/tmp/build-7p0i0lkv/proof/.lake/build/lib/lean /opt/elan/toolchains/leanprover--lean4---v4.33.1/bin/lean /tmp/build-7p0i0lkv/proof/PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.lean -o /tmp/build-7p0i0lkv/proof/.lake/build/lib/lean/PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.olean -i /tmp/build-7p0i0lkv/proof/.lake/build/lib/lean/PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.ilean -c /tmp/build-7p0i0lkv/proof/.lake/build/ir/PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.c --setup /tmp/build-7p0i0lkv/proof/.lake/build/ir/PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.setup.json --json warning: PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.lean:36:8: automatically included section variable(s) unused in theorem `_private.PoincareLib.Topology.Manifold.Smoothing.Rigidity.Surfaces.Cuts.PrimalRimLiftCoverage.0.PoincareMT.M76.OriginalTriangleCopies.residualBand_primal_contacts`: [Fintype (ResidualComplementaryEdge K P D)] consider restructuring your `variable` declarations so that the variables are not in scope or explicitly omit them: omit [Fintype (ResidualComplementaryEdge K P D)] in theorem ... Note: This linter can be disabled with `set_option linter.unusedSectionVars false` error: PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.lean:169:11: Application type mismatch: The argument hbound has type ∀ t ∈ K.faces, t.card ≤ 3 of sort `Prop` but is expected to have type ResidualComplementaryEdge K P D ≃ Fin 2 of sort `Type u_1` in the application copiedBridge_over_primalRim_is_endpoint K P D hcofaces B h hP hbound error: Lean exited with code 1 ✔ [32237/32265] Built PoincareLib.Topology.Manifold.Smoothing.Rigidity.Surfaces.Cuts.OriginalHalfBandCofaces (2.8s) ✔ [32238/32265] Built PoincareLib.Topology.Manifold.Smoothing.Rigidity.Surfaces.Cuts.OriginalRefinementOwnerGerms (1.8s) Some required targets logged failures: - PoincareLib.Topology.Manifold.Smoothing.Rigidity.Surfaces.Cuts.PrimalRimLiftCoverage error: build failed -- 11 s FAILED: lake build ended with exit 1: error: PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.lean:169:11: Application type mismatch: The argument
Resources--partition=lean --time=12:00:00 --cpus-per-task=4 --mem=24576M
Submit directory(the project root)
Approved versionc87b4a2
ResultFAILED: lake build ended with exit 1: error: PoincareLib/Topology/Manifold/Smoothing/Rigidity/Surfaces/Cuts/PrimalRimLiftCoverage.lean:169:11: Application type mismatch: The argument
Batch script
#!/bin/bash
#SBATCH --job-name=lake-build
#SBATCH --partition=lean
#SBATCH --time=12:00:00
#SBATCH --cpus-per-task=4
#SBATCH --mem=24G
# lake build (upstream's build.yml), the sorry gate and the axioms the commit's own Lean reports, on the pushed commit
# ($SS_INPUT), in the project's Lean image (docker/) with no network. The approved checks/build.py and checks/build.json
# say what is run; the image holds the toolchain, the dependencies and a build of the approved main, and the commit is
# compiled on top of it in place, so only what the commit changed is rebuilt. Comparator does not run here ("replay":
# "round" in build.json): its replay of the whole proof is hours, and the maintainers run it once a round and file it
# as the `replay` report. Logs go beside the job's output.
#
# Measured on production, 12-02 (reports: lean-poincare.md), at 4 CPUs: main 147 s, 2 GB; a comment, a proof or a new
# lemma in one file, 1 to 4 minutes, 4 GB at most. A change Lake must carry through many modules costs about 12
# CPU-seconds each: 1,587 modules about 80 minutes here (41 at 8 CPUs, 30 at 16, 21 GB); the file most imported
# (15,578 modules) would not finish in the time limit at 4 CPUs.
set -euo pipefail
BUILD_LOGS="$PWD/logs" python3 -I checks/build.py "$SS_INPUT" checks/build.json