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.CurveShortening.Evolution.Flow |
| 2 | import Mathlib.Tactic.FieldSimp |
| 3 | |
| 4 | /-! |
| 5 | # Positive speed and the normalized spatial tangent |
| 6 | |
| 7 | The pointwise metric facts used in Morgan--Tian Lemma 19.6, pp. 441-442, |
| 8 | and in the 2015 correction, Lemma 0.1, p. 3. These identities retain the |
| 9 | actual metric and parameter velocity, including at endpoint slices. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.M62 |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | {a b : ℝ} (F : RicciFlow n M (Set.Icc a b)) (c : ℝ → ℝ → M) |
| 23 | |
| 24 | /-- Speed is nonnegative without immersion; MT2007 Lemma 19.6, p. 441. -/ |
| 25 | theorem speed_nonneg (t x : ℝ) : 0 ≤ curveSpeed F c t x := |
| 26 | Real.sqrt_nonneg _ |
| 27 | |
| 28 | /-- The speed square is the actual velocity self-pairing; MT2007 p. 441. -/ |
| 29 | theorem speed_sq (t x : ℝ) : |
| 30 | curveSpeed F c t x ^ 2 = |
| 31 | (F.metric t).inner (c x t) (curveVelocity (fun y ↦ c y t) x) |
| 32 | (curveVelocity (fun y ↦ c y t) x) := by |
| 33 | apply Real.sq_sqrt |
| 34 | exact ((F.metric t).toRiemannianMetric.toCore (c x t)).re_inner_nonneg _ |
| 35 | |
| 36 | /-- Immersion gives positive speed, including at endpoints; correction Lemma 0.1, p. 3. -/ |
| 37 | theorem speed_pos (hc : M62ShrinkingCurve F c) {t : ℝ} (ht : t ∈ Set.Icc a b) |
| 38 | (x : ℝ) : 0 < curveSpeed F c t x := by |
| 39 | exact Real.sqrt_pos.mpr ((F.metric t).pos _ _ (hc.immersed t ht x)) |
| 40 | |
| 41 | /-- The normalized parameter velocity is a unit vector; MT2007 Lemma 19.6, p. 441. -/ |
| 42 | theorem unitTangent_inner_self (hc : M62ShrinkingCurve F c) {t : ℝ} |
| 43 | (ht : t ∈ Set.Icc a b) (x : ℝ) : |
| 44 | (F.metric t).inner (c x t) (spatialUnitTangent F c t x) |
| 45 | (spatialUnitTangent F c t x) = 1 := by |
| 46 | have hv := (speed_pos F c hc ht x).ne' |
| 47 | simp only [spatialUnitTangent, map_smul, smul_apply, smul_eq_mul] |
| 48 | rw [← speed_sq F c t x] |
| 49 | field_simp |
| 50 | |
| 51 | /-- The tangent norm uses the chosen flow metric; MT2007 Lemma 19.6, p. 441. -/ |
| 52 | theorem unitTangent_norm (hc : M62ShrinkingCurve F c) {t : ℝ} |
| 53 | (ht : t ∈ Set.Icc a b) (x : ℝ) : |
| 54 | (F.metric t).tangentNorm (c x t) (spatialUnitTangent F c t x) = 1 := by |
| 55 | rw [RiemannianMetric.tangentNorm, unitTangent_inner_self F c hc ht x, Real.sqrt_one] |
| 56 | |
| 57 | end PoincareMT.M62 |