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.Riemannian.Coordinates.Exponential.JetBounds.PrecompactDifferential |
| 2 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.JetBounds.PrecompactGauss |
| 3 | |
| 4 | /-! |
| 5 | # Actual terminal normal charts for source estimates |
| 6 | |
| 7 | MT Theorem 5.11 and Proposition 5.14, pp. 89-91. This interface retains |
| 8 | only actual static normal-chart geometry. The included ordinary source |
| 9 | and its identification with a generalized cylinder remain upstream. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set MeasureTheory |
| 16 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 25 | |
| 26 | /-- Literal static geometry of the source's terminal normal chart. -/ |
| 27 | structure TerminalSourceChart (g : RiemannianMetric 3 M) (R : ℝ) where |
| 28 | chart : PartialDiffeomorph (𝓡 3) (𝓡 3) E M ∞ |
| 29 | centre : M |
| 30 | source : chart.source = Metric.ball 0 R |
| 31 | target : chart.target = g.ball centre R |
| 32 | zero : chart 0 = centre |
| 33 | normalized : ∀ v w, g.pullbackCoefficients chart 0 v w = inner ℝ v w |
| 34 | radial : ∀ v ∈ Metric.ball 0 R, |
| 35 | g.IsGeodesicOn (fun t : ℝ => chart (t • v)) {t | t • v ∈ Metric.ball 0 R} |
| 36 | speed : ∀ v ∈ Metric.ball 0 R, ∀ t ∈ Icc (0 : ℝ) 1, |
| 37 | g.tangentNorm (chart (t • v)) |
| 38 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) (fun s : ℝ => chart (s • v)) t 1) = ‖v‖ |
| 39 | distance : ∀ v ∈ Metric.ball 0 R, g.edist centre (chart v) = ENNReal.ofReal ‖v‖ |
| 40 | |
| 41 | namespace TerminalSourceChart |
| 42 | |
| 43 | variable {g : RiemannianMetric 3 M} {R : ℝ} (C : TerminalSourceChart g R) |
| 44 | |
| 45 | theorem smooth : ContMDiffOn (𝓡 3) (𝓡 3) ∞ C.chart (Metric.ball 0 R) := by |
| 46 | simpa only [C.source] using C.chart.contMDiffOn |
| 47 | |
| 48 | theorem invertible {x : E} (hx : x ∈ Metric.ball 0 R) : |
| 49 | (mfderiv (𝓡 3) (𝓡 3) C.chart x).IsInvertible := by |
| 50 | exact ⟨(C.chart.isLocalDiffeomorphAt (𝓡 3) (𝓡 3) ∞ |
| 51 | (C.source.symm ▸ hx)).mfderivToContinuousLinearEquiv (by simp), rfl⟩ |
| 52 | |
| 53 | theorem gauss {x : E} (hx : x ∈ Metric.ball 0 R) (w : E) : |
| 54 | g.pullbackCoefficients C.chart x x w = inner ℝ x w := |
| 55 | CoordinateExponential.gauss_identity_of_radial_family g C.smooth C.radial C.speed x hx w |
| 56 | |
| 57 | /-- Raw terminal curvature gives the fixed small-ball quadratic bounds. -/ |
| 58 | theorem terminal_bounds (D : LeviCivitaData g) {H ρ : ℝ} |
| 59 | (hρR : 2 * ρ < R) |
| 60 | (hsmall : ∀ s : ℝ, |s| ≤ 2 * ρ → |
| 61 | (H * s ^ 2) * Real.exp (max 1 (H * s ^ 2)) ≤ 3) |
| 62 | (hcurv : ∀ y ∈ C.chart '' Metric.ball 0 R, D.curvatureTensorNorm y ≤ H) |
| 63 | {x : E} (hx : x ∈ Metric.closedBall 0 (2 * ρ)) (v : E) : |
| 64 | (1 / 4 : ℝ) * ‖v‖ ^ 2 ≤ g.pullbackCoefficients C.chart x v v ∧ |
| 65 | g.pullbackCoefficients C.chart x v v ≤ (9 / 4 : ℝ) * ‖v‖ ^ 2 := by |
| 66 | have hradial (w : E) (hw : w ∈ Metric.ball 0 R) : |
| 67 | g.IsGeodesicOn (fun t : ℝ => C.chart (t • w)) |
| 68 | {t | t • w ∈ Metric.ball 0 R} ∧ |
| 69 | ∀ t ∈ Icc (0 : ℝ) 1, |
| 70 | g.tangentNorm (C.chart (t • w)) |
| 71 | (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) (fun s : ℝ => C.chart (s • w)) t 1) = ‖w‖ ∧ |
| 72 | g.edist C.centre (C.chart (t • w)) ≤ ENNReal.ofReal ‖w‖ * ENNReal.ofReal t := by |
| 73 | refine ⟨C.radial w hw, fun t ht => ⟨C.speed w hw t ht, ?_⟩⟩ |
| 74 | have htw : t • w ∈ Metric.ball 0 R := by |
| 75 | rw [Metric.mem_ball, dist_zero_right, norm_smul, Real.norm_of_nonneg ht.1] |
| 76 | exact (mul_le_mul_of_nonneg_right ht.2 (norm_nonneg w)).trans_lt |
| 77 | (by simpa only [one_mul, Metric.mem_ball, dist_zero_right] using hw) |
| 78 | rw [C.distance _ htw, norm_smul, Real.norm_of_nonneg ht.1, |
| 79 | ENNReal.ofReal_mul ht.1, mul_comm] |
| 80 | have hball : ∀ y ∈ g.ball C.centre R, D.curvatureTensorNorm y ≤ H := by |
| 81 | intro y hy |
| 82 | have hyt : y ∈ C.chart.target := C.target.symm ▸ hy |
| 83 | apply hcurv y |
| 84 | exact ⟨C.chart.symm y, C.source ▸ C.chart.map_target hyt, C.chart.right_inv hyt⟩ |
| 85 | exact ((g.radial_exponential_uniform_bounds D hρR hsmall C.smooth C.normalized |
| 86 | hradial hball x hx).2 v).2 |
| 87 | |
| 88 | end TerminalSourceChart |
| 89 | |
| 90 | end PoincareMT.M47 |