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.Opposite.GeodesicJoin |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Raw.InnerNormalReturn |
| 3 | |
| 4 | /-! |
| 5 | # Transversality of the original normal collision |
| 6 | |
| 7 | Backward uniqueness excludes equal terminal velocities. Opposite velocities |
| 8 | would give an actual embedded normal return bounding the same short circle |
| 9 | arc, contrary to the constructed regional curvature bound. No terminal |
| 10 | sector angle or collision-region triangulation is assumed. |
| 11 | Source: MT Claim 19.40, pp. 470-471, and Lemma 19.46, p. 474; see |
| 12 | `derivations/2026-09-27-normal-collision-transversality.md`. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology ContDiff Manifold Bundle Matrix |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 25 | normedSpaceTangentSpaceVectorSpace |
| 26 | |
| 27 | /-- The two original normal sides of a short collision region have |
| 28 | independent terminal tangents directed back towards their bases. The |
| 29 | opposite-velocity case is excluded using the actual smooth joined return |
| 30 | and the same Jordan region. Source: MT Claim 19.40, pp. 470-471, and |
| 31 | Lemma 19.46, p. 474; normal-collision-transversality derivation, Sections 1-3. -/ |
| 32 | theorem m64Intrinsic_short_normal_collision_transverse |
| 33 | (N : IntrinsicAnnulus) |
| 34 | {alpha beta : ℝ → AnnulusCoordinates} |
| 35 | (ha : ContDiff ℝ ∞ alpha) (hb : ContDiff ℝ ∞ beta) |
| 36 | {x y A B : ℝ} (hA : 0 < A) (hB : 0 < B) |
| 37 | (hai : InjOn alpha (Icc 0 A)) (hbi : InjOn beta (Icc 0 B)) |
| 38 | (ha0 : alpha 0 = intrinsicAnnulusBoundary 1 x) |
| 39 | (hb0 : beta 0 = intrinsicAnnulusBoundary 1 y) |
| 40 | (haInterior : ∀ t ∈ Ioc 0 A, 1 < ‖alpha t‖) |
| 41 | (hbInterior : ∀ t ∈ Ioc 0 B, 1 < ‖beta t‖) |
| 42 | (hga : N.metric.IsGeodesicOn alpha (Icc 0 A)) |
| 43 | (hgb : N.metric.IsGeodesicOn beta (Icc 0 B)) |
| 44 | (haUnit : N.metric.inner (alpha 0) (deriv alpha 0) (deriv alpha 0) = 1) |
| 45 | (hbUnit : N.metric.inner (beta 0) (deriv beta 0) (deriv beta 0) = 1) |
| 46 | (haOrth : N.metric.inner (intrinsicAnnulusBoundary 1 x) |
| 47 | (deriv (intrinsicAnnulusBoundary 1) x) (deriv alpha 0) = 0) |
| 48 | (hbOrth : N.metric.inner (intrinsicAnnulusBoundary 1 y) |
| 49 | (deriv (intrinsicAnnulusBoundary 1) y) (deriv beta 0) = 0) |
| 50 | (hinward : 0 < inner ℝ (intrinsicAnnulusBoundary 1 x) (deriv alpha 0)) |
| 51 | (hmeet : alpha A = beta B) |
| 52 | (hcontact : ∀ s ∈ Icc 0 A, ∀ t ∈ Icc 0 B, |
| 53 | alpha s = beta t → s = A ∧ t = B) |
| 54 | (hperiod : |y - x| < rampPeriod) |
| 55 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 56 | (hdisj : Disjoint U V) |
| 57 | (hfU : frontier U = intrinsicAnnulusBoundary 1 '' Icc (min x y) (max x y) ∪ |
| 58 | (alpha '' Icc 0 A ∪ beta '' Icc 0 B)) |
| 59 | (hfV : frontier V = frontier U) |
| 60 | (hclosure : closure U ∪ closure V = univ) (hVconn : IsPreconnected V) |
| 61 | (hsub : closure U ⊆ standardAnnulusDomain) |
| 62 | {K delta r mu : ℝ} (hK : N.GaussianCurvatureBound K) |
| 63 | (hturn : N.SmallBoundaryTurning delta r) |
| 64 | (harea : intrinsicAnnulusArea N.metric < mu) |
| 65 | (hbudget : max K 0 * mu + delta ≤ Real.pi / 2) |
| 66 | (hshort : intrinsicBoundaryLength N.metric 1 (min x y) (max x y) ≤ r) : |
| 67 | LinearIndependent ℝ (![-deriv alpha A, -deriv beta B] : |
| 68 | Fin 2 → AnnulusCoordinates) := by |
| 69 | have hstart : alpha 0 ≠ beta 0 := by |
| 70 | intro heq |
| 71 | exact hA.ne (hcontact 0 ⟨le_rfl, hA.le⟩ 0 ⟨le_rfl, hB.le⟩ heq).1 |
| 72 | have hau : ∀ t ∈ Icc 0 A, |
| 73 | N.metric.inner (alpha t) (deriv alpha t) (deriv alpha t) = 1 := by |
| 74 | have h := m64Intrinsic_geodesic_velocity_unit N hA hga Subset.rfl |
| 75 | (by simpa only [m64Intrinsic_curveVelocity_eq_deriv] using haUnit) |
| 76 | simpa only [m64Intrinsic_curveVelocity_eq_deriv] using h |
| 77 | have hbu : ∀ t ∈ Icc 0 B, |
| 78 | N.metric.inner (beta t) (deriv beta t) (deriv beta t) = 1 := by |
| 79 | have h := m64Intrinsic_geodesic_velocity_unit N hB hgb Subset.rfl |
| 80 | (by simpa only [m64Intrinsic_curveVelocity_eq_deriv] using hbUnit) |
| 81 | simpa only [m64Intrinsic_curveVelocity_eq_deriv] using h |
| 82 | rcases m64Intrinsic_inward_meeting_opposite_or_transverse N.metric ha hb hga hgb |
| 83 | hA.le hB.le (by rw [ha0, m64Intrinsic_inner_boundary_norm]) |
| 84 | (by rw [hb0, m64Intrinsic_inner_boundary_norm]) hstart haInterior hbInterior |
| 85 | (hau A ⟨hA.le, le_rfl⟩) (hbu B ⟨hB.le, le_rfl⟩) hmeet with hopp | hind |
| 86 | · obtain ⟨gamma, hleft, hright, hg, hgeo, hgi, hg0, hg1, himage⟩ := |
| 87 | m64Intrinsic_opposite_first_contact_embedded_join N.metric ha hb hga hgb hA hB |
| 88 | hmeet hopp hai hbi hcontact |
| 89 | have hd0 : deriv gamma 0 = deriv alpha 0 := by |
| 90 | have heq : gamma =ᶠ[𝓝 (0 : ℝ)] alpha := by |
| 91 | filter_upwards [Iio_mem_nhds hA] with t ht |
| 92 | exact hleft t ht.le |
| 93 | exact heq.deriv_eq |
| 94 | have hd1 : deriv gamma (A + B) = -deriv beta 0 := by |
| 95 | have heq : gamma =ᶠ[𝓝 (A + B)] (fun t => beta (A + B - t)) := by |
| 96 | filter_upwards [Ioi_mem_nhds (show A < A + B by linarith)] with t ht |
| 97 | exact hright t ht.le |
| 98 | rw [heq.deriv_eq, deriv_comp_const_sub, sub_self] |
| 99 | have hbne : deriv beta 0 ≠ 0 := by |
| 100 | intro hz |
| 101 | simp only [hz, map_zero] at hbUnit |
| 102 | norm_num at hbUnit |
| 103 | have hcne : deriv (intrinsicAnnulusBoundary 1) y ≠ 0 := by |
| 104 | intro hz |
| 105 | have hpos := m64Intrinsic_boundarySpeed_pos N one_ne_zero y |
| 106 | simp only [intrinsicBoundarySpeed, RiemannianMetric.tangentNorm, |
| 107 | m64Intrinsic_curveVelocity_eq_deriv, hz, map_zero, Real.sqrt_zero] at hpos |
| 108 | exact (lt_irrefl (0 : ℝ)) hpos |
| 109 | have hterminal : LinearIndependent ℝ |
| 110 | (![deriv (intrinsicAnnulusBoundary 1) y, deriv gamma (A + B)] : |
| 111 | Fin 2 → AnnulusCoordinates) := by |
| 112 | rw [hd1, LinearIndependent.pair_neg_right_iff, linearIndependent_fin2] |
| 113 | refine ⟨hbne, ?_⟩ |
| 114 | intro c heq |
| 115 | change c • deriv beta 0 = deriv (intrinsicAnnulusBoundary 1) y at heq |
| 116 | have hbb := N.metric.pos (intrinsicAnnulusBoundary 1 y) (deriv beta 0) hbne |
| 117 | have h := hbOrth |
| 118 | rw [← heq, map_smul, smul_apply, smul_eq_mul] at h |
| 119 | have hc : c = 0 := (mul_eq_zero.mp h).resolve_right hbb.ne' |
| 120 | apply hcne |
| 121 | simpa only [hc, zero_smul] using heq.symm |
| 122 | have hinside : ∀ t ∈ Ioo 0 (A + B), 1 < ‖gamma t‖ := by |
| 123 | intro t ht |
| 124 | by_cases htA : t ≤ A |
| 125 | · rw [hleft t htA] |
| 126 | exact haInterior t ⟨ht.1, htA⟩ |
| 127 | · rw [hright t (le_of_not_ge htA)] |
| 128 | exact hbInterior (A + B - t) ⟨by linarith [ht.2], by linarith⟩ |
| 129 | have hfront : frontier U = |
| 130 | intrinsicAnnulusBoundary 1 '' Icc (min x y) (max x y) ∪ |
| 131 | gamma '' Icc 0 (A + B) := by |
| 132 | rw [himage] |
| 133 | exact hfU |
| 134 | exact (m64Intrinsic_no_short_transverse_inner_return N hg (by linarith) hgi |
| 135 | (hg0.trans ha0) (hg1.trans hb0) hinside hgeo |
| 136 | (by rw [hg0, hd0]; exact haUnit) (by rw [hd0]; exact haOrth) |
| 137 | (by rw [hd0]; exact hinward) hterminal hperiod hU hV hdisj hfront hfV |
| 138 | hclosure hVconn hsub hK hturn harea hbudget hshort).elim |
| 139 | · exact LinearIndependent.pair_neg_left_iff.mpr hind |
| 140 | |
| 141 | end PoincareMT |