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.GaugeBlend |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Extension.PotentialCoefficient |
| 4 | |
| 5 | /-! |
| 6 | # The actual quadratic density of a spatial gauge blend |
| 7 | |
| 8 | The spatial interpolation has exactly the analytic blend's derivative. |
| 9 | This identifies its actual action density with the compactly bounded |
| 10 | metric and potential coefficients. Morgan-Tian Proposition 6.30, |
| 11 | pp. 118-119. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- The inverse gauge uses the prescribed product spacetime model. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M14 |
| 24 | |
| 25 | open Proofs.M09 |
| 26 | |
| 27 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 28 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 29 | (b : G.gaugeCover.index) |
| 30 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 31 | G.gaugeCover.spatial b) |
| 32 | (α β : ℝ → G.Point) (x₀ : G.gaugeCover.spatial b) |
| 33 | |
| 34 | /-- At every admissible interior point, the actual gauge blend has |
| 35 | the quadratic action density of its analytic spatial blend, |
| 36 | Proposition 6.30, pp. 118-119. -/ |
| 37 | theorem gaugeBlend_quadraticDensity {U : Set G.Point} (hU : IsOpen U) |
| 38 | (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift U) |
| 39 | {T a d s : ℝ} |
| 40 | (hα : ContMDiffAt (𝓘(ℝ, ℝ)) (spacetimeModel n) 1 α s) |
| 41 | (hβ : ContMDiffAt (𝓘(ℝ, ℝ)) (spacetimeModel n) 1 β s) |
| 42 | (hαU : α s ∈ U) (hβU : β s ∈ U) |
| 43 | (hmem : smoothJoinBlend (fun t => (lift (α t)).2.val) |
| 44 | (fun t => (lift (β t)).2.val) a d s ∈ G.gaugeCover.spatial b) |
| 45 | (hclock : (lift (β s)).1.val = T - s) : |
| 46 | let v := smoothJoinBlend (fun t => (lift (α t)).2.val) |
| 47 | (fun t => (lift (β t)).2.val) a d |
| 48 | M14RawLIntegrand G (gaugeBlend b lift α β a d) |
| 49 | (projectedCurveVelocity G (gaugeBlend b lift α β a d)) s = |
| 50 | backwardMetricCoefficient (G.gaugeCover.spatial b) (G.gaugeCover.metric b).metric T x₀ |
| 51 | (s, v s) (deriv v s) (deriv v s) / 2 + |
| 52 | backwardPotentialCoefficient b (fun t => (lift (β t)).1) x₀ (s, v s) := by |
| 53 | dsimp only |
| 54 | have hA := (((hlift _ hαU).contMDiffAt (hU.mem_nhds hαU)).of_le (by simp)).comp s hα |
| 55 | have hB := (((hlift _ hβU).contMDiffAt (hU.mem_nhds hβU)).of_le (by simp)).comp s hβ |
| 56 | have hAv : ContMDiffAt (𝓘(ℝ, ℝ)) (𝓡 n) 1 (fun t => (lift (α t)).2.val) s := |
| 57 | contMDiff_subtype_val.contMDiffAt.comp s hA.snd |
| 58 | have hBv : ContMDiffAt (𝓘(ℝ, ℝ)) (𝓡 n) 1 (fun t => (lift (β t)).2.val) s := |
| 59 | contMDiff_subtype_val.contMDiffAt.comp s hB.snd |
| 60 | have hχ : ContMDiffAt (𝓘(ℝ, ℝ)) (𝓘(ℝ, ℝ)) 1 |
| 61 | (fun t => smoothJoinCutoff ((t - a) / d)) s := |
| 62 | ((smoothJoinCutoff_contDiff.of_le (by simp)).comp |
| 63 | ((contDiff_id.sub contDiff_const).div_const d)).contMDiff.contMDiffAt |
| 64 | have hshift := hχ.smul (hBv.sub hAv) |
| 65 | have hspace := ((((G.gaugeCover.spatial b).affineShift_contMDiffOn _ hmem).contMDiffAt |
| 66 | ((G.gaugeCover.spatial b).affineShift_domain_isOpen.mem_nhds hmem)).of_le |
| 67 | (by simp : (1 : ℕ∞ω) ≤ ∞)).comp s (hA.snd.prodMk hshift) |
| 68 | have hv := hAv.add hshift |
| 69 | have heq : (fun t => ((G.gaugeCover.spatial b).affineShift (lift (α t)).2 |
| 70 | (smoothJoinCutoff ((t - a) / d) • |
| 71 | ((lift (β t)).2.val - (lift (α t)).2.val))).val) =ᶠ[𝓝 s] |
| 72 | smoothJoinBlend (fun t => (lift (α t)).2.val) |
| 73 | (fun t => (lift (β t)).2.val) a d := by |
| 74 | filter_upwards [hv.continuousAt.preimage_mem_nhds |
| 75 | ((G.gaugeCover.spatial b).isOpen.mem_nhds hmem)] with t ht |
| 76 | exact (G.gaugeCover.spatial b).affineShift_val ht |
| 77 | have hden := gaugeCurve_quadraticDensity b (fun t => (lift (β t)).1) x₀ |
| 78 | (fun t => (G.gaugeCover.spatial b).affineShift (lift (α t)).2 |
| 79 | (smoothJoinCutoff ((t - a) / d) • ((lift (β t)).2.val - (lift (α t)).2.val))) |
| 80 | (hB.fst.mdifferentiableAt (by simp)) (hspace.mdifferentiableAt (by simp)) hclock |
| 81 | unfold gaugeBlend |
| 82 | simpa only [heq.eq_of_nhds, heq.deriv_eq] using hden |
| 83 | |
| 84 | end PoincareMT.M14 |