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.Geometry.Coordinates.TranslatedEndCharts |
| 2 | import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct |
| 3 | |
| 4 | /-! |
| 5 | # Compact core and reference-end energy cutoffs |
| 6 | |
| 7 | A fixed real bump composed with the proper original height is supported |
| 8 | strictly inside the reference end region. Its plateau and a compact core |
| 9 | cutoff supply the local regions for the countable energy comparison. |
| 10 | This is Morgan-Tian Section 12.5, pp. 309-319 and rotation-invariance.md. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | variable {g : RiemannianMetric 3 StandardCapSpace} |
| 21 | |
| 22 | /-- The fixed height-five bump has an inner radius three fifths and |
| 23 | outer radius nine tenths (Section 12.5, pp. 309-319). -/ |
| 24 | noncomputable def endEnergyProfile : ContDiffBump (5 : ℝ) where |
| 25 | rIn := 3 / 5 |
| 26 | rOut := 9 / 10 |
| 27 | rIn_pos := by norm_num |
| 28 | rIn_lt_rOut := by norm_num |
| 29 | |
| 30 | /-- The reference-end cutoff uses the original proper exhaustion |
| 31 | (Section 12.5, pp. 309-319). -/ |
| 32 | noncomputable def endEnergyCutoff (e : StandardCylindricalEnd g) : StandardCapSpace → ℝ := |
| 33 | endEnergyProfile ∘ endExhaustion e |
| 34 | |
| 35 | /-- The core cutoff is one through exhaustion height five and vanishes |
| 36 | from height six onward (Section 12.5, pp. 309-319). -/ |
| 37 | noncomputable def coreEnergyCutoff (e : StandardCylindricalEnd g) |
| 38 | (x : StandardCapSpace) : ℝ := Real.smoothTransition (6 - endExhaustion e x) |
| 39 | |
| 40 | /-- Both energy cutoffs are smooth on the whole original Euclidean cap |
| 41 | (Section 12.5, pp. 309-319). -/ |
| 42 | theorem energyCutoffs_contDiff (e : StandardCylindricalEnd g) : |
| 43 | ContDiff ℝ ∞ (endEnergyCutoff e) ∧ ContDiff ℝ ∞ (coreEnergyCutoff e) := by |
| 44 | have hrho := contMDiff_iff_contDiff.mp (endExhaustion_contMDiff e) |
| 45 | exact ⟨endEnergyProfile.contDiff.comp hrho, |
| 46 | Real.smoothTransition.contDiff.comp (contDiff_const.sub hrho)⟩ |
| 47 | |
| 48 | /-- Both energy weights take values between zero and one |
| 49 | (Section 12.5, pp. 309-319). -/ |
| 50 | theorem energyCutoffs_mem_Icc (e : StandardCylindricalEnd g) (x : StandardCapSpace) : |
| 51 | endEnergyCutoff e x ∈ Icc (0 : ℝ) 1 ∧ coreEnergyCutoff e x ∈ Icc (0 : ℝ) 1 := |
| 52 | ⟨⟨endEnergyProfile.nonneg, endEnergyProfile.le_one⟩, |
| 53 | ⟨Real.smoothTransition.nonneg _, Real.smoothTransition.le_one _⟩⟩ |
| 54 | |
| 55 | /-- The end cutoff is one throughout the fixed central plateau |
| 56 | (Section 12.5, pp. 309-319). -/ |
| 57 | theorem endEnergyCutoff_eq_one (e : StandardCylindricalEnd g) {x : StandardCapSpace} |
| 58 | (hx : endExhaustion e x ∈ Icc (22 / 5 : ℝ) (28 / 5)) : endEnergyCutoff e x = 1 := by |
| 59 | apply endEnergyProfile.one_of_mem_closedBall |
| 60 | rw [Metric.mem_closedBall, Real.dist_eq] |
| 61 | change |endExhaustion e x - 5| ≤ 3 / 5 |
| 62 | rw [abs_le] |
| 63 | constructor <;> linarith [hx.1, hx.2] |
| 64 | |
| 65 | /-- The core cutoff is exactly one on its retained sublevel |
| 66 | (Section 12.5, pp. 309-319). -/ |
| 67 | theorem coreEnergyCutoff_eq_one (e : StandardCylindricalEnd g) {x : StandardCapSpace} |
| 68 | (hx : endExhaustion e x ≤ 5) : coreEnergyCutoff e x = 1 := |
| 69 | Real.smoothTransition.one_of_one_le (by linarith) |
| 70 | |
| 71 | /-- The end cutoff's closed support has a fixed positive margin inside |
| 72 | the end chart (Section 12.5, pp. 309-319). -/ |
| 73 | theorem endEnergyCutoff_tsupport (e : StandardCylindricalEnd g) : |
| 74 | tsupport (endEnergyCutoff e) ⊆ |
| 75 | {x | endExhaustion e x ∈ Icc (41 / 10 : ℝ) (59 / 10)} := by |
| 76 | intro x hx |
| 77 | have hh := tsupport_comp_subset_preimage (endEnergyProfile : ℝ → ℝ) |
| 78 | (endExhaustion_contMDiff e).continuous hx |
| 79 | change endExhaustion e x ∈ tsupport (endEnergyProfile : ℝ → ℝ) at hh |
| 80 | rw [endEnergyProfile.tsupport_eq, Metric.mem_closedBall, Real.dist_eq] at hh |
| 81 | change |endExhaustion e x - 5| ≤ 9 / 10 at hh |
| 82 | obtain ⟨hl, hu⟩ := abs_le.mp hh |
| 83 | constructor <;> linarith |
| 84 | |
| 85 | /-- The core cutoff has support below exhaustion height six |
| 86 | (Section 12.5, pp. 309-319). -/ |
| 87 | theorem coreEnergyCutoff_tsupport (e : StandardCylindricalEnd g) : |
| 88 | tsupport (coreEnergyCutoff e) ⊆ {x | endExhaustion e x ≤ 6} := by |
| 89 | apply closure_minimal |
| 90 | · intro x hx |
| 91 | by_contra hle |
| 92 | change ¬endExhaustion e x ≤ 6 at hle |
| 93 | have hz : coreEnergyCutoff e x = 0 := |
| 94 | Real.smoothTransition.zero_of_nonpos (by linarith [not_le.mp hle]) |
| 95 | exact hx hz |
| 96 | · exact isClosed_le (endExhaustion_contMDiff e).continuous continuous_const |
| 97 | |
| 98 | /-- Properness of the original height makes both supports compact |
| 99 | (Section 12.5, pp. 309-319). -/ |
| 100 | theorem energyCutoffs_hasCompactSupport (e : StandardCylindricalEnd g) : |
| 101 | HasCompactSupport (endEnergyCutoff e) ∧ HasCompactSupport (coreEnergyCutoff e) := by |
| 102 | constructor |
| 103 | · exact (endExhaustion_sublevel_isCompact e (59 / 10)).of_isClosed_subset |
| 104 | (isClosed_tsupport _) (fun x hx => (endEnergyCutoff_tsupport e hx).2) |
| 105 | · exact (endExhaustion_sublevel_isCompact e 6).of_isClosed_subset |
| 106 | (isClosed_tsupport _) (coreEnergyCutoff_tsupport e) |
| 107 | |
| 108 | /-- Exhaustion above three is the actual affine end height, with a |
| 109 | unique supplied inverse coordinate (Section 12.5, pp. 309-319). -/ |
| 110 | theorem endExhaustion_large_coordinate (e : StandardCylindricalEnd g) {x : StandardCapSpace} |
| 111 | (hx : 3 < endExhaustion e x) : |
| 112 | ∃ z : StandardCylinderSpace, 2 < z.2 ∧ e.coordinate z = x ∧ |
| 113 | endExhaustion e x = 1 + z.2 := by |
| 114 | have hcar : x ∈ e.carrier := by |
| 115 | by_contra hn |
| 116 | have heq : endExhaustion e x = 1 := by simp [endExhaustion, hn] |
| 117 | linarith |
| 118 | have hz := e.inverse_domain x hcar |
| 119 | have hform := endExhaustion_coordinate e hz |
| 120 | rw [e.coordinate_right_inverse hcar] at hform |
| 121 | have hle : endExhaustion e x ≤ 1 + (e.inverse x).2 := by |
| 122 | rw [hform] |
| 123 | have hb := mul_le_mul_of_nonneg_left (Real.smoothTransition.le_one ((e.inverse x).2 - 1)) hz |
| 124 | linarith |
| 125 | have htwo : 2 < (e.inverse x).2 := by linarith |
| 126 | refine ⟨e.inverse x, htwo, e.coordinate_right_inverse hcar, ?_⟩ |
| 127 | have heq := endExhaustion_coordinate_of_two_le e htwo.le |
| 128 | rwa [e.coordinate_right_inverse hcar] at heq |
| 129 | |
| 130 | /-- The end energy support lies in the actual canonical reference region |
| 131 | of end heights three to five (Section 12.5, pp. 309-319). -/ |
| 132 | theorem endEnergyCutoff_tsupport_subset_region (e : StandardCylindricalEnd g) : |
| 133 | tsupport (endEnergyCutoff e) ⊆ endReferenceRegion e := by |
| 134 | intro x hx |
| 135 | have hh := endEnergyCutoff_tsupport e hx |
| 136 | obtain ⟨z, _, hz, heq⟩ := endExhaustion_large_coordinate e (by linarith [hh.1]) |
| 137 | refine ⟨z, ⟨mem_univ _, ?_⟩, hz⟩ |
| 138 | constructor <;> linarith [hh.1, hh.2] |
| 139 | |
| 140 | end PoincareMT.M34 |