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.Variation.Pullback.SmoothGaugeSurface |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.GaugeAction |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Pullback.OpenSurfaceFields |
| 4 | |
| 5 | /-! |
| 6 | # The actual geometric pairing of a gauge momentum |
| 7 | |
| 8 | Morgan-Tian Lemma 6.4 and Definition 6.7, pp. 107-108. The zero-slice |
| 9 | partial fields of the supported surface are actual cylinder tangents. |
| 10 | Their weighted horizontal metric pairing equals the coordinate momentum |
| 11 | paired with the test field. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- Tangent values are compared in the frozen spacetime model before horizontal projection. |
| 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 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 26 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 27 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 28 | (b : G.gaugeCover.index) |
| 29 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 30 | G.gaugeCover.spatial b) (η : ℝ → EuclideanSpace ℝ (Fin n)) |
| 31 | |
| 32 | /-- The actual weighted pairing of the two supported surface tangents |
| 33 | equals the spatial quadratic momentum pairing, Lemma 6.4 and |
| 34 | Definition 6.7, pp. 107-108. -/ |
| 35 | theorem supportedBackwardGauge_weightedPair (x₀ : G.gaugeCover.spatial b) |
| 36 | {U : Set G.Point} (hU : IsOpen U) |
| 37 | (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift U) |
| 38 | (hright : ∀ q ∈ U, (G.gaugeCover.cylinder b).toSpacetime (lift q) = q) |
| 39 | (hsrcSupport : ∀ t ∈ tsupport η, p.curve t ∈ U) |
| 40 | {s : ℝ} (hs : s ∈ Ioo τ₁ τ₂) (hsrc : p.curve s ∈ U) : |
| 41 | let α := fun z : ℝ × ℝ => supportedBackwardGaugeFamily p b lift η z.2 z.1 |
| 42 | 2 * Real.sqrt s * G.spacetime.horizontalMetric.inner (α (s, 0)) |
| 43 | (surfaceHorizontalFst α s 0) (surfaceHorizontalSnd α s 0) = |
| 44 | backwardMetricCoefficient (G.gaugeCover.spatial b) (G.gaugeCover.metric b).metric T x₀ |
| 45 | (s, (lift (p.curve s)).2.val) (deriv (fun t => (lift (p.curve t)).2.val) s) (η s) := by |
| 46 | let α := fun z : ℝ × ℝ => supportedBackwardGaugeFamily p b lift η z.2 z.1 |
| 47 | let β := fun t => (G.gaugeCover.cylinder b).toSpacetime (lift (p.curve t)) |
| 48 | have hp := (p.curve_regular s hs).contMDiffAt (isOpen_Ioo.mem_nhds hs) |
| 49 | have hL := (((hlift _ hsrc).contMDiffAt (hU.mem_nhds hsrc)).of_le (by simp)).comp s hp |
| 50 | have hfirst : (fun t => α (t, 0)) =ᶠ[𝓝 s] β := by |
| 51 | filter_upwards [hp.continuousAt.preimage_mem_nhds (hU.mem_nhds hsrc)] with t ht |
| 52 | change supportedBackwardGaugeFamily p b lift η 0 t = β t |
| 53 | rw [supportedBackwardGaugeFamily_at_zero p b lift η |
| 54 | (fun r hr => hright _ (hsrcSupport r hr))] |
| 55 | exact (hright _ ht).symm |
| 56 | have hd := hfirst.mfderiv_eq (I := 𝓘(ℝ, ℝ)) (I' := spacetimeModel n) |
| 57 | have hparameter := supportedBackwardGaugeFamily_parameter_mfderiv p b lift η |
| 58 | (fun t ht => hright _ (hsrcSupport t ht)) s |
| 59 | change mfderiv (𝓘(ℝ, ℝ)) (spacetimeModel n) (fun v => α (s, v)) 0 (1 : ℝ) = _ at hparameter |
| 60 | have hvelocity := gaugeCurve_projectedVelocity b (fun t => (lift (p.curve t)).1) |
| 61 | (fun t => (lift (p.curve t)).2) (hL.fst.mdifferentiableAt (by simp)) |
| 62 | (hL.snd.mdifferentiableAt (by simp)) |
| 63 | change projectedCurveVelocity G β s = _ at hvelocity |
| 64 | change 2 * Real.sqrt s * G.spacetime.horizontalMetric.inner (α (s, 0)) |
| 65 | (surfaceHorizontalFst α s 0) (surfaceHorizontalSnd α s 0) = _ |
| 66 | unfold surfaceHorizontalFst surfaceHorizontalSnd |
| 67 | rw [hd, hparameter, hfirst.eq_of_nhds] |
| 68 | change 2 * Real.sqrt s * G.spacetime.horizontalMetric.inner (β s) |
| 69 | (projectedCurveVelocity G β s) |
| 70 | (G.spacetime.horizontalProjection (β s) |
| 71 | (((G.gaugeCover.metric b).spatialTangentEquiv |
| 72 | (lift (p.curve s)).1 (lift (p.curve s)).2 (η s)).val)) = _ |
| 73 | rw [hvelocity, G.spacetime.horizontalProjection_identity, |
| 74 | ← (G.gaugeCover.metric b).metric_eq, backwardMetricCoefficient_apply, |
| 75 | gaugeLift_time_eq p b lift hright (Ioo_subset_Icc_self hs) hsrc] |
| 76 | |
| 77 | end PoincareMT.M14 |