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.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Compat.GeneralizedEquation |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.CylinderEnergy |
| 4 | import PoincareLib.Geometry.Spacetime.Interval.RealTime |
| 5 | |
| 6 | /-! |
| 7 | # Physical birth energy of an actual path in the cap image |
| 8 | |
| 9 | Proposition 16.13, pp. 377-378. The inverse spatial coordinate is C1 |
| 10 | by the actual ambient local inverse. The temporal coordinate is the |
| 11 | selected smooth real parametrization of the original path's clock. |
| 12 | Together they identify the physical birth energy with the moving |
| 13 | cylinder readout along the original path. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Function |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.Proofs.M12 |
| 25 | end PoincareMT.Proofs.M12 |
| 26 | open PoincareMT.EpochExtension.Spacetime |
| 27 | local notation "GeneralizedFlowCarrierConclusion" => PoincareMT.GeneralizedFlowCarrierConclusionWithInterval |
| 28 | namespace PoincareMT.M08 |
| 29 | export PoincareMT.LGeometry (referenceSpeedSq) |
| 30 | end PoincareMT.M08 |
| 31 | |
| 32 | namespace PoincareMT.Proofs.M46 |
| 33 | |
| 34 | open PoincareMT.Proofs.M12 |
| 35 | |
| 36 | /-- Exact clock equality gives the actual C1 temporal inverse |
| 37 | coordinate, including relative interval endpoints. Source: Definition |
| 38 | 3.38 and Proposition 16.13, pp. 61 and 377-378. -/ |
| 39 | theorem rawCylinder_lift_time_contMDiffOn |
| 40 | {F : GeneralizedRicciFlowData.{u}} |
| 41 | (R : GeneralizedFlowCarrierConclusion (flowBoxAtlas F)) |
| 42 | {K : SpacetimeInterval} {B : Set ℝ} |
| 43 | {gamma : ℝ → R.spacetime.Point} |
| 44 | (theta : ℝ → (R.timeIntervals.interval K).Point) |
| 45 | (hgamma : ContMDiffOn 𝓘(ℝ, ℝ) (spacetimeModel 3) 1 gamma B) |
| 46 | (hclock : ∀ t ∈ B, (theta t).val = R.spacetime.timeFunction (gamma t)) : |
| 47 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡∂ 1) 1 theta B := by |
| 48 | let : ChartedSpace |
| 49 | (ModelProd (EuclideanHalfSpace 1) (EuclideanSpace ℝ (Fin 3))) F.point := |
| 50 | R.spacetime.chartedSpace |
| 51 | let T := R.timeIntervals.interval K |
| 52 | have htime : ContMDiffOn 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) 1 |
| 53 | (R.spacetime.timeFunction ∘ gamma) B := |
| 54 | (R.spacetime.time_smooth.of_le (by simp : (1 : ℕ∞ω) ≤ ∞)).comp_contMDiffOn hgamma |
| 55 | have hmaps : MapsTo (R.spacetime.timeFunction ∘ gamma) B K.domain := by |
| 56 | intro t ht |
| 57 | change R.spacetime.timeFunction (gamma t) ∈ K.domain |
| 58 | rw [← hclock t ht] |
| 59 | exact (theta t).property |
| 60 | have hparam := (T.realParam_smoothOn.of_le (by simp : (1 : ℕ∞ω) ≤ ∞)).comp htime hmaps |
| 61 | apply hparam.congr |
| 62 | intro t ht |
| 63 | apply Subtype.ext |
| 64 | change (theta t).val = (T.realParam (R.spacetime.timeFunction (gamma t))).val |
| 65 | exact (hclock t ht).trans (T.realParam_val (hmaps ht)).symm |
| 66 | |
| 67 | /-- Every actual C1 curve in the tracked cap image has inverse |
| 68 | coordinates whose physical birth energy is bounded by its actual |
| 69 | horizontal kinetic energy. Source: Proposition 16.13, pp. 377-378. -/ |
| 70 | theorem exists_rawCylinder_energy_lift |
| 71 | {F : GeneralizedRicciFlowData.{u}} (G : FlowBoxRicciGeometry F) |
| 72 | {C : GeneralizedSliceCarrier.{u}} {a q : ℝ} {J : SpacetimeInterval} |
| 73 | {U : TopologicalSpace.Opens C.carrier} |
| 74 | (e : GeneralizedFlowCylinder F C a q J.domain U) |
| 75 | (hI : (cylinderPhysicalInterval a q e.scale_pos J).domain ⊆ F.interval) |
| 76 | (gBirth : RiemannianMetric 3 C.carrier) (mu : ℝ) |
| 77 | (hbound : ∀ (s : ℝ) (hs : s ∈ J.domain) (x : U) |
| 78 | (v : TangentSpace (𝓡 3) x.val), |
| 79 | q * (mu * gBirth.inner x.val v v) ≤ e.pullbackInner s hs x.val v v) |
| 80 | {gamma : ℝ → G.realization.spacetime.Point} {B : Set ℝ} |
| 81 | (hB : B.Nonempty) (hopen : IsOpen B) |
| 82 | (hgamma : ContMDiffOn 𝓘(ℝ, ℝ) (spacetimeModel 3) 1 gamma B) |
| 83 | (himage : MapsTo gamma B (range (rawCylinderMap G.realization e))) : |
| 84 | ∃ beta : ℝ → (G.realization.timeIntervals.interval |
| 85 | (cylinderPhysicalInterval a q e.scale_pos J)).Point × U, |
| 86 | EqOn (rawCylinderMap G.realization e ∘ beta) gamma B ∧ ContinuousOn beta B ∧ |
| 87 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 (fun t => (beta t).2.val) B ∧ |
| 88 | (∀ t ∈ B, (beta t).1.val = G.realization.spacetime.timeFunction (gamma t)) ∧ |
| 89 | ∀ t ∈ B, mu * M08.referenceSpeedSq gBirth (fun r => (beta r).2.val) t ≤ |
| 90 | realizedHorizontalForm G.realization (gamma t) |
| 91 | (mfderiv 𝓘(ℝ, ℝ) (spacetimeModel 3) gamma t 1) |
| 92 | (mfderiv 𝓘(ℝ, ℝ) (spacetimeModel 3) gamma t 1) := by |
| 93 | obtain ⟨beta, heq, hcont, hspatial, hclock⟩ := |
| 94 | exists_rawCylinder_lift G.realization e hI hB hgamma himage |
| 95 | have htime := rawCylinder_lift_time_contMDiffOn G.realization |
| 96 | (fun t => (beta t).1) hgamma hclock |
| 97 | have hz : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 (fun t => (beta t).2) B := by |
| 98 | intro t ht |
| 99 | exact (ChartedSpace.liftPropWithinAt_subtypeVal_comp_iff |
| 100 | (P := ContDiffWithinAtProp 𝓘(ℝ, ℝ) (𝓡 3) 1) (fun t => (beta t).2) B t).mp |
| 101 | (hspatial t ht) |
| 102 | refine ⟨beta, heq, hcont, hspatial, hclock, ?_⟩ |
| 103 | intro t ht |
| 104 | have henergy := rawCylinder_birthEnergy_lower G e hI gBirth mu hbound |
| 105 | (fun r => (beta r).1) (fun r => (beta r).2) |
| 106 | (((htime t ht).contMDiffAt (hopen.mem_nhds ht)).mdifferentiableAt (by simp)) |
| 107 | (((hz t ht).contMDiffAt (hopen.mem_nhds ht)).mdifferentiableAt (by simp)) |
| 108 | have hpath : (rawCylinderMap G.realization e ∘ beta) =ᶠ[𝓝 t] gamma := by |
| 109 | filter_upwards [hopen.mem_nhds ht] with r hr |
| 110 | exact heq hr |
| 111 | have hsame := realizedHorizontalEnergy_congr G hpath |
| 112 | exact henergy.trans_eq hsame |
| 113 | |
| 114 | end PoincareMT.Proofs.M46 |