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

| 1 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Confinement.ObservedCages |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.ObservedAction |
| 3 | |
| 4 | /-! |
| 5 | # The actual cap-avoidance producer for Proposition 16.1 |
| 6 | |
| 7 | Lemma 16.15 and Proposition 16.21, pp. 379-387. Uniform positive action |
| 8 | excludes the persistent cap windows; their actual compact birth and |
| 9 | post-slab sets, the global square-time modulus, and the finite time |
| 10 | cover then confine every admissible path below the fixed action barrier. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.Proofs.M46 |
| 21 | |
| 22 | /-- The literal producer required by the final induction assembly. |
| 23 | All numerical cap parameters precede the observed flow, and the final |
| 24 | cutoff retains the scalar separation on the auxiliary test scale. |
| 25 | Source: Proposition 16.1 and Lemma 16.15, pp. 367-368 and 379-382. -/ |
| 26 | theorem capAvoidanceProducer_of_parameters |
| 27 | (P : M46Predecessors.{u}) (S : RepairedControlledSchedulesData.{u}) |
| 28 | (p : SurgeryParameterPrefix S.constants) (hp : S.SeedCompatible p) |
| 29 | (rNext : ℝ) (_hr : 0 < rNext) (hrLast : rNext ≤ p.r (Fin.last p.i)) |
| 30 | (rho : ℝ) (hrho : 0 < rho) (_hrho_le : rho ≤ rNext) |
| 31 | (params : ActionBarrierParameters S p rho) (cutoff : ℝ) |
| 32 | (hcutoff : cutoff ≤ capScalarCutoff p.setup.epsilon params.c (rho / 2)) : |
| 33 | CapAvoidanceProducer.{u} p rNext cutoff rho params.A params.eta params.theta := by |
| 34 | intro F O inputs D H hnew hradius caps |
| 35 | have hceiling : D.time ≤ surgeryEpochStart (p.i + 1) := |
| 36 | D.time_mem.2.le.trans inputs.next_epoch.2 |
| 37 | have hstart : 0 ≤ surgeryEpochStart (p.i - 1) := by |
| 38 | unfold surgeryEpochStart |
| 39 | positivity |
| 40 | have hordered : surgeryEpochStart (p.i - 1) < D.time := by |
| 41 | have hmargin := (prefix_old_time_bounds p hnew hceiling).1 |
| 42 | linarith |
| 43 | have hwindow : Icc 0 D.time ⊆ H.spacetime.history.generalized.interval := by |
| 44 | rw [H.spacetime.history.interval_eq] |
| 45 | exact fun _ hs => hs |
| 46 | have henergy : 0 ≤ 2 * positiveActionBudget p := |
| 47 | mul_nonneg (by norm_num) (positiveActionBudget_pos p).le |
| 48 | apply actionConfinement_of_local_surgery_cages H.spacetime.history H.spacetime.geometry |
| 49 | hstart hordered hwindow (actionBudget_large p hceiling) henergy |
| 50 | · intro tau _htau hbound y path haction |
| 51 | exact observed_path_squareEnergy_le P p inputs.old inputs.next_epoch H path hbound haction |
| 52 | · apply exists_observed_surgery_cages P S p hp hrLast hrho params hcutoff |
| 53 | inputs D H hradius caps |
| 54 | intro tau _htau hbound y path haction |
| 55 | exact observed_path_positiveAction_le P p inputs.old inputs.next_epoch H path hbound haction |
| 56 | |
| 57 | end PoincareMT.Proofs.M46 |