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.Rigidity.Equality.GramEquality |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Comparison.GaussianNormalization |
| 3 | |
| 4 | /-! |
| 5 | # The exact Jacobian and action in the equality case |
| 6 | |
| 7 | Morgan-Tian Proposition 7.27. The proved Gram identity determines the |
| 8 | actual Jacobian. Substitution in the Gaussian weighted-ray equality then |
| 9 | determines the same actual action, with the book's unnormalized constants. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open 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 | /-- The actual exponential Jacobian equals its exact Euclidean value at earlier times. -/ |
| 27 | theorem exponentialSliceJacobian_eq_of_volume_eq |
| 28 | (hL : LGeodesicTheory F T τmax) (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 29 | (G : LExponentialGeometry F T τmax p) (hmax : 0 < τmax) |
| 30 | (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 31 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 32 | {b : ℝ} (hb : 0 < b) (hbmax : b < τmax) |
| 33 | (heq : reducedVolume F T p b = euclideanReducedVolume n) |
| 34 | (x : EuclideanSpace ℝ (Fin n)) {τ : ℝ} (hτ : 0 < τ) (hτb : τ < b) : |
| 35 | exponentialSliceJacobian G τ x = (2 * Real.sqrt τ) ^ n := by |
| 36 | have hmatrix : (fun i j : Fin n ↦ |
| 37 | pullbackMetricForm (F.metric (T - τ)) (exponentialSliceChart G τ) x |
| 38 | (EuclideanSpace.basisFun (Fin n) ℝ i) (EuclideanSpace.basisFun (Fin n) ℝ j)) = |
| 39 | (4 * τ) • (1 : Matrix (Fin n) (Fin n) ℝ) := by |
| 40 | ext i j |
| 41 | rw [exponential_pairing_eq_of_volume_eq hL hDifferential G hmax hT hwindow |
| 42 | hcurvature hb hbmax heq x _ _ hτ hτb] |
| 43 | change 4 * τ * inner ℝ (EuclideanSpace.basisFun (Fin n) ℝ i) |
| 44 | (EuclideanSpace.basisFun (Fin n) ℝ j) = (4 * τ) * (1 : Matrix (Fin n) (Fin n) ℝ) i j |
| 45 | simp only [OrthonormalBasis.inner_eq_ite, Matrix.one_apply] |
| 46 | change Real.sqrt (Matrix.det _) = _ |
| 47 | rw [hmatrix] |
| 48 | exact sqrt_det_four_mul_identity n hτ.le |
| 49 | |
| 50 | /-- Maximal reduced volume determines the actual normalized action on the whole source space. -/ |
| 51 | theorem normalized_action_eq_norm_sq_of_volume_eq |
| 52 | (hL : LGeodesicTheory F T τmax) (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 53 | (G : LExponentialGeometry F T τmax p) (hmax : 0 < τmax) |
| 54 | (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 55 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 56 | {b : ℝ} (hb : 0 < b) (hbmax : b < τmax) |
| 57 | (heq : reducedVolume F T p b = euclideanReducedVolume n) |
| 58 | (x : EuclideanSpace ℝ (Fin n)) {τ : ℝ} (hτ : 0 < τ) (hτb : τ < b) : |
| 59 | G.toLExponentialFamily.action (metricCoordinates (F.metric T) p x) τ / |
| 60 | (2 * Real.sqrt τ) = ‖x‖ ^ 2 := by |
| 61 | let a := G.toLExponentialFamily.action (metricCoordinates (F.metric T) p x) τ / |
| 62 | (2 * Real.sqrt τ) |
| 63 | have hw := congrFun (weightedExponentialJacobian_eq_gaussian_of_volume_eq hL |
| 64 | hDifferential G hmax hT hwindow hcurvature hτ (hτb.trans hbmax) |
| 65 | (reducedVolume_eq_euclidean_of_le hL hDifferential G hmax hT hwindow hcurvature |
| 66 | hb hbmax hτ hτb.le heq)) x |
| 67 | change Real.rpow τ (-(n : ℝ) / 2) * Real.exp (-a) * |
| 68 | exponentialSliceJacobian G τ x = (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2) at hw |
| 69 | rw [exponentialSliceJacobian_eq_of_volume_eq hL hDifferential G hmax hT hwindow |
| 70 | hcurvature hb hbmax heq x hτ hτb] at hw |
| 71 | have he : (2 : ℝ) ^ n * Real.exp (-a) = (2 : ℝ) ^ n * Real.exp (-‖x‖ ^ 2) := by |
| 72 | calc |
| 73 | _ = (Real.rpow τ (-(n : ℝ) / 2) * (2 * Real.sqrt τ) ^ n) * Real.exp (-a) := by |
| 74 | rw [rpow_mul_gaussian_jacobian n hτ] |
| 75 | _ = _ := by nlinarith only [hw] |
| 76 | have h := Real.exp_injective (mul_left_cancel₀ (pow_ne_zero n (by norm_num : (2 : ℝ) ≠ 0)) he) |
| 77 | exact neg_injective h |
| 78 | |
| 79 | end PoincareMT.ReducedVolume |