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.ODE.Families.ClosedFamilyPrimitive |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Families.FamilyDensity |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Construction.ExponentialCoherence |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Domain.MaximalSmooth |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Action.SquareDensity |
| 6 | |
| 7 | /-! |
| 8 | # Joint smoothness of the actual exponential action |
| 9 | |
| 10 | Morgan-Tian Lemma 6.22, pp. 115-116, and equation (6.2), p. 106. |
| 11 | The actual action on a common closed survival prefix is the primitive |
| 12 | of its jointly smooth square density. Relative continuation promotes |
| 13 | prefix smoothness to the whole positive survival domain, including |
| 14 | physical endpoints. Actual IVP coherence transfers it to every supplied |
| 15 | exponential family. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M14 |
| 26 | |
| 27 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 28 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 29 | {T : ℝ} {x : G.Point} |
| 30 | |
| 31 | private theorem horizontal_t2Space : T2Space (G.Horizontal x) := |
| 32 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 33 | |
| 34 | attribute [local instance] horizontal_t2Space |
| 35 | |
| 36 | private theorem inner_heq {x y : G.Point} (h : x = y) |
| 37 | {v : G.Horizontal x} {w : G.Horizontal y} (hv : HEq v w) : |
| 38 | G.spacetime.horizontalMetric.inner x v v = G.spacetime.horizontalMetric.inner y w w := by |
| 39 | cases h |
| 40 | cases hv |
| 41 | rfl |
| 42 | |
| 43 | /-- On a surviving closed prefix, the actual selected action is the |
| 44 | primitive of the canonical curve's actual within square density, |
| 45 | equation (6.2) and Lemma 6.22, pp. 106, 115-116. -/ |
| 46 | theorem initialValueAction_eq_density_primitive |
| 47 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 48 | {Z : G.Horizontal x} {S r : ℝ} (hS : 0 < S) |
| 49 | (hsurv : (Z, S) ∈ initialValueDomain G T x) (hr : r ∈ Icc 0 S) : |
| 50 | initialValueAction G T x Z r = |
| 51 | ∫ t in 0..r, squareCurveDensity G (initialValueCurve G T x Z) (Icc 0 S) t := by |
| 52 | let P := selectedInitialValuePath ⟨hS, (initialValueDomain_positive_iff hS).mp hsurv⟩ |
| 53 | have hC : M14SqrtParameterInterval 0 (S ^ 2) = Icc 0 S := by |
| 54 | rw [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hS.le] |
| 55 | have heq : EqOn (initialValueCurve G T x Z) P.square_path.curve (Icc 0 S) := by |
| 56 | simpa only [hC] using initialValueCurve_eqOn_square hM04 hM12 P |
| 57 | rw [initialValueAction_eq_integral_prefix hM04 hM12 P |
| 58 | (by simpa only [Real.sqrt_sq hS.le] using hr)] |
| 59 | apply intervalIntegral.integral_congr_Ioo_of_le hr.1 |
| 60 | intro t ht |
| 61 | have htC : t ∈ Icc 0 S := ⟨ht.1.le, ht.2.le.trans hr.2⟩ |
| 62 | have hv := projectedCurveVelocityWithin_congrOn (G := G) heq htC |
| 63 | rw [squareRoot_projectedVelocityWithin_subset P.square_path |
| 64 | (by rw [hC]) htC (uniqueDiffOn_Icc hS t htC)] at hv |
| 65 | have hinner := inner_heq (heq htC) hv |
| 66 | unfold squareRootLIntegrand squareCurveDensity |
| 67 | rw [hinner, heq htC] |
| 68 | |
| 69 | /-- The actual action is jointly smooth on every common smooth |
| 70 | closed survival prefix, including square time zero and its final |
| 71 | endpoint, Lemma 6.22, pp. 115-116. -/ |
| 72 | theorem initialValueAction_smooth_prefix |
| 73 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 74 | {U : Set (G.Horizontal x)} {S : ℝ} (hU : IsOpen U) (hS : 0 < S) |
| 75 | (hsurv : U ×ˢ Icc 0 S ⊆ initialValueDomain G T x) |
| 76 | (hsm : M14HorizontalFamilySmooth G (initialValueCurve G T x) (U ×ˢ Icc 0 S)) : |
| 77 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 78 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 79 | ContMDiffOn ((𝓘(ℝ, G.Horizontal x)).prod (𝓘(ℝ, ℝ))) (𝓘(ℝ, ℝ)) ∞ |
| 80 | (fun z => initialValueAction G T x z.1 z.2) (U ×ˢ Icc 0 S) := by |
| 81 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 82 | let : NormedAddCommGroup (G.Horizontal x) := |
| 83 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 84 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 85 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 86 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 87 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 88 | let : FiniteDimensional ℝ (G.Horizontal x) := |
| 89 | VectorBundle.finiteDimensional ℝ (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 90 | have hγ₀ : ContMDiffOn ((𝓘(ℝ, G.Horizontal x)).prod (𝓘(ℝ, ℝ))) (spacetimeModel n) ∞ |
| 91 | (fun z : G.Horizontal x × ℝ => initialValueCurve G T x z.1 z.2) (U ×ˢ Icc 0 S) := hsm |
| 92 | have hγ : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, G.Horizontal x))) (spacetimeModel n) ∞ |
| 93 | (fun z : ℝ × G.Horizontal x => initialValueCurve G T x z.2 z.1) (Icc 0 S ×ˢ U) := |
| 94 | hγ₀.comp (contMDiff_snd.prodMk contMDiff_fst).contMDiffOn (fun _ hz => ⟨hz.2, hz.1⟩) |
| 95 | have hd := squareFamilyDensity_contDiffOn hM12 (uniqueDiffOn_Icc hS) hU hγ |
| 96 | have hp := closedFamilyPrimitive_contDiffOn hS hU _ hd |
| 97 | have ha : ContDiffOn ℝ ∞ (fun z : G.Horizontal x × ℝ => initialValueAction G T x z.1 z.2) |
| 98 | (U ×ˢ Icc 0 S) := by |
| 99 | apply hp.congr |
| 100 | intro z hz |
| 101 | exact initialValueAction_eq_density_primitive hM04 hM12 hS |
| 102 | (hsurv ⟨hz.1, hS.le, le_rfl⟩) hz.2 |
| 103 | rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 104 | exact ha.contMDiffOn |
| 105 | |
| 106 | /-- The actual selected action is smooth throughout positive |
| 107 | survival, with within smoothness at physical final endpoints, |
| 108 | Lemma 6.22, pp. 115-116. -/ |
| 109 | theorem initialValueAction_smooth |
| 110 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 111 | (hbase : G.spacetime.timeFunction x = T) : |
| 112 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 113 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 114 | ContMDiffOn ((𝓘(ℝ, G.Horizontal x)).prod (𝓘(ℝ, ℝ))) (𝓘(ℝ, ℝ)) ∞ |
| 115 | (fun z => initialValueAction G T x z.1 z.2) |
| 116 | (initialValueDomain G T x ∩ {z | 0 < z.2}) := by |
| 117 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 118 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 119 | rintro ⟨Z, s⟩ ⟨hsurv, hpos⟩ |
| 120 | obtain ⟨S, hsS, U, hU, hZU, hnear, htube, hsm⟩ := |
| 121 | initialValueCurve_smooth_neighborhood_positive hM04 hM12 hbase hpos hsurv |
| 122 | exact ((initialValueAction_smooth_prefix hM04 hM12 hU (hpos.trans_le hsS) htube hsm) |
| 123 | (Z, s) ⟨hZU, hpos.le, hsS⟩).mono_of_mem_nhdsWithin |
| 124 | (nhdsWithin_mono (Z, s) (fun _ hz => initialValueDomain_admissible hbase hz.1) hnear) |
| 125 | |
| 126 | /-- Every supplied exponential family's actual action is jointly |
| 127 | smooth on its positive survival domain, the smoothness clause of |
| 128 | Lemma 6.22, pp. 115-116. -/ |
| 129 | theorem exponentialFamily_action_smooth |
| 130 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 131 | (E : M14ExponentialFamily G T x) : |
| 132 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 133 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 134 | ContMDiffOn ((𝓘(ℝ, G.Horizontal x)).prod (𝓘(ℝ, ℝ))) (𝓘(ℝ, ℝ)) ∞ |
| 135 | (fun z => E.action z.1 z.2) (E.domain ∩ {z | 0 < z.2}) := by |
| 136 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 137 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 138 | have h := initialValueAction_smooth hM04 hM12 E.base_time |
| 139 | rw [← exponentialFamily_domain_eq E] at h |
| 140 | exact h.congr (fun _ hz => exponentialFamily_action_eq hM04 hM12 E hz.1 hz.2) |
| 141 | |
| 142 | end PoincareMT.M14 |