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.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Basic |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Regularity.SmoothEndpointExtension |
| 4 | |
| 5 | /-! |
| 6 | # Horizontal pullback extensions in a bundle chart |
| 7 | |
| 8 | The local extension step for Morgan-Tian Lemmas 6.4 and 6.8, pp. 107-109. |
| 9 | Smooth field coordinates give the actual parameter-dependent horizontal |
| 10 | section. M08's closed-interval extension supplies two-sided endpoint |
| 11 | derivatives without extending the spacetime curve across its boundary. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {γ : ℝ → G.Point} {Y : ∀ s, G.Horizontal (γ s)} |
| 25 | |
| 26 | /-- A smooth coefficient curve defines a genuine horizontal pullback |
| 27 | extension on one bundle chart, as used in Lemmas 6.4 and 6.8, pp. 107-109. -/ |
| 28 | noncomputable def pullbackExtensionInChart |
| 29 | (e : Bundle.Trivialization (EuclideanSpace ℝ (Fin n)) |
| 30 | (Bundle.TotalSpace.proj : Bundle.TotalSpace (EuclideanSpace ℝ (Fin n)) |
| 31 | G.Horizontal → G.Point)) [MemTrivializationAtlas e] |
| 32 | {J U : Set ℝ} (hU : IsOpen U) (hJU : J ⊆ U) |
| 33 | (y : ℝ → EuclideanSpace ℝ (Fin n)) (hy : ContDiffOn ℝ ∞ y U) |
| 34 | (hγ : ∀ s ∈ J, γ s ∈ e.baseSet) |
| 35 | (hY : ∀ s ∈ J, e.symm (γ s) (y s) = Y s) : |
| 36 | M14PullbackExtension G γ J Y where |
| 37 | extension r p := e.symm p (y r) |
| 38 | domain := e.baseSet |
| 39 | domain_open := e.open_baseSet |
| 40 | graph_mem := hγ |
| 41 | spatial_smooth r := by |
| 42 | have hmap : ContMDiffOn (spacetimeModel n) |
| 43 | ((spacetimeModel n).prod (𝓡 n)) ∞ |
| 44 | (fun p : G.Point => (p, y r)) e.baseSet := |
| 45 | contMDiffOn_id.prodMk contMDiffOn_const |
| 46 | exact (e.contMDiffOn_symm.comp hmap |
| 47 | (fun _ hp => e.mem_target.mpr hp)).congr |
| 48 | (fun p hp => e.mk_symm hp (y r)) |
| 49 | joint_smooth := by |
| 50 | refine ⟨U ×ˢ e.baseSet, hU.prod e.open_baseSet, |
| 51 | fun s hs => ⟨hJU hs, hγ s hs⟩, ?_⟩ |
| 52 | have hmap : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (spacetimeModel n)) |
| 53 | ((spacetimeModel n).prod (𝓡 n)) ∞ |
| 54 | (fun z : ℝ × G.Point => (z.2, y z.1)) (U ×ˢ e.baseSet) := |
| 55 | contMDiffOn_snd.prodMk (hy.contMDiffOn.comp contMDiffOn_fst (fun _ hz => hz.1)) |
| 56 | exact (e.contMDiffOn_symm.comp hmap |
| 57 | (fun _ hz => e.mem_target.mpr hz.2)).congr |
| 58 | (fun z hz => e.mk_symm hz.2 (y z.1)) |
| 59 | agrees := hY |
| 60 | parameter_derivative s hs := by |
| 61 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 62 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 63 | have hd := (hy.contDiffAt (hU.mem_nhds (hJU hs))).differentiableAt (by simp) |
| 64 | refine ⟨e.symmL ℝ (γ s) (deriv y s), ?_⟩ |
| 65 | simpa only [Function.comp_def, e.symmL_apply (hγ s hs)] using |
| 66 | ((e.symmL ℝ (γ s)).hasFDerivAt.comp_hasDerivAt s hd.hasDerivAt) |
| 67 | |
| 68 | /-- A horizontal field smooth within a nondegenerate closed interval has |
| 69 | a genuine local-chart pullback extension with two-sided parameter |
| 70 | derivatives, the endpoint step for Lemma 6.8, pp. 108-109. -/ |
| 71 | theorem exists_pullbackExtensionInChart_Icc |
| 72 | (e : Bundle.Trivialization (EuclideanSpace ℝ (Fin n)) |
| 73 | (Bundle.TotalSpace.proj : Bundle.TotalSpace (EuclideanSpace ℝ (Fin n)) |
| 74 | G.Horizontal → G.Point)) [MemTrivializationAtlas e] |
| 75 | {a b : ℝ} (hab : a < b) |
| 76 | (hγ : ∀ s ∈ Set.Icc a b, γ s ∈ e.baseSet) |
| 77 | (hY : ContMDiffOn (𝓘(ℝ, ℝ)) |
| 78 | ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 79 | (fun s => Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 80 | (E := G.spacetime.Horizontal) (γ s) (Y s)) (Set.Icc a b)) : |
| 81 | Nonempty (M14PullbackExtension G γ (Set.Icc a b) Y) := by |
| 82 | let y := fun s => (e (Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 83 | (E := G.spacetime.Horizontal) (γ s) (Y s))).2 |
| 84 | have hpair := e.contMDiffOn.comp hY (fun s hs => e.mem_source.mpr (hγ s hs)) |
| 85 | have hy : ContDiffOn ℝ ∞ y (Set.Icc a b) := |
| 86 | ContMDiffOn.contDiffOn (fun s hs => (hpair s hs).snd) |
| 87 | obtain ⟨z, hz, hzy⟩ := M08.exists_smooth_extension_Icc hab y hy |
| 88 | refine ⟨pullbackExtensionInChart e isOpen_univ (Set.subset_univ _) z |
| 89 | hz.contDiffOn hγ ?_⟩ |
| 90 | intro s hs |
| 91 | rw [hzy hs] |
| 92 | exact e.symm_apply_apply_mk (hγ s hs) (Y s) |
| 93 | |
| 94 | end PoincareMT.M14 |