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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Uniqueness.CompleteScalarMaximum |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Minimum.Compactness.ScalarBound |
| 4 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Scalar.Within |
| 5 | |
| 6 | /-! |
| 7 | # The initial positive scalar floor for every raw standard flow |
| 8 | |
| 9 | Morgan-Tian Lemma 12.6 and Section 12.5. The complete maximum principle |
| 10 | applies to the actual scalar evolution and preserves the positive initial |
| 11 | floor on each closed preterminal slab. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT.M35.Uniqueness |
| 21 | |
| 22 | theorem raw_scalar_floor_on_slab |
| 23 | (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 24 | (H : StandardCapEstimate g₀) (G : PartialStandardCapFlow g₀) |
| 25 | {T : ℝ} (hT : 0 < T) (hTlt : T < G.lifetime) : |
| 26 | ∀ t ∈ Icc 0 T, ∀ x : StandardCapSpace, |
| 27 | H.scalar_constant⁻¹ ≤ (G.flow.connection t).scalarCurvature x := by |
| 28 | let c := H.scalar_constant⁻¹ |
| 29 | have hc : 0 < c := inv_pos.mpr H.scalar_constant_pos |
| 30 | have hsub : Icc 0 T ⊆ Ico 0 G.lifetime := fun _ ht => ⟨ht.1, ht.2.trans_lt hTlt⟩ |
| 31 | obtain ⟨K, hK, hRm⟩ := G.curvature_locally_bounded T hT.le hTlt |
| 32 | have hnorm (t : ℝ) (ht : t ∈ Icc 0 T) (x : StandardCapSpace) : |
| 33 | (G.flow.connection t).curvatureTensorNorm x ≤ K := (le_abs_self _).trans (hRm t ht x) |
| 34 | let f : ℝ → StandardCapSpace → ℝ := fun t x => -c + (G.flow.connection t).scalarCurvature x |
| 35 | have hcont : ContinuousOn (Function.uncurry f) (Icc 0 T ×ˢ univ) := |
| 36 | continuousOn_const.add (G.flow.contMDiffOn_scalarCurvature.continuousOn.mono |
| 37 | (prod_mono hsub Subset.rfl)) |
| 38 | have hsmooth (t : ℝ) (ht : t ∈ Ioc 0 T) (x : StandardCapSpace) : |
| 39 | ContMDiffAt (𝓡 3) 𝓘(ℝ, ℝ) ∞ (f t) x := |
| 40 | contMDiffAt_const.add (G.flow.contMDiff_scalarCurvature t (hsub ⟨ht.1.le, ht.2⟩) x) |
| 41 | have hinit (x : StandardCapSpace) : 0 ≤ f 0 x := by |
| 42 | have htransport (g h : RiemannianMetric 3 StandardCapSpace) |
| 43 | (D : LeviCivitaData g) (D' : LeviCivitaData h) (heq : g = h) (hD : HEq D D') : |
| 44 | D.scalarCurvature x = D'.scalarCurvature x := by |
| 45 | subst h |
| 46 | cases eq_of_heq hD |
| 47 | rfl |
| 48 | change 0 ≤ -c + (G.flow.connection 0).scalarCurvature x |
| 49 | rw [htransport _ _ _ _ G.initial_metric G.initial_connection] |
| 50 | dsimp only [c] |
| 51 | linarith [(H.scalar_bounds x).1] |
| 52 | have hbound (t : ℝ) (ht : t ∈ Icc 0 T) (x : StandardCapSpace) : |
| 53 | -(9 * K + c) ≤ f t x := by |
| 54 | have hb := M10.abs_scalarCurvature_le (G.flow.metric t) (G.flow.connection t) x |
| 55 | norm_num only [Nat.cast_ofNat, Nat.reducePow] at hb |
| 56 | have hlow := (abs_le.mp hb).1 |
| 57 | change -(9 * K + c) ≤ -c + (G.flow.connection t).scalarCurvature x |
| 58 | linarith [hnorm t ht x] |
| 59 | have hheat (t : ℝ) (ht : t ∈ Ioc 0 T) (x : StandardCapSpace) : |
| 60 | ∃ v : ℝ, HasDerivWithinAt (fun s => f s x) v (Icc 0 T) t ∧ |
| 61 | (G.flow.connection t).laplacian (f t) x + 0 * f t x ≤ v := by |
| 62 | have hd := (P.scalar_evolution 3 StandardCapSpace _ G.flow t |
| 63 | (hsub ⟨ht.1.le, ht.2⟩) x).mono hsub |
| 64 | refine ⟨_, hd.const_add (-c), ?_⟩ |
| 65 | change (G.flow.connection t).laplacian |
| 66 | (fun y => -c + (G.flow.connection t).scalarCurvature y) x + 0 * f t x ≤ _ |
| 67 | rw [laplacian_const_add_at _ |
| 68 | (G.flow.contMDiff_scalarCurvature t (hsub ⟨ht.1.le, ht.2⟩) x), zero_mul, add_zero] |
| 69 | exact le_add_of_nonneg_right (mul_nonneg (by norm_num) |
| 70 | (Finset.sum_nonneg (fun _ _ => Finset.sum_nonneg (fun _ _ => sq_nonneg _)))) |
| 71 | have h := raw_scalar_nonnegative P G hT hTlt |
| 72 | (show 0 ≤ 9 * K + c by positivity) (le_refl 0) f hcont hsmooth hinit hbound hheat |
| 73 | intro t ht x |
| 74 | have hh := h t ht x |
| 75 | change 0 ≤ -c + (G.flow.connection t).scalarCurvature x at hh |
| 76 | linarith |
| 77 | |
| 78 | theorem raw_scalar_floor |
| 79 | (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 80 | (H : StandardCapEstimate g₀) (G : PartialStandardCapFlow g₀) |
| 81 | {t : ℝ} (ht : t ∈ Ico 0 G.lifetime) (x : StandardCapSpace) : |
| 82 | H.scalar_constant⁻¹ ≤ (G.flow.connection t).scalarCurvature x := by |
| 83 | let T := (t + G.lifetime) / 2 |
| 84 | have hT : 0 < T := by dsimp only [T]; linarith [G.lifetime_pos, ht.1] |
| 85 | have hTlt : T < G.lifetime := by dsimp only [T]; linarith [ht.2] |
| 86 | exact raw_scalar_floor_on_slab P H G hT hTlt t |
| 87 | ⟨ht.1, by dsimp only [T]; linarith [ht.2]⟩ x |
| 88 | |
| 89 | end PoincareMT.M35.Uniqueness |