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.Existence.Asymptotics.EndCylinderEnergyDecay |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Energy.CanonicalMetricEnergyComparison |
| 3 | |
| 4 | /-! |
| 5 | # Actual ambient coefficient differences on the reference end |
| 6 | |
| 7 | The difference is a field of continuous bilinear forms in the original |
| 8 | Euclidean norm. It is smooth on the actual open reference region, has |
| 9 | all spatial jets bounded uniformly before the translation and time, and |
| 10 | its finite-coordinate cutoff energy is bounded by the proved actual |
| 11 | difference energy. This is Proposition 12.7, pp. 298-299 and |
| 12 | cylinder-asymptotics-by-end-energy.md. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | set_option maxSynthPendingDepth 8 |
| 18 | |
| 19 | open Set MeasureTheory |
| 20 | open scoped Manifold ContDiff BigOperators |
| 21 | |
| 22 | namespace PoincareMT.M34 |
| 23 | |
| 24 | open DifferenceEnergy |
| 25 | |
| 26 | /-- The actual translated cap coefficients minus the unbranched |
| 27 | shrinking-cylinder coefficients (Proposition 12.7, pp. 298-299). -/ |
| 28 | noncomputable def endCylinderDifferenceCoefficients |
| 29 | {g : RiemannianMetric 3 StandardCapSpace} (e : StandardCylindricalEnd g) |
| 30 | {J : Set ℝ} (F : RicciFlow 3 StandardCapSpace J) (j : ℕ) (t : ℝ) : StandardCapSpace → FH 3 := |
| 31 | (F.metric t).pullbackCoefficients (endAxialTranslation e j) - endCylinderCoefficients e t |
| 32 | |
| 33 | /-- Every spatial difference field is smooth on the true open end, even |
| 34 | when its total time is outside the flow domain |
| 35 | (Proposition 12.7, pp. 298-299). -/ |
| 36 | theorem endCylinderDifferenceCoefficients_contDiffOn |
| 37 | {g : RiemannianMetric 3 StandardCapSpace} (e : StandardCylindricalEnd g) |
| 38 | {J : Set ℝ} (F : RicciFlow 3 StandardCapSpace J) (j : ℕ) (t : ℝ) : |
| 39 | ContDiffOn ℝ ∞ (endCylinderDifferenceCoefficients e F j t) (endReferenceRegion e) := by |
| 40 | have hj : -3 < (j : ℝ) := by have := Nat.cast_nonneg (α := ℝ) j; linarith |
| 41 | have hA : ContDiffOn ℝ ∞ ((F.metric t).pullbackCoefficients (endAxialTranslation e j)) |
| 42 | (endReferenceRegion e) := fun x hx => ((F.metric t).contDiffAt_pullbackCoefficients |
| 43 | (((endReferenceTranslation_contMDiffOn e hj) x hx).contMDiffAt |
| 44 | ((endReferenceRegion_isOpen e).mem_nhds hx))).contDiffWithinAt |
| 45 | exact hA.sub (((endCylinderCoefficients_contDiff e).comp |
| 46 | (contDiff_const.prodMk contDiff_id)).contDiffOn) |
| 47 | |
| 48 | /-- The native coefficient difference has uniformly bounded spatial jets |
| 49 | on any compact reference set, before all indices and included times |
| 50 | (Proposition 12.7, pp. 298-299). -/ |
| 51 | theorem partialFlow_endCylinderDifferenceCoefficients_bounds |
| 52 | (P : RicciFlowCurvatureTheory.{0}) {g0 : StandardInitialMetric} |
| 53 | (E0 : StandardCapEstimate g0) (F : PartialStandardCapFlow g0) |
| 54 | (e : StandardCylindricalEnd g0.metric) {T : ℝ} |
| 55 | (hT : T ∈ Ico 0 F.lifetime ∩ Ico 0 1) |
| 56 | {K : Set StandardCapSpace} (hK : IsCompact K) (m : ℕ) : |
| 57 | ∃ M : ℝ, ∀ j t, t ∈ Icc 0 T → ∀ x ∈ K, x ∈ endReferenceRegion e → |
| 58 | ‖iteratedFDeriv ℝ m (endCylinderDifferenceCoefficients e F.flow j t) x‖ ≤ M := by |
| 59 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 60 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 61 | (I := 𝓡 3) (n := ∞) |
| 62 | obtain ⟨S, hTS, hSF⟩ := exists_between hT.1.2 |
| 63 | have hS : 0 < S := hT.1.1.trans_lt hTS |
| 64 | obtain ⟨B0, _hB0, hb0⟩ := F.curvature_locally_bounded S hS.le hSF |
| 65 | let B := max 1 B0 |
| 66 | have hB : 0 < B := zero_lt_one.trans_le (le_max_left _ _) |
| 67 | have hfull (s) (hs : s ∈ Ico 0 S) (x) : (F.flow.connection s).curvatureTensorNorm x ≤ B := |
| 68 | (le_abs_self _).trans ((hb0 s ⟨hs.1, hs.2.le⟩ x).trans (le_max_right _ _)) |
| 69 | obtain ⟨aA, MA, _haA, _hMA, hA⟩ := partialFlow_endPullback_bounds P E0 F e |
| 70 | hS hSF.le hB hfull hK m |
| 71 | obtain ⟨aB, MB, _haB, _hMB, hBmodel⟩ := endCylinderFlow_compact_bounds e hT.2.2 hK m |
| 72 | refine ⟨MA + MB, ?_⟩ |
| 73 | intro j t ht x hx hxU |
| 74 | have hj : -3 < (j : ℝ) := by have := Nat.cast_nonneg (α := ℝ) j; linarith |
| 75 | let p : endReferenceRegion e := ⟨x, hxU⟩ |
| 76 | have htI : t ∈ Ico 0 1 := ⟨ht.1, ht.2.trans_lt hT.2.2⟩ |
| 77 | have hjA := (hA j hj t ⟨ht.1, ht.2.trans_lt hTS⟩ p x hx hxU).1 m le_rfl |
| 78 | have hjB := (hBmodel t ht p x hx hxU).1 m le_rfl |
| 79 | rw [endPullbackFlow_iteratedFDeriv e F.flow j hj t p m x hxU] at hjA |
| 80 | rw [endCylinderFlow_iteratedFDeriv e t htI p m x hxU] at hjB |
| 81 | have hcA : ContDiffAt ℝ ∞ ((F.flow.metric t).pullbackCoefficients (endAxialTranslation e j)) x := |
| 82 | (F.flow.metric t).contDiffAt_pullbackCoefficients |
| 83 | (((endReferenceTranslation_contMDiffOn e hj) x hxU).contMDiffAt |
| 84 | ((endReferenceRegion_isOpen e).mem_nhds hxU)) |
| 85 | have hcB : ContDiffAt ℝ ∞ (endCylinderCoefficients e t) x := |
| 86 | ((endCylinderCoefficients_contDiff e).comp (contDiff_const.prodMk contDiff_id)).contDiffAt |
| 87 | change ‖iteratedFDeriv ℝ m |
| 88 | ((F.flow.metric t).pullbackCoefficients (endAxialTranslation e j) - endCylinderCoefficients e t) |
| 89 | x‖ ≤ MA + MB |
| 90 | rw [iteratedFDeriv_sub_apply (hcA.of_le (by exact_mod_cast le_top)) |
| 91 | (hcB.of_le (by exact_mod_cast le_top))] |
| 92 | exact (norm_sub_le _ _).trans (add_le_add hjA hjB) |
| 93 | |
| 94 | /-- The finite-coordinate L2 energy of the native metric difference is |
| 95 | bounded by the genuine full cylinder-comparison energy at included times |
| 96 | (Proposition 12.7, pp. 298-299). -/ |
| 97 | theorem endCylinderDifferenceCoefficients_energy_le |
| 98 | {g : RiemannianMetric 3 StandardCapSpace} (e : StandardCylindricalEnd g) |
| 99 | {dH dA dS : ℕ} (qH : FH 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dH)) |
| 100 | (qA : FA 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dA)) |
| 101 | (qS : FS 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dS)) |
| 102 | {J : Set ℝ} (F : RicciFlow 3 StandardCapSpace J) (p : endReferenceRegion e) |
| 103 | {t : ℝ} (ht : t ∈ J ∩ Ico 0 1) (j : ℕ) : |
| 104 | letI : MeasurableSpace StandardCapSpace := borel _ |
| 105 | letI : BorelSpace StandardCapSpace := ⟨rfl⟩ |
| 106 | (∑ i, ∫ x, (endEnergyCutoff e x * qH (endCylinderDifferenceCoefficients e F j t x) i) ^ 2) ≤ |
| 107 | endCylinderDifferenceEnergy e qH qA qS F p j t := by |
| 108 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 109 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 110 | (I := 𝓡 3) (n := ∞) |
| 111 | let : MeasurableSpace StandardCapSpace := borel _ |
| 112 | let : BorelSpace StandardCapSpace := ⟨rfl⟩ |
| 113 | have hj : -3 < (j : ℝ) := by have := Nat.cast_nonneg (α := ℝ) j; linarith |
| 114 | apply canonicalDifferenceEnergy_metric_part_le (endReferenceRegion e) |
| 115 | (endReferenceRegion_isOpen e) qH qA qS |
| 116 | (energyCutoffs_contDiff e).1.continuous (energyCutoffs_hasCompactSupport e).1 |
| 117 | (endEnergyCutoff_tsupport_subset_region e) |
| 118 | (endPullbackFlow e F j hj) (endCylinderFlow e) p ht |
| 119 | intro x |
| 120 | rw [endPullbackFlow_inner e F j hj t x] |
| 121 | ext u v |
| 122 | change ((F.metric t).pullbackCoefficients (endAxialTranslation e j) x u v - |
| 123 | endCylinderCoefficients e t x u v) = |
| 124 | ((F.metric t).pullbackCoefficients (endAxialTranslation e j) x u v - |
| 125 | (endCylinderMetric e t).inner x u v) |
| 126 | rw [endCylinderMetric_inner, endCylinderParameter, if_pos ht.2] |
| 127 | |
| 128 | end PoincareMT.M34 |