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.Harnack.Finite |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Path.Comparison |
| 3 | |
| 4 | /-! The exact frozen M06 field assembly from the finite diagonal producer. -/ |
| 5 | |
| 6 | set_option autoImplicit false |
| 7 | |
| 8 | open scoped Manifold ContDiff Bundle BigOperators |
| 9 | open Set |
| 10 | |
| 11 | universe u |
| 12 | |
| 13 | namespace PoincareMT |
| 14 | |
| 15 | open Poincare.RicciFlow.Harnack |
| 16 | |
| 17 | theorem differentialHarnackAncientTheory_of_hamilton_diagonal |
| 18 | (hM04 : RicciFlowCurvatureTheory.{u}) |
| 19 | (hdiag : |
| 20 | ∀ (n : ℕ) (M : Type u) [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] |
| 23 | [T2Space M] [T3Space M] [SecondCountableTopology M], |
| 24 | ∀ T₀ T₁ : ℝ, T₀ < T₁ → |
| 25 | ∀ F : RicciFlow n M (Ioo T₀ T₁), |
| 26 | (∀ t ∈ Ioo T₀ T₁, MetricComplete (F.metric t)) → |
| 27 | (∀ t ∈ Ioo T₀ T₁, ∀ x : M, |
| 28 | LeviCivitaData.NonnegativeCurvatureOperator (F.connection t) x) → |
| 29 | (∀ t ∈ Ioo T₀ T₁, ∃ K : ℝ, 0 ≤ K ∧ |
| 30 | ∀ x : M, LeviCivitaData.CurvatureOperatorBound |
| 31 | (F.connection t) K x) → |
| 32 | ∀ t ∈ Ioo T₀ T₁, ∀ x : M, |
| 33 | ∀ v : TangentSpace (𝓡 n) x, ∀ i, |
| 34 | 0 ≤ hamiltonM (F.connection t) (t - T₀) x |
| 35 | ((F.metric t).orthonormalBasis x i) |
| 36 | ((F.metric t).orthonormalBasis x i) + |
| 37 | 2 * hamiltonP (F.connection t) x v |
| 38 | ((F.metric t).orthonormalBasis x i) |
| 39 | ((F.metric t).orthonormalBasis x i) + |
| 40 | (F.connection t).curvatureTensor x v |
| 41 | ((F.metric t).orthonormalBasis x i) v |
| 42 | ((F.metric t).orthonormalBasis x i)) : |
| 43 | HarnackAncientTheory.{u} := by |
| 44 | apply Poincare.Geometry.RicciFlow.Harnack.assemble_harnack_from_finite_differential |
| 45 | hM04 |
| 46 | intro n M _ _ _ _ _ _ T₀ T₁ hT F hcomplete hcurv hbound |
| 47 | apply finite_differential_of_hamilton_diagonal hM04 T₀ T₁ F |
| 48 | intro t ht x v |
| 49 | exact hdiag n M T₀ T₁ hT F hcomplete hcurv hbound t ht x v |
| 50 | |
| 51 | /- The final frozen theory can consume the geometric block witness directly. |
| 52 | This is the exact boundary for the noncompact Hamilton producer. -/ |
| 53 | theorem differentialHarnackAncientTheory_of_hamilton_block |
| 54 | (hM04 : RicciFlowCurvatureTheory.{u}) |
| 55 | (hblock : |
| 56 | ∀ (n : ℕ) (M : Type u) [TopologicalSpace M] |
| 57 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 58 | [IsManifold (𝓡 n) ∞ M] |
| 59 | [T2Space M] [T3Space M] [SecondCountableTopology M], |
| 60 | ∀ T₀ T₁ : ℝ, T₀ < T₁ → |
| 61 | ∀ F : RicciFlow n M (Ioo T₀ T₁), |
| 62 | (∀ t ∈ Ioo T₀ T₁, MetricComplete (F.metric t)) → |
| 63 | (∀ t ∈ Ioo T₀ T₁, ∀ x : M, |
| 64 | LeviCivitaData.NonnegativeCurvatureOperator (F.connection t) x) → |
| 65 | (∀ t ∈ Ioo T₀ T₁, ∃ K : ℝ, 0 ≤ K ∧ |
| 66 | ∀ x : M, LeviCivitaData.CurvatureOperatorBound |
| 67 | (F.connection t) K x) → |
| 68 | ∀ t ∈ Ioo T₀ T₁, ∀ x : M, |
| 69 | HamiltonBlockPos F t x (t - T₀)) : |
| 70 | HarnackAncientTheory.{u} := by |
| 71 | apply Poincare.Geometry.RicciFlow.Harnack.assemble_harnack_from_finite_differential |
| 72 | hM04 |
| 73 | intro n M _ _ _ _ _ _ T₀ T₁ hT F hcomplete hcurv hbound |
| 74 | apply finite_differential_of_hamilton_block hM04 T₀ T₁ F |
| 75 | intro t ht x |
| 76 | exact hblock n M T₀ T₁ hT F hcomplete hcurv hbound t ht x |
| 77 | |
| 78 | end PoincareMT |