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.Spacetime.Realization.Interval.System |
| 2 | |
| 3 | /-! |
| 4 | # Smooth maps into a time interval |
| 5 | |
| 6 | Smoothness can be tested after the actual real inclusion, including at the |
| 7 | included endpoints. The proof uses the selected target segment chart. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open Set |
| 14 | open scoped Manifold ContDiff Topology |
| 15 | |
| 16 | open PoincareMT |
| 17 | |
| 18 | namespace Poincare.Spacetime.Realization |
| 19 | |
| 20 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 21 | {H : Type*} [TopologicalSpace H] {J : ModelWithCorners ℝ E H} |
| 22 | {M : Type*} [TopologicalSpace M] [ChartedSpace H M] |
| 23 | |
| 24 | theorem contMDiffAt_interval_iff (I : SpacetimeInterval) |
| 25 | {f : M → (smoothInterval I).Point} {x : M} : |
| 26 | ContMDiffAt J (𝓡∂ 1) ∞ f x ↔ |
| 27 | ContMDiffAt J 𝓘(ℝ) ∞ (Subtype.val ∘ f) x := by |
| 28 | let := intervalChartedSpace I |
| 29 | constructor |
| 30 | · intro hf |
| 31 | exact ((smoothInterval I).inclusion_smooth (f x)).comp x hf |
| 32 | · intro hf |
| 33 | let D := intervalSegmentAt I (f x) |
| 34 | let : Fact (D.left < D.right) := ⟨D.lt⟩ |
| 35 | let S : Set M := {y | (f y).val ∈ D.window} |
| 36 | have hS : S ∈ 𝓝 x := |
| 37 | hf.continuousAt.preimage_mem_nhds |
| 38 | (D.open_window.mem_nhds (intervalSegmentAt_mem I (f x))) |
| 39 | have hproj : ContMDiffWithinAt J (𝓡∂ 1) ∞ (D.toSegment ∘ f) S x := by |
| 40 | apply (contMDiffOn_projIcc _ |
| 41 | (D.window_subset ⟨intervalSegmentAt_mem I (f x), (f x).property⟩)).comp |
| 42 | x hf.contMDiffWithinAt |
| 43 | intro y hy |
| 44 | exact D.window_subset ⟨hy, (f y).property⟩ |
| 45 | apply contMDiffAt_iff_target.mpr |
| 46 | refine ⟨tendsto_subtype_rng.mpr hf.continuousAt, ?_⟩ |
| 47 | change ContMDiffAt J 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) ∞ |
| 48 | (extChartAt (𝓡∂ 1) (D.toSegment (f x)) ∘ (D.toSegment ∘ f)) x |
| 49 | exact (contMDiffAt_extChartAt (I := 𝓡∂ 1) (x := D.toSegment (f x))).comp x |
| 50 | (hproj.contMDiffAt hS) |
| 51 | |
| 52 | theorem contMDiff_interval_iff (I : SpacetimeInterval) |
| 53 | {f : M → (smoothInterval I).Point} : |
| 54 | ContMDiff J (𝓡∂ 1) ∞ f ↔ ContMDiff J 𝓘(ℝ) ∞ (Subtype.val ∘ f) := |
| 55 | forall_congr' fun _ ↦ contMDiffAt_interval_iff I |
| 56 | |
| 57 | end Poincare.Spacetime.Realization |