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.ReducedGeometry.ReducedLength.Exponential.NormalizedSquareFamily |
| 2 | |
| 3 | /-! |
| 4 | # Open domains of jointly smooth families |
| 5 | |
| 6 | Use actual open smooth neighborhoods. Pointwise infinite differentiability |
| 7 | alone is not used to produce a common infinitely differentiable neighborhood. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | |
| 12 | open scoped Manifold ContDiff Bundle Topology |
| 13 | |
| 14 | universe u v |
| 15 | |
| 16 | namespace PoincareMT.ReducedLength |
| 17 | |
| 18 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 20 | [IsManifold (𝓡 n) ∞ M] |
| 21 | {E : Type v} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 22 | |
| 23 | def smoothFamilyDomain (f : E × ℝ → M) : Set (E × ℝ) := |
| 24 | {z | ∃ U : Set (E × ℝ), IsOpen U ∧ z ∈ U ∧ |
| 25 | ContMDiffOn (𝓘(ℝ, E × ℝ)) (𝓡 n) ∞ f U} |
| 26 | |
| 27 | theorem subset_smoothFamilyDomain (f : E × ℝ → M) {U : Set (E × ℝ)} |
| 28 | (hU : IsOpen U) (hf : ContMDiffOn (𝓘(ℝ, E × ℝ)) (𝓡 n) ∞ f U) : |
| 29 | U ⊆ smoothFamilyDomain (n := n) f := fun _ hz ↦ ⟨U, hU, hz, hf⟩ |
| 30 | |
| 31 | theorem isOpen_smoothFamilyDomain (f : E × ℝ → M) : |
| 32 | IsOpen (smoothFamilyDomain (n := n) f) := by |
| 33 | rw [isOpen_iff_mem_nhds] |
| 34 | intro z hz |
| 35 | obtain ⟨U, hU, hzU, hf⟩ := hz |
| 36 | exact Filter.mem_of_superset (hU.mem_nhds hzU) (subset_smoothFamilyDomain f hU hf) |
| 37 | |
| 38 | theorem contMDiffOn_smoothFamilyDomain (f : E × ℝ → M) : |
| 39 | ContMDiffOn (𝓘(ℝ, E × ℝ)) (𝓡 n) ∞ f (smoothFamilyDomain (n := n) f) := by |
| 40 | intro z hz |
| 41 | obtain ⟨U, hU, hzU, hf⟩ := hz |
| 42 | exact (hf.contMDiffAt (hU.mem_nhds hzU)).contMDiffWithinAt |
| 43 | |
| 44 | theorem normalizedSquareFamily_zero_mem_smoothFamilyDomain {J : Set ℝ} [T2Space M] |
| 45 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 46 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 47 | (p : M) (Z0 : TangentSpace (𝓡 n) p) : |
| 48 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 49 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 50 | (Z0, 0) ∈ smoothFamilyDomain (n := n) |
| 51 | (fun z ↦ normalizedSquareFamily F T b p z.1 z.2) := by |
| 52 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 53 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 54 | obtain ⟨W, d, hW, hZ, hd, _, hf⟩ := |
| 55 | exists_normalizedSquareFamily_smooth_zero F hM04 T b hb hwindow p Z0 |
| 56 | exact ⟨W ×ˢ Set.Ioo (-d) d, hW.prod isOpen_Ioo, |
| 57 | ⟨hZ, neg_lt_zero.mpr hd, hd⟩, hf⟩ |
| 58 | |
| 59 | end PoincareMT.ReducedLength |