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.LGeometry.Basic |
| 2 | import Mathlib.Geometry.Manifold.ContMDiffMFDeriv |
| 3 | import Mathlib.Topology.Separation.Hausdorff |
| 4 | |
| 5 | /-! |
| 6 | # The actual tangent phase of a smooth curve |
| 7 | |
| 8 | The phase retains the ambient manifold derivative. Its regularity and |
| 9 | Hausdorff target allow local geometric uniqueness to propagate. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] |
| 23 | |
| 24 | local notation "V" => EuclideanSpace ℝ (Fin n) |
| 25 | |
| 26 | noncomputable def curvePhase (γ : ℝ → M) (s : ℝ) : TangentBundle (𝓡 n) M := |
| 27 | ⟨γ s, curveVelocity γ s⟩ |
| 28 | |
| 29 | set_option backward.isDefEq.respectTransparency false in |
| 30 | theorem curvePhase_contMDiffOn (γ : ℝ → M) (I : Set ℝ) (hI : IsOpen I) |
| 31 | (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ γ I) : |
| 32 | ContMDiffOn (𝓘(ℝ, ℝ)) ((𝓡 n).prod (𝓡 n)) ∞ (curvePhase (n := n) γ) I := by |
| 33 | have hmodel : ContMDiff ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, ℝ))) |
| 34 | ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, ℝ))) ∞ |
| 35 | (fun q : ℝ × ℝ ↦ (⟨q.1, q.2⟩ : TangentBundle (𝓘(ℝ, ℝ)) ℝ)) := by |
| 36 | convert! (contMDiff_tangentBundleModelSpaceHomeomorph_symm |
| 37 | (I := 𝓘(ℝ, ℝ)) (n := ∞)) using 1 |
| 38 | rw [chartedSpaceSelf_prod] |
| 39 | rfl |
| 40 | have ht : ContMDiff (𝓘(ℝ, ℝ)) ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, ℝ))) ∞ |
| 41 | (fun s : ℝ ↦ (⟨s, 1⟩ : TangentBundle (𝓘(ℝ, ℝ)) ℝ)) := |
| 42 | hmodel.comp (contMDiff_id.prodMk contMDiff_const) |
| 43 | have h := (hγ.contMDiffOn_tangentMapWithin (m := ∞) (by simp) hI.uniqueMDiffOn).comp |
| 44 | ht.contMDiffOn (fun s hs ↦ hs) |
| 45 | apply h.congr |
| 46 | intro s hs |
| 47 | change Bundle.TotalSpace.mk' V (γ s) ((mfderiv (𝓘(ℝ, ℝ)) (𝓡 n) γ s) 1) = |
| 48 | Bundle.TotalSpace.mk' V (γ s) ((mfderivWithin (𝓘(ℝ, ℝ)) (𝓡 n) γ I s) 1) |
| 49 | rw [mfderivWithin_of_isOpen hI hs] |
| 50 | |
| 51 | theorem tangentBundle_t2Space [T2Space M] : T2Space (TangentBundle (𝓡 n) M) := by |
| 52 | apply t2Space_iff_disjoint_nhds.mpr |
| 53 | intro x y hxy |
| 54 | by_cases hbase : x.proj = y.proj |
| 55 | · let e := trivializationAt V (TangentSpace (𝓡 n) : M → Type _) x.proj |
| 56 | have hx : x ∈ e.source := e.mem_source.mpr |
| 57 | (FiberBundle.mem_baseSet_trivializationAt' x.proj) |
| 58 | have hy : y ∈ e.source := by |
| 59 | apply e.mem_source.mpr |
| 60 | rw [← hbase] |
| 61 | exact FiberBundle.mem_baseSet_trivializationAt' x.proj |
| 62 | have hne : e x ≠ e y := fun h ↦ hxy (e.toOpenPartialHomeomorph.injOn hx hy h) |
| 63 | exact (e.toOpenPartialHomeomorph.continuousAt hx).disjoint |
| 64 | (disjoint_nhds_nhds.mpr hne) (e.toOpenPartialHomeomorph.continuousAt hy) |
| 65 | · exact (FiberBundle.continuous_proj V (TangentSpace (𝓡 n))).continuousAt.disjoint |
| 66 | (disjoint_nhds_nhds.mpr hbase) |
| 67 | (FiberBundle.continuous_proj V (TangentSpace (𝓡 n))).continuousAt |
| 68 | |
| 69 | theorem curvePhase_eventuallyEq {γ δ : ℝ → M} {s : ℝ} (h : γ =ᶠ[𝓝 s] δ) : |
| 70 | curvePhase (n := n) γ =ᶠ[𝓝 s] curvePhase (n := n) δ := by |
| 71 | filter_upwards [eventually_eventuallyEq_nhds.2 h] with t ht |
| 72 | apply Bundle.TotalSpace.ext ht.self_of_nhds |
| 73 | exact heq_of_eq (congrArg (fun L : ℝ →L[ℝ] V ↦ L 1) |
| 74 | (ht.mfderiv_eq (I := 𝓘(ℝ, ℝ)) (I' := 𝓡 n))) |
| 75 | |
| 76 | end PoincareMT.ReducedLength |