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.CurveShortening.Comparison.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Annulus.SliceDifferential |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Coordinate.GaugeEquation |
| 4 | import PoincareLib.Geometry.RicciFlow.Area.MinimalSphere.EnergyDensityCoordinates |
| 5 | |
| 6 | /-! |
| 7 | # Actual slice acceleration in a local target chart |
| 8 | |
| 9 | The selected Levi-Civita pullback acceleration of a straight source slice |
| 10 | is the chart covariant derivative of the actual map differential. Only a |
| 11 | local target chart is used. |
| 12 | |
| 13 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 14 | 447-449. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | open Proofs.M09 CoordinateExponential ConnectionVariation |
| 28 | |
| 29 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 31 | {g : RiemannianMetric n M} |
| 32 | |
| 33 | /-- On a constant-velocity source slice, the actual acceleration is the chart representation |
| 34 | of the covariant Hessian in that direction. Source: Morgan--Tian (2007), Lemma 19.15 and |
| 35 | Corollary 19.16, pp. 447-449; project derivation |
| 36 | `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ |
| 37 | theorem m64Annulus_slice_acceleration_in_chart |
| 38 | (D : LeviCivitaData g) (b : M) {f : LoopPlane → M} |
| 39 | {O : Set LoopPlane} (hO : IsOpen O) |
| 40 | (hf : ContMDiffOn (𝓡 2) (𝓡 n) ∞ f O) |
| 41 | (hchart : MapsTo f O (extChartAt (𝓡 n) b).source) |
| 42 | {ell : ℝ → LoopPlane} {J : Set ℝ} (hJ : IsOpen J) |
| 43 | (hell : ContDiffOn ℝ ∞ ell J) (hmap : MapsTo ell J O) |
| 44 | (d : LoopPlane) (hd : ∀ r ∈ J, HasDerivAt ell d r) {x : ℝ} (hx : x ∈ J) : |
| 45 | let u := (extChartAt (𝓡 n) b) ∘ f |
| 46 | let B := g.pullbackCoefficients (extChartAt (𝓡 n) b).symm |
| 47 | rampHorizontalCovariantDerivative D (f ∘ ell) |
| 48 | (fun r => curveVelocity (f ∘ ell) r) x = |
| 49 | chartVectorField b |
| 50 | (covDerivAlong (christoffelBilinear B) u |
| 51 | (fun q => fderiv ℝ u q d) d (ell x)) (f (ell x)) := by |
| 52 | let c := extChartAt (𝓡 n) b |
| 53 | let u := c ∘ f |
| 54 | let B := g.pullbackCoefficients c.symm |
| 55 | have he : extChartAt (𝓡 n) b = |
| 56 | (chartAt (EuclideanSpace ℝ (Fin n)) b).toPartialEquiv := by |
| 57 | ext y <;> simp |
| 58 | have hu : ContDiffOn ℝ ∞ u O := by |
| 59 | intro p hp |
| 60 | have hc : ContMDiffAt (𝓡 n) (𝓡 n) ∞ c (f p) := |
| 61 | contMDiffAt_extChartAt' (by simpa only [extChartAt_source] using hchart hp) |
| 62 | exact (contMDiffAt_iff_contDiffAt.mp |
| 63 | (hc.comp p (hf.contMDiffAt (hO.mem_nhds hp)))).contDiffWithinAt |
| 64 | have hgamma : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) 2 (f ∘ ell) J := |
| 65 | (hf.comp hell.contMDiffOn hmap).of_le (WithTop.coe_le_coe.mpr le_top) |
| 66 | have hgammaChart : MapsTo (f ∘ ell) J |
| 67 | (chartAt (EuclideanSpace ℝ (Fin n)) b).source := by |
| 68 | simpa only [he] using hchart.comp hmap |
| 69 | have hacc := M63.pullback_velocity_eq_chart_acceleration D b hJ hgamma hgammaChart hx |
| 70 | let z := fun r => u (ell r) |
| 71 | have hz (r : ℝ) (hr : r ∈ J) : HasDerivAt z (fderiv ℝ u (ell r) d) r := |
| 72 | ((hu.contDiffAt (hO.mem_nhds (hmap hr))).differentiableAt (by simp)).hasFDerivAt |
| 73 | |>.comp_hasDerivAt r (hd r hr) |
| 74 | have hz' : (deriv z) =ᶠ[𝓝 x] fun r => fderiv ℝ u (ell r) d := by |
| 75 | filter_upwards [hJ.mem_nhds hx] with r hr |
| 76 | exact (hz r hr).deriv |
| 77 | have hdu : ContDiffAt ℝ ∞ (fun p => fderiv ℝ u p d) (ell x) := |
| 78 | ((hu.contDiffAt (hO.mem_nhds (hmap hx))).fderiv_right (m := ∞) (by simp)).clm_apply |
| 79 | contDiffAt_const |
| 80 | have hsecond : deriv (deriv z) x = fderiv ℝ (fun p => fderiv ℝ u p d) (ell x) d := |
| 81 | hz'.deriv_eq.trans (((hdu.differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt x |
| 82 | (hd x hx)).deriv) |
| 83 | have hacc' : rampHorizontalCovariantDerivative D (f ∘ ell) |
| 84 | (fun r => curveVelocity (f ∘ ell) r) x = |
| 85 | chartVectorField b |
| 86 | (deriv (deriv z) x + coordinateChristoffel B (u (ell x)) (deriv z x) (deriv z x)) |
| 87 | (f (ell x)) := by |
| 88 | simpa only [c, u, B, z, he, Function.comp_def] using! hacc |
| 89 | rw [hsecond, (hz x hx).deriv] at hacc' |
| 90 | exact hacc' |
| 91 | |
| 92 | end PoincareMT |