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.Surgery.Singular.RegularLimit.Reference |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Scalar.Within |
| 3 | |
| 4 | /-! |
| 5 | # Scalar continuity through the actual terminal gluing |
| 6 | |
| 7 | Ordinary flow-box scalar regularity makes the scalar continuous on the |
| 8 | generalized spacetime. The terminal gluing map therefore retains strict |
| 9 | scalar lower bounds along the original reference worldlines. |
| 10 | Source: Morgan--Tian, Theorem 11.19 and Lemma 11.21, pp. 279-280. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Topology |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | theorem GeneralizedRicciFlowData.continuous_scalar (G : GeneralizedRicciFlowData.{u}) : |
| 25 | Continuous G.scalar := by |
| 26 | apply continuous_iff_continuousAt.mpr |
| 27 | rintro ⟨t, x⟩ |
| 28 | obtain ⟨b, hb, y, rfl⟩ := G.box_covers t x |
| 29 | let f : (G.box b).interval × (G.box b).carrier.carrier → G.point := |
| 30 | fun p => ⟨p.1.val, (G.box b).forward p.1.val p.1.property p.2⟩ |
| 31 | have heq : G.scalar ∘ f = fun p : (G.box b).interval × (G.box b).carrier.carrier => |
| 32 | ((G.box b).flow.connection p.1.val).scalarCurvature p.2 := by |
| 33 | funext p |
| 34 | exact (G.box_scalar b p.1.val p.1.property p.2).symm |
| 35 | have hc : Continuous (G.scalar ∘ f) := by |
| 36 | rw [heq] |
| 37 | have hj : ContinuousOn (fun p : ℝ × (G.box b).carrier.carrier => |
| 38 | ((G.box b).flow.connection p.1).scalarCurvature p.2) |
| 39 | ((G.box b).interval ×ˢ univ) := |
| 40 | (G.box b).flow.contMDiffOn_scalarCurvature.continuousOn |
| 41 | exact hj.comp_continuous |
| 42 | (f := fun p : (G.box b).interval × (G.box b).carrier.carrier => (p.1.val, p.2)) |
| 43 | ((continuous_subtype_val.comp continuous_fst).prodMk continuous_snd) |
| 44 | (fun p => ⟨p.1.property, mem_univ _⟩) |
| 45 | exact (G.box_openEmbedding b).isEmbedding.isInducing.continuousAt_iff' |
| 46 | ((G.box_openEmbedding b).isOpen_range.mem_nhds ⟨(⟨t, hb⟩, y), rfl⟩) |>.mp |
| 47 | hc.continuousAt |
| 48 | |
| 49 | namespace SingularLimitConclusion |
| 50 | |
| 51 | variable {M : Type u} [TopologicalSpace M] |
| 52 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 53 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 54 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} {H : SingularTimeAssumptions G T M} |
| 55 | (Q : SingularLimitConclusion H) |
| 56 | |
| 57 | theorem continuous_gluing_scalar : |
| 58 | Continuous (Q.extension.extended.scalar ∘ Q.gluing_map) := |
| 59 | Q.extension.extended.continuous_scalar.comp Q.gluing_openEmbedding.continuous |
| 60 | |
| 61 | theorem gluing_scalar_old (t : ℝ) (ht : t ∈ Ioc H.reference.tMinus T) (hlt : t < T) |
| 62 | (z : (Q.extension.extended.slice T).carrier) : |
| 63 | Q.extension.extended.scalar (Q.gluing_map (⟨t, ht⟩, z)) = |
| 64 | H.reference.scalar t (Q.terminal_source z) := by |
| 65 | rw [Q.gluing_old t ht hlt z, |
| 66 | Q.extension.spacetime_slices t (H.reference.window_subset ⟨ht.1.le, hlt⟩)] |
| 67 | exact (Q.extension.scalar_pullback t (H.reference.window_subset ⟨ht.1.le, hlt⟩) _).trans |
| 68 | (H.reference.scalar_pullback t ⟨ht.1.le, hlt⟩ _) |
| 69 | |
| 70 | theorem gluing_scalar_terminal (z : (Q.extension.extended.slice T).carrier) : |
| 71 | Q.extension.extended.scalar |
| 72 | (Q.gluing_map (⟨T, H.reference.tMinus_lt, le_rfl⟩, z)) = Q.terminal_scalar z := by |
| 73 | rw [Q.gluing_terminal, Q.terminal_scalar_eq] |
| 74 | rfl |
| 75 | |
| 76 | /-- A strict terminal scalar lower bound holds on an actual final reference tail. -/ |
| 77 | theorem exists_strict_scalar_tail (z : (Q.extension.extended.slice T).carrier) |
| 78 | (a : ℝ) (ha : a < Q.terminal_scalar z) : |
| 79 | ∃ s : ℝ, H.reference.tMinus < s ∧ s < T ∧ |
| 80 | ∀ t ∈ Ico s T, a < H.reference.scalar t (Q.terminal_source z) := by |
| 81 | let f : Ioc H.reference.tMinus T → ℝ := fun t => |
| 82 | Q.extension.extended.scalar (Q.gluing_map (t, z)) |
| 83 | have hf : Continuous f := Q.continuous_gluing_scalar.comp |
| 84 | (continuous_id.prodMk continuous_const) |
| 85 | have hTa : a < f ⟨T, H.reference.tMinus_lt, le_rfl⟩ := by |
| 86 | simpa only [f, Q.gluing_scalar_terminal] using ha |
| 87 | obtain ⟨δ, hδ, hball⟩ := Metric.isOpen_iff.mp (isOpen_Ioi.preimage hf) |
| 88 | ⟨T, H.reference.tMinus_lt, le_rfl⟩ hTa |
| 89 | obtain ⟨s, hs, hsT⟩ := exists_between |
| 90 | (max_lt H.reference.tMinus_lt (sub_lt_self T hδ)) |
| 91 | have hsref := (le_max_left H.reference.tMinus (T - δ)).trans_lt hs |
| 92 | refine ⟨s, hsref, hsT, ?_⟩ |
| 93 | intro t ht |
| 94 | have htref : H.reference.tMinus < t := hsref.trans_le ht.1 |
| 95 | have hdist : dist (⟨t, htref, ht.2.le⟩ : Ioc H.reference.tMinus T) |
| 96 | ⟨T, H.reference.tMinus_lt, le_rfl⟩ < δ := by |
| 97 | rw [Subtype.dist_eq, Real.dist_eq, abs_of_neg (sub_neg.mpr ht.2)] |
| 98 | have := (le_max_right H.reference.tMinus (T - δ)).trans_lt hs |
| 99 | linarith [ht.1] |
| 100 | have h := hball (show (⟨t, htref, ht.2.le⟩ : Ioc H.reference.tMinus T) ∈ |
| 101 | Metric.ball ⟨T, H.reference.tMinus_lt, le_rfl⟩ δ from hdist) |
| 102 | change a < Q.extension.extended.scalar |
| 103 | (Q.gluing_map (⟨t, htref, ht.2.le⟩, z)) at h |
| 104 | rwa [Q.gluing_scalar_old t ⟨htref, ht.2.le⟩ ht.2 z] at h |
| 105 | |
| 106 | end SingularLimitConclusion |
| 107 | end PoincareMT |