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.Extension.LocalTestField |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.IndexForm.FixedEndpointBoundary |
| 3 | |
| 4 | /-! |
| 5 | # Actual fields at shifted and fixed endpoints |
| 6 | |
| 7 | Morgan-Tian Lemma 6.4 and Proposition 6.30, pp. 107-108, 118-119. |
| 8 | The endpoint derivative needs reconstruction only at that time point. |
| 9 | Away from the support the frozen field vanishes exactly. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | -- The underlying model identifies transported tangent-space values. |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 26 | (R : M14SquareRootPath G p) (j : G.gaugeCover.index) |
| 27 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval j)).Point × |
| 28 | G.gaugeCover.spatial j) (η : ℝ → EuclideanSpace ℝ (Fin n)) |
| 29 | |
| 30 | private theorem horizontal_transport_val {q r : G.Point} (h : q = r) |
| 31 | (v : G.Horizontal q) : (h.symm ▸ v : G.Horizontal r).val = v.val := by |
| 32 | cases h |
| 33 | rfl |
| 34 | |
| 35 | /-- At any actual closed time point with gauge reconstruction, the frozen |
| 36 | field is the chosen spatial test vector under the actual tangent map, |
| 37 | Lemma 6.4 and Proposition 6.30, pp. 107-108, 118-119. -/ |
| 38 | theorem variationField_supportedGauge_val_at (V : M14LVariationData G p R) {s : ℝ} |
| 39 | (hs : s ∈ M14SqrtParameterInterval a b) |
| 40 | (hV : ∀ v, V.squareFamily s v = supportedGaugeFamily R j lift η (s, v)) |
| 41 | (hright : (G.gaugeCover.cylinder j).toSpacetime (lift (R.curve s)) = R.curve s) : |
| 42 | (M14VariationField V s).val = |
| 43 | ((G.gaugeCover.metric j).spatialTangentEquiv |
| 44 | (lift (R.curve s)).1 (lift (R.curve s)).2 (η s)).val := by |
| 45 | have htransport : (M14VariationField V s).val = (M14EndpointVariationField V s 0).val := |
| 46 | horizontal_transport_val (V.square_base s) _ |
| 47 | have hzero : (0 : ℝ) ∈ V.parameterDomain := by |
| 48 | rw [V.parameterDomain_eq] |
| 49 | exact ⟨neg_lt_zero.mpr V.radius_pos, V.radius_pos⟩ |
| 50 | rw [htransport, endpointVariationField_val_eq_tangent V hs hzero] |
| 51 | have heq : (fun v => V.squareFamily s v) = |
| 52 | (fun v => gaugeShiftFamily R j lift η (s, v)) := |
| 53 | funext (fun v => (hV v).trans (supportedGaugeFamily_eq_gauge R j lift η hright)) |
| 54 | rw [heq] |
| 55 | exact gaugeShiftFamily_parameter_mfderiv R j lift η s |
| 56 | |
| 57 | /-- Outside the chosen support the exact variation field vanishes, |
| 58 | including fixed outer endpoints, Lemma 6.4, pp. 107-108. -/ |
| 59 | theorem variationField_supportedGauge_eq_zero (V : M14LVariationData G p R) {s : ℝ} |
| 60 | (hV : ∀ v, V.squareFamily s v = supportedGaugeFamily R j lift η (s, v)) |
| 61 | (hs : s ∉ tsupport η) : M14VariationField V s = 0 := by |
| 62 | apply variationField_eq_zero_of_constant V |
| 63 | intro v _ |
| 64 | rw [hV v, hV 0, supportedGaugeFamily_eq_of_not_tsupport R j lift η hs, |
| 65 | supportedGaugeFamily_eq_of_not_tsupport R j lift η hs] |
| 66 | |
| 67 | end PoincareMT.M14 |