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.Canonical.RoundComparison.SphereModel |
| 2 | |
| 3 | /-! # A common centered coordinate metric for every unit-curvature model -/ |
| 4 | |
| 5 | noncomputable section |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | |
| 10 | open Set Filter Bundle |
| 11 | open scoped Manifold ContDiff Topology InnerProductSpace |
| 12 | open Poincare.Geometry.Riemannian.SpaceForm |
| 13 | |
| 14 | namespace PoincareMT.SingularRegularLimit.RoundComparison |
| 15 | |
| 16 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 17 | |
| 18 | theorem sphereReferenceMetric_inner_zero (v w : E) : |
| 19 | sphereReferenceMetric.inner 0 v w = ⟪v, w⟫_ℝ := by |
| 20 | change (16 / (‖(0 : E)‖ ^ 2 + 4) ^ 2) * ⟪v, w⟫_ℝ = ⟪v, w⟫_ℝ |
| 21 | norm_num |
| 22 | |
| 23 | /-- A local isometry centered at any model point uses the same Euclidean |
| 24 | unit-sphere metric. Its domain size need not be uniform for pointwise jets. -/ |
| 25 | theorem exists_centered_unit_curvature_chart |
| 26 | {X : Type*} [TopologicalSpace X] [T2Space X] [CompactSpace X] |
| 27 | [ChartedSpace E X] [IsManifold (𝓡 3) ∞ X] |
| 28 | {g : RiemannianMetric 3 X} (D : LeviCivitaData g) |
| 29 | (hsec : ∀ (x : X) (v w : TangentSpace (𝓡 3) x), |
| 30 | LeviCivitaData.IsOrthonormalPair g x v w → D.sectionalCurvature x v w = 1) |
| 31 | (x : X) : |
| 32 | ∃ (U : Set E) (f : E → X), IsOpen U ∧ (0 : E) ∈ U ∧ f 0 = x ∧ |
| 33 | ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U ∧ |
| 34 | (∀ y ∈ U, (mfderiv (𝓡 3) (𝓡 3) f y).IsInvertible) ∧ |
| 35 | ∀ y ∈ U, ∀ v w : E, |
| 36 | sphereReferenceMetric.inner y v w = g.inner (f y) |
| 37 | (mfderiv (𝓡 3) (𝓡 3) f y v) (mfderiv (𝓡 3) (𝓡 3) f y w) := by |
| 38 | let q : UnitSphere 3 := ⟨EuclideanSpace.single (0 : Fin 4) (1 : ℝ), by simp⟩ |
| 39 | have hsec' (y : X) (v w : TangentSpace (𝓡 3) y) |
| 40 | (hn : g.inner y v v * g.inner y w w - (g.inner y v w) ^ 2 ≠ 0) : |
| 41 | D.sectionalCurvature y v w = 1 := |
| 42 | D.sectionalCurvature_eq_of_orthonormal y 1 |
| 43 | (fun a b haa hbb hab => hsec y a b ⟨haa, hbb, hab⟩) v w hn |
| 44 | obtain ⟨F, hq, hFx, hF, _, hFm⟩ := SpaceForm.exists_local_isometry_of_unit_curvature |
| 45 | (roundSphereMetric 3) g (roundSphereMetric 3).leviCivitaData D |
| 46 | roundSphereMetric_unit_sectionalCurvature hsec' q x |
| 47 | let c := chartAt E q |
| 48 | let f := F ∘ c.symm |
| 49 | let U : Set E := c.symm ⁻¹' F.source |
| 50 | have hU : IsOpen U := F.open_source.preimage (sphere_chart_symm_contMDiff q).continuous |
| 51 | have hzero : (0 : E) ∈ U := by |
| 52 | simpa only [U, mem_preimage, c, sphere_chart_symm_zero] using hq |
| 53 | have hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U := |
| 54 | hF.comp (sphere_chart_symm_contMDiff q).contMDiffOn (fun _ hy => hy) |
| 55 | have hfm (y : E) (hy : y ∈ U) (v w : E) : |
| 56 | sphereReferenceMetric.inner y v w = g.inner (f y) |
| 57 | (mfderiv (𝓡 3) (𝓡 3) f y v) (mfderiv (𝓡 3) (𝓡 3) f y w) := by |
| 58 | have hder := mfderiv_comp y |
| 59 | ((hF.contMDiffAt (F.open_source.mem_nhds hy)).mdifferentiableAt (by simp)) |
| 60 | ((sphere_chart_symm_contMDiff q y).mdifferentiableAt (by simp)) |
| 61 | change _ = g.inner (F (c.symm y)) |
| 62 | (mfderiv (𝓡 3) (𝓡 3) (F ∘ c.symm) y v) |
| 63 | (mfderiv (𝓡 3) (𝓡 3) (F ∘ c.symm) y w) |
| 64 | rw [hder] |
| 65 | have hs : sphereReferenceMetric.inner y v w = (roundSphereMetric 3).inner |
| 66 | (c.symm y) (mfderiv (𝓡 3) (𝓡 3) c.symm y v) |
| 67 | (mfderiv (𝓡 3) (𝓡 3) c.symm y w) := |
| 68 | (roundSphereMetric_chart_symm_inner q y v w).symm |
| 69 | exact hs.trans (hFm _ hy _ _) |
| 70 | have hinv (y : E) (hy : y ∈ U) : (mfderiv (𝓡 3) (𝓡 3) f y).IsInvertible := by |
| 71 | have hb := sphereReferenceMetric.mfderiv_bijective_of_pullback_eq g y |
| 72 | (fun u v => (hfm y hy u v).symm) |
| 73 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) y) := |
| 74 | VectorBundle.finiteDimensional ℝ E (TangentSpace (𝓡 3) : E → Type _) _ |
| 75 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) (f y)) := |
| 76 | VectorBundle.finiteDimensional ℝ E (TangentSpace (𝓡 3) : X → Type _) _ |
| 77 | exact ⟨(LinearEquiv.ofBijective |
| 78 | (mfderiv (𝓡 3) (𝓡 3) f y).toLinearMap hb).toContinuousLinearEquiv, rfl⟩ |
| 79 | refine ⟨U, f, hU, hzero, ?_, hf, hinv, hfm⟩ |
| 80 | simpa only [f, Function.comp_apply, c, sphere_chart_symm_zero] using hFx |
| 81 | |
| 82 | end PoincareMT.SingularRegularLimit.RoundComparison |