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.Comparison.Map |
| 2 | /-! |
| 3 | # The local formulas of the Proposition 15.12 extension |
| 4 | |
| 5 | Morgan--Tian Proposition 15.12 and Remark 15.13, p. 365. This internal |
| 6 | record separates the construction of the continuous map from the compact |
| 7 | regular convergence argument. Its existence is proved from the event; |
| 8 | it adds no hypothesis to the public comparison theorem. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.SurgeryComparison |
| 18 | |
| 19 | variable {g₀ : StandardInitialMetric} {D : RepairedSurgeryFlowData.{u} g₀} |
| 20 | {T : ℝ} {hT : T ∈ D.flow.surgery_times} |
| 21 | [Nonempty (D.flow.slice T).carrier] |
| 22 | (I : RepairedComparisonMapInput D T hT) |
| 23 | |
| 24 | /-- The three local formulas in Proposition 15.12, p. 365. The retained |
| 25 | and neck pieces lie in one compact regular control set. The whole local |
| 26 | surgery output lands in the selected child, so its ambient path estimate |
| 27 | can be used without assuming an ambient distance isometry. -/ |
| 28 | def ComparisonLocalModel |
| 29 | (f : I.parent.carrier.carrier → I.child.carrier.carrier) |
| 30 | (K : Set (D.flow.slice (D.flow.event T hT).tMinus).carrier) |
| 31 | (U : Set I.parent.carrier.carrier) : Prop := |
| 32 | (∃ y, Set.EqOn f (fun _ => y) U) ∨ |
| 33 | (Set.MapsTo I.parent.inclusion U K ∧ |
| 34 | (U ⊆ I.retained ∨ |
| 35 | ∃ i : Fin (D.flow.event T hT).cap_count, |
| 36 | Set.range ((D.flow.event T hT).local_embed i) ⊆ Set.range I.child.inclusion ∧ |
| 37 | Set.MapsTo ((D.flow.event T hT).limit_identify.map ∘ I.parent.inclusion) |
| 38 | U ((D.flow.event T hT).necks i).neck.carrier ∧ |
| 39 | Set.EqOn f (fun x => I.child.inverse |
| 40 | ((D.flow.event T hT).local_embed i |
| 41 | (((D.flow.event T hT).local_result i).collapse |
| 42 | ((D.flow.event T hT).limit_identify.map (I.parent.inclusion x))))) U)) |
| 43 | |
| 44 | /-- One fixed extension with its compactly controlled local formulas. |
| 45 | The construction follows Proposition 15.12 and Remark 15.13, p. 365; |
| 46 | the control set is used for the near-unit estimate of Claim 18.22, p. 433. -/ |
| 47 | structure ComparisonExtension where |
| 48 | map : ContinuousMap I.parent.carrier.carrier I.child.carrier.carrier |
| 49 | retained_agreement : ∀ x ∈ I.retained, |
| 50 | I.child.inclusion (map x) = (D.flow.event T hT).retention.map |
| 51 | (I.parent.inclusion x) |
| 52 | outside_image_in_caps : ∀ x ∉ I.retained, |
| 53 | ∃ i : Fin (D.flow.event T hT).cap_count, |
| 54 | I.child.inclusion (map x) ∈ ((D.flow.event T hT).caps i).carrier |
| 55 | control : Set (D.flow.slice (D.flow.event T hT).tMinus).carrier |
| 56 | control_compact : IsCompact control |
| 57 | control_regular : control ⊆ (D.flow.event T hT).regular_limit |
| 58 | local_model : ∀ x, ∃ U, IsOpen U ∧ x ∈ U ∧ ComparisonLocalModel I map control U |
| 59 | |
| 60 | end PoincareMT.SurgeryComparison |