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.Local.ClosedODETimeJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Paths.ClosedODEPathFamily |
| 3 | |
| 4 | /-! |
| 5 | # Jointly smooth actual local closed ODE families |
| 6 | |
| 7 | Morgan-Tian Lemma 6.18, pp. 113-114. A state-only extension agrees |
| 8 | with the original field on a retained ball. The actual local path |
| 9 | family stays in this ball, so its actual time jets prove joint |
| 10 | smoothness without extending the time interval. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter Metric |
| 16 | open scoped Topology ContDiff |
| 17 | |
| 18 | namespace PoincareMT.M14 |
| 19 | |
| 20 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 21 | |
| 22 | /-- A smooth actual closed-time field admits a jointly smooth local |
| 23 | initial-value family on a relative time neighborhood. Its state range |
| 24 | and actual within ODE are retained, including initial and final closed |
| 25 | endpoints, as required by Lemma 6.18, pp. 113-114. -/ |
| 26 | theorem closedODE_exists_joint_family {a b : ℝ} (hab : a < b) (t₀ : Icc a b) |
| 27 | {U : Set E} (hU : IsOpen U) (f : ℝ × E → E) |
| 28 | (hf : ContDiffOn ℝ ∞ f (Icc a b ×ˢ U)) {x₀ : E} (hx₀ : x₀ ∈ U) : |
| 29 | ∃ c d : ℝ, ∃ t₁ : Icc c d, |
| 30 | c < d ∧ a ≤ c ∧ d ≤ b ∧ t₁.val = t₀.val ∧ Icc c d ∈ 𝓝[Icc a b] t₀.val ∧ |
| 31 | ∃ ρ > (0 : ℝ), ∃ α : E × ℝ → E, |
| 32 | ContDiffOn ℝ ∞ α (ball x₀ ρ ×ˢ Icc c d) ∧ ∀ x ∈ ball x₀ ρ, |
| 33 | α (x, t₁.val) = x ∧ ∀ s ∈ Icc c d, |
| 34 | α (x, s) ∈ U ∧ HasDerivWithinAt (fun r => α (x, r)) |
| 35 | (f (s, α (x, s))) (Icc c d) s := by |
| 36 | obtain ⟨R, hR, g, hRU, hg, hgf⟩ := exists_closedTime_state_extension hU f hf hx₀ |
| 37 | have hballU : ball x₀ R ⊆ U := ball_subset_closedBall.trans hRU |
| 38 | obtain ⟨c, d, t₁, hcd, hac, hdb, hi, hnear, ρ, hρ, Φ, hΦ, hdata⟩ := |
| 39 | closedODE_exists_smooth_path_family hab t₀ isOpen_ball f |
| 40 | (hf.mono (prod_mono Subset.rfl hballU)) (mem_ball_self hR) |
| 41 | have hsub : Icc c d ⊆ Icc a b := Icc_subset_Icc hac hdb |
| 42 | have hg' : ContDiffOn ℝ ∞ g (Icc c d ×ˢ univ) := hg.mono (prod_mono hsub Subset.rfl) |
| 43 | let α := closedPathEvaluation hcd.le Φ |
| 44 | have hsm : ContDiffOn ℝ ∞ α (ball x₀ ρ ×ˢ Icc c d) := by |
| 45 | apply closedODEFamily_joint_contDiff hcd t₁ isOpen_ball g hg' Φ hΦ |
| 46 | intro x hx s |
| 47 | rw [hgf ⟨hsub s.property, ball_subset_closedBall ((hdata x hx).2.1 s)⟩] |
| 48 | exact (hdata x hx).2.2.2 s |
| 49 | have heval (x : E) (s : Icc c d) : α (x, s.val) = Φ x s := by |
| 50 | dsimp only [α, closedPathEvaluation] |
| 51 | rw [projIcc_of_mem hcd.le s.property] |
| 52 | refine ⟨c, d, t₁, hcd, hac, hdb, hi, hnear, ρ, hρ, α, hsm, ?_⟩ |
| 53 | intro x hx |
| 54 | refine ⟨(heval x t₁).trans (hdata x hx).1, ?_⟩ |
| 55 | intro s hs |
| 56 | have hs' := heval x ⟨s, hs⟩ |
| 57 | refine ⟨hs'.symm ▸ hballU ((hdata x hx).2.1 ⟨s, hs⟩), ?_⟩ |
| 58 | rw [hs'] |
| 59 | exact (hdata x hx).2.2.2 ⟨s, hs⟩ |
| 60 | |
| 61 | end PoincareMT.M14 |