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.Embedded.Collar |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Boundary.Parameters |
| 3 | |
| 4 | /-! |
| 5 | # Periodicity of the actual inward normal exponential |
| 6 | |
| 7 | The inward unit normal is unique in the two-dimensional tangent plane. |
| 8 | Consequently the normal field and its geodesics agree across the angular |
| 9 | parameter seam, independently of the choices in their construction. |
| 10 | |
| 11 | Morgan--Tian context: Claim 19.37, printed pp. 468-469, in the proof of Proposition |
| 12 | 19.35. This module supplies actual normal-geodesic data or its coordinate and measure |
| 13 | transport. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Topology Manifold ContDiff Bundle |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 26 | normedSpaceTangentSpaceVectorSpace |
| 27 | |
| 28 | /-- Metric unit length, orthogonality to the actual boundary velocity and positive radial |
| 29 | direction determine the inward normal uniquely. Source/construction: Morgan--Tian Claim |
| 30 | 19.37, printed pp. 468-469. -/ |
| 31 | theorem m64Intrinsic_inward_unit_normal_unique |
| 32 | (N : IntrinsicAnnulus) {a : ℝ} {v w : AnnulusCoordinates} |
| 33 | (hvunit : N.metric.inner (intrinsicAnnulusBoundary 1 a) v v = 1) |
| 34 | (hwunit : N.metric.inner (intrinsicAnnulusBoundary 1 a) w w = 1) |
| 35 | (hvorth : N.metric.inner (intrinsicAnnulusBoundary 1 a) v |
| 36 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a) = 0) |
| 37 | (hworth : N.metric.inner (intrinsicAnnulusBoundary 1 a) w |
| 38 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a) = 0) |
| 39 | (hvin : 0 < inner ℝ (intrinsicAnnulusBoundary 1 a) v) |
| 40 | (hwin : 0 < inner ℝ (intrinsicAnnulusBoundary 1 a) w) : v = w := by |
| 41 | let p := intrinsicAnnulusBoundary 1 a |
| 42 | let T : AnnulusCoordinates := curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a |
| 43 | change N.metric.inner p v v = 1 at hvunit |
| 44 | change N.metric.inner p w w = 1 at hwunit |
| 45 | change N.metric.inner p v T = 0 at hvorth |
| 46 | change N.metric.inner p w T = 0 at hworth |
| 47 | have hTT : 0 < N.metric.inner p T T := |
| 48 | Real.sqrt_pos.mp (m64Intrinsic_boundarySpeed_pos N (by norm_num) a) |
| 49 | have hTv : N.metric.inner p T v = 0 := by |
| 50 | rw [N.metric.symm] |
| 51 | exact hvorth |
| 52 | let L : (ℝ × ℝ) →ₗ[ℝ] AnnulusCoordinates := |
| 53 | { toFun := fun z => z.1 • T + z.2 • v |
| 54 | map_add' := by intros; simp only [Prod.fst_add, Prod.snd_add, add_smul]; abel |
| 55 | map_smul' := by intros; simp [smul_add, mul_smul] } |
| 56 | have hL (z : ℝ × ℝ) : L z = z.1 • T + z.2 • v := rfl |
| 57 | have hLi : Function.Injective L := by |
| 58 | apply (injective_iff_map_eq_zero L).mpr |
| 59 | intro z hz |
| 60 | have hx := congrArg (fun q => N.metric.inner p q T) hz |
| 61 | have hy := congrArg (fun q => N.metric.inner p q v) hz |
| 62 | rw [hL] at hx hy |
| 63 | simp only [map_add, add_apply, map_smul, smul_apply, smul_eq_mul, |
| 64 | hvorth, mul_zero, add_zero, map_zero, zero_apply] at hx |
| 65 | simp only [map_add, add_apply, map_smul, smul_apply, smul_eq_mul, |
| 66 | hTv, hvunit, mul_zero, zero_add, mul_one, map_zero, zero_apply] at hy |
| 67 | exact Prod.ext ((mul_eq_zero.mp hx).resolve_right hTT.ne') hy |
| 68 | have hdim : Module.finrank ℝ (ℝ × ℝ) = Module.finrank ℝ AnnulusCoordinates := by |
| 69 | simp |
| 70 | obtain ⟨z, hz⟩ := |
| 71 | (LinearMap.injective_iff_surjective_of_finrank_eq_finrank hdim).mp hLi w |
| 72 | have hx := congrArg (fun q => N.metric.inner p q T) hz |
| 73 | rw [hL] at hx |
| 74 | simp only [map_add, add_apply, map_smul, smul_apply, smul_eq_mul, |
| 75 | hvorth, hworth, mul_zero, add_zero] at hx |
| 76 | have hx0 : z.1 = 0 := (mul_eq_zero.mp hx).resolve_right hTT.ne' |
| 77 | have hw : w = z.2 • v := by simpa only [hL, hx0, zero_smul, zero_add] using hz.symm |
| 78 | have hunit : z.2 ^ 2 = 1 := by |
| 79 | rw [hw] at hwunit |
| 80 | simpa only [map_smul, smul_apply, smul_eq_mul, hvunit, mul_one, pow_two] using hwunit |
| 81 | have hpos : 0 < z.2 := by |
| 82 | rw [hw, inner_smul_right] at hwin |
| 83 | exact (mul_pos_iff_of_pos_right hvin).mp hwin |
| 84 | have hz1 : z.2 = 1 := by nlinarith |
| 85 | simpa only [hz1, one_smul] using hw.symm |
| 86 | |
| 87 | /-- The actual inward metric unit normal inherits the boundary's angular period by |
| 88 | uniqueness. Source/construction: Morgan--Tian Claim 19.37, printed pp. 468-469. -/ |
| 89 | theorem m64Intrinsic_inward_normal_periodic |
| 90 | (N : IntrinsicAnnulus) {normal : ℝ → AnnulusCoordinates} |
| 91 | (hnormal : ∀ a, |
| 92 | N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) (normal a) = 1 ∧ |
| 93 | N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) |
| 94 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a) = 0 ∧ |
| 95 | 0 < inner ℝ (intrinsicAnnulusBoundary 1 a) (normal a)) : |
| 96 | Function.Periodic normal rampPeriod := by |
| 97 | intro a |
| 98 | have hb := m64Intrinsic_boundary_periodic 1 a |
| 99 | have hT : curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) (a + rampPeriod) = |
| 100 | curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a := by |
| 101 | rw [m64Intrinsic_boundary_velocity, m64Intrinsic_boundary_velocity] |
| 102 | simp only [rampPeriod, Real.sin_add_two_pi, Real.cos_add_two_pi] |
| 103 | obtain ⟨hu, ho, hi⟩ := hnormal (a + rampPeriod) |
| 104 | rw [hb] at hu ho hi |
| 105 | rw [hT] at ho |
| 106 | exact m64Intrinsic_inward_unit_normal_unique N hu (hnormal a).1 ho |
| 107 | (hnormal a).2.1 hi (hnormal a).2.2 |
| 108 | |
| 109 | /-- Geodesic uniqueness propagates periodic initial normal data through the common time |
| 110 | interval. Source/construction: Morgan--Tian Claim 19.37, printed pp. 468-469. -/ |
| 111 | theorem m64Intrinsic_normal_map_periodic |
| 112 | (G : RiemannianMetric 2 AnnulusCoordinates) |
| 113 | {normal : ℝ → AnnulusCoordinates} {u : ℝ × ℝ → AnnulusCoordinates} |
| 114 | (hnormal : Function.Periodic normal rampPeriod) |
| 115 | (hboundary : ∀ a, u (a, 0) = intrinsicAnnulusBoundary 1 a) |
| 116 | (hvelocity : ∀ a, HasDerivAt (fun t => u (a, t)) (normal a) 0) |
| 117 | (hgeo : ∀ a, G.IsGeodesicOn (fun t => u (a, t)) (Icc (0 : ℝ) 1)) |
| 118 | {t : ℝ} (ht : t ∈ Icc (0 : ℝ) 1) : |
| 119 | Function.Periodic (fun a => u (a, t)) rampPeriod := by |
| 120 | intro a |
| 121 | have hinit : u (a + rampPeriod, 0) = u (a, 0) := by |
| 122 | rw [hboundary, hboundary, m64Intrinsic_boundary_periodic 1 a] |
| 123 | have hvel : deriv (fun s => extChartAt (𝓡 2) |
| 124 | (u (a + rampPeriod, 0)) (u (a + rampPeriod, s))) 0 = |
| 125 | deriv (fun s => extChartAt (𝓡 2) (u (a + rampPeriod, 0)) (u (a, s))) 0 := by |
| 126 | simpa only [extChartAt_model_space_eq_id, PartialEquiv.refl_coe, id_eq, |
| 127 | (hvelocity (a + rampPeriod)).deriv, (hvelocity a).deriv] using hnormal a |
| 128 | have heq := (hgeo (a + rampPeriod)).eq_nhds_on_of_initial_data (hgeo a) |
| 129 | (convex_Icc (0 : ℝ) 1).isPreconnected (t₀ := 0) (by simp) |
| 130 | (u (a + rampPeriod, 0)) (by simp) hinit hvel |
| 131 | exact (heq t ht).self_of_nhds |
| 132 | |
| 133 | end PoincareMT |