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.Surgery.Induction.Noncollapse.Assembly.PositiveComponents.PositiveSectionalLowerBound |
| 2 | |
| 3 | /-! |
| 4 | # Positive components on arbitrary ordinary time intervals |
| 5 | |
| 6 | Morgan--Tian Lemma 4.13, pp. 68-69, the time-translation convention on |
| 7 | p. 61, and the positive-component argument on p. 393. Compactness chooses |
| 8 | one positive initial lower bound; every closed restriction preserves it. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | -- Time translation preserves the chosen metric and derivative instances. |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Topology |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M04 |
| 21 | end PoincareMT.M04 |
| 22 | open PoincareMT.RicciFlowAnalysis |
| 23 | |
| 24 | namespace PoincareMT.Proofs.M46 |
| 25 | |
| 26 | open PoincareMT.M04 |
| 27 | |
| 28 | variable {M : Type u} [TopologicalSpace M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 30 | {J : Set ℝ} |
| 31 | |
| 32 | set_option maxHeartbeats 1200000 in |
| 33 | -- The parameter quotient uses the chosen ordinary metric at the initial time. |
| 34 | set_option backward.isDefEq.respectTransparency false in |
| 35 | /-- Positive sectional curvature on a closed subset of a compact slice |
| 36 | has a uniform positive lower bound, as required on p. 393. -/ |
| 37 | theorem exists_initial_sectional_lower [CompactSpace M] |
| 38 | (F : RicciFlow 3 M J) {a : ℝ} (ha : a ∈ J) |
| 39 | {S : Set M} (hS : IsClosed S) |
| 40 | (hpos : ∀ y ∈ S, ∀ u v : TangentSpace (𝓡 3) y, |
| 41 | LeviCivitaData.IsOrthonormalPair (F.metric a) y u v → |
| 42 | 0 < (F.connection a).sectionalCurvature y u v) : |
| 43 | ∃ c : ℝ, 0 < c ∧ ∀ y ∈ S, ∀ u v : TangentSpace (𝓡 3) y, |
| 44 | c * metricGram (F.metric a) y u v ≤ (F.connection a).curvatureTensor y u v u v := by |
| 45 | classical |
| 46 | obtain ⟨P⟩ := compactSectionalParameters F |
| 47 | let C := P.point ⁻¹' S |
| 48 | let : CompactSpace C := |
| 49 | isCompact_iff_compactSpace.mp (hS.preimage P.point_continuous).isCompact |
| 50 | let q : C → ℝ := fun z => |
| 51 | (F.connection a).curvatureTensor (P.point z.1) (P.left z.1) (P.right z.1) |
| 52 | (P.left z.1) (P.right z.1) / |
| 53 | metricGram (F.metric a) (P.point z.1) (P.left z.1) (P.right z.1) |
| 54 | have hG (z : C) : |
| 55 | 0 < metricGram (F.metric a) (P.point z.1) (P.left z.1) (P.right z.1) := |
| 56 | metricGram_pos_of_linearIndependent (F.metric a) _ _ _ (P.independent z.1) |
| 57 | have hqc : Continuous q := P.continuous_quotient.comp_continuous |
| 58 | (continuous_const.prodMk continuous_subtype_val) (fun z => ⟨ha, mem_univ z.1⟩) |
| 59 | have hqpos (z : C) : 0 < q z := div_pos |
| 60 | (curvature_pair_positive_of_orthonormal (F.connection a) (P.point z.1) |
| 61 | (hpos _ z.2) _ _ (P.independent z.1)) (hG z) |
| 62 | by_cases hC : Nonempty C |
| 63 | · let : Nonempty C := hC |
| 64 | obtain ⟨z, _, hz⟩ := isCompact_univ.exists_isMinOn (Set.univ_nonempty : (univ : Set C).Nonempty) |
| 65 | hqc.continuousOn |
| 66 | refine ⟨q z, hqpos z, P.complete_on S a (q z) ?_⟩ |
| 67 | intro w hw |
| 68 | exact (le_div_iff₀ (hG ⟨w, hw⟩)).mp (hz (mem_univ ⟨w, hw⟩)) |
| 69 | · have : IsEmpty C := not_nonempty_iff.mp hC |
| 70 | refine ⟨1, zero_lt_one, P.complete_on S a 1 ?_⟩ |
| 71 | intro z hz |
| 72 | exact isEmptyElim (⟨z, hz⟩ : C) |
| 73 | |
| 74 | /-- Restrict to a closed ordinary interval and translate its initial time |
| 75 | to zero, with identical metric and connection representatives, p. 61. -/ |
| 76 | def zeroBasedOrdinaryRestriction (F : RicciFlow 3 M J) |
| 77 | {a b : ℝ} (hab : a < b) (hI : Icc a b ⊆ J) : RicciFlow 3 M (Icc 0 (b - a)) where |
| 78 | metric s := F.metric (a + s) |
| 79 | connection s := F.connection (a + s) |
| 80 | interval := ordConnected_Icc |
| 81 | nontrivial := ⟨0, ⟨le_rfl, (sub_pos.mpr hab).le⟩, |
| 82 | b - a, ⟨(sub_pos.mpr hab).le, le_rfl⟩, (sub_pos.mpr hab).ne⟩ |
| 83 | smooth := by |
| 84 | have hs : ContMDiff (𝓘(ℝ, ℝ).prod (𝓡 3)) (𝓘(ℝ, ℝ).prod (𝓡 3)) ∞ |
| 85 | (fun p : ℝ × M => (a + p.1, p.2)) := |
| 86 | (contMDiff_const.add contMDiff_fst).prodMk contMDiff_snd |
| 87 | exact F.smooth.comp hs.contMDiffOn (fun p hp => |
| 88 | ⟨hI ⟨by linarith [hp.1.1], by linarith [hp.1.2]⟩, mem_univ _⟩) |
| 89 | equation s hs x u v := by |
| 90 | have htime : a + s ∈ J := hI ⟨by linarith [hs.1], by linarith [hs.2]⟩ |
| 91 | have hshift : HasDerivWithinAt (fun t : ℝ => a + t) 1 (Icc 0 (b - a)) s := by |
| 92 | simpa only [id_eq] using ((hasDerivAt_id s).const_add a).hasDerivWithinAt |
| 93 | have h := (F.equation (a + s) htime x u v).comp s hshift |
| 94 | (fun t ht => hI ⟨by linarith [ht.1], by linarith [ht.2]⟩) |
| 95 | convert! h using 1 |
| 96 | simp only [mul_one] |
| 97 | |
| 98 | /-- The fixed lower bound is preserved on every closed ordinary time |
| 99 | subinterval, including its terminal endpoint, Lemma 4.13, pp. 68-69. -/ |
| 100 | theorem sectional_lower_on_closed_interval |
| 101 | [T2Space M] [SecondCountableTopology M] [CompactSpace M] |
| 102 | (F : RicciFlow 3 M J) {a b c : ℝ} (hab : a < b) (hc : 0 ≤ c) |
| 103 | (hI : Icc a b ⊆ J) {S : Set M} (hSopen : IsOpen S) (hSclosed : IsClosed S) |
| 104 | (hinit : ∀ y ∈ S, ∀ u v : TangentSpace (𝓡 3) y, |
| 105 | c * metricGram (F.metric a) y u v ≤ (F.connection a).curvatureTensor y u v u v) : |
| 106 | ∀ t ∈ Icc a b, ∀ y ∈ S, ∀ u v : TangentSpace (𝓡 3) y, |
| 107 | c * metricGram (F.metric t) y u v ≤ (F.connection t).curvatureTensor y u v u v := by |
| 108 | let F0 := zeroBasedOrdinaryRestriction F hab hI |
| 109 | have hi : ∀ y ∈ S, ∀ u v : TangentSpace (𝓡 3) y, |
| 110 | c * metricGram (F0.metric 0) y u v ≤ (F0.connection 0).curvatureTensor y u v u v := by |
| 111 | change ∀ y ∈ S, ∀ u v : TangentSpace (𝓡 3) y, |
| 112 | c * metricGram (F.metric (a + 0)) y u v ≤ |
| 113 | (F.connection (a + 0)).curvatureTensor y u v u v |
| 114 | exact (congrArg (fun t => ∀ y ∈ S, ∀ u v : TangentSpace (𝓡 3) y, |
| 115 | c * metricGram (F.metric t) y u v ≤ (F.connection t).curvatureTensor y u v u v) |
| 116 | (add_zero a)).mpr hinit |
| 117 | intro t ht y hy u v |
| 118 | have h := clopen_sectional_lower_preserved (sub_pos.mpr hab) hc F0 hSopen hSclosed |
| 119 | hi (t - a) ⟨sub_nonneg.mpr ht.1, sub_le_sub_right ht.2 a⟩ y hy u v |
| 120 | have heq : a + (t - a) = t := by ring |
| 121 | change c * metricGram (F.metric (a + (t - a))) y u v ≤ |
| 122 | (F.connection (a + (t - a))).curvatureTensor y u v u v at h |
| 123 | rwa [heq] at h |
| 124 | |
| 125 | /-- One positive constant works on every later ordinary slice in the |
| 126 | given domain; it does not depend on an auxiliary terminal horizon, p. 393. -/ |
| 127 | theorem positive_sectional_uniform_on_component |
| 128 | [T2Space M] [SecondCountableTopology M] [CompactSpace M] |
| 129 | (F : RicciFlow 3 M J) {a : ℝ} (ha : a ∈ J) (x : M) |
| 130 | (hpos : ∀ y ∈ connectedComponent x, ∀ u v : TangentSpace (𝓡 3) y, |
| 131 | LeviCivitaData.IsOrthonormalPair (F.metric a) y u v → |
| 132 | 0 < (F.connection a).sectionalCurvature y u v) : |
| 133 | ∃ c : ℝ, 0 < c ∧ ∀ t ∈ J, a ≤ t → ∀ y ∈ connectedComponent x, |
| 134 | ∀ u v : TangentSpace (𝓡 3) y, |
| 135 | c * metricGram (F.metric t) y u v ≤ (F.connection t).curvatureTensor y u v u v := by |
| 136 | let : LocallyConnectedSpace M := ChartedSpace.locallyConnectedSpace (EuclideanSpace ℝ (Fin 3)) M |
| 137 | have hC := isClopen_connectedComponent (x := x) |
| 138 | obtain ⟨c, hc, hinit⟩ := exists_initial_sectional_lower F ha hC.isClosed hpos |
| 139 | refine ⟨c, hc, ?_⟩ |
| 140 | intro t ht hat |
| 141 | rcases lt_or_eq_of_le hat with hlt | rfl |
| 142 | · exact sectional_lower_on_closed_interval F hlt hc.le |
| 143 | (F.interval.out ha ht) hC.isOpen hC.isClosed hinit t ⟨hat, le_rfl⟩ |
| 144 | · exact hinit |
| 145 | |
| 146 | end PoincareMT.Proofs.M46 |