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.Comparison.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.PolygonApproximation.Local.SideUniqueness |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.Approximation.Sampled.PolygonLength |
| 4 | import PoincareLib.Geometry.Riemannian.LoopSpace.ShortLoops.UniformRadius |
| 5 | |
| 6 | /-! |
| 7 | # Uniform uniqueness of short minimizing sides |
| 8 | |
| 9 | The compact diagonal supplies one endpoint radius for the closed-interval |
| 10 | local uniqueness theorem. Affine normalization applies it to every positive |
| 11 | cell length, including sides with distinct extension neighborhoods. |
| 12 | |
| 13 | Morgan--Tian context: Section 19.4, Definition 19.18 and Claims 19.19-19.22, printed pp. |
| 14 | 450-453. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 29 | {g : RiemannianMetric n M} {D : LeviCivitaData g} |
| 30 | |
| 31 | /-- Positive affine parameter normalization preserves the minimizing side's geodesic |
| 32 | equation. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. |
| 33 | 450-453; project construction in |
| 34 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 35 | theorem m64MinimizingSide_normalized_geodesic {ell : ℝ} (hell : 0 < ell) |
| 36 | {p q : M} (side : M63MinimizingGeodesicSide g D ell p q) : |
| 37 | g.IsGeodesicOn (fun t => side.map (ell * t)) (Icc (0 : ℝ) 1) := by |
| 38 | intro t ht |
| 39 | apply (m64MinimizingSide_isGeodesicOn side).comp_mul ell t |
| 40 | change ell * t ∈ Icc (0 : ℝ) ell |
| 41 | exact ⟨mul_nonneg hell.le ht.1, by nlinarith [ht.2]⟩ |
| 42 | |
| 43 | /-- The unit-interval normalized side has initial speed equal to the intrinsic endpoint |
| 44 | distance. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. |
| 45 | 450-453; project construction in |
| 46 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 47 | theorem m64MinimizingSide_normalized_speed {ell : ℝ} (hell : 0 < ell) |
| 48 | {p q : M} (side : M63MinimizingGeodesicSide g D ell p q) : |
| 49 | g.tangentNorm (side.map (ell * 0)) |
| 50 | (curveVelocity (fun t => side.map (ell * t)) 0) = (g.edist p q).toReal := by |
| 51 | have hd : MDifferentiableAt 𝓘(ℝ, ℝ) (𝓡 n) side.map (ell * 0) := by |
| 52 | rw [mul_zero] |
| 53 | exact (side.smooth.contMDiffAt |
| 54 | (side.domain_open.mem_nhds (side.interval_subset ⟨le_rfl, hell.le⟩))).mdifferentiableAt |
| 55 | (by simp) |
| 56 | have hparam : HasDerivAt (fun t : ℝ => ell * t) ell 0 := by |
| 57 | simpa using (hasDerivAt_id (0 : ℝ)).const_mul ell |
| 58 | rw [M63.curveVelocity_comp hd hparam, g.tangentNorm_smul, abs_of_pos hell, |
| 59 | mul_zero, side.constant_speed 0 ⟨le_rfl, hell.le⟩, side.edist_eq_length hell.le, |
| 60 | ENNReal.toReal_ofReal (mul_nonneg hell.le side.speed_nonnegative)] |
| 61 | |
| 62 | /-- Compactness gives one short endpoint radius ensuring equality of minimizing sides on |
| 63 | their closed intervals. Source: Auxiliary step for MT Definition 19.18 and Claims |
| 64 | 19.19/19.22, pp. 450-453; project construction in |
| 65 | `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ |
| 66 | theorem m64_exists_uniform_minimizing_side_uniqueness |
| 67 | [T2Space M] |
| 68 | (g : RiemannianMetric n M) (hcompact : IsCompact (univ : Set M)) : |
| 69 | ∃ r : ℝ, 0 < r ∧ ∀ {ell : ℝ}, 0 < ell → ∀ {D : LeviCivitaData g} |
| 70 | {p q : M}, g.edist p q < ENNReal.ofReal r → |
| 71 | ∀ side other : M63MinimizingGeodesicSide g D ell p q, |
| 72 | EqOn other.map side.map (Icc (0 : ℝ) ell) := by |
| 73 | classical |
| 74 | choose O hOopen hOmem hOuniq using m64_exists_local_unit_geodesic_uniqueness g |
| 75 | let U : Set (M × M) := ⋃ p0 : M, O p0 ×ˢ O p0 |
| 76 | have hUopen : IsOpen U := isOpen_iUnion fun p0 => (hOopen p0).prod (hOopen p0) |
| 77 | have hUdiag (p : M) : (p, p) ∈ U := mem_iUnion.mpr ⟨p, hOmem p, hOmem p⟩ |
| 78 | obtain ⟨r, hr, hrU⟩ := |
| 79 | Proofs.M58.exists_uniform_riemannian_radius g hcompact hUopen hUdiag |
| 80 | refine ⟨r, hr, ?_⟩ |
| 81 | intro ell hell D p q hpq side other |
| 82 | obtain ⟨p0, hp, hq⟩ := mem_iUnion.mp (hrU p q hpq) |
| 83 | have heq := hOuniq p0 p hp q hq |
| 84 | (fun t => other.map (ell * t)) (fun t => side.map (ell * t)) |
| 85 | (m64MinimizingSide_normalized_geodesic hell other) |
| 86 | (m64MinimizingSide_normalized_geodesic hell side) |
| 87 | (by simpa only [mul_zero] using other.start) |
| 88 | (by simpa only [mul_zero] using side.start) |
| 89 | (by simpa only [mul_one] using other.finish) |
| 90 | (by simpa only [mul_one] using side.finish) |
| 91 | (m64MinimizingSide_normalized_speed hell other) |
| 92 | (m64MinimizingSide_normalized_speed hell side) |
| 93 | intro s hs |
| 94 | have hunit : s / ell ∈ Icc (0 : ℝ) 1 := |
| 95 | ⟨div_nonneg hs.1 hell.le, (div_le_one hell).mpr hs.2⟩ |
| 96 | have hscale : ell * (s / ell) = s := by field_simp [hell.ne'] |
| 97 | simpa only [hscale] using heq hunit |
| 98 | |
| 99 | end PoincareMT |