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.StandardCap.Existence.Geometry.Basic.CompleteDerivativeBounds |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.ExistenceData |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Regularity |
| 4 | |
| 5 | /-! |
| 6 | # Uniform derivatives for every partial standard-cap flow |
| 7 | |
| 8 | Initial derivative bounds and a curvature bound through any finite horizon |
| 9 | give uniform bounds of every covariant order, including time zero. The |
| 10 | estimate on shorter closed slabs has one constant before their endpoints |
| 11 | are chosen. This is the continuation preparation in Morgan-Tian Theorem |
| 12 | 12.5, p. 297; see the reviewed maximal-continuation-restart derivation. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | namespace PoincareMT.M34 |
| 21 | |
| 22 | /-- A finite initial derivative range has one common global bound |
| 23 | (Lemma 12.3 and Theorem 12.5, pp. 294-297). -/ |
| 24 | theorem standardInitial_derivative_bounds_upto {g0 : StandardInitialMetric} |
| 25 | (E0 : StandardCapEstimate g0) (k : ℕ) : |
| 26 | ∃ C : ℝ, 0 ≤ C ∧ ∀ j ≤ k, ∀ x : StandardCapSpace, |
| 27 | g0.connection.curvatureDerivativeNorm j x ≤ C := by |
| 28 | induction k with |
| 29 | | zero => |
| 30 | obtain ⟨C, hC, hb⟩ := E0.curvature_derivative_bounds 0 |
| 31 | refine ⟨C, hC, fun j hj x => ?_⟩ |
| 32 | have : j = 0 := by omega |
| 33 | subst j |
| 34 | exact hb x |
| 35 | | succ k ih => |
| 36 | obtain ⟨C, hC, hb⟩ := ih |
| 37 | obtain ⟨A, _hA, ha⟩ := E0.curvature_derivative_bounds (k + 1) |
| 38 | refine ⟨max C A, hC.trans (le_max_left _ _), fun j hj x => ?_⟩ |
| 39 | by_cases hjk : j ≤ k |
| 40 | · exact (hb j hjk x).trans (le_max_left _ _) |
| 41 | · have : j = k + 1 := by omega |
| 42 | subst j |
| 43 | exact (ha x).trans (le_max_right _ _) |
| 44 | |
| 45 | /-- Every bounded-curvature finite horizon has global bounds for every |
| 46 | covariant derivative, including zero and uniform up to an excluded |
| 47 | terminal time (Theorem 12.5, p. 297). -/ |
| 48 | theorem partialFlow_curvatureDerivative_bound (P : RicciFlowCurvatureTheory.{0}) |
| 49 | {g0 : StandardInitialMetric} (E0 : StandardCapEstimate g0) |
| 50 | (F : PartialStandardCapFlow g0) {S B : ℝ} (hS : 0 < S) |
| 51 | (hSF : S ≤ F.lifetime) (hB : 0 < B) |
| 52 | (hfull : ∀ t ∈ Ico 0 S, ∀ x : StandardCapSpace, |
| 53 | (F.flow.connection t).curvatureTensorNorm x ≤ B) (k : ℕ) : |
| 54 | ∃ C : ℝ, 0 < C ∧ ∀ t ∈ Ico 0 S, ∀ x : StandardCapSpace, |
| 55 | (F.flow.connection t).curvatureDerivativeNorm k x ≤ C := by |
| 56 | obtain ⟨A, _hA, hA⟩ := standardInitial_derivative_bounds_upto E0 k |
| 57 | obtain ⟨C, hC, hest⟩ := complete_initial_derivative_bound P 3 k |
| 58 | (hB.trans_le (le_max_left B A)) hS |
| 59 | have hpair : (⟨F.flow.metric 0, F.flow.connection 0⟩ : |
| 60 | Σ g : RiemannianMetric 3 StandardCapSpace, LeviCivitaData g) = |
| 61 | ⟨g0.metric, g0.connection⟩ := |
| 62 | Sigma.mk.inj_iff.mpr ⟨F.initial_metric, F.initial_connection⟩ |
| 63 | have hinit (j : ℕ) (hj : j ≤ k) (x : StandardCapSpace) : |
| 64 | (F.flow.connection 0).curvatureDerivativeNorm j x ≤ A := by |
| 65 | have heq := congrArg (fun p : Σ g : RiemannianMetric 3 StandardCapSpace, |
| 66 | LeviCivitaData g => p.2.curvatureDerivativeNorm j x) hpair |
| 67 | exact heq.le.trans (hA j hj x) |
| 68 | refine ⟨C, hC, fun t ht x => ?_⟩ |
| 69 | let T := (t + S) / 2 |
| 70 | have hT : 0 < T := by dsimp [T]; linarith [ht.1] |
| 71 | have htT : t ≤ T := by dsimp [T]; linarith [ht.2] |
| 72 | have hTS : T < S := by dsimp [T]; linarith [ht.2] |
| 73 | have hsub : Icc 0 T ⊆ Ico 0 F.lifetime := |
| 74 | fun _ hs => ⟨hs.1, hs.2.trans_lt (hTS.trans_le hSF)⟩ |
| 75 | have hne : (Icc 0 T).Nontrivial := |
| 76 | ⟨0, ⟨le_rfl, hT.le⟩, T, ⟨hT.le, le_rfl⟩, ne_of_lt hT⟩ |
| 77 | let G := Poincare.Geometry.RicciFlow.Harnack.restrictFlow F.flow hsub ordConnected_Icc hne |
| 78 | apply hest StandardCapSpace T hT hTS.le G |
| 79 | · change MetricComplete (F.flow.metric 0) |
| 80 | rw [F.initial_metric] |
| 81 | exact g0.complete |
| 82 | · exact fun s hs y => (hfull s ⟨hs.1, hs.2.trans_lt hTS⟩ y).trans (le_max_left _ _) |
| 83 | · exact fun j hj y => (hinit j hj y).trans (le_max_right _ _) |
| 84 | · exact ⟨ht.1, htT⟩ |
| 85 | |
| 86 | end PoincareMT.M34 |