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.Curvature.Theory |
| 2 | import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace |
| 3 | |
| 4 | /-! |
| 5 | # Smooth fields in square-root time |
| 6 | |
| 7 | The signed square-root-time neighborhood maps into the original flow |
| 8 | window, including its terminal endpoint. Within-domain composition |
| 9 | therefore gives smooth fields at square-root time zero. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | theorem squareTime_mem_window {b s : ℝ} (T : ℝ) (hb : 0 < b) |
| 21 | (hs : s ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) : |
| 22 | T - s ^ 2 ∈ Set.Icc (T - b) T := by |
| 23 | have hprod := mul_pos (sub_pos.mpr hs.1) (sub_pos.mpr hs.2) |
| 24 | have hsqrt := Real.sq_sqrt hb.le |
| 25 | constructor <;> nlinarith [sq_nonneg s] |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 29 | [IsManifold (𝓡 n) ∞ M] |
| 30 | |
| 31 | omit [IsManifold (𝓡 n) ∞ M] in |
| 32 | theorem squareTime_smooth (T : ℝ) : |
| 33 | ContMDiff ((𝓘(ℝ, ℝ)).prod (𝓡 n)) ((𝓘(ℝ, ℝ)).prod (𝓡 n)) ∞ |
| 34 | (fun z : ℝ × M ↦ (T - z.1 ^ 2, z.2)) := by |
| 35 | have h : ContDiff ℝ ∞ (fun s : ℝ ↦ T - s ^ 2) := |
| 36 | contDiff_const.sub (contDiff_id.pow 2) |
| 37 | exact (h.contMDiff.comp contMDiff_fst).prodMk contMDiff_snd |
| 38 | |
| 39 | theorem squareTime_metric_smooth {J : Set ℝ} (F : RicciFlow n M J) |
| 40 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) : |
| 41 | RiemannianMetric.IsSmoothFamilyOn (fun s ↦ F.metric (T - s ^ 2)) |
| 42 | (Set.Ioo (-Real.sqrt b) (Real.sqrt b)) := by |
| 43 | exact F.smooth.comp (squareTime_smooth (M := M) T).contMDiffOn |
| 44 | (fun z hz ↦ ⟨hwindow (squareTime_mem_window T hb hz.1), Set.mem_univ _⟩) |
| 45 | |
| 46 | theorem squareTime_scalar_smooth {J : Set ℝ} (F : RicciFlow n M J) |
| 47 | (hM04 : RicciFlowCurvatureTheory.{u}) (T b : ℝ) (hb : 0 < b) |
| 48 | (hwindow : Set.Icc (T - b) T ⊆ J) : |
| 49 | ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓡 n)) (𝓘(ℝ, ℝ)) ∞ |
| 50 | (fun z : ℝ × M ↦ (F.connection (T - z.1 ^ 2)).scalarCurvature z.2) |
| 51 | (Set.Ioo (-Real.sqrt b) (Real.sqrt b) ×ˢ Set.univ) := by |
| 52 | exact (hM04.scalar_regular n M J F).comp (squareTime_smooth (M := M) T).contMDiffOn |
| 53 | (fun z hz ↦ ⟨hwindow (squareTime_mem_window T hb hz.1), Set.mem_univ _⟩) |
| 54 | |
| 55 | end PoincareMT.ReducedLength |