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.SourceNames.ReducedVolume |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Measure.Transport.MeasureTransport |
| 3 | |
| 4 | /-! |
| 5 | # Measure transport with a prescribed orthonormal source basis |
| 6 | |
| 7 | Morgan-Tian Lemma 6.71 and Corollary 6.74, pp. 141-142. The existing |
| 8 | stable endpoint chart and calibrated area formula work for each chosen |
| 9 | orthonormal source basis. Prescribing that basis lets rescaling retain |
| 10 | the normalized initial-vector identification in the Gram determinant. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M14 |
| 20 | |
| 21 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 22 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 23 | {T τ : ℝ} {x : G.Point} {E : M14ExponentialFamily G T x} |
| 24 | |
| 25 | /-- The full signed measure-transport data can retain any prescribed |
| 26 | orthonormal initial basis. This is the existing stable-coordinate area |
| 27 | formula of Lemma 6.71, p. 141, with the source basis specified. -/ |
| 28 | noncomputable def rescalingMeasureDataWithBasis (H : M14StableSet G T τ x E) |
| 29 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 30 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 31 | if i = j then 1 else 0) : M14MeasureJacobianData G T τ x E H := by |
| 32 | classical |
| 33 | let : T2Space (G.Horizontal x) := |
| 34 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 35 | let c (Z : G.Horizontal x) (_hZ : Z ∈ H.carrier) := |
| 36 | Classical.choose (exists_orthonormal_tangentBasis |
| 37 | (G.slices (T - τ)).metricOnPoints (H.endpoint_slice_map Z)) |
| 38 | have hc (Z : G.Horizontal x) (hZ : Z ∈ H.carrier) (i j : Fin n) : |
| 39 | (G.slices (T - τ)).metricOnPoints.inner (H.endpoint_slice_map Z) |
| 40 | (c Z hZ i) (c Z hZ j) = if i = j then 1 else 0 := |
| 41 | Classical.choose_spec (exists_orthonormal_tangentBasis |
| 42 | (G.slices (T - τ)).metricOnPoints (H.endpoint_slice_map Z)) i j |
| 43 | let C := b.euclideanCoordinates |
| 44 | let e := stableCoordinateChart H b |
| 45 | let ρ := M10.pullbackJacobian (G.slices (T - τ)).metricOnPoints e |
| 46 | let J : G.Horizontal x → ℝ := fun Z => ρ (C.symm Z) |
| 47 | have hJ (Z : G.Horizontal x) (hZ : Z ∈ H.carrier) : |
| 48 | J Z = M14MetricJacobianFromBasis G b c Z hZ := by |
| 49 | have hpre : b.euclideanCoordinates (C.symm Z) ∈ H.carrier := by |
| 50 | simpa only [C, ContinuousLinearEquiv.apply_symm_apply] using hZ |
| 51 | have h := pullbackJacobian_eq_metricJacobian H b c (C.symm Z) hpre |
| 52 | simpa only [J, ρ, C, e, ContinuousLinearEquiv.apply_symm_apply] using h |
| 53 | have he : ContMDiffOn (𝓡 n) (𝓡 n) 1 e e.source := |
| 54 | (stableCoordinateChart_smooth H b).of_le (by simp) |
| 55 | have hei : ContMDiffOn (𝓡 n) (𝓡 n) 1 e.symm e.target := |
| 56 | (stableCoordinateChart_symm_smooth H b).of_le (by simp) |
| 57 | have hρ : ContinuousOn ρ e.source := by |
| 58 | intro z hz |
| 59 | exact (M10.pullbackJacobian_continuousAt (G.slices (T - τ)).metricOnPoints |
| 60 | (he.contMDiffAt (e.open_source.mem_nhds hz))).continuousWithinAt |
| 61 | refine { |
| 62 | sourceMeasure := M14HorizontalCoordinateVolume G b |
| 63 | sourceBasis := b |
| 64 | targetBasis := c |
| 65 | source_basis_orthonormal := hb |
| 66 | target_basis_orthonormal := hc |
| 67 | source_volume_eq_metric_volume := rfl |
| 68 | carrier_measurable := H.carrier_open.measurableSet |
| 69 | endpoint_measurable := H.endpoint_slice_continuous.domRestrict.measurable |
| 70 | image_measurable := e.open_target.measurableSet |
| 71 | jacobian := J |
| 72 | jacobian_eq := hJ |
| 73 | coordinate_jacobian_eq := fun Z hZ => (hJ Z hZ).trans |
| 74 | (metricJacobian_eq_coordinateJacobian b c hc Z hZ) |
| 75 | jacobian_nonnegative := fun Z => M10.pullbackJacobian_nonneg _ _ _ |
| 76 | change_of_variables := ?_ } |
| 77 | intro φ hφ |
| 78 | let f : G.Horizontal x → ℝ := fun Z => φ (H.endpoint_slice_map Z) * J Z |
| 79 | have hfcomp : f ∘ C = fun z => ρ z * φ (e z) := by |
| 80 | funext z |
| 81 | change φ (H.endpoint_slice_map (C z)) * ρ (C.symm (C z)) = |
| 82 | ρ z * φ (H.endpoint_slice_map (C z)) |
| 83 | rw [ContinuousLinearEquiv.symm_apply_apply, mul_comm] |
| 84 | have hsource := b.integrableOn_coordinateVolume_iff f H.carrier |
| 85 | have hsourceIntegral := b.setIntegral_coordinateVolume f H.carrier |
| 86 | rw [hfcomp] at hsource hsourceIntegral |
| 87 | have hφae : MeasureTheory.AEStronglyMeasurable φ |
| 88 | ((calibratedMetricVolume (G.slices (T - τ)).metricOnPoints).restrict e.target) := |
| 89 | hφ.aestronglyMeasurable |
| 90 | have htarget := M10.integrableOn_calibrated_iff_pullback |
| 91 | (G.slices (T - τ)).metricOnPoints e he hei hρ hφae |
| 92 | have htargetIntegral := M10.integralOn_calibrated_eq_pullback |
| 93 | (G.slices (T - τ)).metricOnPoints e he hei hρ hφae |
| 94 | exact ⟨hsource.trans htarget.symm, hsourceIntegral.trans htargetIntegral.symm⟩ |
| 95 | |
| 96 | /-- The constructed measure data retain the prescribed source basis |
| 97 | exactly, as required by Corollary 6.74, p. 142. -/ |
| 98 | theorem rescalingMeasureDataWithBasis_sourceBasis (H : M14StableSet G T τ x E) |
| 99 | (b : Module.Basis (Fin n) ℝ (G.Horizontal x)) |
| 100 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner x (b i) (b j) = |
| 101 | if i = j then 1 else 0) : |
| 102 | (rescalingMeasureDataWithBasis H b hb).sourceBasis = b := rfl |
| 103 | |
| 104 | end PoincareMT.M14 |