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.ReducedVolume.Regularity.AlmostEverywhere.Countability |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.AlmostEverywhere.Sard |
| 3 | |
| 4 | /-! |
| 5 | # Critical values of every interior L-exponential slice |
| 6 | |
| 7 | A single fixed terminal-metric orthonormal basis identifies the source with |
| 8 | the standard Euclidean model. The chain rule preserves the actual critical |
| 9 | values, so the target-chart Sard result applies to the exact slice measure. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open MeasureTheory Set |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedVolume |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | [ConnectedSpace M] [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 24 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 25 | |
| 26 | set_option backward.isDefEq.respectTransparency false in |
| 27 | /-- The actual L-exponential critical values are null at every positive interior time. -/ |
| 28 | theorem exponential_slice_criticalValues_eq_zero |
| 29 | (hL : LGeodesicTheory F T τmax) (G : LExponentialGeometry F T τmax p) |
| 30 | {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 31 | calibratedMetricVolume (F.metric (T - τ)) |
| 32 | ((fun Z ↦ G.gamma Z τ) '' |
| 33 | {Z | ¬ Function.Bijective (G.toLExponentialFamily.sliceDifferential Z τ)}) = 0 := by |
| 34 | let : SecondCountableTopology M := secondCountableTopology_of_exponential hL G hτ hmax |
| 35 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 36 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 37 | let : FiniteDimensional ℝ (TangentSpace (𝓡 n) p) := |
| 38 | inferInstanceAs (FiniteDimensional ℝ (EuclideanSpace ℝ (Fin n))) |
| 39 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 n) p) = n := by |
| 40 | change Module.finrank ℝ (EuclideanSpace ℝ (Fin n)) = n |
| 41 | simp |
| 42 | let b : OrthonormalBasis (Fin n) ℝ (TangentSpace (𝓡 n) p) := |
| 43 | ((F.metric T).orthonormalBasis p).reindex (finCongr hdim) |
| 44 | let e0 : EuclideanSpace ℝ (Fin n) ≃L[ℝ] TangentSpace (𝓡 n) p := |
| 45 | b.repr.symm.toContinuousLinearEquiv |
| 46 | let E : TangentSpace (𝓡 n) p → M := fun Z ↦ G.gamma Z τ |
| 47 | have hE : MDifferentiable (𝓘(ℝ, TangentSpace (𝓡 n) p)) (𝓡 n) E := by |
| 48 | intro Z |
| 49 | exact ((G.gamma_smooth.contMDiffAt |
| 50 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨mem_univ Z, hτ, hmax⟩)).comp Z |
| 51 | (contMDiffAt_id.prodMk contMDiffAt_const)).mdifferentiableAt (by simp) |
| 52 | have he0 : MDifferentiable (𝓡 n) (𝓘(ℝ, TangentSpace (𝓡 n) p)) e0 := |
| 53 | e0.differentiable.mdifferentiable |
| 54 | let f : EuclideanSpace ℝ (Fin n) → M := E ∘ e0 |
| 55 | have hf : MDifferentiable (𝓡 n) (𝓡 n) f := hE.comp he0 |
| 56 | have hchain (x : EuclideanSpace ℝ (Fin n)) : |
| 57 | mfderiv (𝓡 n) (𝓡 n) f x = |
| 58 | (G.toLExponentialFamily.sliceDifferential (e0 x) τ).comp e0.toContinuousLinearMap := by |
| 59 | have h := mfderiv_comp x (hE (e0 x)) (he0 x) |
| 60 | rw [mfderiv_eq_fderiv, e0.hasFDerivAt.fderiv] at h |
| 61 | exact h |
| 62 | have hnull := calibratedMetricVolume_criticalValues_eq_zero (F.metric (T - τ)) hf |
| 63 | apply measure_mono_null _ hnull |
| 64 | rintro q ⟨Z, hZ, rfl⟩ |
| 65 | refine ⟨e0.symm Z, ?_, ?_⟩ |
| 66 | · intro hbij |
| 67 | rw [hchain] at hbij |
| 68 | have hbase := (Function.Bijective.of_comp_iff |
| 69 | (G.toLExponentialFamily.sliceDifferential (e0 (e0.symm Z)) τ) e0.bijective).mp hbij |
| 70 | exact hZ (Eq.mp (congrArg (fun V : TangentSpace (𝓡 n) p ↦ |
| 71 | Function.Bijective (G.toLExponentialFamily.sliceDifferential V τ)) |
| 72 | (e0.apply_symm_apply Z)) hbase) |
| 73 | · simp only [f, E, Function.comp_apply, ContinuousLinearEquiv.apply_symm_apply] |
| 74 | |
| 75 | end PoincareMT.ReducedVolume |