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.ReducedGeometry.SourceNames.ReducedLength |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Joining.PrefixJoinCoefficients |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Joining.PrefixJoinCoordinates |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Joining.GaugeBlendDensity |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Density.InteriorDensity |
| 6 | |
| 7 | /-! |
| 8 | # Uniform action-density control for actual prefix blends |
| 9 | |
| 10 | The fixed compact gauge region bounds the actual blend density by |
| 11 | a constant times one plus its squared coordinate speed. The constant |
| 12 | is independent of the transition width. Morgan-Tian Proposition 6.30, |
| 13 | pp. 118-119. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | -- The actual metric operators use the prescribed Euclidean norm instances. |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M14.PrefixJoinGauge |
| 26 | |
| 27 | open Proofs.M09 |
| 28 | |
| 29 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 30 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 31 | {T τ₁ τ₂ c : ℝ} {x y : G.Point} |
| 32 | {q : M14BackwardPath G T τ₁ τ₂ x y} |
| 33 | {p : M14BackwardPath G T τ₁ c x (q.curve c)} (D : PrefixJoinGauge q p) |
| 34 | |
| 35 | private noncomputable local instance dualNormedGroup : |
| 36 | NormedAddCommGroup (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 37 | ContinuousLinearMap.toNormedAddCommGroup |
| 38 | |
| 39 | private noncomputable local instance dualNormedSpace : |
| 40 | NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 41 | ContinuousLinearMap.toNormedSpace |
| 42 | |
| 43 | private noncomputable local instance bilinearNormedGroup : |
| 44 | NormedAddCommGroup |
| 45 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 46 | ContinuousLinearMap.toNormedAddCommGroup |
| 47 | |
| 48 | private noncomputable local instance bilinearNormedSpace : |
| 49 | NormedSpace ℝ |
| 50 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 51 | ContinuousLinearMap.toNormedSpace |
| 52 | |
| 53 | /-- The actual unpatched blend is C1 throughout the common open |
| 54 | gauge window for every center and width, Proposition 6.30, |
| 55 | pp. 118-119. -/ |
| 56 | theorem blend_contMDiffOn_one (a d : ℝ) : |
| 57 | ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) 1 |
| 58 | (gaugeBlend D.index D.lift p.curve q.curve a d) (Ioo (c - D.radius) c) := by |
| 59 | intro s hs |
| 60 | have hp : s ∈ Ioo τ₁ c := ⟨D.left_margin.trans hs.1, hs.2⟩ |
| 61 | have hq : s ∈ Ioo τ₁ τ₂ := |
| 62 | ⟨hp.1, by linarith [hs.2, D.radius_pos, D.right_margin]⟩ |
| 63 | exact (gaugeBlend_contMDiffAt D.index D.lift p.curve q.curve D.image_open D.lift_smooth |
| 64 | (by simp : (1 : ℕ∞ω) ≤ ∞) (c := a) (d := d) |
| 65 | ((p.curve_regular s hp).contMDiffAt (isOpen_Ioo.mem_nhds hp)) |
| 66 | ((q.curve_regular s hq).contMDiffAt (isOpen_Ioo.mem_nhds hq)) |
| 67 | (D.prefix_in_image s (Ioo_subset_Icc_self hs)) |
| 68 | (D.continuation_in_image s ⟨hs.1.le, by linarith [hs.2, D.radius_pos]⟩) |
| 69 | (D.region_subset (D.blend_mem_region a d (Ioo_subset_Icc_self hs)))).contMDiffWithinAt |
| 70 | |
| 71 | /-- One fixed constant bounds every actual blend density by its |
| 72 | coordinate kinetic energy plus one, Proposition 6.30, pp. 118-119. -/ |
| 73 | theorem exists_blend_density_bound (hM12 : GeneralizedRicciGaugeTheory.{u} n) : |
| 74 | ∃ C : ℝ, 0 ≤ C ∧ ∀ a d : ℝ, ∀ s ∈ Ioo (c - D.radius) c, |
| 75 | ‖M14RawLIntegrand G (gaugeBlend D.index D.lift p.curve q.curve a d) |
| 76 | (projectedCurveVelocity G (gaugeBlend D.index D.lift p.curve q.curve a d)) s‖ ≤ |
| 77 | C * (1 + ‖deriv (smoothJoinBlend (fun t => (D.lift (p.curve t)).2.val) |
| 78 | (fun t => (D.lift (q.curve t)).2.val) a d) s‖ ^ 2) := by |
| 79 | obtain ⟨C, hC, hbound⟩ := D.exists_coefficient_bound hM12 |
| 80 | refine ⟨C, hC, ?_⟩ |
| 81 | intro a d s hs |
| 82 | have hp : s ∈ Ioo τ₁ c := ⟨D.left_margin.trans hs.1, hs.2⟩ |
| 83 | have hq : s ∈ Ioo τ₁ τ₂ := |
| 84 | ⟨hp.1, by linarith [hs.2, D.radius_pos, D.right_margin]⟩ |
| 85 | have hwide : s ∈ Icc (c - D.radius) (c + D.radius) := |
| 86 | ⟨hs.1.le, by linarith [hs.2, D.radius_pos]⟩ |
| 87 | have hclock := (D.lift_time _ (D.continuation_in_image s hwide)).trans |
| 88 | (q.curve_time s (Ioo_subset_Icc_self hq)) |
| 89 | have hmem := D.blend_mem_region a d (Ioo_subset_Icc_self hs) |
| 90 | rw [gaugeBlend_quadraticDensity D.index D.lift p.curve q.curve |
| 91 | (D.lift (q.curve c)).2 D.image_open D.lift_smooth |
| 92 | ((p.curve_regular s hp).contMDiffAt (isOpen_Ioo.mem_nhds hp)) |
| 93 | ((q.curve_regular s hq).contMDiffAt (isOpen_Ioo.mem_nhds hq)) |
| 94 | (D.prefix_in_image s (Ioo_subset_Icc_self hs)) |
| 95 | (D.continuation_in_image s hwide) (D.region_subset hmem) hclock] |
| 96 | let v := smoothJoinBlend (fun t => (D.lift (p.curve t)).2.val) |
| 97 | (fun t => (D.lift (q.curve t)).2.val) a d |
| 98 | let B := backwardMetricCoefficient (G.gaugeCover.spatial D.index) |
| 99 | (G.gaugeCover.metric D.index).metric T (D.lift (q.curve c)).2 (s, v s) |
| 100 | let V := backwardPotentialCoefficient D.index (fun t => (D.lift (q.curve t)).1) |
| 101 | (D.lift (q.curve c)).2 (s, v s) |
| 102 | obtain ⟨hB, hV⟩ := hbound s hwide (v s) hmem |
| 103 | change ‖B (deriv v s) (deriv v s) / 2 + V‖ ≤ C * (1 + ‖deriv v s‖ ^ 2) |
| 104 | have hkin := B.le_of_opNorm₂_le_of_le hB (le_refl ‖deriv v s‖) (le_refl ‖deriv v s‖) |
| 105 | have hsum := norm_add_le (B (deriv v s) (deriv v s) / 2) V |
| 106 | norm_num only [norm_div, Real.norm_ofNat] at hsum |
| 107 | nlinarith [mul_nonneg hC (sq_nonneg ‖deriv v s‖)] |
| 108 | |
| 109 | end PoincareMT.M14.PrefixJoinGauge |