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.Surgery.StandardCap.PersistenceGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Coordinates.IntrinsicJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Cylinder.CylinderCoefficients |
| 4 | |
| 5 | /-! |
| 6 | # Intrinsic estimates from the actual cap comparison |
| 7 | |
| 8 | Definition 16.12 and Proposition 16.13, pp. 376-378. These lemmas extract |
| 9 | individual metric jets and quadratic metric bounds from the actual M44 |
| 10 | family comparison. The normalization is the single inverse-square surgery |
| 11 | height already used by the persistence cylinder. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- The cap chart and cylinder use their original chosen manifold instances. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M46 |
| 23 | |
| 24 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 25 | normedSpaceTangentSpaceVectorSpace |
| 26 | |
| 27 | variable {F : SurgeryFlowData.{u}} {t : ℝ} {I : Set ℝ} |
| 28 | {U : Set (F.slice t).carrier} |
| 29 | |
| 30 | /-- The actual normalized cap metric as a bundled bilinear coefficient |
| 31 | field, with both chart and cylinder differentials retained. Source: |
| 32 | Proposition 16.5(a) in Definition 16.12, pp. 370 and 376. -/ |
| 33 | noncomputable def capComparisonCoefficients |
| 34 | (e : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) I U) |
| 35 | (chart : StandardCapSpace → (F.slice t).carrier) |
| 36 | (s : ℝ) (hs : s ∈ I) : |
| 37 | StandardCapSpace → StandardCapSpace →L[ℝ] StandardCapSpace →L[ℝ] ℝ := by |
| 38 | intro x |
| 39 | let : NormedAddCommGroup (TangentSpace (𝓡 3) (e.forward s hs (chart x))) := by |
| 40 | unfold TangentSpace |
| 41 | infer_instance |
| 42 | let : NormedSpace ℝ (TangentSpace (𝓡 3) (e.forward s hs (chart x))) := by |
| 43 | unfold TangentSpace |
| 44 | infer_instance |
| 45 | let d : StandardCapSpace →L[ℝ] TangentSpace (𝓡 3) (e.forward s hs (chart x)) := |
| 46 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) (chart x)).comp |
| 47 | (mfderiv (𝓡 3) (𝓡 3) chart x) |
| 48 | exact ((F.parameters.h t)⁻¹ ^ 2) • ContinuousLinearMap.bilinearComp |
| 49 | (E := TangentSpace (𝓡 3) (e.forward s hs (chart x))) |
| 50 | (F := TangentSpace (𝓡 3) (e.forward s hs (chart x))) (G := ℝ) |
| 51 | (E' := StandardCapSpace) (F' := StandardCapSpace) |
| 52 | ((F.metric (t + s / ((F.parameters.h t)⁻¹ ^ 2))).inner |
| 53 | (e.forward s hs (chart x))) d d |
| 54 | |
| 55 | /-- The bundled coefficients evaluate to M44's exact comparison tensor; |
| 56 | no replacement metric or new normalization is introduced. Source: |
| 57 | Proposition 16.5(a), p. 370. -/ |
| 58 | theorem capComparisonCoefficients_apply |
| 59 | (e : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) I U) |
| 60 | (chart : StandardCapSpace → (F.slice t).carrier) |
| 61 | (s : ℝ) (hs : s ∈ I) (x v w : StandardCapSpace) : |
| 62 | capComparisonCoefficients e chart s hs x v w = |
| 63 | e.pullbackInner s hs (chart x) |
| 64 | (mfderiv (𝓡 3) (𝓡 3) chart x v) |
| 65 | (mfderiv (𝓡 3) (𝓡 3) chart x w) := rfl |
| 66 | |
| 67 | /-- Every advertised intrinsic metric jet of the persisting surgery cap |
| 68 | is below its comparison tolerance. Source: Definition 16.12, p. 376. -/ |
| 69 | theorem capComparison_covariant_error_lt |
| 70 | {S : MaximalStandardCapFlow F.standard_initial} {A eta : ℝ} |
| 71 | (e : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) I U) |
| 72 | (chart : StandardCapSpace → (F.slice t).carrier) |
| 73 | (comparison : SurgeryCapFamilyComparison F S A eta e chart) |
| 74 | (heta : 0 < eta) (s : ℝ) (hs : s ∈ I) {x : StandardCapSpace} |
| 75 | (hx : x ∈ F.standard_initial.metric.ball 0 A) {j : ℕ} (hj : j ≤ ⌊eta⁻¹⌋₊) : |
| 76 | (S.metric s).tensorNorm ((S.connection s).iteratedCovariantTensorDerivative (k := 2) |
| 77 | (fun y v => capComparisonCoefficients e chart s hs y (v 0) (v 1) - |
| 78 | (S.metric s).inner y (v 0) (v 1)) j) x < eta := by |
| 79 | obtain ⟨bound, hbound, _hlifetime, _htime, _himage, hjets⟩ := comparison |
| 80 | exact metric_covariant_error_lt_of_jet_error (S.metric s) (S.connection s) |
| 81 | (fun y v => capComparisonCoefficients e chart s hs y (v 0) (v 1)) hj heta |
| 82 | ((hjets s hs x hx).trans_lt hbound) |
| 83 | |
| 84 | /-- The zeroth intrinsic jet gives the actual quadratic metric comparison |
| 85 | used by Proposition 16.13, pp. 377-378. The statement includes zero tangent |
| 86 | vectors and has no smoothness requirement outside the cap ball. -/ |
| 87 | theorem capComparison_metric_bounds |
| 88 | {S : MaximalStandardCapFlow F.standard_initial} {A eta : ℝ} |
| 89 | (e : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) I U) |
| 90 | (chart : StandardCapSpace → (F.slice t).carrier) |
| 91 | (comparison : SurgeryCapFamilyComparison F S A eta e chart) |
| 92 | (heta : 0 < eta) (s : ℝ) (hs : s ∈ I) {x : StandardCapSpace} |
| 93 | (hx : x ∈ F.standard_initial.metric.ball 0 A) (v : StandardCapSpace) : |
| 94 | (1 - eta) * (S.metric s).inner x v v ≤ |
| 95 | capComparisonCoefficients e chart s hs x v v ∧ |
| 96 | capComparisonCoefficients e chart s hs x v v ≤ |
| 97 | (1 + eta) * (S.metric s).inner x v v := by |
| 98 | obtain ⟨bound, hbound, _hlifetime, _htime, _himage, hjets⟩ := comparison |
| 99 | exact metric_quadratic_bounds_of_jet_error (S.metric s) (S.connection s) |
| 100 | (capComparisonCoefficients e chart s hs) heta |
| 101 | ((hjets s hs x hx).trans_lt hbound) v |
| 102 | |
| 103 | /-- The literal comparison coefficients are smooth on an open birth |
| 104 | chart. This identifies their germ with the actual normalized pullback, |
| 105 | so later scalar readouts use actual physical curvature. Source: |
| 106 | Definition 16.12, p. 376. -/ |
| 107 | theorem capComparisonCoefficients_smooth |
| 108 | (e : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) I U) |
| 109 | (hU : IsOpen U) {chart : StandardCapSpace → (F.slice t).carrier} |
| 110 | {V : Set StandardCapSpace} (hV : IsOpen V) |
| 111 | (hchart : ContMDiffOn (𝓡 3) (𝓡 3) ∞ chart V) |
| 112 | (hmap : Set.MapsTo chart V U) (s : ℝ) (hs : s ∈ I) : |
| 113 | ContDiffOn ℝ ∞ (capComparisonCoefficients e chart s hs) V := by |
| 114 | apply ((M44.cylinderPhysicalCoefficients_smooth e hV hchart hmap s hs).const_smul |
| 115 | ((F.parameters.h t)⁻¹ ^ 2)).congr |
| 116 | intro x hx |
| 117 | apply ContinuousLinearMap.ext |
| 118 | intro v |
| 119 | apply ContinuousLinearMap.ext |
| 120 | intro w |
| 121 | exact (capComparisonCoefficients_apply e chart s hs x v w).trans |
| 122 | (M44.cylinderPhysicalCoefficients_normalization e hU hV hchart hmap s hs hx v w).symm |
| 123 | |
| 124 | end PoincareMT.Proofs.M46 |