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.Metric.Standard.Cylindrical.CylindricalSphere |
| 2 | |
| 3 | /-! |
| 4 | # Polar coordinates adapted to the supplied cylindrical end |
| 5 | |
| 6 | The smooth angular reparametrization identifies the primitive end chart |
| 7 | with the cap's radial coordinates. The corresponding clipped collapse |
| 8 | agrees with the reversed end chart on the retained collar. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Topology |
| 14 | |
| 15 | namespace PoincareMT.MetricSurgery |
| 16 | |
| 17 | noncomputable def adaptedPolarPoint (g₀ : StandardInitialMetric) |
| 18 | (z : StandardCylinderSpace) : StandardCapSpace := |
| 19 | radialPolarPoint g₀ (cylindricalBoundaryDirection g₀ z.1, z.2) |
| 20 | |
| 21 | noncomputable def adaptedInverseCoordinates (g₀ : StandardInitialMetric) |
| 22 | (x : StandardCapSpace) : StandardCylinderSpace := |
| 23 | (cylindricalBoundaryInverse g₀ (radialDirection x), radialArclength g₀ ‖x‖) |
| 24 | |
| 25 | theorem adaptedPolarPoint_contMDiff (g₀ : StandardInitialMetric) : |
| 26 | ContMDiff ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ (adaptedPolarPoint g₀) := |
| 27 | (radialPolarPoint_contMDiff g₀).comp |
| 28 | (((cylindricalBoundaryDirection_contMDiff g₀).comp contMDiff_fst).prodMk contMDiff_snd) |
| 29 | |
| 30 | theorem adaptedInverseCoordinates_contMDiffOn (g₀ : StandardInitialMetric) : |
| 31 | ContMDiffOn (𝓡 3) ((𝓡 2).prod 𝓘(ℝ, ℝ)) ∞ |
| 32 | (adaptedInverseCoordinates g₀) ({0}ᶜ : Set StandardCapSpace) := by |
| 33 | have hT : ContMDiff ((𝓡 2).prod 𝓘(ℝ, ℝ)) ((𝓡 2).prod 𝓘(ℝ, ℝ)) ∞ |
| 34 | (fun z : StandardCylinderSpace => (cylindricalBoundaryInverse g₀ z.1, z.2)) := |
| 35 | ((cylindricalBoundaryInverse_contMDiff g₀).comp contMDiff_fst).prodMk contMDiff_snd |
| 36 | exact hT.comp_contMDiffOn (radialInverseCoordinates_contMDiffOn g₀) |
| 37 | |
| 38 | theorem adaptedPolarPoint_ne_zero (g₀ : StandardInitialMetric) |
| 39 | (z : StandardCylinderSpace) (hz : 0 < z.2) : adaptedPolarPoint g₀ z ≠ 0 := |
| 40 | radialPolarPoint_ne_zero g₀ _ hz |
| 41 | |
| 42 | theorem adaptedInverseCoordinates_polar (g₀ : StandardInitialMetric) |
| 43 | (z : StandardCylinderSpace) (hz : 0 < z.2) : |
| 44 | adaptedInverseCoordinates g₀ (adaptedPolarPoint g₀ z) = z := by |
| 45 | apply Prod.ext |
| 46 | · change cylindricalBoundaryInverse g₀ (radialDirection (adaptedPolarPoint g₀ z)) = z.1 |
| 47 | rw [adaptedPolarPoint, |
| 48 | radialDirection_polar g₀ (cylindricalBoundaryDirection g₀ z.1, z.2) hz] |
| 49 | exact cylindricalBoundary_left_inverse g₀ z.1 |
| 50 | · exact radialArclength_norm_polar g₀ _ hz.le |
| 51 | |
| 52 | theorem adaptedPolarPoint_inverse (g₀ : StandardInitialMetric) |
| 53 | (x : StandardCapSpace) (hx : x ≠ 0) : |
| 54 | adaptedPolarPoint g₀ (adaptedInverseCoordinates g₀ x) = x := by |
| 55 | change radialPolarPoint g₀ (cylindricalBoundaryDirection g₀ |
| 56 | (cylindricalBoundaryInverse g₀ (radialDirection x)), radialArclength g₀ ‖x‖) = x |
| 57 | rw [cylindricalBoundary_right_inverse g₀ (radialDirection x)] |
| 58 | exact radialPolarPoint_inverse g₀ x hx |
| 59 | |
| 60 | noncomputable def adaptedPolarChart (g₀ : StandardInitialMetric) : |
| 61 | OpenPartialHomeomorph StandardCylinderSpace StandardCapSpace where |
| 62 | toFun := adaptedPolarPoint g₀ |
| 63 | invFun := adaptedInverseCoordinates g₀ |
| 64 | source := Set.univ ×ˢ Set.Ioi (0 : ℝ) |
| 65 | target := {0}ᶜ |
| 66 | map_source' z hz := by simpa using adaptedPolarPoint_ne_zero g₀ z hz.2 |
| 67 | map_target' x hx := ⟨Set.mem_univ _, radialArclength_pos g₀ |
| 68 | (norm_pos_iff.mpr (by simpa using hx))⟩ |
| 69 | left_inv' z hz := adaptedInverseCoordinates_polar g₀ z hz.2 |
| 70 | right_inv' x hx := adaptedPolarPoint_inverse g₀ x (by simpa using hx) |
| 71 | open_source := isOpen_univ.prod isOpen_Ioi |
| 72 | open_target := isOpen_compl_singleton |
| 73 | continuousOn_toFun := (adaptedPolarPoint_contMDiff g₀).continuous.continuousOn |
| 74 | continuousOn_invFun := (adaptedInverseCoordinates_contMDiffOn g₀).continuousOn |
| 75 | |
| 76 | noncomputable def adaptedClippedCollapse (g₀ : StandardInitialMetric) |
| 77 | (A : ℝ) (z : StandardCylinderSpace) : StandardCapSpace := |
| 78 | clippedRadialCollapse g₀ A (cylindricalBoundaryDirection g₀ z.1, z.2) |
| 79 | |
| 80 | theorem adaptedClippedCollapse_continuous (g₀ : StandardInitialMetric) (A : ℝ) : |
| 81 | Continuous (adaptedClippedCollapse g₀ A) := |
| 82 | (clippedRadialCollapse_continuous g₀ A).comp |
| 83 | (((cylindricalBoundaryDirection_contMDiff g₀).continuous.comp continuous_fst).prodMk |
| 84 | continuous_snd) |
| 85 | |
| 86 | theorem adaptedClippedCollapse_contMDiffOn (g₀ : StandardInitialMetric) (A : ℝ) : |
| 87 | ContMDiffOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ |
| 88 | (adaptedClippedCollapse g₀ A) {z | z.2 < A} := |
| 89 | (clippedRadialCollapse_contMDiffOn g₀ A).comp |
| 90 | ((((cylindricalBoundaryDirection_contMDiff g₀).comp contMDiff_fst).prodMk |
| 91 | contMDiff_snd).contMDiffOn) (fun _ hz => hz) |
| 92 | |
| 93 | theorem adaptedClippedCollapse_tail (g₀ : StandardInitialMetric) (A : ℝ) |
| 94 | (z : StandardCylinderSpace) (hz : A ≤ z.2) : adaptedClippedCollapse g₀ A z = 0 := |
| 95 | clippedRadialCollapse_of_le g₀ A _ hz |
| 96 | |
| 97 | theorem adaptedClippedCollapse_arclength (g₀ : StandardInitialMetric) (A : ℝ) |
| 98 | (z : StandardCylinderSpace) : |
| 99 | radialArclength g₀ ‖adaptedClippedCollapse g₀ A z‖ = max (A - z.2) 0 := |
| 100 | radialArclength_norm_collapse g₀ A _ |
| 101 | |
| 102 | theorem adaptedClippedCollapse_end (g₀ : StandardInitialMetric) |
| 103 | (z : StandardCylinderSpace) (hz : z.2 ≤ 4) : |
| 104 | adaptedClippedCollapse g₀ (g₀.cylindrical_end.radius + 4) z = |
| 105 | g₀.cylindrical_end.coordinate (z.1, 4 - z.2) := by |
| 106 | unfold adaptedClippedCollapse |
| 107 | rw [clippedRadialCollapse_of_lt g₀ _ _ |
| 108 | (by linarith [g₀.cylindrical_end.radius_pos]), |
| 109 | cylindrical_coordinate_radial g₀ (z.1, 4 - z.2) (sub_nonneg.mpr hz)] |
| 110 | change radialEuclideanRadius g₀ (g₀.cylindrical_end.radius + 4 - z.2) • |
| 111 | (cylindricalBoundaryDirection g₀ z.1).1 = |
| 112 | radialEuclideanRadius g₀ (g₀.cylindrical_end.radius + (4 - z.2)) • |
| 113 | (cylindricalBoundaryDirection g₀ z.1).1 |
| 114 | rw [add_sub_assoc] |
| 115 | |
| 116 | end PoincareMT.MetricSurgery |