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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.SectionalRayleigh |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.SectionalBarrierVelocity |
| 4 | |
| 5 | /-! |
| 6 | # Sectional velocity at a growing-distance barrier minimum |
| 7 | |
| 8 | Morgan-Tian Lemma 12.6, p. 297. At a spatial minimum over all Euclidean |
| 9 | plane parameters, an actual upper distance support supplies the shifted |
| 10 | curvature tensor. This is the geometric input to compact comparison. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M35.Uniqueness |
| 20 | |
| 21 | open M04 |
| 22 | |
| 23 | theorem raw_sectional_velocity_at_distance_minimum {g₀ : StandardInitialMetric} |
| 24 | (G : PartialStandardCapFlow g₀) {s c : ℝ} (hs : s ∈ Ico 0 G.lifetime) (hc : 0 < c) |
| 25 | {S : Set StandardCapSpace} (y : StandardCapSpace × StandardSectionalPair) |
| 26 | (hyS : y.1 ∈ interior S) {ψ : StandardCapSpace → ℝ} |
| 27 | (hψsmooth : ContMDiffAt (𝓡 3) 𝓘(ℝ, ℝ) ∞ ψ y.1) |
| 28 | (hψtouch : ψ y.1 = rawDistanceSquare G 0 s y.1) |
| 29 | (hψspace : ∀ᶠ a in 𝓝 y.1, rawDistanceSquare G 0 s a ≤ ψ a) |
| 30 | (hmin : ∀ z : StandardCapSpace × StandardSectionalPair, z.1 ∈ S → |
| 31 | rawSectionalRayleigh G s y + c * rawDistanceSquare G 0 s y.1 ≤ |
| 32 | rawSectionalRayleigh G s z + c * rawDistanceSquare G 0 s z.1) : |
| 33 | ∃ vq : ℝ, HasDerivWithinAt (fun t => rawSectionalRayleigh G t y) |
| 34 | vq (Ico 0 G.lifetime) s ∧ |
| 35 | -(c * (G.flow.connection s).laplacian ψ y.1) + rawSectionalRayleigh G s y * |
| 36 | ((G.flow.connection s).scalarCurvature y.1 - 2 * rawSectionalRayleigh G s y) ≤ vq := by |
| 37 | let q := rawSectionalRayleigh G |
| 38 | let μ := rawDistanceSquare G (0 : StandardCapSpace) s |
| 39 | let w := q s y + c * μ y.1 |
| 40 | let f : StandardCapSpace → ℝ := fun a => -w + c * ψ a |
| 41 | have hf : ContDiffAt ℝ ∞ f y.1 := |
| 42 | contDiffAt_const.add (contDiffAt_const.mul (contMDiffAt_iff_contDiffAt.mp hψsmooth)) |
| 43 | have hpos : ∀ᶠ a in 𝓝 y.1, ∀ u v : StandardCapSpace, |
| 44 | 0 ≤ (G.flow.connection s).curvatureTensor a u v u v + |
| 45 | f a * metricGram (G.flow.metric s) a u v := by |
| 46 | filter_upwards [hψspace, isOpen_interior.mem_nhds hyS] with a ha haS u v |
| 47 | have hlow (p : StandardCapSpace × StandardCapSpace) (hp : p ∈ modelOrthonormalPairs 3) : |
| 48 | w - c * ψ a ≤ (G.flow.connection s).sectionalCurvature a p.1 p.2 := by |
| 49 | have hm := hmin (a, ⟨p, hp⟩) (interior_subset haS) |
| 50 | have hu := mul_le_mul_of_nonneg_left ha hc.le |
| 51 | change w ≤ (G.flow.connection s).sectionalCurvature a p.1 p.2 + c * μ a at hm |
| 52 | change c * μ a ≤ c * ψ a at hu |
| 53 | linarith |
| 54 | have hh := sectional_lower_of_modelPairs (G.flow.connection s) a (w - c * ψ a) hlow u v |
| 55 | dsimp only [f] |
| 56 | nlinarith only [hh] |
| 57 | have hgram := metricGram_pos_of_modelPair (G.flow.metric s) y.1 y.2.property |
| 58 | have hR : q s y * metricGram (G.flow.metric s) y.1 y.2.val.1 y.2.val.2 = |
| 59 | (G.flow.connection s).curvatureTensor y.1 y.2.val.1 y.2.val.2 y.2.val.1 y.2.val.2 := |
| 60 | div_mul_cancel₀ _ hgram.ne' |
| 61 | have hnull : (G.flow.connection s).curvatureTensor y.1 |
| 62 | y.2.val.1 y.2.val.2 y.2.val.1 y.2.val.2 + |
| 63 | f y.1 * metricGram (G.flow.metric s) y.1 y.2.val.1 y.2.val.2 = 0 := by |
| 64 | dsimp only [f] |
| 65 | rw [hψtouch] |
| 66 | change _ + (-(q s y + c * μ y.1) + c * μ y.1) * _ = 0 |
| 67 | nlinarith only [hR] |
| 68 | obtain ⟨vq, hdq, hqheat⟩ := sectional_velocity_lower_bound_at_barrier_contact G.flow |
| 69 | hs y.2.property hf hpos hnull |
| 70 | have hflap : (G.flow.connection s).laplacian f y.1 = |
| 71 | c * (G.flow.connection s).laplacian ψ y.1 := by |
| 72 | have hcs : ContMDiffAt (𝓡 3) 𝓘(ℝ, ℝ) ∞ (fun a => c * ψ a) y.1 := |
| 73 | contMDiffAt_const.mul hψsmooth |
| 74 | rw [show f = fun a => -w + c * ψ a from rfl, |
| 75 | laplacian_const_add_at _ hcs (-w), |
| 76 | LeviCivitaData.laplacian_const_mul] |
| 77 | rw [hflap] at hqheat |
| 78 | exact ⟨vq, hdq, hqheat⟩ |
| 79 | |
| 80 | end PoincareMT.M35.Uniqueness |