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.Compactness.Coordinates.SpacetimeBounds.SpatialBounds |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.Ricci.BootstrapAdapter |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.Bootstrap.Evolution |
| 4 | |
| 5 | /-! # All spacetime metric jets in fixed normal charts |
| 6 | |
| 7 | The Ricci equation is a smooth function of the spatial two-jet on the elliptic |
| 8 | domain. Compact spatial jet bounds therefore give all joint time-space bounds. |
| 9 | Reference: Morgan--Tian, Proposition 5.14, pp. 90--91. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | set_option maxSynthPendingDepth 12 |
| 15 | set_option synthInstance.maxHeartbeats 100000 |
| 16 | set_option maxHeartbeats 1000000 |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology Bundle ENNReal |
| 20 | |
| 21 | namespace PoincareMT.PointedRicciFlowCompactnessHypotheses |
| 22 | |
| 23 | open SpacetimeBounds SpacetimeBounds.Bootstrap |
| 24 | |
| 25 | theorem eventually_normalChartCover_spacetime_jet_bound_of_local_derivative_estimates |
| 26 | {n : ℕ} {T' T : ℝ} (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 27 | (hShi : LocalCurvatureDerivativeEstimates.{0}) |
| 28 | {I : Set ℝ} (hIcompact : IsCompact I) (hI : I ⊆ Ioo T' T) |
| 29 | {A R ρ a b : ℝ} {N : ℕ} (hA : 0 < A) (hρ : 0 < ρ) |
| 30 | (hρR : 2 * ρ < R) (ha : 0 < a) (hb : 0 ≤ b) (m : ℕ) : |
| 31 | ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k in atTop, |
| 32 | let C := H.sequence.carrier k |
| 33 | let F := H.sequence.flow k |
| 34 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 35 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 36 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 37 | ∀ cover : NormalChartCover F.metricAt F.base T' T A R ρ a b N, |
| 38 | ∀ i, ∀ t ∈ I, ∀ x ∈ Metric.closedBall 0 ρ, |
| 39 | ‖iteratedFDeriv ℝ m (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 40 | (F.metricAt z.1).pullbackCoefficients (cover.chart i) z.2) (t, x)‖ ≤ B := by |
| 41 | classical |
| 42 | let : ∀ k, TopologicalSpace (H.sequence.carrier k).carrier := |
| 43 | fun k => (H.sequence.carrier k).topologicalSpace |
| 44 | let : ∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (H.sequence.carrier k).carrier := |
| 45 | fun k => (H.sequence.carrier k).chartedSpace |
| 46 | let : ∀ k, IsManifold (𝓡 n) ∞ (H.sequence.carrier k).carrier := |
| 47 | fun k => (H.sequence.carrier k).isManifold |
| 48 | let Cover := fun k => NormalChartCover (H.sequence.flow k).metricAt |
| 49 | (H.sequence.flow k).base T' T A R ρ a b N |
| 50 | let α := (k : ℕ) × (Cover k × Fin (N + 1)) |
| 51 | let L : Filter α := Filter.comap Sigma.fst atTop |
| 52 | let E := EuclideanSpace ℝ (Fin n) |
| 53 | let f : α → ℝ × E → MetricCoefficient n := fun w z => |
| 54 | ((H.sequence.flow w.1).metricAt z.1).pullbackCoefficients (w.2.1.chart w.2.2) z.2 |
| 55 | let S : α → Set (ℝ × E) := fun _ => I ×ˢ Metric.closedBall 0 ρ |
| 56 | have hxR {x : E} (hx : x ∈ Metric.closedBall 0 ρ) : x ∈ Metric.ball 0 R := |
| 57 | Metric.closedBall_subset_ball (by linarith) hx |
| 58 | have he (w : α) : ContMDiffOn (𝓡 n) (𝓡 n) ∞ (w.2.1.chart w.2.2) |
| 59 | (Metric.ball 0 R) := by |
| 60 | simpa only [w.2.1.source w.2.2] using (w.2.1.chart w.2.2).contMDiffOn |
| 61 | have hi (w : α) (x : E) (hx : x ∈ Metric.ball 0 R) : |
| 62 | (mfderiv (𝓡 n) (𝓡 n) (w.2.1.chart w.2.2) x).IsInvertible := |
| 63 | ⟨((w.2.1.chart w.2.2).isLocalDiffeomorphAt (𝓡 n) (𝓡 n) ∞ |
| 64 | ((w.2.1.source w.2.2).symm ▸ hx)).mfderivToContinuousLinearEquiv (by simp), rfl⟩ |
| 65 | have hf (w : α) : ContDiffOn ℝ ∞ (f w) (Ioo T' T ×ˢ Metric.ball 0 R) := |
| 66 | (H.sequence.flow w.1).flow.contDiffOn_pullbackCoefficients |
| 67 | isOpen_Ioo Metric.isOpen_ball (he w) |
| 68 | have hrange (w : α) (z : ℝ × E) (hz : z ∈ Ioo T' T ×ˢ Metric.ball 0 R) : |
| 69 | spatialJet 2 (f w) z ∈ jetRicciFlowDomain n := by |
| 70 | change ((twoJetProjection n (spatialJet 2 (f w) z)).1).IsInvertible |
| 71 | rw [twoJetProjection_spatialJet] |
| 72 | exact ((H.sequence.flow w.1).metricAt z.1).isInvertible_pullbackCoefficients |
| 73 | (hi w z.2 hz.2).injective |
| 74 | have hevol (w : α) (z : ℝ × E) (hz : z ∈ Ioo T' T ×ˢ Metric.ball 0 R) : |
| 75 | deriv (fun t => f w (t, z.2)) z.1 = jetRicciFlowOperator n (spatialJet 2 (f w) z) := by |
| 76 | rw [jetRicciFlowOperator, Function.comp_apply, twoJetProjection_spatialJet] |
| 77 | exact deriv_pullbackCoefficients_eq_ricciFlowOperator (H.sequence.flow w.1).flow |
| 78 | isOpen_Ioo Metric.isOpen_ball (he w) (hi w) hz.1 hz.2 |
| 79 | have hI0 : insert 0 I ⊆ Ioo T' T := insert_subset H.time_bounds hI |
| 80 | obtain ⟨l, hl, hmin⟩ := |
| 81 | (hIcompact.insert 0).exists_isMinOn (insert_nonempty 0 I) continuousOn_id |
| 82 | obtain ⟨r, hr, hmax⟩ := |
| 83 | (hIcompact.insert 0).exists_isMaxOn (insert_nonempty 0 I) continuousOn_id |
| 84 | have h0 : (0 : ℝ) ∈ Icc l r := ⟨hmin (mem_insert 0 I), hmax (mem_insert 0 I)⟩ |
| 85 | have hIJ : I ⊆ Icc l r := fun t ht => |
| 86 | ⟨hmin (mem_insert_of_mem 0 ht), hmax (mem_insert_of_mem 0 ht)⟩ |
| 87 | have hJ : Icc l r ⊆ Ioo T' T := fun t ht => |
| 88 | ⟨(hI0 hl).1.trans_le ht.1, ht.2.trans_lt (hI0 hr).2⟩ |
| 89 | have hall (q : ℕ) : ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ w in L, ∀ z ∈ S w, ∀ j ≤ q, |
| 90 | ‖iteratedFDeriv ℝ j (fun x => f w (z.1, x)) z.2‖ ≤ B := by |
| 91 | obtain ⟨B, hB, hbound⟩ := |
| 92 | H.eventually_normalChartCover_spatial_bounds_on_interval_of_local_derivative_estimates |
| 93 | hShi h0 hJ (N := N) hA hρ hρR ha hb q |
| 94 | refine ⟨B, hB, eventually_comap.mpr ?_⟩ |
| 95 | filter_upwards [hbound] with k hk w hw z hz j hj |
| 96 | subst k |
| 97 | exact hk w.2.1 w.2.2 z.1 (hIJ hz.1) z.2 hz.2 j hj |
| 98 | have hspatial (j : ℕ) : ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ w in L, ∀ z ∈ S w, |
| 99 | ‖iteratedFDeriv ℝ j (fun x => f w (z.1, x)) z.2‖ ≤ B := by |
| 100 | obtain ⟨B, hB, hbound⟩ := hall j |
| 101 | exact ⟨B, hB, hbound.mono (fun w hw z hz => hw z hz j le_rfl)⟩ |
| 102 | have hcompact (j : ℕ) : ∃ K : Set (Jet E (MetricCoefficient n) (2 + j)), |
| 103 | IsCompact K ∧ K ⊆ (baseProjection 2 j) ⁻¹' jetRicciFlowDomain n ∧ |
| 104 | ∀ᶠ w in L, MapsTo (spatialJet (2 + j) (f w)) (S w) K := by |
| 105 | obtain ⟨B, hB, hbound⟩ := hall (2 + j) |
| 106 | obtain ⟨K, hK, hKU, hbox⟩ := exists_compact_elliptic_jet_box n j ha B |
| 107 | refine ⟨K, hK, hKU, hbound.mono ?_⟩ |
| 108 | intro w hw z hz |
| 109 | apply hbox |
| 110 | · exact (pi_norm_le_iff_of_nonneg hB).mpr (fun d => hw z hz d (by omega)) |
| 111 | · intro v |
| 112 | exact (w.2.1.coefficients w.2.2 z.1 (hI hz.1) z.2 |
| 113 | (Metric.closedBall_subset_closedBall (by linarith) hz.2) v).1 |
| 114 | obtain ⟨B, hB, hbound⟩ := eventuallyBounded_spacetime_jets L |
| 115 | (isOpen_jetRicciFlowDomain n) (contDiffOn_jetRicciFlowOperator n) |
| 116 | f (fun _ => Ioo T' T) (fun _ => Metric.ball 0 R) S hf |
| 117 | (fun _ => isOpen_Ioo) (fun _ => Metric.isOpen_ball) |
| 118 | (fun _ _ hz => ⟨hI hz.1, hxR hz.2⟩) hrange hevol hspatial hcompact m |
| 119 | refine ⟨B, hB, ?_⟩ |
| 120 | filter_upwards [eventually_comap.mp hbound] with k hk |
| 121 | dsimp only |
| 122 | intro cover i t ht x hx |
| 123 | exact hk ⟨k, cover, i⟩ rfl (t, x) ⟨ht, hx⟩ |
| 124 | |
| 125 | /-- The supplied curvature theory bounds all spacetime jets in the retained charts. -/ |
| 126 | theorem eventually_normalChartCover_spacetime_jet_bound |
| 127 | {n : ℕ} {T' T : ℝ} (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 128 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 129 | {I : Set ℝ} (hIcompact : IsCompact I) (hI : I ⊆ Ioo T' T) |
| 130 | {A R ρ a b : ℝ} {N : ℕ} (hA : 0 < A) (hρ : 0 < ρ) |
| 131 | (hρR : 2 * ρ < R) (ha : 0 < a) (hb : 0 ≤ b) (m : ℕ) : |
| 132 | ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k in atTop, |
| 133 | let C := H.sequence.carrier k |
| 134 | let F := H.sequence.flow k |
| 135 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 136 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 137 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 138 | ∀ cover : NormalChartCover F.metricAt F.base T' T A R ρ a b N, |
| 139 | ∀ i, ∀ t ∈ I, ∀ x ∈ Metric.closedBall 0 ρ, |
| 140 | ‖iteratedFDeriv ℝ m (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 141 | (F.metricAt z.1).pullbackCoefficients (cover.chart i) z.2) (t, x)‖ ≤ B := |
| 142 | H.eventually_normalChartCover_spacetime_jet_bound_of_local_derivative_estimates |
| 143 | hM04.local_derivative_estimates hIcompact hI hA hρ hρR ha hb m |
| 144 | |
| 145 | end PoincareMT.PointedRicciFlowCompactnessHypotheses |