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.ReducedGeometry.ReducedLength.Action.ExponentialCoercivity |
| 2 | import Mathlib.Analysis.Normed.Group.Bounded |
| 3 | |
| 4 | /-! |
| 5 | # Uniform action and competitor bounds down to time zero |
| 6 | |
| 7 | The actual square-time density is bounded on a compact initial ball. |
| 8 | Coercivity then confines every minimizing competitor to one larger ball. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] |
| 23 | |
| 24 | set_option backward.isDefEq.respectTransparency false in |
| 25 | theorem lExponentialFamily_action_bound_near_zero {J : Set ℝ} {F : RicciFlow n M J} |
| 26 | (hM04 : RicciFlowCurvatureTheory.{u}) {T τmax : ℝ} |
| 27 | (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 28 | {p : M} (A : LExponentialFamily F T τmax p) |
| 29 | (b : ℝ) (hb : 0 < b) (hbmax : b < τmax) (a : ℝ) (_ha : 0 ≤ a) : |
| 30 | ∃ D : ℝ, 0 ≤ D ∧ ∀ (Z : TangentSpace (𝓡 n) p), |
| 31 | (F.metric T).tangentNorm p Z ≤ a → ∀ t, 0 < t → t ≤ b → |
| 32 | |A.action Z t| ≤ D * Real.sqrt t := by |
| 33 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 34 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 35 | let E := TangentSpace (𝓡 n) p |
| 36 | letI : FiniteDimensional ℝ E := |
| 37 | VectorBundle.finiteDimensional ℝ (EuclideanSpace ℝ (Fin n)) |
| 38 | (TangentSpace (𝓡 n) : M → Type _) p |
| 39 | let K := Metric.closedBall (0 : E) a ×ˢ Set.Icc 0 (Real.sqrt b) |
| 40 | let U := A.squareDomain ∩ (Set.univ ×ˢ Set.Ioo (-Real.sqrt τmax) (Real.sqrt τmax)) |
| 41 | let f : E × ℝ → M := fun z ↦ A.squareFamily z.1 z.2 |
| 42 | let H := squareFamilyActionDensity F T f |
| 43 | have hK : IsCompact K := (isCompact_closedBall _ _).prod isCompact_Icc |
| 44 | have hU : IsOpen U := A.square_open.inter (isOpen_univ.prod isOpen_Ioo) |
| 45 | have hKU : K ⊆ U := by |
| 46 | intro z hz |
| 47 | have hlt := hz.2.2.trans_lt (Real.sqrt_lt_sqrt hb.le hbmax) |
| 48 | exact ⟨A.square_contains ⟨Set.mem_univ _, hz.2.1, hlt⟩, |
| 49 | Set.mem_univ _, (neg_lt_zero.mpr (Real.sqrt_pos.mpr hτmax)).trans_le hz.2.1, hlt⟩ |
| 50 | have hf : ContMDiffOn (𝓘(ℝ, E × ℝ)) (𝓡 n) ∞ f A.squareDomain := by |
| 51 | convert! A.square_smooth using 1 <;> |
| 52 | simp only [E, modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 53 | have hH : ContDiffOn ℝ ∞ H U := |
| 54 | squareFamilyActionDensity_contDiffOn F hM04 T τmax hτmax hwindow f U hU |
| 55 | (hf.mono Set.inter_subset_left) (fun z hz ↦ hz.2.2) |
| 56 | obtain ⟨D, hD⟩ := hK.exists_bound_of_continuousOn (hH.continuousOn.mono hKU) |
| 57 | refine ⟨max 0 D, le_max_left _ _, ?_⟩ |
| 58 | intro Z hZ t ht htb |
| 59 | have hZn : ‖Z‖ ≤ a := by |
| 60 | rw [norm_eq_sqrt_real_inner] |
| 61 | exact hZ |
| 62 | rw [lExponentialFamily_action_square_eq A Z t ht (htb.trans_lt hbmax)] |
| 63 | have hbound : ∀ s ∈ Set.uIoc 0 (Real.sqrt t), ‖H (Z, s)‖ ≤ max 0 D := by |
| 64 | intro s hs |
| 65 | rw [Set.uIoc_of_le (Real.sqrt_nonneg t)] at hs |
| 66 | exact (hD (Z, s) ⟨by simpa only [Metric.mem_closedBall, dist_zero_right] using hZn, |
| 67 | hs.1.le, hs.2.trans (Real.sqrt_le_sqrt htb)⟩).trans (le_max_right _ _) |
| 68 | simpa only [Real.norm_eq_abs, sub_zero, abs_of_nonneg (Real.sqrt_nonneg t)] using |
| 69 | intervalIntegral.norm_integral_le_of_norm_le_const hbound |
| 70 | |
| 71 | theorem lExponentialFamily_minimizing_competitors_bounded [ConnectedSpace M] |
| 72 | [T3Space M] [SecondCountableTopology M] {J : Set ℝ} |
| 73 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 74 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 75 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 76 | (p : M) (A : LExponentialFamily F T τmax p) |
| 77 | (b : ℝ) (hb : 0 < b) (hbmax : b < τmax) (a : ℝ) (ha : 0 ≤ a) : |
| 78 | ∃ R : ℝ, 0 ≤ R ∧ a ≤ R ∧ ∀ Z : TangentSpace (𝓡 n) p, |
| 79 | (F.metric T).tangentNorm p Z ≤ a → ∀ t (ht : 0 < t) (htb : t ≤ b), |
| 80 | ∀ W : TangentSpace (𝓡 n) p, A.gamma W t = A.gamma Z t → |
| 81 | IsMinimizingBackwardLPath F T 0 t (A.path W t ht (htb.trans_lt hbmax)) → |
| 82 | (F.metric T).tangentNorm p W ≤ R := by |
| 83 | obtain ⟨D, hD, hbound⟩ := lExponentialFamily_action_bound_near_zero hM04 hτmax |
| 84 | hwindow A b hb hbmax a ha |
| 85 | obtain ⟨B, C, hB, hC, hcoercive⟩ := exists_uniform_lExponentialFamily_action_coercive |
| 86 | F hM04 T τmax hτmax hwindow hcurvature b hb hbmax |
| 87 | let K := Real.exp (B * Real.sqrt b) * (2 * D + 4 * C * b + 1) |
| 88 | refine ⟨max a (Real.sqrt K), ha.trans (le_max_left _ _), le_max_left _ _, ?_⟩ |
| 89 | intro Z hZ t ht htb W hend hmin |
| 90 | have hmax := htb.trans_lt hbmax |
| 91 | have hcompare : A.action W t ≤ A.action Z t := by |
| 92 | have h := hmin (A.path Z t ht hmax) |
| 93 | (by simp only [A.path_eq, A.gamma_at_zero]) |
| 94 | (by simpa only [A.path_eq] using hend.symm) |
| 95 | simpa only [A.path_eq, LExponentialFamily.action] using h |
| 96 | have haction : A.action W t ≤ D * Real.sqrt t := |
| 97 | hcompare.trans ((le_abs_self _).trans (hbound Z hZ t ht htb)) |
| 98 | have hs : 0 < Real.sqrt t := Real.sqrt_pos.mpr ht |
| 99 | have henergy : 0 ≤ (F.metric T).inner p W W := by |
| 100 | rcases eq_or_ne W 0 with rfl | hne |
| 101 | · simp |
| 102 | · exact ((F.metric T).pos p W hne).le |
| 103 | have hupper : 4 * (F.metric T).inner p W W + 1 ≤ |
| 104 | Real.exp (B * Real.sqrt t) * (2 * D + 4 * C * t + 1) := by |
| 105 | apply (mul_le_mul_iff_right₀ hs).mp |
| 106 | calc |
| 107 | _ ≤ Real.exp (B * Real.sqrt t) * |
| 108 | (2 * A.action W t + 4 * C * (Real.sqrt t) ^ 3 + Real.sqrt t) := |
| 109 | hcoercive p A W t ht htb |
| 110 | _ ≤ Real.exp (B * Real.sqrt t) * |
| 111 | (2 * (D * Real.sqrt t) + 4 * C * (Real.sqrt t) ^ 3 + Real.sqrt t) := by |
| 112 | apply mul_le_mul_of_nonneg_left _ (Real.exp_nonneg _) |
| 113 | linarith |
| 114 | _ = Real.sqrt t * |
| 115 | (Real.exp (B * Real.sqrt t) * (2 * D + 4 * C * t + 1)) := by |
| 116 | have hcub : (Real.sqrt t) ^ 3 = Real.sqrt t * t := by |
| 117 | calc |
| 118 | _ = Real.sqrt t * (Real.sqrt t) ^ 2 := by ring |
| 119 | _ = Real.sqrt t * t := by rw [Real.sq_sqrt ht.le] |
| 120 | rw [hcub] |
| 121 | ring |
| 122 | have hconstant : Real.exp (B * Real.sqrt t) * (2 * D + 4 * C * t + 1) ≤ K := by |
| 123 | apply mul_le_mul |
| 124 | · exact Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt htb) hB.le) |
| 125 | · have hc := mul_le_mul_of_nonneg_left htb (mul_nonneg (by norm_num : (0 : ℝ) ≤ 4) hC) |
| 126 | linarith |
| 127 | · positivity |
| 128 | · exact Real.exp_nonneg _ |
| 129 | have heK : (F.metric T).inner p W W ≤ K := by |
| 130 | linarith [hupper.trans hconstant] |
| 131 | exact (Real.sqrt_le_sqrt heK).trans (le_max_right _ _) |
| 132 | |
| 133 | end PoincareMT.ReducedLength |