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.AnnularEvolution.Plateau.Stabilization.Free.RampClosedC1 |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Stabilization.Free.RampSmoothMinimum |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Free.ClassicalCompletion |
| 4 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Closed.C1BoundaryLabels |
| 5 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Closed.StripBoundaryLabels |
| 6 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Classical.CompletionConformality |
| 7 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Periodic.ClassicalRegularity |
| 8 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Modulus.FreeBoundaryTransport |
| 9 | |
| 10 | /-! Actual classical attainment for separated stabilized C2 ramps. |
| 11 | The same raw free minimum supplies closed C1, the original Lipschitz |
| 12 | labels, conformality and exact least area. Source: MT Lemma 19.15, |
| 13 | pp. 447-449; M64 classical-label attainment derivation. -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option warningAsError true |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set MeasureTheory Topology |
| 21 | open scoped Topology Manifold ContDiff |
| 22 | |
| 23 | namespace PoincareMT.M64 |
| 24 | |
| 25 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] [CompactSpace M] [T2Space M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | {a b : ℝ} {F : RicciFlow n M (Icc a b)} {circumference auxiliary : ℝ} |
| 28 | |
| 29 | local notation "S" => interior m64AnnulusDomain |
| 30 | |
| 31 | /-- Separated auxiliary lifts of the actual C2 ramps attain the original least area in their |
| 32 | free-label class. The actual map is C1 on the closed covering strip and smooth on its open |
| 33 | interior. Source: Morgan--Tian Lemma 19.15, printed pp. 447-449, and Lemma 19.31, pp. |
| 34 | 464-466; `proof-work/tasks/M64/derivations/2026-09-27-trimmed-intrinsic-transport.md`. -/ |
| 35 | theorem auxiliaryCircle_free_ramp_classical_minimum |
| 36 | (P : M62.CircleProductData F circumference) |
| 37 | (Q : M62.CircleProductData P.flow auxiliary) (time : ℝ) |
| 38 | (gamma0 gamma1 : ℝ → P.charts.Point) |
| 39 | (hgamma0 : ContMDiff 𝓘(ℝ, ℝ) (𝓡 (n + 1)) 2 gamma0) |
| 40 | (hgamma1 : ContMDiff 𝓘(ℝ, ℝ) (𝓡 (n + 1)) 2 gamma1) |
| 41 | (hp0 : Function.Periodic gamma0 curvePeriod) |
| 42 | (hp1 : Function.Periodic gamma1 curvePeriod) |
| 43 | (hramp0 : M63IsRampAt P gamma0 time) (hramp1 : M63IsRampAt P gamma1 time) |
| 44 | (A0 : M64Annulus (P.flow.metric time) gamma0 gamma1) |
| 45 | {delta : ℝ} (hdelta : 0 < delta) (hsmall : delta < auxiliary) : |
| 46 | let c0 := auxiliaryCircleSection Q (Q.circle.quotient 0) ∘ gamma0 |
| 47 | let c1 := auxiliaryCircleSection Q (Q.circle.quotient delta) ∘ gamma1 |
| 48 | ∃ r : ℝ, 0 < r ∧ ∃ sigma0 sigma1 : M64PeriodicDegreeOneLift, |
| 49 | ∃ A : M64Annulus (Q.flow.metric time) (c0 ∘ sigma0.map) (c1 ∘ sigma1.map), |
| 50 | ContMDiffOn (𝓡 2) (𝓡 ((n + 1) + 1)) 1 A.map |
| 51 | {p : LoopPlane | p 1 ∈ Icc (0 : ℝ) 1} ∧ |
| 52 | ContMDiffOn (𝓡 2) (𝓡 ((n + 1) + 1)) ∞ A.map |
| 53 | {p : LoopPlane | p 1 ∈ Ioo (0 : ℝ) 1} ∧ |
| 54 | ContDiff ℝ 1 sigma0.map ∧ ContDiff ℝ 1 sigma1.map ∧ |
| 55 | A.area = m64LeastAnnulusArea (Q.flow.metric time) c0 c1 ∧ |
| 56 | ∀ᵐ p ∂volume.restrict m64AnnulusDomain, |
| 57 | r * m60AreaGram (Q.flow.metric time) A.map p 0 0 = |
| 58 | r⁻¹ * m60AreaGram (Q.flow.metric time) A.map p 1 1 ∧ |
| 59 | m60AreaGram (Q.flow.metric time) A.map p 0 1 = 0 := by |
| 60 | let : Fact (0 < circumference) := ⟨P.circle.positive⟩ |
| 61 | let : Fact (0 < auxiliary) := ⟨Q.circle.positive⟩ |
| 62 | let c0 := auxiliaryCircleSection Q (Q.circle.quotient 0) ∘ gamma0 |
| 63 | let c1 := auxiliaryCircleSection Q (Q.circle.quotient delta) ∘ gamma1 |
| 64 | let g := Q.flow.metric time |
| 65 | obtain ⟨m, e, R, T, H0, H1, degree, B, he, hei, hread, hR, -, -, hH0, hH1, |
| 66 | hquot0, hquot1, hB, hpos, hsymm, hdiag, r, hr, L, hL, harea, hminimum⟩ := |
| 67 | auxiliaryCircle_free_ramp_smooth_minimum P Q time gamma0 gamma1 hgamma0 hgamma1 |
| 68 | hp0 hp1 hramp0 hramp1 A0 hdelta hsmall |
| 69 | have he1 : ContMDiff (𝓡 ((n + 1) + 1)) (𝓡 m) 1 e := he.of_le (by simp) |
| 70 | obtain ⟨C, hC, hcoercive⟩ := m64ObservedMetric_coercivity_of_diagonal g e he1 B hdiag |
| 71 | have hbounded : Bornology.IsBounded (range B) := (isCompact_range hB).isBounded |
| 72 | obtain ⟨bound, hbound⟩ := hbounded.exists_norm_le |
| 73 | have hb : ∀ q, ‖B q‖ ≤ bound := fun q => hbound _ (mem_range_self q) |
| 74 | obtain ⟨U, hU, hUL, hseam, hU0, hU1⟩ := |
| 75 | auxiliaryCircle_free_ramp_closed_contMDiffOn P Q time gamma0 gamma1 hgamma0 hgamma1 |
| 76 | hp0 hp1 hramp0 hramp1 (Q.circle.quotient 0) (Q.circle.quotient delta) |
| 77 | he hei hread hR L hL.continuousOn hH0 hH1 hquot0 hquot1 g (Q.flow.connection time) |
| 78 | B hB hb hsymm hpos hC hcoercive hdiag hr hminimum |
| 79 | have hp0' : Function.Periodic c0 curvePeriod := |
| 80 | fun x => congrArg (auxiliaryCircleSection Q (Q.circle.quotient 0)) (hp0 x) |
| 81 | have hp1' : Function.Periodic c1 curvePeriod := |
| 82 | fun x => congrArg (auxiliaryCircleSection Q (Q.circle.quotient delta)) (hp1 x) |
| 83 | have hc0 : ContMDiff 𝓘(ℝ, ℝ) (𝓡 ((n + 1) + 1)) 2 c0 ∧ |
| 84 | ∀ x, curveVelocity (n := (n + 1) + 1) c0 x ≠ 0 := by |
| 85 | have heq : (fun s => auxiliaryCircleSection Q (Q.circle.quotient 0) |
| 86 | (gamma0 (s + 0))) = c0 := by |
| 87 | funext s |
| 88 | simp only [c0, Function.comp_apply, add_zero] |
| 89 | have h := auxiliaryCircle_shifted_ramp_regular P Q time gamma0 hgamma0 hramp0 |
| 90 | (Q.circle.quotient 0) 0 |
| 91 | rw [heq] at h |
| 92 | exact h |
| 93 | have hc1 : ContMDiff 𝓘(ℝ, ℝ) (𝓡 ((n + 1) + 1)) 2 c1 ∧ |
| 94 | ∀ x, curveVelocity (n := (n + 1) + 1) c1 x ≠ 0 := by |
| 95 | have heq : (fun s => auxiliaryCircleSection Q (Q.circle.quotient delta) |
| 96 | (gamma1 (s + 0))) = c1 := by |
| 97 | funext s |
| 98 | simp only [c1, Function.comp_apply, add_zero] |
| 99 | have h := auxiliaryCircle_shifted_ramp_regular P Q time gamma1 hgamma1 hramp1 |
| 100 | (Q.circle.quotient delta) 0 |
| 101 | rw [heq] at h |
| 102 | exact h |
| 103 | have hlab := L.labels_continuous hH0 hH1 |
| 104 | obtain ⟨sigma0, hsigma0⟩ := m64ClosedC1Trace_exists_degreeOneLift he hread |
| 105 | (hc0.1.of_le (by norm_num)) hc0.2 hlab.1 L.label0_monotone L.label0_period hU |
| 106 | (show (0 : ℝ) ∈ Icc 0 1 by norm_num) hU0 |
| 107 | obtain ⟨sigma1, hsigma1⟩ := m64ClosedC1Trace_exists_degreeOneLift he hread |
| 108 | (hc1.1.of_le (by norm_num)) hc1.2 hlab.2 L.label1_monotone L.label1_period hU |
| 109 | (show (1 : ℝ) ∈ Icc 0 1 by norm_num) hU1 |
| 110 | obtain ⟨A, hAc1, hAL, -⟩ := |
| 111 | L.exists_classical_completion g hp0' hp1' U hU hUL hseam hU0 hU1 |
| 112 | have hAsmooth : ContMDiffOn (𝓡 2) (𝓡 ((n + 1) + 1)) ∞ A.map S := hL.congr hAL |
| 113 | obtain ⟨V, hV, hVae, -, -, hVi⟩ := |
| 114 | auxiliaryCircle_free_ramp_halfTurn_radial_contMDiffOn P Q time gamma0 gamma1 hgamma0 |
| 115 | hgamma1 hp0 hp1 hramp0 hramp1 (Q.circle.quotient 0) (Q.circle.quotient delta) |
| 116 | he hei hread hR L hH0 hH1 hquot0 hquot1 g (Q.flow.connection time) B hB hb hsymm |
| 117 | hpos hC hcoercive hdiag hr hminimum |
| 118 | have hLA : L.annulus.map =ᵐ[volume.restrict S] A.map := |
| 119 | (ae_restrict_mem isOpen_interior.measurableSet).mono fun _ hp => (hAL hp).symm |
| 120 | have hrot : L.annulus.map ∘ m64AnnulusHalfTurn =ᵐ[volume.restrict S] |
| 121 | A.map ∘ m64AnnulusHalfTurn := |
| 122 | m64AnnulusHalfTurn_measurePreserving.quasiMeasurePreserving.ae hLA |
| 123 | have hstrip := m64Annulus_periodic_classical_regularity A hAc1 hAsmooth hV hVi |
| 124 | (hVae.trans hrot) |
| 125 | have hlabel0 := m64ClosedStripTrace_label_contDiff he hread |
| 126 | (hc0.1.of_le (by norm_num)) hc0.2 hlab.1 hstrip.1 |
| 127 | (show (0 : ℝ) ∈ Icc 0 1 by norm_num) A.lower_boundary |
| 128 | have hlabel1 := m64ClosedStripTrace_label_contDiff he hread |
| 129 | (hc1.1.of_le (by norm_num)) hc1.2 hlab.2 hstrip.1 |
| 130 | (show (1 : ℝ) ∈ Icc 0 1 by norm_num) A.upper_boundary |
| 131 | have hdegree := circle_phase_period_of_periodic_lift P.circle (fun x => (gamma0 x).2) |
| 132 | (fun x => congrArg Prod.snd (hp0 x)) H0 hH0 hquot0 |
| 133 | have hconf := auxiliaryCircle_free_phase_raw_conformal P Q e he1 hei hread R hR L |
| 134 | (he.continuous.comp hc0.1.continuous) (he.continuous.comp hc1.1.continuous) |
| 135 | hp0' hp1' hH0 hH1 hdegree g B hB hb hpos hdiag hr hminimum hL.continuousOn |
| 136 | have henergy : A.area = L.annulus.weightedEnergy B r := |
| 137 | L.annulus.area_eq_of_conformal_completion A he1 B hdiag hAL |
| 138 | (hAc1.mono interior_subset) hr hconf |
| 139 | have htransport := m64FreeBoundaryAreaTransport_of_collars hc0.1.continuous hp0' |
| 140 | (m64PeriodicC1Curve_metric_lipschitz g (hc0.1.of_le (by norm_num)) hp0') |
| 141 | hc1.1.continuous hp1' |
| 142 | (m64PeriodicC1Curve_metric_lipschitz g (hc1.1.of_le (by norm_num)) hp1') |
| 143 | have hfixed : ∃ D : M64Annulus g c0 c1, D.area = A.area := by |
| 144 | have h := htransport sigma0 sigma1 |
| 145 | rw [hsigma0, hsigma1] at h |
| 146 | exact h A |
| 147 | obtain ⟨D, hD⟩ := hfixed |
| 148 | have hleast : A.area = m64LeastAnnulusArea g c0 c1 := le_antisymm |
| 149 | (henergy.trans_le harea) ((m64LeastAnnulusArea_le_annulus D).trans_eq hD) |
| 150 | refine ⟨r, hr, sigma0, sigma1, ?_⟩ |
| 151 | rw [hsigma0, hsigma1] |
| 152 | exact ⟨A, hstrip.1, hstrip.2, hlabel0, hlabel1, hleast, |
| 153 | m64Annulus_conformal_of_interior_completion g hAL hconf⟩ |
| 154 | |
| 155 | end PoincareMT.M64 |