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.Maps |
| 2 | |
| 3 | /-! |
| 4 | # Smooth interval families as maps on their actual real time domain |
| 5 | -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | |
| 10 | open Set Function |
| 11 | open scoped Manifold ContDiff Topology |
| 12 | |
| 13 | open PoincareMT |
| 14 | |
| 15 | namespace Poincare.Spacetime.Realization |
| 16 | |
| 17 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 18 | {H : Type*} [TopologicalSpace H] {J : ModelWithCorners ℝ E H} |
| 19 | {M : Type*} [TopologicalSpace M] [ChartedSpace H M] |
| 20 | {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 21 | {H' : Type*} [TopologicalSpace H'] {J' : ModelWithCorners ℝ F H'} |
| 22 | {N : Type*} [TopologicalSpace N] [ChartedSpace H' N] |
| 23 | |
| 24 | theorem interval_family_smoothOn (I : SpacetimeInterval) |
| 25 | {f : (smoothInterval I).Point × M → N} {g : ℝ × M → N} |
| 26 | (hf : ContMDiff ((𝓡∂ 1).prod J) J' ∞ f) |
| 27 | (hg : ∀ (t : (smoothInterval I).Point) (x : M), g (t.val, x) = f (t, x)) : |
| 28 | ContMDiffOn (𝓘(ℝ).prod J) J' ∞ g (I.domain ×ˢ univ) := by |
| 29 | let := intervalChartedSpace I |
| 30 | intro p hp |
| 31 | let D := intervalSegmentAt I ⟨p.1, hp.1⟩ |
| 32 | let : Fact (D.left < D.right) := ⟨D.lt⟩ |
| 33 | let U : Set (ℝ × M) := D.window ×ˢ univ |
| 34 | let S : Set (ℝ × M) := (I.domain ×ˢ univ) ∩ U |
| 35 | have hpU : p ∈ U := ⟨intervalSegmentAt_mem I ⟨p.1, hp.1⟩, mem_univ _⟩ |
| 36 | have hU : U ∈ 𝓝 p := (D.open_window.prod isOpen_univ).mem_nhds hpU |
| 37 | apply (contMDiffWithinAt_inter hU).mp |
| 38 | have hinc : ContMDiff (𝓡∂ 1) (𝓡∂ 1) ∞ D.toSegment.symm := by |
| 39 | apply (contMDiff_interval_iff I).mpr |
| 40 | exact contMDiff_subtypeVal_Icc |
| 41 | have hpseg : p.1 ∈ Icc D.left D.right := D.window_subset ⟨hpU.1, hp.1⟩ |
| 42 | have hproj : ContMDiffWithinAt (𝓘(ℝ).prod J) (𝓡∂ 1) ∞ |
| 43 | (fun q : ℝ × M ↦ projIcc D.left D.right D.lt.le q.1) S p := by |
| 44 | apply (contMDiffOn_projIcc p.1 hpseg).comp p contMDiffWithinAt_fst |
| 45 | intro q hq |
| 46 | exact D.window_subset ⟨hq.2.1, hq.1.1⟩ |
| 47 | have hs := (hf.comp (hinc.prodMap contMDiff_id)).contMDiffAt.comp_contMDiffWithinAt p |
| 48 | (hproj.prodMk contMDiffWithinAt_snd) |
| 49 | apply hs.congr_of_mem _ ⟨hp, hpU⟩ |
| 50 | intro q hq |
| 51 | change g q = f (D.toSegment.symm (projIcc D.left D.right D.lt.le q.1), q.2) |
| 52 | rw [hg ⟨q.1, hq.1.1⟩ q.2] |
| 53 | congr 1 |
| 54 | apply Prod.ext |
| 55 | · apply Subtype.ext |
| 56 | exact (congrArg Subtype.val |
| 57 | (projIcc_of_mem D.lt.le (D.window_subset ⟨hq.2.1, hq.1.1⟩))).symm |
| 58 | · rfl |
| 59 | |
| 60 | end Poincare.Spacetime.Realization |