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.CompatibleEndDensity |
| 2 | |
| 3 | /-! |
| 4 | # Uniform actual difference density on end overlaps |
| 5 | |
| 6 | The actual metric, connection and curvature transition identities combine |
| 7 | with compact bounds on the three fixed derivatives. One constant precedes |
| 8 | both flows, all translations, times and points. This is the pointwise |
| 9 | overlap step in Morgan-Tian Section 12.5, pp. 309-319 and |
| 10 | coordinate-density-and-slabs.md. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | -- The actual density contains three nested curvature Hom fibers. |
| 16 | set_option maxSynthPendingDepth 8 |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff BigOperators |
| 20 | |
| 21 | namespace PoincareMT.M34 |
| 22 | |
| 23 | open DifferenceEnergy |
| 24 | |
| 25 | /-- The actual density in a translated chart is uniformly controlled by |
| 26 | the actual neighboring-chart density on compact overlaps |
| 27 | (Section 12.5, pp. 309-319). -/ |
| 28 | theorem exists_endTransition_density_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 | {K : Set StandardCapSpace} (hK : IsCompact K) (hKU : K ⊆ endReferenceRegion e) : |
| 34 | letI := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 35 | letI := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 36 | (I := 𝓡 3) (n := ∞) |
| 37 | ∃ C : ℝ, 0 ≤ C ∧ ∀ {J J' : Set ℝ} |
| 38 | (F : RicciFlow 3 StandardCapSpace J) (F' : RicciFlow 3 StandardCapSpace J') |
| 39 | (p : endReferenceRegion e) (r : ℝ), (r = -1 ∨ r = 0 ∨ r = 1) → |
| 40 | ∀ (s : ℝ) (hs : -3 < s) (hrs : -3 < r + s) (t : ℝ) (x : endReferenceRegion e), |
| 41 | (x : StandardCapSpace) ∈ K → endAxialTranslation e r x ∈ K → |
| 42 | actualDifferenceEnergyDensity qH qA qS |
| 43 | ((endPullbackFlow e F (r + s) hrs).connection t) |
| 44 | ((endPullbackFlow e F' (r + s) hrs).connection t) x ≤ |
| 45 | C * actualDifferenceEnergyDensity qH qA qS |
| 46 | ((endPullbackFlow e F s hs).connection t) |
| 47 | ((endPullbackFlow e F' s hs).connection t) (endReferenceTransition e p r x) := by |
| 48 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 49 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 50 | (I := 𝓡 3) (n := ∞) |
| 51 | obtain ⟨C, hC, hcompare⟩ := exists_compatibleEnd_density_bound e qH qA qS hK hKU |
| 52 | refine ⟨C, hC, ?_⟩ |
| 53 | intro J J' F F' p r hr s hs hrs t x hx hshift |
| 54 | have hrpos : -3 < r := by rcases hr with rfl | rfl | rfl <;> norm_num |
| 55 | exact hcompare _ _ _ _ |
| 56 | ((endPullbackFlow e F (r + s) hrs).connection t) |
| 57 | ((endPullbackFlow e F' (r + s) hrs).connection t) |
| 58 | ((endPullbackFlow e F s hs).connection t) ((endPullbackFlow e F' s hs).connection t) |
| 59 | p r hr (endReferenceTransition_metric e F p r hrpos s hs hrs t) |
| 60 | (endReferenceTransition_metric e F' p r hrpos s hs hrs t) x hx hshift |
| 61 | |
| 62 | end PoincareMT.M34 |