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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.Geometry |
| 3 | |
| 4 | /-! |
| 5 | # Finite jet consequences of a round-component comparison |
| 6 | |
| 7 | The frozen round-component comparison is a squared finite covariant-jet |
| 8 | bound. This file exposes each individual nonnegative jet term, and hence |
| 9 | its strict norm bound, without assuming that a chosen model chart varies |
| 10 | continuously with the model point. The curvature/scalar transfer from |
| 11 | these finite jets is a separate producer. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle BigOperators |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- Each retained nonnegative summand of the frozen squared jet error is |
| 24 | bounded by its total comparison error (Definition 2.16 and Definition |
| 25 | 9.76; section 10.3.1, p. 247). -/ |
| 26 | theorem singularMetricJetErrorSquared_term_le |
| 27 | {X : Type u} [TopologicalSpace X] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] |
| 29 | [IsManifold (𝓡 3) ∞ X] |
| 30 | (g₀ : RiemannianMetric 3 X) (D₀ : LeviCivitaData g₀) |
| 31 | (B : CovariantTensorEvaluation 3 X 2) (k j : ℕ) (x : X) |
| 32 | (hj : j ≤ k) {E : ℝ} |
| 33 | (hE : singularMetricJetErrorSquared g₀ D₀ B k x ≤ E) : |
| 34 | (g₀.tensorNorm (D₀.iteratedCovariantTensorDerivative |
| 35 | (fun y v ↦ B y v - g₀.inner y (v 0) (v 1)) j) x) ^ 2 ≤ E := by |
| 36 | unfold singularMetricJetErrorSquared at hE |
| 37 | have hE' : ∑ i ∈ Finset.range k.succ, |
| 38 | (g₀.tensorNorm (D₀.iteratedCovariantTensorDerivative |
| 39 | (fun y v ↦ B y v - g₀.inner y (v 0) (v 1)) i) x) ^ 2 ≤ E := by |
| 40 | simpa only [Nat.succ_eq_add_one] using hE |
| 41 | have hsingle := Finset.single_le_sum |
| 42 | (s := Finset.range k.succ) |
| 43 | (f := fun i ↦ (g₀.tensorNorm (D₀.iteratedCovariantTensorDerivative |
| 44 | (fun y v ↦ B y v - g₀.inner y (v 0) (v 1)) i) x) ^ 2) |
| 45 | (fun i _ ↦ sq_nonneg _) (Finset.mem_range.mpr (Nat.lt_succ_iff.mpr hj)) |
| 46 | exact hsingle.trans hE' |
| 47 | |
| 48 | /-- A strict squared comparison gives a strict bound on every retained |
| 49 | jet norm (Definition 9.76; task derivation 16). -/ |
| 50 | theorem singularMetricJetNorm_lt_of_error_lt |
| 51 | {X : Type u} [TopologicalSpace X] |
| 52 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] |
| 53 | [IsManifold (𝓡 3) ∞ X] |
| 54 | (g₀ : RiemannianMetric 3 X) (D₀ : LeviCivitaData g₀) |
| 55 | (B : CovariantTensorEvaluation 3 X 2) (k j : ℕ) (x : X) |
| 56 | (hj : j ≤ k) {epsilon E : ℝ} (hepsilon : 0 < epsilon) |
| 57 | (hE : singularMetricJetErrorSquared g₀ D₀ B k x ≤ E) |
| 58 | (hEepsilon : E < epsilon ^ 2) : |
| 59 | g₀.tensorNorm (D₀.iteratedCovariantTensorDerivative |
| 60 | (fun y v ↦ B y v - g₀.inner y (v 0) (v 1)) j) x < epsilon := by |
| 61 | have hsq := singularMetricJetErrorSquared_term_le g₀ D₀ B k j x hj hE |
| 62 | have hlt : (g₀.tensorNorm (D₀.iteratedCovariantTensorDerivative |
| 63 | (fun y v ↦ B y v - g₀.inner y (v 0) (v 1)) j) x) ^ 2 < epsilon ^ 2 := |
| 64 | hsq.trans_lt hEepsilon |
| 65 | have hnorm : 0 ≤ g₀.tensorNorm (D₀.iteratedCovariantTensorDerivative |
| 66 | (fun y v ↦ B y v - g₀.inner y (v 0) (v 1)) j) x := by |
| 67 | exact Real.sqrt_nonneg _ |
| 68 | nlinarith |
| 69 | |
| 70 | end PoincareMT |