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.RicciFlow.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Geometry.SourceLaterNegativeCut |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Local.Geometry.LocalFrontierScale |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Geometry.SourceEdgeCommonOrientation |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Geometry.SourceBalancedChainAssembly |
| 6 | |
| 7 | /-! |
| 8 | # Common-closure scale control for later-negative cuts |
| 9 | |
| 10 | The scale ratio is needed only at a hypothetical intersection and follows |
| 11 | there from the actual common-closure comparison. Two source edges supply |
| 12 | the required path-length lower bound. See derivation 53 and the signed |
| 13 | overlap route, revision 2, section 5. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M28 |
| 25 | |
| 26 | /-- The far-cut theorem requires no ratio between unrelated distant necks: |
| 27 | at a proposed bad overlap, common-closure scalar comparison supplies it. -/ |
| 28 | theorem exists_later_negative_cut_accuracy : |
| 29 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 30 | ∀ {M : Type u} [TopologicalSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 32 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 33 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M}, |
| 34 | ∀ (N P : EpsilonNeck g), N.epsilon ≤ epsilon₀ → P.epsilon = N.epsilon → |
| 35 | ∀ {U : Set M}, N.carrier ⊆ U → P.carrier ⊆ U → |
| 36 | ∀ {γ : ℝ → M} {t₁ tN tP : ℝ}, t₁ < tN → tN < tP → |
| 37 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc t₁ tP) → |
| 38 | γ tN = N.center → γ tP = P.center → |
| 39 | (∀ a b, t₁ ≤ a → a ≤ b → b ≤ tP → |
| 40 | g.pathELength γ a b = intrinsicEDist g U (γ a) (γ b)) → |
| 41 | g.pathELength γ t₁ tN = |
| 42 | ENNReal.ofReal ((0.3 : ℝ) * N.scale * N.epsilon⁻¹) → |
| 43 | (N.coordinate_inverse (γ t₁)).2 ≤ -((0.292 : ℝ) * N.epsilon⁻¹) → |
| 44 | γ t₁ ∈ N.carrier → |
| 45 | ENNReal.ofReal ((1.9 : ℝ) * N.scale * N.epsilon⁻¹) ≤ |
| 46 | g.pathELength γ tN tP → |
| 47 | Disjoint P.carrier (N.region (-N.epsilon⁻¹) (-N.epsilon⁻¹ / 2)) := by |
| 48 | obtain ⟨epsilonS, hSpos, _, hS⟩ := |
| 49 | EpsilonNeck.exists_scale_comparison_at_common_closure_m28.{u} |
| 50 | refine ⟨min epsilonS (1 / 1000), lt_min hSpos (by norm_num), min_le_right _ _, ?_⟩ |
| 51 | intro M _ _ _ _ _ _ _ g N P hsmall heq U hNU hPU γ t₁ tN tP |
| 52 | h₁ hNP hγ hcN hcP hmin hanchor hsign hz₁ hfar |
| 53 | have hε : N.epsilon ≤ 1 / 1000 := hsmall.trans (min_le_right _ _) |
| 54 | have hA : (1000 : ℝ) ≤ N.epsilon⁻¹ := by |
| 55 | have h := mul_le_mul_of_nonneg_right hε (inv_pos.mpr N.epsilon_pos).le |
| 56 | rw [mul_inv_cancel₀ N.epsilon_pos.ne'] at h |
| 57 | linarith |
| 58 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 59 | ⟨g.toRiemannianMetric⟩ |
| 60 | refine Set.disjoint_left.mpr fun y hyP hyN => ?_ |
| 61 | have hscale := hS N P (hsmall.trans (min_le_left _ _)) |
| 62 | (by rw [heq]; exact hsmall.trans (min_le_left _ _)) |
| 63 | ⟨y, subset_closure hyN.1, subset_closure hyP⟩ |
| 64 | have hratio : P.scale ≤ (1.1 : ℝ) * N.scale := by |
| 65 | nlinarith [hscale.2, N.scale_pos] |
| 66 | have hcut := later_negative_cut_of_minimizer N P hε hA heq hratio hNU hPU |
| 67 | h₁ hNP hγ hcN hcP hmin (Manifold.pathELength_add h₁.le hNP.le).symm |
| 68 | hanchor hsign hz₁ hfar |
| 69 | exact Set.disjoint_left.mp hcut hyP hyN |
| 70 | |
| 71 | variable {M : Type u} [TopologicalSpace M] |
| 72 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 73 | [IsManifold (𝓡 3) ∞ M] {g : RiemannianMetric 3 M} |
| 74 | |
| 75 | /-- Two consecutive actual source edges give the far-cut length margin; |
| 76 | length monotonicity extends it to every subsequent center time. -/ |
| 77 | theorem two_source_edges_pathELength_lower |
| 78 | {N P Q R T : EpsilonNeck g} {γ : ℝ → M} {tN tQ tR tP : ℝ} |
| 79 | (H₀ : SourceEdgeCommonOrientationPacket N P Q (γ := γ) tN tQ) |
| 80 | (H₁ : SourceEdgeCommonOrientationPacket Q R T (γ := γ) tQ tR) |
| 81 | (hNQ : tN < tQ) (hQR : tQ < tR) (hRP : tR ≤ tP) |
| 82 | (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc tN tP)) : |
| 83 | ENNReal.ofReal ((1.9 : ℝ) * N.scale * N.epsilon⁻¹) ≤ |
| 84 | g.pathELength γ tN tP := by |
| 85 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 86 | ⟨g.toRiemannianMetric⟩ |
| 87 | have hA : 0 < N.epsilon⁻¹ := inv_pos.mpr N.epsilon_pos |
| 88 | have hfirst : ENNReal.ofReal ((0.99 : ℝ) * N.scale * N.epsilon⁻¹) ≤ |
| 89 | g.pathELength γ tN tQ := by |
| 90 | apply H₀.center_distance.1.trans |
| 91 | exact Manifold.riemannianEDist_le_pathELength |
| 92 | (hγ.mono (Icc_subset_Icc le_rfl (hQR.le.trans hRP))) |
| 93 | H₀.center_N H₀.center_Q hNQ.le |
| 94 | have hsecond : ENNReal.ofReal ((0.99 : ℝ) * Q.scale * N.epsilon⁻¹) ≤ |
| 95 | g.pathELength γ tQ tR := by |
| 96 | have hd := H₁.center_distance.1 |
| 97 | rw [H₀.epsilon_eq] at hd |
| 98 | apply hd.trans |
| 99 | exact Manifold.riemannianEDist_le_pathELength |
| 100 | (hγ.mono (Icc_subset_Icc hNQ.le hRP)) H₁.center_N H₁.center_Q hQR.le |
| 101 | have hsum : ENNReal.ofReal |
| 102 | ((0.99 : ℝ) * N.scale * N.epsilon⁻¹ + (0.99 : ℝ) * Q.scale * N.epsilon⁻¹) ≤ |
| 103 | g.pathELength γ tN tR := by |
| 104 | rw [ENNReal.ofReal_add |
| 105 | (mul_nonneg (mul_nonneg (by norm_num) N.scale_pos.le) hA.le) |
| 106 | (mul_nonneg (mul_nonneg (by norm_num) Q.scale_pos.le) hA.le)] |
| 107 | exact (add_le_add hfirst hsecond).trans_eq |
| 108 | (Manifold.pathELength_add hNQ.le hQR.le) |
| 109 | have hreal : (1.9 : ℝ) * N.scale * N.epsilon⁻¹ ≤ |
| 110 | (0.99 : ℝ) * N.scale * N.epsilon⁻¹ + (0.99 : ℝ) * Q.scale * N.epsilon⁻¹ := by |
| 111 | have hscale := mul_lt_mul_of_pos_right H₀.scale.1 hA |
| 112 | nlinarith [mul_pos N.scale_pos hA] |
| 113 | exact ((ENNReal.ofReal_le_ofReal hreal).trans hsum).trans |
| 114 | (Manifold.pathELength_mono le_rfl hRP) |
| 115 | |
| 116 | /-- The adjacent universal negative cut is the checked overlap field. -/ |
| 117 | theorem SourceEdgePacket.later_negative_cut {N Q : EpsilonNeck g} {epsilon : ℝ} |
| 118 | (H : SourceEdgePacket N Q epsilon) : |
| 119 | Disjoint Q.carrier (N.region (-epsilon⁻¹) (-epsilon⁻¹ / 2)) := by |
| 120 | have h := adjacent_later_negative_cut N Q |
| 121 | (by simpa only [H.epsilon_N] using H.overlap_within_three_quarters) |
| 122 | simpa only [H.epsilon_N] using h |
| 123 | |
| 124 | end PoincareMT.M28 |