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.Extension.ClosedStateExtension |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Paths.ClosedPathSubstitution |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Paths.ContinuousPathFamily |
| 4 | |
| 5 | /-! |
| 6 | # Smoothly currying a family on its actual compact time set |
| 7 | |
| 8 | The parameter smoothness used for Morgan-Tian Lemma 6.22, |
| 9 | pp. 115-116. Localizing only the open parameter variable permits |
| 10 | the existing closed-time substitution theorem to apply to constant |
| 11 | parameter paths. The actual compact time set is retained throughout. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter Metric |
| 17 | open scoped ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {E F : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 24 | [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 25 | {C : Set ℝ} [CompactSpace C] {U : Set E} |
| 26 | |
| 27 | /-- A path family representing a smooth closed-time scalar or vector |
| 28 | family is smooth in the open parameter set, with no condition on its |
| 29 | off-parameter values, the path-space form of Lemma 6.22, pp. 115-116. -/ |
| 30 | theorem contDiffOn_closedPathFamily (hC : UniqueDiffOn ℝ C) (hU : IsOpen U) |
| 31 | (f : ℝ × E → F) (hf : ContDiffOn ℝ ∞ f (C ×ˢ U)) |
| 32 | (Φ : E → C(C, F)) (hΦ : ∀ x ∈ U, ∀ t : C, Φ x t = f (t.val, x)) : |
| 33 | ContDiffOn ℝ ∞ Φ U := by |
| 34 | intro x hx |
| 35 | obtain ⟨r, hr, g, _, hg, hgf⟩ := exists_closedTime_state_extension hU f hf hx |
| 36 | let L : E →L[ℝ] C(C, E) := ContinuousLinearMap.const ℝ C |
| 37 | let Ψ : E → C(C, F) := fun y => closedTimePostcomp g hg.continuousOn (L y) |
| 38 | have hΨ : ContDiff ℝ ∞ Ψ := |
| 39 | (closedTimePostcomp_contDiff hC g hg).comp L.contDiff |
| 40 | have heq : Φ =ᶠ[𝓝 x] Ψ := by |
| 41 | filter_upwards [ball_mem_nhds x hr, hU.mem_nhds hx] with y hy hyU |
| 42 | apply ContinuousMap.ext |
| 43 | intro t |
| 44 | exact (hΦ y hyU t).trans (hgf ⟨t.property, ball_subset_closedBall hy⟩).symm |
| 45 | exact (hΨ.contDiffAt.congr_of_eventuallyEq heq).contDiffWithinAt |
| 46 | |
| 47 | /-- A smooth family on a compact actual time set has a smooth |
| 48 | continuous-path representative on its open parameter set. This |
| 49 | supplies the bounded-integral input to Lemma 6.22, pp. 115-116. -/ |
| 50 | theorem exists_contDiffOn_closedPathFamily (hC : UniqueDiffOn ℝ C) (hU : IsOpen U) |
| 51 | (f : ℝ × E → F) (hf : ContDiffOn ℝ ∞ f (C ×ˢ U)) : |
| 52 | ∃ Φ : E → C(C, F), ContDiffOn ℝ ∞ Φ U ∧ |
| 53 | ∀ x ∈ U, ∀ t : C, Φ x t = f (t.val, x) := by |
| 54 | have hc : ContinuousOn (fun z : E × C => f (z.2.val, z.1)) (U ×ˢ univ) := |
| 55 | hf.continuousOn.comp |
| 56 | ((continuous_subtype_val.comp continuous_snd).prodMk continuous_fst).continuousOn |
| 57 | (fun z hz => ⟨z.2.property, hz.1⟩) |
| 58 | obtain ⟨Φ, _, hΦ⟩ := exists_continuousOn_pathFamily |
| 59 | (fun z : E × C => f (z.2.val, z.1)) hc (0 : C(C, F)) |
| 60 | exact ⟨Φ, contDiffOn_closedPathFamily hC hU f hf Φ hΦ, hΦ⟩ |
| 61 | |
| 62 | end PoincareMT.M14 |