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.RotationInvariance.CompatibleEndIntegral |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.RotationInvariance.EndDensityComparison |
| 3 | |
| 4 | /-! |
| 5 | # Actual energy comparison on one end overlap |
| 6 | |
| 7 | The inverse-shift Jacobian bound converts the source integral to a fixed |
| 8 | target plateau. Actual tensor-density comparison and genuine cutoff |
| 9 | integrability then bound it by the neighboring local energy. The constant |
| 10 | precedes both flows, translations and included time. This is Morgan-Tian |
| 11 | Section 12.5, pp. 309-319 and end-overlap-energy.md. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | -- The actual curvature fiber contains three nested Hom spaces. |
| 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 | /-- An inverse-shift image of a fixed cutoff plateau has its actual |
| 27 | density integral controlled by the neighboring energy, uniformly before |
| 28 | both flows and all translations (Section 12.5, pp. 309-319). -/ |
| 29 | theorem exists_endOverlap_integral_bound |
| 30 | {g : RiemannianMetric 3 StandardCapSpace} (e : StandardCylindricalEnd g) |
| 31 | {dH dA dS : ℕ} (qH : FH 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dH)) |
| 32 | (qA : FA 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dA)) |
| 33 | (qS : FS 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dS)) |
| 34 | {K Q : Set StandardCapSpace} (hK : IsCompact K) (hKU : K ⊆ endReferenceRegion e) |
| 35 | (hQ : IsCompact Q) (hQK : Q ⊆ K) {r : ℝ} (hr : r = -1 ∨ r = 0 ∨ r = 1) |
| 36 | (himage : endAxialTranslation e (-r) '' Q ⊆ K) |
| 37 | (hplateau : ∀ x ∈ Q, endEnergyCutoff e x = 1) : |
| 38 | letI := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 39 | letI := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 40 | (I := 𝓡 3) (n := ∞) |
| 41 | letI : MeasurableSpace StandardCapSpace := borel _ |
| 42 | letI : BorelSpace StandardCapSpace := ⟨rfl⟩ |
| 43 | ∃ C : ℝ, 0 ≤ C ∧ ∀ {J J' : Set ℝ} |
| 44 | (F : RicciFlow 3 StandardCapSpace J) (F' : RicciFlow 3 StandardCapSpace J') |
| 45 | (p : endReferenceRegion e) (s : ℝ) (hs : -3 < s) (hrs : -3 < r + s) |
| 46 | {t : ℝ}, t ∈ J ∩ J' → |
| 47 | (∫ x in endAxialTranslation e (-r) '' Q, |
| 48 | canonicalDifferenceDensity (endReferenceRegion e) (endReferenceRegion_isOpen e) |
| 49 | qH qA qS (endPullbackFlow e F (r + s) hrs) (endPullbackFlow e F' (r + s) hrs) p t x) ≤ |
| 50 | C * ∫ x, endEnergyCutoff e x ^ 2 * |
| 51 | canonicalDifferenceDensity (endReferenceRegion e) (endReferenceRegion_isOpen e) |
| 52 | qH qA qS (endPullbackFlow e F s hs) (endPullbackFlow e F' s hs) p t x := by |
| 53 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 54 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 55 | (I := 𝓡 3) (n := ∞) |
| 56 | let : MeasurableSpace StandardCapSpace := borel _ |
| 57 | let : BorelSpace StandardCapSpace := ⟨rfl⟩ |
| 58 | obtain ⟨C, hC, hcompare⟩ := exists_compatibleEnd_integral_bound e qH qA qS |
| 59 | hK hKU hQ hQK hr himage hplateau |
| 60 | refine ⟨C, hC, ?_⟩ |
| 61 | intro J J' F F' p s hs hrs t ht |
| 62 | have hrpos : -3 < r := by rcases hr with rfl | rfl | rfl <;> norm_num |
| 63 | exact hcompare (endPullbackFlow e F (r + s) hrs) (endPullbackFlow e F' (r + s) hrs) |
| 64 | (endPullbackFlow e F s hs) (endPullbackFlow e F' s hs) p ht ht |
| 65 | (endReferenceTransition_metric e F p r hrpos s hs hrs t) |
| 66 | (endReferenceTransition_metric e F' p r hrpos s hs hrs t) |
| 67 | |
| 68 | end PoincareMT.M34 |