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.Global.Certificate |
| 2 | |
| 3 | /-! Restrict a final numerical schedule without assuming any flow extension. |
| 4 | M51 may use this helper after constructing its global schedule. It does not |
| 5 | describe the intermediate, subsequently tightened induction prefixes. -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | |
| 9 | namespace PoincareMT |
| 10 | |
| 11 | /-- The finite sequence is the literal restriction of the chosen schedule. -/ |
| 12 | def GlobalSurgerySchedule.parameterPrefix {K : MetricSurgeryConstants} |
| 13 | (S : GlobalSurgerySchedule K) (i : Nat) (hi : 0 < i) : |
| 14 | SurgeryParameterPrefix K where |
| 15 | setup := S.setup |
| 16 | i := i |
| 17 | i_pos := hi |
| 18 | r j := S.r j.val |
| 19 | kappa j := S.kappa j.val |
| 20 | Delta j := S.Delta j.val |
| 21 | r_pos j := S.r_pos j.val |
| 22 | kappa_pos j := S.kappa_pos j.val |
| 23 | Delta_pos j := S.Delta_pos j.val |
| 24 | r_antitone := fun {_ _} h => S.r_antitone h |
| 25 | kappa_antitone := fun {_ _} h => S.kappa_antitone h |
| 26 | Delta_antitone := fun {_ _} h => S.Delta_antitone h |
| 27 | r_zero := S.r_zero |
| 28 | r_le_epsilon j := S.r_le_epsilon j.val |
| 29 | Delta_le_setup j := S.Delta_le j.val |
| 30 | |
| 31 | /-- Every positive finite restriction has a witness, independently of any |
| 32 | flow, observation horizon, noncollapsing result or continuation theorem. |
| 33 | Source: the sequence restrictions in Morgan--Tian Definition 15.7, p. 360. -/ |
| 34 | theorem globalSurgeryPrefixWitness_of_schedule {K : MetricSurgeryConstants} |
| 35 | (S : GlobalSurgerySchedule K) (i : Nat) (hi : 0 < i) : |
| 36 | Nonempty (GlobalSurgeryPrefixWitness K S i) := by |
| 37 | exact ⟨{ |
| 38 | param_prefix := S.parameterPrefix i hi |
| 39 | prefix_index := rfl |
| 40 | setup_eq := rfl |
| 41 | prefix_agrees := ⟨fun _ => rfl, fun _ => rfl, fun _ => rfl⟩ }⟩ |
| 42 | |
| 43 | end PoincareMT |