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.Calculus.Differential.OpenFirstPartialTangent |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialDifferential |
| 3 | |
| 4 | /-! |
| 5 | # Smoothness of the actual initial-vector differential field |
| 6 | |
| 7 | Morgan-Tian Lemma 6.18, pp. 113-114. The initial-vector derivative |
| 8 | is an unrestricted partial derivative on an open initial fiber. |
| 9 | Its smooth tangent lift and horizontal projection remain smooth |
| 10 | through the closed square-time endpoints. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T : ℝ} {x : G.Point} |
| 25 | |
| 26 | private theorem horizontal_t2Space : T2Space (G.Horizontal x) := |
| 27 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 28 | |
| 29 | attribute [local instance] horizontal_t2Space |
| 30 | |
| 31 | /-- The actual projected initial-vector differential applied to a |
| 32 | fixed direction is jointly smooth on every smooth open-by-closed |
| 33 | family rectangle, the regularity part of Lemma 6.18, pp. 113-114. -/ |
| 34 | theorem initialValueDifferential_contMDiffOn |
| 35 | {U : Set (G.Horizontal x)} {C : Set ℝ} (hU : IsOpen U) |
| 36 | (hC : UniqueDiffOn ℝ C) |
| 37 | (hsm : M14HorizontalFamilySmooth G (initialValueCurve G T x) (U ×ˢ C)) |
| 38 | (W : G.Horizontal x) : |
| 39 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 40 | letI : NormedAddCommGroup (G.Horizontal x) := |
| 41 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 42 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 43 | letI : InnerProductSpace ℝ (G.Horizontal x) := |
| 44 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 45 | ContMDiffOn ((𝓘(ℝ, G.Horizontal x)).prod (𝓘(ℝ, ℝ))) |
| 46 | ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 47 | (fun z : G.Horizontal x × ℝ => Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 48 | (E := G.Horizontal) (initialValueCurve G T x z.1 z.2) |
| 49 | (initialValueDifferential G T x z.1 z.2 W)) (U ×ˢ C) := by |
| 50 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 51 | let : NormedAddCommGroup (G.Horizontal x) := |
| 52 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 53 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 54 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 55 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 56 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 57 | have htan := hsm.contMDiffOn_partialTangent_fst_prod hU hC W (k := ∞) (by simp) |
| 58 | have hproj : ContMDiff (spacetimeModel n).tangent |
| 59 | ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 60 | (fun v : TangentBundle (spacetimeModel n) G.Point => |
| 61 | Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 62 | (E := G.Horizontal) v.proj |
| 63 | (G.spacetime.horizontalProjection v.proj v.2)) := |
| 64 | G.spacetime.horizontalProjection_smooth |
| 65 | exact hproj.comp_contMDiffOn htan |
| 66 | |
| 67 | /-- Along every surviving central prefix, the actual initial-vector |
| 68 | differential gives a smooth horizontal field through both endpoints, |
| 69 | as needed for its Jacobi representation in Lemma 6.18, pp. 113-114. -/ |
| 70 | theorem initialValueDifferential_field_contMDiffOn |
| 71 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 72 | (hbase : G.spacetime.timeFunction x = T) {Z : G.Horizontal x} {s : ℝ} |
| 73 | (hs : 0 < s) (hsurv : (Z, s) ∈ initialValueDomain G T x) (W : G.Horizontal x) : |
| 74 | ContMDiffOn (𝓘(ℝ, ℝ)) ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 75 | (fun r => Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 76 | (E := G.Horizontal) (initialValueCurve G T x Z r) |
| 77 | (initialValueDifferential G T x Z r W)) (Icc 0 s) := by |
| 78 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 79 | let : NormedAddCommGroup (G.Horizontal x) := |
| 80 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 81 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 82 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 83 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 84 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 85 | obtain ⟨U, hU, hZU, _, hsm⟩ := |
| 86 | initialValueCurve_smooth_prefix hM04 hM12 hbase hs hsurv |
| 87 | exact (initialValueDifferential_contMDiffOn hU (uniqueDiffOn_Icc hs) hsm W).comp |
| 88 | ((contMDiff_const (c := Z)).prodMk contMDiff_id).contMDiffOn (fun _ hr => ⟨hZU, hr⟩) |
| 89 | |
| 90 | end PoincareMT.M14 |