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.EndOverlapIntegral |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.RotationInvariance.CompatibleEndNeighbors |
| 3 | |
| 4 | /-! |
| 5 | # Uniform three-neighbor control of end support integrals |
| 6 | |
| 7 | The translated actual flow families obey the metric compatibility |
| 8 | identities, so the shared three-slab theorem controls their neighboring |
| 9 | energies uniformly. This is Morgan-Tian Section 12.5, pp. 309-319 and |
| 10 | end-overlap-energy.md. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | -- The actual curvature fiber contains three nested Hom spaces. |
| 16 | set_option maxSynthPendingDepth 8 |
| 17 | |
| 18 | open Set MeasureTheory |
| 19 | open scoped Manifold ContDiff BigOperators |
| 20 | |
| 21 | namespace PoincareMT.M34 |
| 22 | |
| 23 | open DifferenceEnergy |
| 24 | |
| 25 | /-- A positive-index end support integral is bounded by its three actual |
| 26 | neighboring local energies, with a single constant before all flows and |
| 27 | indices (Section 12.5, pp. 309-319). -/ |
| 28 | theorem exists_endNeighbor_integral_bound |
| 29 | {g : RiemannianMetric 3 StandardCapSpace} (e : StandardCylindricalEnd g) |
| 30 | {dH dA dS : ℕ} (qH : FH 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dH)) |
| 31 | (qA : FA 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dA)) |
| 32 | (qS : FS 3 ≃L[ℝ] EuclideanSpace ℝ (Fin dS)) : |
| 33 | letI := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 34 | letI := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 35 | (I := 𝓡 3) (n := ∞) |
| 36 | letI : MeasurableSpace StandardCapSpace := borel _ |
| 37 | letI : BorelSpace StandardCapSpace := ⟨rfl⟩ |
| 38 | ∃ C : ℝ, 0 ≤ C ∧ ∀ {J J' : Set ℝ} |
| 39 | (F : RicciFlow 3 StandardCapSpace J) (F' : RicciFlow 3 StandardCapSpace J') |
| 40 | (p : endReferenceRegion e) {t : ℝ}, t ∈ J ∩ J' → |
| 41 | let rho := fun j : ℕ => canonicalDifferenceDensity |
| 42 | (endReferenceRegion e) (endReferenceRegion_isOpen e) qH qA qS |
| 43 | (endPullbackFlow e F j (by have := Nat.cast_nonneg (α := ℝ) j; linarith)) |
| 44 | (endPullbackFlow e F' j (by have := Nat.cast_nonneg (α := ℝ) j; linarith)) p t |
| 45 | ∀ j : ℕ, (∫ x in tsupport (endEnergyCutoff e), rho (j + 1) x) ≤ |
| 46 | C * ((∫ x, endEnergyCutoff e x ^ 2 * rho j x) + |
| 47 | (∫ x, endEnergyCutoff e x ^ 2 * rho (j + 1) x) + |
| 48 | (∫ x, endEnergyCutoff e x ^ 2 * rho (j + 2) x)) := by |
| 49 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 50 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 51 | (I := 𝓡 3) (n := ∞) |
| 52 | let : MeasurableSpace StandardCapSpace := borel _ |
| 53 | let : BorelSpace StandardCapSpace := ⟨rfl⟩ |
| 54 | obtain ⟨C, hC, hcompare⟩ := exists_compatibleEnd_neighbor_bound e qH qA qS |
| 55 | refine ⟨C, hC, ?_⟩ |
| 56 | intro J J' F F' p t ht |
| 57 | have hj (j : ℕ) : -3 < (j : ℝ) := by have := Nat.cast_nonneg (α := ℝ) j; linarith |
| 58 | apply hcompare (fun j => endPullbackFlow e F j (hj j)) |
| 59 | (fun j => endPullbackFlow e F' j (hj j)) p ht |
| 60 | · intro i j r hr hij x hx u v |
| 61 | have hrpos : -3 < r := by rcases hr with rfl | rfl | rfl <;> norm_num |
| 62 | have hrs : -3 < r + (j : ℝ) := by rw [← hij]; exact hj i |
| 63 | simpa only [← hij] using endReferenceTransition_metric e F p r hrpos j (hj j) hrs t x hx u v |
| 64 | · intro i j r hr hij x hx u v |
| 65 | have hrpos : -3 < r := by rcases hr with rfl | rfl | rfl <;> norm_num |
| 66 | have hrs : -3 < r + (j : ℝ) := by rw [← hij]; exact hj i |
| 67 | simpa only [← hij] using endReferenceTransition_metric e F' p r hrpos j (hj j) hrs t x hx u v |
| 68 | |
| 69 | end PoincareMT.M34 |