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.Generalized.ReducedGeometry.Exponential |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Basic |
| 3 | import Mathlib.LinearAlgebra.Basis.Basic |
| 4 | import Mathlib.MeasureTheory.Integral.Bochner.Basic |
| 5 | |
| 6 | /-! Adapted from Mapher `PoincareMT/Definitions/M14MeasureTransport.lean` at |
| 7 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 8 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 9 | |
| 10 | /-! |
| 11 | # M14 endpoint measure transport |
| 12 | |
| 13 | Morgan--Tian Chapter 7, pp. 149-167. The endpoint map is the selected map |
| 14 | from one fixed stable carrier into the actual earlier-time slice. Its |
| 15 | differential is the exponential differential transported through the slice |
| 16 | tangent equivalence. The Jacobian is a metric Gram determinant in explicit |
| 17 | bases, and the change-of-variables law is recorded as an integral identity. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | |
| 22 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT |
| 27 | |
| 28 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 29 | {I : SpacetimeInterval} |
| 30 | |
| 31 | noncomputable instance m14HorizontalMeasurableSpace |
| 32 | (G : GeneralizedLGeometryTransport n X time I) (x : G.Point) : |
| 33 | MeasurableSpace (G.Horizontal x) := borel (G.Horizontal x) |
| 34 | |
| 35 | instance m14HorizontalBorelSpace |
| 36 | (G : GeneralizedLGeometryTransport n X time I) (x : G.Point) : |
| 37 | BorelSpace (G.Horizontal x) := ⟨rfl⟩ |
| 38 | |
| 39 | noncomputable def M14EndpointTangentDifferential |
| 40 | (G : GeneralizedLGeometryTransport n X time I) |
| 41 | {T τ : ℝ} {x : G.Point} {E : M14ExponentialFamily G T x} |
| 42 | {H : M14StableSet G T τ x E} |
| 43 | (Z : G.Horizontal x) (hZ : Z ∈ H.carrier) : |
| 44 | G.Horizontal x →L[ℝ] |
| 45 | TangentSpace (𝓡 n) (H.endpoint_slice_map Z) := |
| 46 | (((G.slices (T - τ)).tangentEquiv (H.endpoint_slice_map Z)).symm : |
| 47 | G.Horizontal (H.endpoint_slice_map Z).val →L[ℝ] |
| 48 | TangentSpace (𝓡 n) (H.endpoint_slice_map Z)).comp |
| 49 | ((H.endpoint_slice_map_val Z hZ).symm ▸ H.endpoint_differential Z hZ) |
| 50 | |
| 51 | noncomputable def M14MetricJacobianFromBasis |
| 52 | (G : GeneralizedLGeometryTransport n X time I) |
| 53 | {T τ : ℝ} {x : G.Point} {E : M14ExponentialFamily G T x} |
| 54 | {H : M14StableSet G T τ x E} |
| 55 | (sourceBasis : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 56 | (_targetBasis : ∀ Z : G.Horizontal x, Z ∈ H.carrier → |
| 57 | Module.Basis (Fin n) ℝ |
| 58 | (TangentSpace (𝓡 n) (H.endpoint_slice_map Z))) |
| 59 | (Z : G.Horizontal x) (hZ : Z ∈ H.carrier) : ℝ := |
| 60 | Real.sqrt (max 0 (Matrix.det (fun i j : Fin n => |
| 61 | (G.slices (T - τ)).metricOnPoints.inner (H.endpoint_slice_map Z) |
| 62 | ((M14EndpointTangentDifferential G Z hZ) (sourceBasis i)) |
| 63 | ((M14EndpointTangentDifferential G Z hZ) (sourceBasis j))))) |
| 64 | |
| 65 | noncomputable def M14CoordinateJacobianFromBasis |
| 66 | (G : GeneralizedLGeometryTransport n X time I) |
| 67 | {T τ : ℝ} {x : G.Point} {E : M14ExponentialFamily G T x} |
| 68 | {H : M14StableSet G T τ x E} |
| 69 | (sourceBasis : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 70 | (targetBasis : ∀ Z : G.Horizontal x, Z ∈ H.carrier → |
| 71 | Module.Basis (Fin n) ℝ |
| 72 | (TangentSpace (𝓡 n) (H.endpoint_slice_map Z))) |
| 73 | (Z : G.Horizontal x) (hZ : Z ∈ H.carrier) : ℝ := |
| 74 | |Matrix.det (LinearMap.toMatrix sourceBasis (targetBasis Z hZ) |
| 75 | (M14EndpointTangentDifferential G Z hZ).toLinearMap)| |
| 76 | |
| 77 | noncomputable def M14HorizontalCoordinateVolume |
| 78 | (G : GeneralizedLGeometryTransport n X time I) |
| 79 | {x : G.Point} |
| 80 | (sourceBasis : Module.Basis (Fin n) ℝ (G.Horizontal x)) : |
| 81 | MeasureTheory.Measure (G.Horizontal x) := |
| 82 | MeasureTheory.Measure.map (sourceBasis.equivFun).symm MeasureTheory.volume |
| 83 | |
| 84 | structure M14MeasureJacobianData |
| 85 | (G : GeneralizedLGeometryTransport n X time I) |
| 86 | (T τ : ℝ) (x : G.Point) (E : M14ExponentialFamily G T x) |
| 87 | (H : M14StableSet G T τ x E) where |
| 88 | sourceMeasure : MeasureTheory.Measure (G.Horizontal x) |
| 89 | sourceBasis : Module.Basis (Fin n) ℝ (G.Horizontal x) |
| 90 | targetBasis : ∀ Z : G.Horizontal x, Z ∈ H.carrier → |
| 91 | Module.Basis (Fin n) ℝ |
| 92 | (TangentSpace (𝓡 n) (H.endpoint_slice_map Z)) |
| 93 | source_basis_orthonormal : ∀ i j, |
| 94 | G.spacetime.horizontalMetric.inner x (sourceBasis i) (sourceBasis j) = |
| 95 | if i = j then 1 else 0 |
| 96 | target_basis_orthonormal : ∀ Z hZ i j, |
| 97 | (G.slices (T - τ)).metricOnPoints.inner (H.endpoint_slice_map Z) |
| 98 | (targetBasis Z hZ i) (targetBasis Z hZ j) = |
| 99 | if i = j then 1 else 0 |
| 100 | source_volume_eq_metric_volume : |
| 101 | sourceMeasure = M14HorizontalCoordinateVolume G sourceBasis |
| 102 | carrier_measurable : MeasurableSet H.carrier |
| 103 | endpoint_measurable : Measurable |
| 104 | (fun Z : H.carrier => H.endpoint_slice_map Z.val) |
| 105 | image_measurable : MeasurableSet (H.endpoint_slice_map '' H.carrier) |
| 106 | jacobian : G.Horizontal x → ℝ |
| 107 | jacobian_eq : ∀ Z hZ, |
| 108 | jacobian Z = M14MetricJacobianFromBasis G sourceBasis targetBasis Z hZ |
| 109 | coordinate_jacobian_eq : ∀ Z hZ, |
| 110 | jacobian Z = M14CoordinateJacobianFromBasis G sourceBasis targetBasis Z hZ |
| 111 | jacobian_nonnegative : ∀ Z, 0 ≤ jacobian Z |
| 112 | change_of_variables : ∀ φ : (G.slices (T - τ)).Point → ℝ, |
| 113 | Measurable φ → |
| 114 | (MeasureTheory.IntegrableOn |
| 115 | (fun Z => φ (H.endpoint_slice_map Z) * jacobian Z) H.carrier |
| 116 | sourceMeasure ↔ |
| 117 | MeasureTheory.IntegrableOn φ (H.endpoint_slice_map '' H.carrier) |
| 118 | (calibratedMetricVolume (G.slices (T - τ)).metricOnPoints)) ∧ |
| 119 | (∫ Z in H.carrier, φ (H.endpoint_slice_map Z) * jacobian Z ∂sourceMeasure) = |
| 120 | (∫ q in H.endpoint_slice_map '' H.carrier, φ q |
| 121 | ∂calibratedMetricVolume (G.slices (T - τ)).metricOnPoints) |
| 122 | |
| 123 | end PoincareMT |