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.AreaComparison.Canonical.AnnulusConstructor |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.AreaComparison.Close.LoopInterpolator |
| 4 | import PoincareLib.Geometry.CurveShortening.Comparison.PolygonApproximation.Sampled.InterpolatorVertical |
| 5 | |
| 6 | /-! |
| 7 | # Uniformly small product annuli between close family members |
| 8 | |
| 9 | One minimizing interpolator and compact endpoint derivative bound are |
| 10 | chosen before the two family members and the circle product. The resulting |
| 11 | distance threshold therefore works for every product with circumference |
| 12 | at most the fixed angular period. |
| 13 | |
| 14 | Morgan--Tian context: Section 19.6, Lemmas 19.30-19.31, printed pp. 461-466. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set MeasureTheory |
| 21 | open scoped Manifold ContDiff |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | /-- Uniformly close loops in the compact family have actual canonical product annuli of |
| 28 | uniformly small area. Source: Auxiliary step for MT Section 19.6, pp. 461-462; project |
| 29 | construction in `proof-work/tasks/M64/reports/2026-09-24-finite-nets-closed.md`. -/ |
| 30 | theorem m64_uniform_close_loop_canonical_annuli |
| 31 | {M : Type u} [TopologicalSpace M] [T2Space M] |
| 32 | [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] |
| 33 | {a b : ℝ} (F : RicciFlow 3 M (Icc a b)) (t : ℝ) |
| 34 | (hcompact : IsCompact (univ : Set M)) |
| 35 | {Z : Type*} [TopologicalSpace Z] [CompactSpace Z] |
| 36 | (Gamma : Z → C1FreeLoopSpace (M := M)) (hGamma : Continuous Gamma) |
| 37 | {mu : ℝ} (hmu : 0 < mu) : |
| 38 | ∃ epsilon : ℝ, 0 < epsilon ∧ ∀ z w : Z, |
| 39 | (∀ x : ℝ, (F.metric t).edist (periodicFreeLoop (Gamma z) x) |
| 40 | (periodicFreeLoop (Gamma w) x) < ENNReal.ofReal epsilon) → |
| 41 | ∀ circumference : ℝ, ∀ P : M62.CircleProductData F circumference, |
| 42 | circumference ≤ curvePeriod → |
| 43 | ∃ A : M64Annulus (P.flow.metric t) |
| 44 | (m63CanonicalRamp P (periodicFreeLoop (Gamma z))) |
| 45 | (m63CanonicalRamp P (periodicFreeLoop (Gamma w))), A.area < mu := by |
| 46 | let g := F.metric t |
| 47 | obtain ⟨r, hr, H, hH, hgeom, _hdiag, _hunique⟩ := |
| 48 | M63.exists_smooth_minimizing_interpolator g hcompact |
| 49 | obtain ⟨S, _hS, hspeed⟩ := m64_compact_family_speed_bound g Gamma hGamma |
| 50 | obtain ⟨B, hB, hbound⟩ := |
| 51 | m64_interpolator_endpoint_bound_on_short_tube g hcompact hr H hH S |
| 52 | let C := (B + 1) * volume.real m64AnnulusDomain |
| 53 | have hC : 0 ≤ C := mul_nonneg (by linarith) ENNReal.toReal_nonneg |
| 54 | have hdenom : 0 < C + 1 := by linarith |
| 55 | let epsilon := min (r / 2) (mu / (C + 1)) |
| 56 | have hepsilon : 0 < epsilon := lt_min (half_pos hr) (div_pos hmu hdenom) |
| 57 | have hepsr : epsilon ≤ r / 2 := min_le_left _ _ |
| 58 | have hstrict : (B + 1) * epsilon * volume.real m64AnnulusDomain < mu := by |
| 59 | calc |
| 60 | _ = C * epsilon := by dsimp only [C]; ring |
| 61 | _ < (C + 1) * epsilon := by nlinarith |
| 62 | _ ≤ mu := by |
| 63 | have h := (le_div_iff₀ hdenom).mp (min_le_right (r / 2) (mu / (C + 1))) |
| 64 | nlinarith only [h] |
| 65 | refine ⟨epsilon, hepsilon, ?_⟩ |
| 66 | intro z w hshort circumference P hcirc |
| 67 | have hshortHalf (x : ℝ) : g.edist (periodicFreeLoop (Gamma z) x) |
| 68 | (periodicFreeLoop (Gamma w) x) < ENNReal.ofReal (r / 2) := |
| 69 | (hshort x).trans_le (ENNReal.ofReal_le_ofReal hepsr) |
| 70 | have hshortR (x : ℝ) : g.edist (periodicFreeLoop (Gamma z) x) |
| 71 | (periodicFreeLoop (Gamma w) x) < ENNReal.ofReal r := |
| 72 | (hshortHalf x).trans ((ENNReal.ofReal_lt_ofReal_iff hr).mpr (by linarith)) |
| 73 | let f : LoopPlane → M := fun p => |
| 74 | H (p 1, periodicFreeLoop (Gamma z) (p 0), periodicFreeLoop (Gamma w) (p 0)) |
| 75 | have hHat : ∀ p ∈ m64AnnulusDomain, |
| 76 | ContMDiffAt (𝓘(ℝ, ℝ).prod ((𝓡 3).prod (𝓡 3))) (𝓡 3) 1 H |
| 77 | (p 1, periodicFreeLoop (Gamma z) (p 0), periodicFreeLoop (Gamma w) (p 0)) := by |
| 78 | intro p hp |
| 79 | have htime : p 1 ∈ Ioo (-1 : ℝ) 2 := by |
| 80 | constructor <;> linarith [hp.2.2.1, hp.2.2.2] |
| 81 | have hmem : (p 1, periodicFreeLoop (Gamma z) (p 0), periodicFreeLoop (Gamma w) (p 0)) ∈ |
| 82 | Ioo (-1 : ℝ) 2 ×ˢ {pq : M × M | g.edist pq.1 pq.2 < ENNReal.ofReal r} := |
| 83 | ⟨htime, hshortR (p 0)⟩ |
| 84 | exact (hH.contMDiffAt ((isOpen_Ioo.prod (m64_isOpen_short_pair_tube g r)).mem_nhds |
| 85 | hmem)).of_le (m := 1) (by norm_num) |
| 86 | have hf : ∀ p ∈ m64AnnulusDomain, ContMDiffAt (𝓡 2) (𝓡 3) 1 f p := |
| 87 | fun p hp => m64_pair_interpolator_contMDiffAt (Gamma z) (Gamma w) (hHat p hp) |
| 88 | have hcolumns : ∀ p ∈ m64AnnulusDomain, |
| 89 | g.tangentNorm (f p) |
| 90 | (mfderiv (𝓡 2) (𝓡 3) f p (EuclideanSpace.basisFun (Fin 2) ℝ 0)) ≤ B ∧ |
| 91 | g.tangentNorm (f p) |
| 92 | (mfderiv (𝓡 2) (𝓡 3) f p (EuclideanSpace.basisFun (Fin 2) ℝ 1)) ≤ epsilon := by |
| 93 | intro p hp |
| 94 | apply m64_pair_interpolator_column_bounds g (Gamma z) (Gamma w) hHat |
| 95 | ?_ (hspeed z) (hspeed w) ?_ hshort hp |
| 96 | · intro q hq v hv v' hv' |
| 97 | exact hbound (q 1) ⟨hq.2.2.1, hq.2.2.2⟩ _ _ (hshortHalf (q 0)).le v hv v' hv' |
| 98 | · intro x s hs |
| 99 | exact (hgeom _ _ (hshortR x)).2.2.2.1 s |
| 100 | ⟨by linarith [hs.1], by linarith [hs.2]⟩ |
| 101 | have hperiodic : ∀ x s : ℝ, |
| 102 | f (annulusPoint (x + curvePeriod) s) = f (annulusPoint x s) := by |
| 103 | intro x s |
| 104 | change H (s, periodicFreeLoop (Gamma z) (x + curvePeriod), |
| 105 | periodicFreeLoop (Gamma w) (x + curvePeriod)) = _ |
| 106 | have hz : periodicFreeLoop (Gamma z) (x + curvePeriod) = periodicFreeLoop (Gamma z) x := |
| 107 | Proofs.M58.periodic_periodicFreeLoop (Gamma z) x |
| 108 | have hw : periodicFreeLoop (Gamma w) (x + curvePeriod) = periodicFreeLoop (Gamma w) x := |
| 109 | Proofs.M58.periodic_periodicFreeLoop (Gamma w) x |
| 110 | rw [hz, hw] |
| 111 | rfl |
| 112 | have hlower (x : ℝ) : f (annulusPoint x 0) = periodicFreeLoop (Gamma z) x := |
| 113 | (hgeom _ _ (hshortR x)).1 |
| 114 | have hupper (x : ℝ) : f (annulusPoint x 1) = periodicFreeLoop (Gamma w) x := |
| 115 | (hgeom _ _ (hshortR x)).2.1 |
| 116 | obtain ⟨A, _, hA⟩ := m64_canonical_annulus_of_columns P t f hf hperiodic |
| 117 | hlower hupper hB hepsilon.le (fun p hp => (hcolumns p hp).1) |
| 118 | (fun p hp => (hcolumns p hp).2) hcirc hstrict |
| 119 | exact ⟨A, hA⟩ |
| 120 | |
| 121 | end PoincareMT |