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.Variation.Coordinates.GaugeEndpointFamily |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialVectorVariation |
| 3 | |
| 4 | /-! |
| 5 | # Actual exponential lines with an independently moving endpoint |
| 6 | |
| 7 | Morgan-Tian Lemma 6.22 and Proposition 6.30, pp. 115-116, 118-119. |
| 8 | The affine initial-vector line survives on one common closed prefix. |
| 9 | Its actual square family supplies the smooth endpoint construction |
| 10 | without extending through a physical time boundary. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u v |
| 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 | |
| 25 | /-- The actual coordinate diagonal remains in the open endpoint-family |
| 26 | parameter set near its center, Proposition 6.30, pp. 118-119. -/ |
| 27 | theorem GaugeEndpointFamily.diagonal_eventually_mem |
| 28 | {P : Type v} [NormedAddCommGroup P] [NormedSpace ℝ P] |
| 29 | {f : ℝ × P → G.Point} {U : Set P} {T a b c : ℝ} {p₀ : P} |
| 30 | {j : G.gaugeCover.index} |
| 31 | {lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval j)).Point × |
| 32 | G.gaugeCover.spatial j} |
| 33 | (D : GaugeEndpointFamily f U T a b c p₀ j lift) : |
| 34 | ∀ᶠ r in 𝓝 p₀, (r, (lift (f (c, r))).2.val) ∈ D.parameters := |
| 35 | (continuousAt_id.prodMk D.coordinate_smooth.continuousAt).preimage_mem_nhds |
| 36 | (D.parameters_open.mem_nhds D.center_mem) |
| 37 | |
| 38 | /-- A surviving affine exponential line admits a genuine closed-time |
| 39 | endpoint family in any supplied compatible inverse gauge at the |
| 40 | interior meeting point, Proposition 6.30, pp. 118-119. -/ |
| 41 | theorem exists_exponentialLine_endpointFamily |
| 42 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 43 | {T : ℝ} {x : G.Point} (E : M14ExponentialFamily G T x) (Z W : G.Horizontal x) |
| 44 | {b c : ℝ} (hb : (Z, b) ∈ E.domain) (hc : c ∈ Ioo 0 b) |
| 45 | (j : G.gaugeCover.index) |
| 46 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval j)).Point × |
| 47 | G.gaugeCover.spatial j) {V : Set G.Point} (hV : IsOpen V) |
| 48 | (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift V) |
| 49 | (hright : ∀ q ∈ V, (G.gaugeCover.cylinder j).toSpacetime (lift q) = q) |
| 50 | (hcenter : E.gamma Z c ∈ V) : |
| 51 | ∃ U : Set ℝ, IsOpen U ∧ 0 ∈ U ∧ |
| 52 | (∀ r ∈ U, (Z + r • W, b) ∈ E.domain) ∧ |
| 53 | Nonempty (GaugeEndpointFamily (fun z : ℝ × ℝ => E.gamma (Z + z.2 • W) z.1) |
| 54 | U T 0 b c 0 j lift) := by |
| 55 | have hbpos : 0 < b := hc.1.trans hc.2 |
| 56 | obtain ⟨A, hsurvive, hA⟩ := exists_initialVectorVariation hM04 hM12 E Z W hb hbpos |
| 57 | have hU : IsOpen A.parameterDomain := A.parameterDomain_eq ▸ isOpen_Ioo |
| 58 | have hzero : (0 : ℝ) ∈ A.parameterDomain := by |
| 59 | rw [A.parameterDomain_eq] |
| 60 | exact ⟨neg_lt_zero.mpr A.radius_pos, A.radius_pos⟩ |
| 61 | have hC : M14SqrtParameterInterval 0 (b ^ 2) = Icc 0 b := by |
| 62 | rw [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hbpos.le] |
| 63 | have hf : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, ℝ))) (spacetimeModel n) ∞ |
| 64 | (fun z : ℝ × ℝ => E.gamma (Z + z.2 • W) z.1) (Icc 0 b ×ˢ A.parameterDomain) := by |
| 65 | have h := A.square_smooth.mono A.square_contains |
| 66 | rw [hC] at h |
| 67 | exact h.congr (fun z hz => (hA z.1 (hC.symm ▸ hz.1) z.2).symm) |
| 68 | have hclock (s : ℝ) (hs : s ∈ Icc 0 b) (r : ℝ) (hr : r ∈ A.parameterDomain) : |
| 69 | G.spacetime.timeFunction (E.gamma (Z + r • W) s) = T - s ^ 2 := |
| 70 | E.clock _ _ ((E.maximal_lifetime _).out (E.domain_zero _) (hsurvive r hr) hs) |
| 71 | refine ⟨A.parameterDomain, hU, hzero, hsurvive, ?_⟩ |
| 72 | exact gaugeEndpointFamily_nonempty _ hU hzero hc hf hclock j lift hV hlift hright |
| 73 | (by simpa only [zero_smul, add_zero] using hcenter) |
| 74 | |
| 75 | end PoincareMT.M14 |