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.Minimizers.MinimizerCoordinates |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Extension.OpenFieldExtension |
| 3 | |
| 4 | /-! |
| 5 | # Interior smoothness and velocity extensions of minimizing paths |
| 6 | |
| 7 | Morgan-Tian Lemma 6.4 and Definition 6.7, pp. 107-108. Local smooth |
| 8 | gauge coordinates reconstruct the actual minimizing curve. Its given |
| 9 | horizontal velocity is the smooth projected derivative, and thus has |
| 10 | the actual common-domain extension required by the Euler statement. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- The open-subset coordinates retain the supplied cylinder manifold structure. |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {T τ₁ τ₂ : ℝ} {x y : G.Point} (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 27 | |
| 28 | /-- Every actual minimizing backward path is smooth throughout its |
| 29 | original strict parameter interval, the regularity assertion accompanying |
| 30 | Lemma 6.4 and Definition 6.7, pp. 107-108. -/ |
| 31 | theorem minimizing_curve_contMDiffOn (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 32 | (hmin : M14IsMinimizing p) : |
| 33 | ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ p.curve (Ioo τ₁ τ₂) := by |
| 34 | intro t ht |
| 35 | obtain ⟨b, U, lift, hU, htU, hlift, hright, _⟩ := exists_smooth_gauge_lift G (p.curve t) |
| 36 | let J := Ioo τ₁ τ₂ ∩ p.curve ⁻¹' U |
| 37 | have hJ : IsOpen J := p.curve_regular.continuousOn.isOpen_inter_preimage isOpen_Ioo hU |
| 38 | have htJ : t ∈ J := ⟨ht, htU⟩ |
| 39 | obtain ⟨a, c, htac, hacN, hacJ⟩ := exists_Icc_mem_subset_of_mem_nhds (hJ.mem_nhds htJ) |
| 40 | have hac : a < c := (Icc_mem_nhds_iff.mp hacN).1.trans (Icc_mem_nhds_iff.mp hacN).2 |
| 41 | have hu := (minimizing_gaugeCoordinate_regularity p b lift (lift (p.curve t)).2 hM12 hmin |
| 42 | hU hlift hright hJ inter_subset_left (fun _ hs => hs.2) hac hacJ).1 |
| 43 | have hs : ContMDiffWithinAt (𝓘(ℝ, ℝ)) (𝓡 n) ∞ |
| 44 | (fun s => (lift (p.curve s)).2) (Icc a c) t := |
| 45 | (ContMDiffWithinAt.subtypeVal_comp_iff (G.gaugeCover.spatial b) _ _ t).mp |
| 46 | (hu.contMDiffOn t htac) |
| 47 | have hθ := gaugeLift_time_contMDiffOn p b lift hright |
| 48 | (show J ⊆ Icc τ₁ τ₂ from inter_subset_left.trans Ioo_subset_Icc_self) |
| 49 | (fun _ hs => hs.2) |
| 50 | have hpair := ((hθ t htJ).contMDiffAt (hJ.mem_nhds htJ)).prodMk (hs.contMDiffAt hacN) |
| 51 | have hcyl := (G.gaugeCover.cylinder b).smooth.contMDiffAt.comp t hpair |
| 52 | have heq : p.curve =ᶠ[𝓝 t] |
| 53 | (fun s => (G.gaugeCover.cylinder b).toSpacetime (lift (p.curve s))) := by |
| 54 | filter_upwards [hJ.mem_nhds htJ] with s hs |
| 55 | exact (hright _ hs.2).symm |
| 56 | exact (hcyl.congr_of_eventuallyEq heq).contMDiffWithinAt |
| 57 | |
| 58 | /-- The given horizontal velocity of a minimizing path is smooth on |
| 59 | its original strict interval, using its actual derivative equation, |
| 60 | Definition 6.7, p. 108. -/ |
| 61 | theorem minimizing_horizontalVelocity_contMDiffOn (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 62 | (hmin : M14IsMinimizing p) : |
| 63 | ContMDiffOn (𝓘(ℝ, ℝ)) ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 64 | (fun s => Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 65 | (E := G.Horizontal) (p.curve s) (p.horizontal_velocity s)) (Ioo τ₁ τ₂) := by |
| 66 | have hv := projectedCurveVelocityWithin_smooth isOpen_Ioo.uniqueDiffOn |
| 67 | (minimizing_curve_contMDiffOn p hM12 hmin) |
| 68 | apply hv.congr |
| 69 | intro s hs |
| 70 | simp only [backwardPath_velocity_eq_projected p hs, projectedCurveVelocityWithin, |
| 71 | projectedCurveVelocity, mfderivWithin_of_mem_nhds (isOpen_Ioo.mem_nhds hs)] |
| 72 | |
| 73 | /-- An actual minimizing path has the frozen horizontal velocity |
| 74 | extension on the original strict interval, the extension part of |
| 75 | Lemma 6.4 and Definition 6.7, pp. 107-108. -/ |
| 76 | theorem exists_minimizing_velocity_extension (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 77 | (hmin : M14IsMinimizing p) : |
| 78 | Nonempty (M14PullbackExtension G p.curve (Ioo τ₁ τ₂) p.horizontal_velocity) := |
| 79 | exists_pullbackExtension_of_isOpen isOpen_Ioo |
| 80 | (minimizing_horizontalVelocity_contMDiffOn p hM12 hmin) |
| 81 | |
| 82 | end PoincareMT.M14 |