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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.IntrinsicGeometry.IntrinsicOpenMetric |
| 3 | import PoincareLib.Geometry.Riemannian.Comparison.Volume.Conjugate.Energy.Length |
| 4 | |
| 5 | /-! |
| 6 | # Regional path-energy upper bounds |
| 7 | |
| 8 | The local Appendix A.9 support varies a short terminal part of an actual |
| 9 | minimum. Young's inequality bounds its literal path length; the triangle |
| 10 | inequality uses the same open-region distance as the unchanged prefix. |
| 11 | See `claim10_4/2026-09-23-intrinsic-distance-upper-support.md`. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter MeasureTheory |
| 19 | open scoped Manifold ContDiff Topology ENNReal Bundle |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M28 |
| 24 | |
| 25 | variable {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 27 | [IsManifold (𝓡 3) ∞ M] |
| 28 | |
| 29 | /-- Young's inequality at reference speed one bounds the actual path length, |
| 30 | so the bound remains usable for a regional competitor. -/ |
| 31 | theorem pathELength_le_ofReal_halfEnergy (g : RiemannianMetric 3 M) |
| 32 | {γ : ℝ → M} {a b : ℝ} (hab : a ≤ b) |
| 33 | (hcont : ContinuousOn (fun t => |
| 34 | g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) γ t 1)) (Icc a b)) : |
| 35 | g.pathELength γ a b ≤ ENNReal.ofReal |
| 36 | ((∫ t in a..b, (1 / 2 : ℝ) * |
| 37 | (g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) γ t 1)) ^ 2) + |
| 38 | (b - a) / 2) := by |
| 39 | let v : ℝ → ℝ := fun t => |
| 40 | g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) γ t 1) |
| 41 | have hv : IntervalIntegrable v volume a b := by |
| 42 | apply ContinuousOn.intervalIntegrable |
| 43 | simpa only [uIcc_of_le hab] using hcont |
| 44 | have hv2 : IntervalIntegrable (fun t => (1 / 2 : ℝ) * v t ^ 2) volume a b := by |
| 45 | apply ContinuousOn.intervalIntegrable |
| 46 | rw [uIcc_of_le hab] |
| 47 | exact continuousOn_const.mul (hcont.pow 2) |
| 48 | rw [g.pathELength_eq_ofReal_integral_speed hab hcont] |
| 49 | apply ENNReal.ofReal_le_ofReal |
| 50 | have h := intervalIntegral.integral_mono_on hab hv |
| 51 | (hv2.add intervalIntegrable_const) |
| 52 | (fun t _ => show v t ≤ (1 / 2 : ℝ) * v t ^ 2 + 1 / 2 by |
| 53 | nlinarith [sq_nonneg (v t - 1)]) |
| 54 | rw [intervalIntegral.integral_add hv2 intervalIntegrable_const, |
| 55 | intervalIntegral.integral_const] at h |
| 56 | simpa only [v, smul_eq_mul, div_eq_mul_inv, one_mul] using h |
| 57 | |
| 58 | /-- The frozen regional distance satisfies its actual triangle inequality |
| 59 | on points of the open region, without an ambient-distance substitution. -/ |
| 60 | theorem intrinsicOpenEDist_triangle (g : RiemannianMetric 3 M) |
| 61 | (U : TopologicalSpace.Opens M) {p q r : M} |
| 62 | (hp : p ∈ U) (hq : q ∈ U) (hr : r ∈ U) : |
| 63 | intrinsicEDist g (U : Set M) p r ≤ |
| 64 | intrinsicEDist g (U : Set M) p q + intrinsicEDist g (U : Set M) q r := by |
| 65 | let pU : U := ⟨p, hp⟩ |
| 66 | let qU : U := ⟨q, hq⟩ |
| 67 | let rU : U := ⟨r, hr⟩ |
| 68 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : U → Type _) := |
| 69 | ⟨(intrinsicOpenMetric g U).toRiemannianMetric⟩ |
| 70 | have h := Manifold.riemannianEDist_triangle (I := 𝓡 3) |
| 71 | (x := pU) (y := qU) (z := rU) |
| 72 | change (intrinsicOpenMetric g U).edist pU rU ≤ |
| 73 | (intrinsicOpenMetric g U).edist pU qU + |
| 74 | (intrinsicOpenMetric g U).edist qU rU at h |
| 75 | simpa only [intrinsicOpenMetric_edist, pU, qU, rU] using h |
| 76 | |
| 77 | /-- An exact finite prefix and a genuine regional terminal competitor give |
| 78 | the upper support's path-energy bound. No smooth splice is required. -/ |
| 79 | theorem intrinsicEDist_le_ofReal_prefix_halfEnergy |
| 80 | (g : RiemannianMetric 3 M) (U : TopologicalSpace.Opens M) |
| 81 | {p : M} (hp : p ∈ U) {γ : ℝ → M} {a b A : ℝ} |
| 82 | (hab : a ≤ b) (hA : 0 ≤ A) |
| 83 | (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc a b)) |
| 84 | (hγU : MapsTo γ (Icc a b) (U : Set M)) |
| 85 | (hcont : ContinuousOn (fun t => |
| 86 | g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) γ t 1)) (Icc a b)) |
| 87 | (hprefix : intrinsicEDist g (U : Set M) p (γ a) = ENNReal.ofReal A) : |
| 88 | intrinsicEDist g (U : Set M) p (γ b) ≤ ENNReal.ofReal |
| 89 | (A + ((∫ t in a..b, (1 / 2 : ℝ) * |
| 90 | (g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) γ t 1)) ^ 2) + |
| 91 | (b - a) / 2)) := by |
| 92 | have henergy : 0 ≤ (∫ t in a..b, (1 / 2 : ℝ) * |
| 93 | (g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) γ t 1)) ^ 2) + |
| 94 | (b - a) / 2 := by |
| 95 | apply add_nonneg |
| 96 | · exact intervalIntegral.integral_nonneg hab (fun _ _ => by positivity) |
| 97 | · positivity |
| 98 | calc |
| 99 | intrinsicEDist g (U : Set M) p (γ b) ≤ |
| 100 | intrinsicEDist g (U : Set M) p (γ a) + |
| 101 | intrinsicEDist g (U : Set M) (γ a) (γ b) := |
| 102 | intrinsicOpenEDist_triangle g U hp (hγU ⟨le_rfl, hab⟩) (hγU ⟨hab, le_rfl⟩) |
| 103 | _ ≤ ENNReal.ofReal A + ENNReal.ofReal |
| 104 | ((∫ t in a..b, (1 / 2 : ℝ) * |
| 105 | (g.tangentNorm (γ t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) γ t 1)) ^ 2) + |
| 106 | (b - a) / 2) := by |
| 107 | rw [hprefix] |
| 108 | exact add_le_add (le_refl _) ((intrinsicEDist_le_pathELength g hab hγ hγU).trans |
| 109 | (pathELength_le_ofReal_halfEnergy g hab hcont)) |
| 110 | _ = _ := (ENNReal.ofReal_add hA henergy).symm |
| 111 | |
| 112 | end PoincareMT.M28 |