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.EndTranslationCalculus |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.RotationInvariance.EnergyCutoffs |
| 3 | |
| 4 | /-! |
| 5 | # Fixed compact slabs for end overlap integrals |
| 6 | |
| 7 | Closed cylinder slabs give actual compact subsets in the original cap |
| 8 | topology. Their translated images have the exact translated height |
| 9 | intervals, and the end cutoff is supported in one fixed interior slab. |
| 10 | This is Morgan-Tian Section 12.5, pp. 309-319 and end-overlap-energy.md. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | variable {g : RiemannianMetric 3 StandardCapSpace} (e : StandardCylindricalEnd g) |
| 21 | |
| 22 | /-- A closed slab of the actual supplied cylindrical coordinates |
| 23 | (Section 12.5, pp. 309-319). -/ |
| 24 | def endClosedSlab (a b : ℝ) : Set StandardCapSpace := |
| 25 | e.coordinate '' (univ ×ˢ Icc a b) |
| 26 | |
| 27 | /-- Closed nonnegative-height slabs are compact in the original topology |
| 28 | (Section 12.5, pp. 309-319). -/ |
| 29 | theorem endClosedSlab_isCompact {a b : ℝ} (ha : 0 ≤ a) : |
| 30 | IsCompact (endClosedSlab e a b) := by |
| 31 | apply (isCompact_univ.prod isCompact_Icc).image_of_continuousOn |
| 32 | apply e.coordinate_smooth.continuousOn.mono |
| 33 | intro z hz |
| 34 | refine ⟨mem_univ _, ?_⟩ |
| 35 | change -e.collar < z.2 |
| 36 | have hh : a ≤ z.2 := hz.2.1 |
| 37 | linarith [e.collar_pos] |
| 38 | |
| 39 | /-- Slabs with heights strictly between three and five lie in the fixed |
| 40 | open reference domain (Section 12.5, pp. 309-319). -/ |
| 41 | theorem endClosedSlab_subset_reference {a b : ℝ} (ha : 3 < a) (hb : b < 5) : |
| 42 | endClosedSlab e a b ⊆ endReferenceRegion e := by |
| 43 | rintro _ ⟨z, hz, rfl⟩ |
| 44 | exact ⟨z, ⟨mem_univ _, ha.trans_le hz.2.1, hz.2.2.trans_lt hb⟩, rfl⟩ |
| 45 | |
| 46 | /-- The actual image of a slab under axial translation is the slab with |
| 47 | both endpoints translated (Section 12.5, pp. 309-319). -/ |
| 48 | theorem endClosedSlab_translation {a b : ℝ} (ha : 0 ≤ a) (r : ℝ) : |
| 49 | endAxialTranslation e r '' endClosedSlab e a b = endClosedSlab e (a + r) (b + r) := by |
| 50 | apply Subset.antisymm |
| 51 | · rintro _ ⟨_, ⟨z, hz, rfl⟩, rfl⟩ |
| 52 | rw [endAxialTranslation_coordinate e r (ha.trans hz.2.1)] |
| 53 | refine ⟨(z.1, z.2 + r), ⟨mem_univ _, ?_⟩, rfl⟩ |
| 54 | constructor <;> dsimp <;> linarith [hz.2.1, hz.2.2] |
| 55 | · rintro _ ⟨z, hz, rfl⟩ |
| 56 | let w : StandardCylinderSpace := (z.1, z.2 - r) |
| 57 | have hw : w ∈ univ ×ˢ Icc a b := by |
| 58 | have hl : a + r ≤ z.2 := hz.2.1 |
| 59 | have hu : z.2 ≤ b + r := hz.2.2 |
| 60 | exact ⟨mem_univ _, by dsimp [w]; constructor <;> linarith⟩ |
| 61 | refine ⟨e.coordinate w, ⟨w, hw, rfl⟩, ?_⟩ |
| 62 | rw [endAxialTranslation_coordinate e r (ha.trans hw.2.1)] |
| 63 | congr 1 |
| 64 | ext <;> simp [w] |
| 65 | |
| 66 | /-- Actual translations are injective on the valid reference region |
| 67 | (Section 12.5, pp. 309-319). -/ |
| 68 | theorem endAxialTranslation_injOn_reference (r : ℝ) (hr : -3 < r) : |
| 69 | InjOn (endAxialTranslation e r) (endReferenceRegion e) := by |
| 70 | intro x hx y hy hxy |
| 71 | have hinv (z : StandardCapSpace) (hz : z ∈ endReferenceRegion e) : |
| 72 | endAxialTranslation e (-r) (endAxialTranslation e r z) = z := by |
| 73 | rw [endAxialTranslation_comp_reference e r hr (-r) hz, add_neg_cancel, |
| 74 | endAxialTranslation_zero_reference e hz] |
| 75 | have hh := congrArg (endAxialTranslation e (-r)) hxy |
| 76 | rwa [hinv x hx, hinv y hy] at hh |
| 77 | |
| 78 | /-- The actual end cutoff is supported in the fixed closed height slab |
| 79 | from 31/10 to 49/10 (Section 12.5, pp. 309-319). -/ |
| 80 | theorem endEnergyCutoff_tsupport_subset_slab : |
| 81 | tsupport (endEnergyCutoff e) ⊆ endClosedSlab e (31 / 10) (49 / 10) := by |
| 82 | intro x hx |
| 83 | have hheight : endExhaustion e x ∈ Icc (41 / 10 : ℝ) (59 / 10) := |
| 84 | endEnergyCutoff_tsupport e hx |
| 85 | obtain ⟨z, hz, hzx, hvalue⟩ := endExhaustion_large_coordinate e |
| 86 | (show 3 < endExhaustion e x by have hh := hheight.1; linarith) |
| 87 | refine ⟨z, ⟨mem_univ _, ?_⟩, hzx⟩ |
| 88 | rw [hvalue] at hheight |
| 89 | constructor <;> linarith [hheight.1, hheight.2] |
| 90 | |
| 91 | end PoincareMT.M34 |