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.Volume.Surgery.Cap.CapJetComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Measure.ScaledJacobianComparison |
| 3 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Measure.MetricBallTopology |
| 4 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Topology.SmoothPartialChart |
| 5 | import PoincareLib.Geometry.RicciFlow.Volume.Surgery.Measure.CalibratedTransport |
| 6 | |
| 7 | /-! |
| 8 | Adapted from Mapher `PoincareMT/Proofs/M49/CapComparisonVolume.lean` at |
| 9 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 10 | |
| 11 | # Cubic volume comparison on the actual cap chart |
| 12 | |
| 13 | Morgan-Tian Theorem 13.2, p. 333, supplies the actual smooth comparison |
| 14 | map. Its normalized paired metric bound gives the h-cubed density |
| 15 | factor required in Lemma 17.12, p. 410. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set MeasureTheory |
| 21 | open scoped Manifold ContDiff Bundle ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.SurgeryVolume |
| 26 | |
| 27 | variable {g₀ : StandardInitialMetric} {S : GeneralizedSliceCarrier.{u}} |
| 28 | {g : RiemannianMetric 3 S.carrier} {tip : S.carrier} {h eta : ℝ} |
| 29 | |
| 30 | /-- The actual surgery comparison map and inverse define an open chart |
| 31 | (MT Theorem 13.2, p. 333, used in Lemma 17.12, p. 410). -/ |
| 32 | noncomputable def surgeryCapCloseChart (C : SurgeryCapClose g₀ S g tip h eta) (heta : eta < 1) : |
| 33 | OpenPartialHomeomorph StandardCapSpace S.carrier := |
| 34 | smoothOpenPartialHomeomorph C.map C.inverse (g₀.metric.ball 0 eta⁻¹) |
| 35 | (isOpen_metric_ball g₀.metric 0 eta⁻¹) C.map_smooth C.inverse_smooth C.left_inverse |
| 36 | (fun p hp => by |
| 37 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) p) := |
| 38 | inferInstanceAs (FiniteDimensional ℝ (EuclideanSpace ℝ (Fin 3))) |
| 39 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) (C.map p)) := |
| 40 | inferInstanceAs (FiniteDimensional ℝ (EuclideanSpace ℝ (Fin 3))) |
| 41 | have hi := surgeryCapClose_mfderiv_injective C heta hp |
| 42 | exact ⟨hi, (LinearMap.injective_iff_surjective_of_finrank_eq_finrank |
| 43 | (f := (mfderiv (𝓡 3) (𝓡 3) C.map p).toLinearMap) rfl).mp hi⟩) |
| 44 | |
| 45 | -- Both Jacobians keep the specified metrics on the dependent tangent spaces. |
| 46 | set_option backward.isDefEq.respectTransparency false in |
| 47 | /-- The actual comparison image has at most twice the cubically rescaled |
| 48 | model volume (MT Theorem 13.2, p. 333; Lemma 17.12, p. 410). -/ |
| 49 | theorem surgeryCapClose_volume_image_le (C : SurgeryCapClose g₀ S g tip h eta) |
| 50 | (heta : eta < 1) |
| 51 | (hmat : ∀ A : Matrix (Fin 3) (Fin 3) ℝ, |
| 52 | (∀ i j, |A i j - if i = j then 1 else 0| ≤ eta) → |
| 53 | (1 / 2 : ℝ) ≤ Real.sqrt A.det ∧ Real.sqrt A.det ≤ 2) |
| 54 | {A : Set StandardCapSpace} (hA : MeasurableSet A) |
| 55 | (hAs : A ⊆ g₀.metric.ball 0 eta⁻¹) : |
| 56 | calibratedMetricVolume g (C.map '' A) ≤ |
| 57 | ENNReal.ofReal (2 * h ^ 3) * calibratedMetricVolume g₀.metric A := by |
| 58 | have hh := C.scale_pos |
| 59 | let e := surgeryCapCloseChart C heta |
| 60 | let e₀ := OpenPartialHomeomorph.refl StandardCapSpace |
| 61 | have he : ContMDiffOn (𝓡 3) (𝓡 3) 1 e e.source := |
| 62 | C.map_smooth.of_le (by simp) |
| 63 | have hei : ContMDiffOn (𝓡 3) (𝓡 3) 1 e.symm e.target := |
| 64 | C.inverse_smooth.of_le (by simp) |
| 65 | have he₀ : ContMDiffOn (𝓡 3) (𝓡 3) 1 e₀ e₀.source := contMDiffOn_id |
| 66 | have hei₀ : ContMDiffOn (𝓡 3) (𝓡 3) 1 e₀.symm e₀.target := contMDiffOn_id |
| 67 | have htarget := SurgeryVolume.Measure.calibratedMetricVolume_image_eq_lintegral g e he hei hA hAs |
| 68 | have hmodel := SurgeryVolume.Measure.calibratedMetricVolume_image_eq_lintegral |
| 69 | g₀.metric e₀ he₀ hei₀ hA (subset_univ A) |
| 70 | change calibratedMetricVolume g (C.map '' A) = |
| 71 | ∫⁻ p in A, ENNReal.ofReal (SurgeryVolume.Measure.pullbackJacobian g C.map p) at htarget |
| 72 | change calibratedMetricVolume g₀.metric (id '' A) = |
| 73 | ∫⁻ p in A, ENNReal.ofReal (SurgeryVolume.Measure.pullbackJacobian g₀.metric id p) at hmodel |
| 74 | rw [image_id] at hmodel |
| 75 | rw [htarget, hmodel] |
| 76 | calc |
| 77 | _ ≤ ∫⁻ p in A, ENNReal.ofReal (2 * h ^ 3) * |
| 78 | ENNReal.ofReal (SurgeryVolume.Measure.pullbackJacobian g₀.metric id p) := by |
| 79 | apply lintegral_mono_ae |
| 80 | filter_upwards [ae_restrict_mem hA] with p hp |
| 81 | have hD : |
| 82 | (mfderiv (𝓡 3) (𝓡 3) (id : StandardCapSpace → StandardCapSpace) p).IsInvertible := by |
| 83 | rw [mfderiv_id] |
| 84 | exact ⟨ContinuousLinearEquiv.refl ℝ StandardCapSpace, rfl⟩ |
| 85 | have herror : ∀ v w : StandardCapSpace, |
| 86 | |h⁻¹ ^ 2 * SurgeryVolume.Measure.pullbackMetricForm g C.map p v w - |
| 87 | SurgeryVolume.Measure.pullbackMetricForm g₀.metric id p v w| ≤ |
| 88 | eta * g₀.metric.tangentNorm p (mfderiv (𝓡 3) (𝓡 3) id p v) * |
| 89 | g₀.metric.tangentNorm p (mfderiv (𝓡 3) (𝓡 3) id p w) := by |
| 90 | intro v w |
| 91 | simpa only [SurgeryVolume.Measure.pullbackMetricForm, mfderiv_id, ContinuousLinearMap.id_apply, |
| 92 | ContinuousLinearMap.bilinearComp_apply, id_eq] using! |
| 93 | surgeryCapClose_bilinear_error_le C (hAs hp) v w |
| 94 | have hJ := (pullbackJacobian_comparison_of_bilinear_error g₀.metric g |
| 95 | id C.map p C.scale_pos hmat hD herror).2 |
| 96 | rw [← ENNReal.ofReal_mul (by positivity : 0 ≤ 2 * h ^ 3)] |
| 97 | exact ENNReal.ofReal_le_ofReal hJ |
| 98 | _ = _ := lintegral_const_mul' _ _ ENNReal.ofReal_ne_top |
| 99 | |
| 100 | end PoincareMT.SurgeryVolume |