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.LGeometry.Path.ActionBounds |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Path.RegularizedAction |
| 3 | import Mathlib.Geometry.Manifold.ContMDiffMFDeriv |
| 4 | |
| 5 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/ReferenceEnergy.lean` at |
| 6 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 7 | |
| 8 | |
| 9 | /-! |
| 10 | # Reference-metric energy of admissible paths |
| 11 | |
| 12 | Metric comparison turns the action bound into a bound for the kinetic |
| 13 | energy measured by the complete terminal metric. Squaring the parameter |
| 14 | then removes the vanishing weight at backward time zero. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle intervalIntegral Topology |
| 21 | open MeasureTheory |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.LGeometry |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 29 | [IsManifold (𝓡 n) ∞ M] |
| 30 | |
| 31 | theorem curveVelocity_continuousOn_open {γ : ℝ → M} {I : Set ℝ} |
| 32 | (hI : IsOpen I) (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 γ I) : |
| 33 | ContinuousOn (fun s ↦ Bundle.TotalSpace.mk' |
| 34 | (EuclideanSpace ℝ (Fin n)) (γ s) (curveVelocity (n := n) γ s)) I := by |
| 35 | let ι : ℝ → TangentBundle (𝓘(ℝ, ℝ)) ℝ := |
| 36 | (tangentBundleModelSpaceHomeomorph (𝓘(ℝ, ℝ))).symm ∘ |
| 37 | (fun s : ℝ ↦ (s, (1 : ℝ))) |
| 38 | have hι : Continuous ι := |
| 39 | (contMDiff_tangentBundleModelSpaceHomeomorph_symm |
| 40 | (I := 𝓘(ℝ, ℝ)) (n := ∞)).continuous.comp |
| 41 | (continuous_id.prodMk continuous_const) |
| 42 | have ht := hγ.continuousOn_tangentMapWithin (by norm_num) hI.uniqueMDiffOn |
| 43 | have hcomp := ht.comp hι.continuousOn (fun s hs ↦ hs) |
| 44 | apply hcomp.congr |
| 45 | intro s hs |
| 46 | change Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (γ s) |
| 47 | (curveVelocity (n := n) γ s) = |
| 48 | Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (γ s) |
| 49 | ((mfderivWithin (𝓘(ℝ, ℝ)) (𝓡 n) γ I s) 1) |
| 50 | rw [mfderivWithin_of_mem_nhds (hI.mem_nhds hs)] |
| 51 | rfl |
| 52 | |
| 53 | noncomputable def referenceSpeedSq (g : RiemannianMetric n M) |
| 54 | (γ : ℝ → M) (s : ℝ) : ℝ := |
| 55 | g.inner (γ s) (curveVelocity (n := n) γ s) (curveVelocity (n := n) γ s) |
| 56 | |
| 57 | theorem referenceSpeedSq_nonneg (g : RiemannianMetric n M) |
| 58 | (γ : ℝ → M) (s : ℝ) : 0 ≤ referenceSpeedSq g γ s := by |
| 59 | by_cases hv : curveVelocity (n := n) γ s = 0 |
| 60 | · simp [referenceSpeedSq, hv] |
| 61 | · exact (g.pos (γ s) _ hv).le |
| 62 | |
| 63 | theorem referenceSpeedSq_continuousOn {γ : ℝ → M} {I : Set ℝ} |
| 64 | (g : RiemannianMetric n M) (hI : IsOpen I) |
| 65 | (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 γ I) : |
| 66 | ContinuousOn (referenceSpeedSq g γ) I := by |
| 67 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 68 | ⟨g.toRiemannianMetric⟩ |
| 69 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 70 | (TangentSpace (𝓡 n) : M → Type _) := |
| 71 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 72 | have hv := curveVelocity_continuousOn_open hI hγ |
| 73 | exact hv.inner_bundle hv |
| 74 | |
| 75 | theorem referenceSpeedSq_le_evolving {J : Set ℝ} {F : RicciFlow n M J} |
| 76 | {T τmax K τ : ℝ} (hM04 : RicciFlowCurvatureTheory.{u}) |
| 77 | (hwindow : Set.Icc (T - τmax) T ⊆ J) (hK : 0 ≤ K) |
| 78 | (hbound : ∀ t ∈ Set.Icc (T - τmax) T, ∀ x : M, |
| 79 | |(F.connection t).curvatureTensorNorm x| ≤ K) |
| 80 | (hτ : τ ∈ Set.Icc 0 τmax) (γ : ℝ → M) : |
| 81 | referenceSpeedSq (F.metric T) γ τ ≤ |
| 82 | Real.exp (2 * (n : ℝ) * K * τmax) * referenceSpeedSq (F.metric (T - τ)) γ τ := by |
| 83 | have h := (backwardPath_metric_comparison hM04 hwindow le_rfl hτ.1 hτ.2 hK hbound |
| 84 | (γ τ) (curveVelocity (n := n) γ τ)).2 |
| 85 | simp only [sub_zero] at h |
| 86 | apply h.trans |
| 87 | apply mul_le_mul_of_nonneg_right _ (referenceSpeedSq_nonneg _ _ _) |
| 88 | apply Real.exp_le_exp.mpr |
| 89 | exact mul_le_mul_of_nonneg_left hτ.2 (mul_nonneg (by positivity) hK) |
| 90 | |
| 91 | /-- Reference weighted energy is integrable and bounded by the frozen action. -/ |
| 92 | theorem referenceWeightedEnergy_bound {J : Set ℝ} {F : RicciFlow n M J} |
| 93 | {T τmax τ₁ τ₂ K : ℝ} (hM04 : RicciFlowCurvatureTheory.{u}) |
| 94 | (hwindow : Set.Icc (T - τmax) T ⊆ J) (hK : 0 ≤ K) |
| 95 | (hbound : ∀ t ∈ Set.Icc (T - τmax) T, ∀ x : M, |
| 96 | |(F.connection t).curvatureTensorNorm x| ≤ K) |
| 97 | (p : BackwardTimePath F T τ₁ τ₂) (hτ₂ : τ₂ ≤ τmax) : |
| 98 | IntervalIntegrable (fun τ ↦ Real.sqrt τ * referenceSpeedSq (F.metric T) p.curve τ) |
| 99 | volume τ₁ τ₂ ∧ |
| 100 | (∫ τ in τ₁..τ₂, Real.sqrt τ * referenceSpeedSq (F.metric T) p.curve τ) ≤ |
| 101 | Real.exp (2 * (n : ℝ) * K * τmax) * |
| 102 | (backwardLLength F T τ₁ τ₂ p.curve + |
| 103 | (Real.sqrt τ₂ * (n : ℝ) ^ 2 * K) * (τ₂ - τ₁)) := by |
| 104 | let Q := Real.exp (2 * (n : ℝ) * K * τmax) |
| 105 | let W := fun τ ↦ Real.sqrt τ * referenceSpeedSq (F.metric T) p.curve τ |
| 106 | have hWnonneg (τ : ℝ) : 0 ≤ W τ := |
| 107 | mul_nonneg (Real.sqrt_nonneg _) (referenceSpeedSq_nonneg _ _ _) |
| 108 | have hWbound (τ : ℝ) (hτ : τ ∈ Set.Icc τ₁ τ₂) : |
| 109 | W τ ≤ Q * backwardLKinetic F T p.curve τ := by |
| 110 | have h := mul_le_mul_of_nonneg_left |
| 111 | (referenceSpeedSq_le_evolving hM04 hwindow hK hbound |
| 112 | ⟨p.nonnegative.trans hτ.1, hτ.2.trans hτ₂⟩ p.curve) (Real.sqrt_nonneg τ) |
| 113 | simpa only [W, backwardLKinetic, referenceSpeedSq, Q, mul_left_comm] using h |
| 114 | have hmeas : AEStronglyMeasurable W (volume.restrict (Set.uIoc τ₁ τ₂)) := by |
| 115 | rw [Set.uIoc_of_le p.ordered.le, ← restrict_Ioo_eq_restrict_Ioc] |
| 116 | exact (Real.continuous_sqrt.continuousOn.mul |
| 117 | (referenceSpeedSq_continuousOn (F.metric T) isOpen_Ioo p.regular)).aestronglyMeasurable |
| 118 | measurableSet_Ioo |
| 119 | have hk := (backwardLKinetic_intervalIntegrable hM04 p).const_mul Q |
| 120 | have hW : IntervalIntegrable W volume τ₁ τ₂ := by |
| 121 | apply hk.mono_fun' hmeas |
| 122 | filter_upwards [ae_restrict_mem measurableSet_uIoc] with τ hτ |
| 123 | rw [Real.norm_eq_abs, abs_of_nonneg (hWnonneg τ)] |
| 124 | apply hWbound |
| 125 | simpa only [Set.uIcc_of_le p.ordered.le] using Set.uIoc_subset_uIcc hτ |
| 126 | refine ⟨hW, ?_⟩ |
| 127 | calc |
| 128 | (∫ τ in τ₁..τ₂, W τ) ≤ ∫ τ in τ₁..τ₂, Q * backwardLKinetic F T p.curve τ := |
| 129 | intervalIntegral.integral_mono_on p.ordered.le hW hk hWbound |
| 130 | _ = Q * ∫ τ in τ₁..τ₂, backwardLKinetic F T p.curve τ := |
| 131 | intervalIntegral.integral_const_mul _ _ |
| 132 | _ ≤ _ := mul_le_mul_of_nonneg_left |
| 133 | (backwardLLength_coercive hM04 p hτ₂ hbound).2 (Real.exp_pos _).le |
| 134 | |
| 135 | end PoincareMT.LGeometry |