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.IntrinsicComparison.Endpoint.Periodicity |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Normal.Density |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Endpoint.Lift |
| 4 | |
| 5 | /-! |
| 6 | # Uniform periodic normal geometry with actual first-contact heights |
| 7 | |
| 8 | Claim 19.37, pp. 468-469: retain the actual normal field and initial data of |
| 9 | the continued exponential, together with its periodic measurable contact |
| 10 | height. Every prescribed smaller cutoff is permitted before the annulus is |
| 11 | chosen. Only the metric estimates require a good boundary-curvature point; |
| 12 | the actual normal geodesic neighborhoods exist at every base point. |
| 13 | See `derivations/2026-09-25-uniform-normal-geometry.md`. |
| 14 | |
| 15 | Context: Morgan--Tian Claim 19.37, printed pp. 468-469, in the proof of Proposition |
| 16 | 19.35. |
| 17 | -/ |
| 18 | |
| 19 | noncomputable section |
| 20 | set_option autoImplicit false |
| 21 | set_option backward.isDefEq.respectTransparency false |
| 22 | |
| 23 | open Set Filter MeasureTheory |
| 24 | open scoped Topology Manifold ContDiff Bundle Matrix |
| 25 | |
| 26 | namespace PoincareMT |
| 27 | |
| 28 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 29 | normedSpaceTangentSpaceVectorSpace |
| 30 | |
| 31 | /-- Claim 19.37's actual periodic normal family at any smaller prescribed uniform cutoff. |
| 32 | The normal initial data, first contacts, geodesic tubes, and metric/density estimates all |
| 33 | refer to this same constructed map. The radius is chosen before `N`; no embedded-collar |
| 34 | radius is used. Source/construction: |
| 35 | proof-work/tasks/M64/derivations/2026-09-25-uniform-normal-geometry.md, Construction. -/ |
| 36 | theorem m64Intrinsic_exists_uniform_normal_geometry |
| 37 | (K : ℝ) {delta alpha : ℝ} (hdelta : 0 < delta) (hdelta1 : delta < 1) |
| 38 | (halpha : 0 ≤ alpha) : |
| 39 | ∃ R0 : ℝ, 0 < R0 ∧ R0 < 1 / 10 ∧ |
| 40 | ∀ R : ℝ, 0 < R → R ≤ R0 → |
| 41 | ∀ N : IntrinsicAnnulus, N.GaussianCurvatureBound K → |
| 42 | ∃ (normal : ℝ → AnnulusCoordinates) |
| 43 | (e : AnnulusCoordinates → AnnulusCoordinates) (height : ℝ → ℝ), |
| 44 | ContDiff ℝ ∞ normal ∧ ContDiff ℝ ∞ e ∧ Measurable height ∧ |
| 45 | Function.Periodic normal rampPeriod ∧ |
| 46 | (∀ t : ℝ, Function.Periodic (fun a => e !₂[a, t]) rampPeriod) ∧ |
| 47 | Function.Periodic height rampPeriod ∧ |
| 48 | (∀ a, N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) (normal a) = 1 ∧ |
| 49 | N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) |
| 50 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a) = 0 ∧ |
| 51 | 0 < inner ℝ (intrinsicAnnulusBoundary 1 a) (normal a)) ∧ |
| 52 | (∀ a, e !₂[a, 0] = intrinsicAnnulusBoundary 1 a) ∧ |
| 53 | (∀ a, HasDerivAt (fun t => e !₂[a, t]) (normal a) 0) ∧ |
| 54 | (∀ a, 0 < height a ∧ height a ≤ R ∧ |
| 55 | (∀ t ∈ Ioo (0 : ℝ) (height a), 1 < ‖e !₂[a, t]‖ ∧ ‖e !₂[a, t]‖ < 2) ∧ |
| 56 | e !₂[a, height a] ∈ standardAnnulusDomain ∧ |
| 57 | (height a = R ∨ ‖e !₂[a, height a]‖ = 1 ∨ ‖e !₂[a, height a]‖ = 2)) ∧ |
| 58 | (∀ a, ∃ S I : Set ℝ, IsOpen S ∧ IsOpen I ∧ a ∈ S ∧ |
| 59 | Icc (0 : ℝ) (height a) ⊆ I ∧ |
| 60 | ∀ s ∈ S, N.metric.IsGeodesicOn (fun t => e !₂[s, t]) I) ∧ |
| 61 | ∀ a, intrinsicGeodesicCurvature N.metric N.connection 1 a ≤ alpha → |
| 62 | ∀ t ∈ Icc (0 : ℝ) (height a), |
| 63 | (∀ v : AnnulusCoordinates, |
| 64 | (1 - delta) ^ 2 * |
| 65 | (intrinsicBoundarySpeed N.metric 1 a ^ 2 * (v 0) ^ 2 + (v 1) ^ 2) ≤ |
| 66 | N.metric.inner (e !₂[a, t]) |
| 67 | (fderiv ℝ e !₂[a, t] v) (fderiv ℝ e !₂[a, t] v)) ∧ |
| 68 | Function.Injective (fderiv ℝ e !₂[a, t]) ∧ |
| 69 | (1 - delta) ^ 2 * intrinsicBoundarySpeed N.metric 1 a ≤ |
| 70 | N.metric.pullbackVolumeDensity e !₂[a, t] := by |
| 71 | obtain ⟨R0, hR0, hR0small, hmetric⟩ := |
| 72 | m64Intrinsic_exists_uniform_normal_metric_radius K hdelta hdelta1 halpha |
| 73 | refine ⟨R0, hR0, hR0small, ?_⟩ |
| 74 | intro R hR hRR0 N hK |
| 75 | obtain ⟨G, normal, u, hG, hnormal, hu, hn, hend⟩ := |
| 76 | m64Intrinsic_exists_smooth_extended_normal_endpoint N |
| 77 | have hdata := m64Intrinsic_normal_endpoint_initial_data G hend |
| 78 | have hnperiod := m64Intrinsic_inward_normal_periodic N hn |
| 79 | have huperiod := m64Intrinsic_normal_endpoint_periodic G hnperiod hend |
| 80 | obtain ⟨height, hheight, hcontact⟩ := m64Intrinsic_exists_measurable_contact_times |
| 81 | hu.continuous hR (fun a => m64Intrinsic_inward_curve_enters_annulus |
| 82 | (hdata a).1 (hdata a).2 (hn a).2.2) |
| 83 | have hheightPeriod : Function.Periodic height rampPeriod := |
| 84 | m64Intrinsic_first_contact_height_periodic huperiod (fun a => |
| 85 | ⟨(hcontact a).1, (hcontact a).2.1, (hcontact a).2.2.1, (hcontact a).2.2.2.2⟩) |
| 86 | let e : AnnulusCoordinates → AnnulusCoordinates := fun z => u (z 0, z 1) |
| 87 | have he : ContDiff ℝ ∞ e := hu.comp (by fun_prop) |
| 88 | have himage (a : ℝ) : |
| 89 | ∀ t ∈ Icc (0 : ℝ) (height a), u (a, t) ∈ standardAnnulusDomain := by |
| 90 | intro t ht |
| 91 | rcases eq_or_lt_of_le ht.1 with hzero | hpos |
| 92 | · rw [← hzero, (hdata a).1] |
| 93 | have hnorm : ‖intrinsicAnnulusBoundary 1 a‖ = 1 := by |
| 94 | have hsq := m64Intrinsic_boundary_self_inner 1 a |
| 95 | rw [real_inner_self_eq_norm_sq] at hsq |
| 96 | nlinarith [norm_nonneg (intrinsicAnnulusBoundary 1 a)] |
| 97 | exact ⟨by rw [hnorm], by simpa only [hnorm] using (by norm_num : (1 : ℝ) ≤ 2)⟩ |
| 98 | · rcases eq_or_lt_of_le ht.2 with hlast | hlt |
| 99 | · simpa only [hlast] using (hcontact a).2.2.2.1 |
| 100 | · exact ⟨((hcontact a).2.2.1 t ⟨hpos, hlt⟩).1.le, |
| 101 | ((hcontact a).2.2.1 t ⟨hpos, hlt⟩).2.le⟩ |
| 102 | have htube (a : ℝ) : ∃ S I : Set ℝ, IsOpen S ∧ IsOpen I ∧ a ∈ S ∧ |
| 103 | Icc (0 : ℝ) (height a) ⊆ I ∧ |
| 104 | ∀ s ∈ S, N.metric.IsGeodesicOn (fun t => u (s, t)) I := by |
| 105 | have hsmall : height a < 1 := ((hcontact a).2.1.trans hRR0).trans_lt |
| 106 | (hR0small.trans (by norm_num)) |
| 107 | obtain ⟨S, I, hS, hI, ha, hsub, _, hgeo⟩ := |
| 108 | m64Intrinsic_exists_actual_normal_geodesic_neighborhood N G hG hnormal hu hend |
| 109 | hsmall (himage a) |
| 110 | exact ⟨S, I, hS, hI, ha, hsub, hgeo⟩ |
| 111 | refine ⟨normal, e, height, hnormal, he, hheight, hnperiod, huperiod, hheightPeriod, |
| 112 | hn, fun a => (hdata a).1, fun a => (hdata a).2, hcontact, htube, ?_⟩ |
| 113 | intro a ha |
| 114 | obtain ⟨S, I, hS, hI, haS, hsub, hgeo⟩ := htube a |
| 115 | have hbound := hmetric (height a) (hcontact a).1 ((hcontact a).2.1.trans hRR0) |
| 116 | N 1 (by norm_num) hK u S I hS hI hsub |
| 117 | (contMDiff_iff_contDiff.mpr hu).contMDiffOn hgeo (fun s _ => (hdata s).1) |
| 118 | normal hnormal (fun s => (hn s).1) (fun s => (hn s).2.1) |
| 119 | (fun s _ => (m64Intrinsic_curveVelocity_eq_deriv _ _).trans (hdata s).2.deriv) |
| 120 | a haS ha (fun t ht => |
| 121 | ⟨((hcontact a).2.2.1 t ht).1.le, ((hcontact a).2.2.1 t ht).2.le⟩) |
| 122 | intro t ht |
| 123 | have hd (v : AnnulusCoordinates) : |
| 124 | fderiv ℝ e !₂[a, t] v = fderiv ℝ u (a, t) (v 0, v 1) := |
| 125 | m64Intrinsic_normal_coordinate_differential (hu.differentiable (by simp) (a, t)) v |
| 126 | refine ⟨?_, ?_, ?_⟩ |
| 127 | · intro v |
| 128 | rw [hd] |
| 129 | exact (hbound t ht).1 (v 0, v 1) |
| 130 | · intro v w hvw |
| 131 | rw [hd, hd] at hvw |
| 132 | have heq := (hbound t ht).2 hvw |
| 133 | ext i |
| 134 | fin_cases i |
| 135 | · exact congrArg Prod.fst heq |
| 136 | · exact congrArg Prod.snd heq |
| 137 | · exact m64Intrinsic_normal_map_density_lower N.metric |
| 138 | (hu.differentiable (by simp) (a, t)) (hbound t ht).1 |
| 139 | |
| 140 | end PoincareMT |