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.CanonicalInduction.Terminal.Source.TerminalSourceJetsCurvature |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Collar.Coordinates.CoordinateEvolution |
| 3 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.JetBounds.FiniteOrder.Pullback |
| 4 | |
| 5 | /-! # Spatial source jets propagated from the terminal normal chart |
| 6 | |
| 7 | MT Proposition 5.14, pp. 90-91. Reflection applies only to the analytic |
| 8 | jet function. The flow and its equation retain their original clock. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | set_option maxSynthPendingDepth 12 |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 23 | |
| 24 | /-- A terminal norm and an interior affine derivative bound control the |
| 25 | recent closed half-interval using actual within smoothness. -/ |
| 26 | theorem terminalSourceJets_backward_norm_bound |
| 27 | {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 28 | {τ C Z : ℝ} (hτ : 0 < τ) (hC : 0 ≤ C) (hZ : 1 ≤ Z) |
| 29 | (f : ℝ → V) (hf : ContDiffOn ℝ 1 f (Icc (-τ) 0)) (hinit : ‖f 0‖ ≤ Z) |
| 30 | (hrate : ∀ t ∈ Ioo (-(τ / 2)) 0, ‖deriv f t‖ ≤ C * (1 + ‖f t‖)) : |
| 31 | ∀ t ∈ Icc (-(τ / 2)) 0, ‖f t‖ ≤ Z * Real.exp (C * τ) := by |
| 32 | have hh : ContDiffOn ℝ 1 (fun s : ℝ => f (-s)) (Icc 0 (τ / 2)) := by |
| 33 | apply hf.comp contDiffOn_id.neg |
| 34 | intro s hs |
| 35 | change -s ∈ Icc (-τ) 0 |
| 36 | constructor <;> linarith [hs.1, hs.2] |
| 37 | have hrate' : ∀ s ∈ Ioo (0 : ℝ) (τ / 2), |
| 38 | ‖deriv (fun u => f (-u)) s‖ ≤ C * (1 + ‖f (-s)‖) := by |
| 39 | intro s hs |
| 40 | have hmem : -s ∈ Ioo (-τ) 0 := by constructor <;> linarith [hs.1, hs.2] |
| 41 | have hd := (hf.contDiffAt (Icc_mem_nhds hmem.1 hmem.2)).differentiableAt (by norm_num) |
| 42 | have he : HasDerivAt (fun u => f (-u)) (-deriv f (-s)) s := by |
| 43 | simpa [Function.comp_def] using hd.hasDerivAt.scomp s (hasDerivAt_id s).neg |
| 44 | rw [he.deriv, norm_neg] |
| 45 | exact hrate (-s) ⟨by linarith [hs.2], by linarith [hs.1]⟩ |
| 46 | intro t ht |
| 47 | have h := M44.norm_le_exp_of_interior_affine_bound (by positivity : (0 : ℝ) < τ / 2) |
| 48 | hh hC hZ (by simpa using hinit) hrate' (-t) |
| 49 | ⟨by linarith [ht.2], by linarith [ht.1]⟩ |
| 50 | simpa only [neg_neg, sub_zero, show (2 * C) * (τ / 2) = C * τ by ring] using h |
| 51 | |
| 52 | /-- Finite spatial jet bounds are uniform over actual Type-u source |
| 53 | flows, including the terminal time and the full retained spatial buffer. -/ |
| 54 | theorem terminalSourceJets_spatial (P : RicciFlowCurvatureTheory.{u}) |
| 55 | {τ R H ρ : ℝ} (hτ : 0 < τ) (hH : 0 < H) (hρ : 0 < ρ) (hρR : 2 * ρ < R) |
| 56 | (hsmall : ∀ s : ℝ, |s| ≤ 2 * ρ → |
| 57 | (H * s ^ 2) * Real.exp (max 1 (H * s ^ 2)) ≤ 3) (m : ℕ) : |
| 58 | ∃ B : ℝ, 0 ≤ B ∧ ∀ {M : Type u} [TopologicalSpace M] [ChartedSpace E M] |
| 59 | [IsManifold (𝓡 3) ∞ M] [T2Space M] [SecondCountableTopology M], |
| 60 | ∀ (F : RicciFlow 3 M (Icc (-τ) 0)) (C : TerminalSourceChart (F.metric 0) R), |
| 61 | (∀ t ∈ Icc (-τ) 0, ∀ y ∈ C.chart '' Metric.ball 0 R, |
| 62 | (F.connection t).curvatureTensorNorm y ≤ H) → |
| 63 | ∀ t ∈ Icc (-(τ / 2)) 0, ∀ x ∈ Metric.closedBall 0 ρ, ∀ j ≤ m, |
| 64 | ‖iteratedFDeriv ℝ j ((F.metric t).pullbackCoefficients C.chart) x‖ ≤ B := by |
| 65 | classical |
| 66 | let a := terminalSourceLower H τ |
| 67 | let b := terminalSourceUpper H τ |
| 68 | have ha : 0 < a := terminalSourceLower_pos H τ |
| 69 | have hb : 0 ≤ b := (terminalSourceUpper_pos H τ).le |
| 70 | have hsub : Icc (-(τ / 2)) 0 ⊆ Icc (-τ) 0 := by |
| 71 | intro t ht |
| 72 | exact ⟨by linarith [ht.1], ht.2⟩ |
| 73 | have htwo : Metric.closedBall (0 : E) ρ ⊆ Metric.closedBall 0 (2 * ρ) := |
| 74 | Metric.closedBall_subset_closedBall (by linarith) |
| 75 | have houter : Metric.closedBall (0 : E) ρ ⊆ Metric.ball 0 (3 * ρ / 2) := |
| 76 | Metric.closedBall_subset_ball (by linarith) |
| 77 | have houterR : 3 * ρ / 2 ≤ R := by linarith |
| 78 | choose K hK hcurv using fun j => terminalSourceJets_curvature P hτ hH hρ hρR hsmall j |
| 79 | induction m with |
| 80 | | zero => |
| 81 | refine ⟨b, hb, ?_⟩ |
| 82 | intro M _ _ _ _ _ F C hraw t ht x hx j hj |
| 83 | have hj0 : j = 0 := by omega |
| 84 | subst j |
| 85 | rw [norm_iteratedFDeriv_zero] |
| 86 | apply HarmonicCoordinates.norm_bilinear_le_of_quadratic _ hb |
| 87 | · exact fun v w => (F.metric t).symm _ _ _ |
| 88 | · intro v |
| 89 | have hnn : 0 ≤ (F.metric t).pullbackCoefficients C.chart x v v := by |
| 90 | let w := mfderiv (𝓡 3) (𝓡 3) C.chart x v |
| 91 | change 0 ≤ (F.metric t).inner (C.chart x) w w |
| 92 | by_cases hw : w = 0 |
| 93 | · simp [hw] |
| 94 | · exact ((F.metric t).pos _ _ hw).le |
| 95 | rw [abs_of_nonneg hnn] |
| 96 | exact (C.closed_bounds hτ hH.le F hρR hsmall hraw (hsub ht) (htwo hx) v).2 |
| 97 | | succ q ih => |
| 98 | obtain ⟨B, hB, hlow⟩ := ih |
| 99 | let A := max B 1 |
| 100 | have hA : 1 ≤ A := le_max_right _ _ |
| 101 | obtain ⟨L, hL, hevol⟩ := SpacetimeBounds.exists_affine_spatialJet_evolution_bound |
| 102 | 3 q K hK ha hb A hA |
| 103 | obtain ⟨Z, hZ, hterminal⟩ := CoordinateExponential.exists_uniform_pullback_metric_jet_bound |
| 104 | 3 (q + 1) hρ (by linarith : ρ < 3 * ρ / 2) K hK |
| 105 | let D := max Z 1 |
| 106 | have hD : 1 ≤ D := le_max_right _ _ |
| 107 | let Bnext := D * Real.exp (L * τ) |
| 108 | refine ⟨max B Bnext, hB.trans (le_max_left _ _), ?_⟩ |
| 109 | intro M _ _ _ _ _ F C hraw t ht x hx j hj |
| 110 | rcases Nat.eq_or_lt_of_le hj with rfl | hj |
| 111 | · apply le_trans _ (le_max_right B Bnext) |
| 112 | let f := fun s => iteratedFDeriv ℝ (q + 1) ((F.metric s).pullbackCoefficients C.chart) x |
| 113 | have hxR : x ∈ Metric.ball 0 R := Metric.closedBall_subset_ball hρR (htwo hx) |
| 114 | have hf : ContDiffOn ℝ 1 f (Icc (-τ) 0) := |
| 115 | (M44.contDiffOn_pullback_spatialJet_time (by linarith : -τ < 0) F |
| 116 | Metric.isOpen_ball C.smooth (q + 1) hxR).of_le (by simp) |
| 117 | have hinit : ‖f 0‖ ≤ D := by |
| 118 | apply le_trans _ (le_max_left Z 1) |
| 119 | apply hterminal (F.metric 0) (F.connection 0) C.chart |
| 120 | (C.smooth.mono (Metric.ball_subset_ball houterR)) |
| 121 | (fun y hy => C.invertible (Metric.ball_subset_ball houterR hy)) C.normalized |
| 122 | (fun y hy w => C.gauss (Metric.ball_subset_ball houterR hy) w) |
| 123 | (fun d _ y hy => hcurv d F C hraw 0 ⟨by linarith, le_rfl⟩ y hy) x hx |
| 124 | apply terminalSourceJets_backward_norm_bound hτ hL hD f hf hinit ?_ t ht |
| 125 | intro s hs |
| 126 | let G := M44.closedSlabInterior (by linarith : -τ < 0) F |
| 127 | have hrecent : s ∈ Icc (-(τ / 2)) 0 := Ioo_subset_Icc_self hs |
| 128 | have hsG : s ∈ Ioo (-τ) 0 := ⟨by linarith [hs.1], hs.2⟩ |
| 129 | exact hevol G isOpen_Ioo Metric.isOpen_ball C.smooth |
| 130 | (fun y hy => C.invertible hy) hsG hxR |
| 131 | (fun v => (C.closed_bounds hτ hH.le F hρR hsmall hraw (hsub hrecent) (htwo hx) v).1) |
| 132 | (fun v => (C.closed_bounds hτ hH.le F hρR hsmall hraw (hsub hrecent) (htwo hx) v).2) |
| 133 | (fun d _ => hcurv d F C hraw s hrecent x (houter hx)) |
| 134 | (fun d hd hdq => (hlow F C hraw s hrecent x hx d hdq).trans |
| 135 | ((le_max_left B 1).trans (by simpa only [pow_one] using pow_le_pow_right₀ hA hd))) |
| 136 | · exact (hlow F C hraw t ht x hx j (by omega)).trans (le_max_left _ _) |
| 137 | |
| 138 | end PoincareMT.M47 |