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.Construction.Basic.ApproximationEllipticity |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Energy.ClosedIntervalGronwall |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.SpatialEvolution |
| 4 | |
| 5 | /-! |
| 6 | # Uniform spatial jets through the initial endpoint |
| 7 | |
| 8 | Uniform covariant curvature bounds give an affine evolution inequality |
| 9 | for the next spatial metric jet. Compact initial bounds and the closed |
| 10 | interval Gronwall estimate propagate that bound simultaneously over all |
| 11 | compact approximants. This supplies the initial-endpoint estimates in |
| 12 | Morgan-Tian Theorem 12.5, p. 297; see fixed-chart-endpoint.md. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | namespace PoincareMT.M34.CompactCapApproximation |
| 21 | |
| 22 | variable {g0 : StandardInitialMetric} (A : CompactCapApproximation g0) |
| 23 | |
| 24 | /-- Restrict to the open time interval while retaining the literal total |
| 25 | metric and connection families (Theorem 12.5, p. 297). -/ |
| 26 | noncomputable def interiorFlow (k : ℕ) : RicciFlow 3 (CompactCapDouble g0 k) (Ioo 0 A.time) := by |
| 27 | have hne : (Ioo 0 A.time).Nontrivial := by |
| 28 | refine ⟨A.time / 3, ⟨?_, ?_⟩, 2 * A.time / 3, ⟨?_, ?_⟩, ?_⟩ <;> |
| 29 | linarith [A.time_pos] |
| 30 | exact Poincare.Geometry.RicciFlow.Harnack.restrictFlow (A.flow k) |
| 31 | Ioo_subset_Icc_self ordConnected_Ioo hne |
| 32 | |
| 33 | /-- Closed-interval Gronwall applies to each actual spatial jet |
| 34 | (Theorem 12.5, p. 297). -/ |
| 35 | theorem spatialJet_norm_le_exp (k m : ℕ) {x : StandardCapSpace} |
| 36 | (hx : x ∈ compactCapSource g0 k) {C : ℝ} (hC : 0 ≤ C) |
| 37 | (hb : ∀ s ∈ Ioo 0 A.time, |
| 38 | ‖deriv (fun u => iteratedFDeriv ℝ m (A.coefficients k u) x) s‖ ≤ |
| 39 | C * (1 + ‖iteratedFDeriv ℝ m (A.coefficients k s) x‖)) |
| 40 | {t : ℝ} (ht : t ∈ Icc 0 A.time) : |
| 41 | ‖iteratedFDeriv ℝ m (A.coefficients k t) x‖ ≤ |
| 42 | max ‖iteratedFDeriv ℝ m (A.coefficients k 0) x‖ 1 * Real.exp (2 * C * t) := by |
| 43 | apply norm_le_exp_of_interior_affine_deriv_bound |
| 44 | (f := fun u : ℝ => iteratedFDeriv ℝ m (A.coefficients k u) x) |
| 45 | (T := A.time) (C := C) |
| 46 | · exact A.continuousOn_spatialJet_time k m (x := x) hx |
| 47 | · intro s hs |
| 48 | exact A.differentiableAt_spatialJet_time k m (x := x) hx (t := s) hs |
| 49 | · exact hC |
| 50 | · exact hb |
| 51 | · exact ht |
| 52 | |
| 53 | set_option backward.isDefEq.respectTransparency false in |
| 54 | /-- Every finite collection of spatial metric jets has one bound before |
| 55 | index, included time, and point are selected (Theorem 12.5, p. 297). -/ |
| 56 | theorem exists_compact_spatialJet_bounds (P : RicciFlowCurvatureTheory.{0}) |
| 57 | {K : Set StandardCapSpace} (hK : IsCompact K) (m : ℕ) : |
| 58 | ∃ B : ℝ, 1 ≤ B ∧ ∀ j ≤ m, ∀ k t, t ∈ Icc 0 A.time → |
| 59 | ∀ x ∈ K, x ∈ compactCapSource g0 k → |
| 60 | ‖iteratedFDeriv ℝ j (A.coefficients k t) x‖ ≤ B := by |
| 61 | obtain ⟨a, b, ha, hb, hcoeff⟩ := A.exists_compact_ellipticity P hK |
| 62 | induction m with |
| 63 | | zero => |
| 64 | refine ⟨max b 1, le_max_right _ _, ?_⟩ |
| 65 | intro j hj k t ht x hx hsource |
| 66 | have hjzero : j = 0 := by omega |
| 67 | subst j |
| 68 | rw [norm_iteratedFDeriv_zero] |
| 69 | exact (A.norm_coefficients_le k t x hb |
| 70 | (fun v => (hcoeff k t ht x hx hsource v).2)).trans (le_max_left _ _) |
| 71 | | succ q ih => |
| 72 | obtain ⟨B, hB, hlower⟩ := ih |
| 73 | obtain ⟨C, hC, hevol⟩ := SpacetimeBounds.exists_affine_spatialJet_evolution_bound |
| 74 | 3 q A.curvature_bound (fun d => (A.bound_pos d).le) ha hb B hB |
| 75 | have hinit : ∃ Z : ℝ, ∀ x ∈ K, |
| 76 | ‖iteratedFDeriv ℝ (q + 1) g0.metric.euclideanCoefficients x‖ ≤ Z := |
| 77 | hK.exists_bound_of_continuousOn |
| 78 | (f := iteratedFDeriv ℝ (q + 1) g0.metric.euclideanCoefficients) |
| 79 | (fun x _ => ((g0.metric.contDiffAt_euclideanCoefficients x).continuousAt_iteratedFDeriv |
| 80 | (by exact_mod_cast le_top)).continuousWithinAt) |
| 81 | obtain ⟨Z, hZ⟩ := hinit |
| 82 | let E := max Z 1 * Real.exp (2 * C * A.time) |
| 83 | refine ⟨max B E, hB.trans (le_max_left _ _), ?_⟩ |
| 84 | intro j hj k t ht x hx hsource |
| 85 | rcases Nat.eq_or_lt_of_le hj with rfl | hj |
| 86 | · have hbound (s : ℝ) (hs : s ∈ Ioo 0 A.time) : |
| 87 | ‖deriv (fun u => iteratedFDeriv ℝ (q + 1) (A.coefficients k u) x) s‖ ≤ |
| 88 | C * (1 + ‖iteratedFDeriv ℝ (q + 1) (A.coefficients k s) x‖) := by |
| 89 | exact hevol (A.interiorFlow k) isOpen_Ioo (compactCapSource_isOpen g0 k) |
| 90 | (compactCapChart_contMDiffOn g0 k) |
| 91 | (fun _ hy => compactCapChart_mfderiv_isInvertible g0 k hy) hs hsource |
| 92 | (fun v => (hcoeff k s (Ioo_subset_Icc_self hs) x hx hsource v).1) |
| 93 | (fun v => (hcoeff k s (Ioo_subset_Icc_self hs) x hx hsource v).2) |
| 94 | (fun d _ => A.curvature_le d k s (Ioo_subset_Icc_self hs) _) |
| 95 | (fun d hd hdq => |
| 96 | (hlower d hdq k s (Ioo_subset_Icc_self hs) x hx hsource).trans |
| 97 | (le_self_pow₀ hB (by omega))) |
| 98 | have hgr := A.spatialJet_norm_le_exp k (q + 1) hsource hC hbound ht |
| 99 | rw [A.spatialJet_zero k (q + 1) hsource] at hgr |
| 100 | apply hgr.trans ((le_trans ?_ (le_max_right B E))) |
| 101 | apply mul_le_mul (max_le_max (hZ x hx) le_rfl) |
| 102 | (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 (by positivity))) |
| 103 | (Real.exp_pos _).le (by positivity) |
| 104 | · exact (hlower j (by omega) k t ht x hx hsource).trans (le_max_left _ _) |
| 105 | |
| 106 | end PoincareMT.M34.CompactCapApproximation |