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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularSourceRealization |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceJetsG4Assembly |
| 4 | |
| 5 | /-! |
| 6 | # Actual G4 data on the retained regular source family |
| 7 | |
| 8 | The fixed stage lifetime is shortened once, before its source indices or |
| 9 | normal charts. The same physical cylinders produce the ordinary flows; |
| 10 | the original scalar divergence and cutoff tail give every G4 guard. |
| 11 | MT Claim 17.9, pp. 405-407; terminal-regular-source-realization.md, C2. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | /-- Actual available stage cylinders produce their same-source ordinary |
| 25 | flows and an eventual G4 certificate for every later normal chart. -/ |
| 26 | theorem terminalSource_regular_stage_G4 |
| 27 | (P : M47Predecessors.{u}) (S : RepairedControlledSchedulesData.{u}) |
| 28 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) |
| 29 | (p : SurgeryParameterPrefix S.constants) (hp : S.SeedCompatible p) |
| 30 | {α : Type v} (l : Filter α) |
| 31 | (F : α → SurgeryFlowData.{u}) (O : ∀ k, SurgeryObservation (F k)) |
| 32 | (W : ∀ k, M33RegularHistoryWindow (F k)) (H : ∀ k, M33RegularHistoryData (W k)) |
| 33 | (base r delta : α → ℝ) (ht : ∀ k, base k ∈ (H k).generalized.interval) |
| 34 | (x : ∀ k, ((H k).generalized.slice (base k)).carrier) |
| 35 | (old : ∀ k, SurgeryPrefixControls p (F k) (O k)) |
| 36 | (hBase : ∀ k, base k ∈ Ico (surgeryEpochStart p.i) (O k).H) |
| 37 | (hPinched : ∀ k, SurgeryFlowPinched (F k)) |
| 38 | (hEarlier : ∀ k, SurgeryCanonicalOn (F k) (Ico 0 (base k)) (r k)) |
| 39 | (hFloor : ∀ k, (r k)⁻¹ ^ 2 ≤ ((F k).connection (base k)).scalarCurvature |
| 40 | ((H k).history.forward (base k) (ht k) (x k))) |
| 41 | (hOverlap : ∀ k t, t ∈ surgeryObservationInterval (O k) ∩ |
| 42 | Ico (surgeryEpochStart (p.i - 1)) (O k).H → (F k).parameters.delta t ≤ delta k) |
| 43 | (hdelta : Tendsto delta l (𝓝 0)) |
| 44 | (hDiverges : Tendsto (fun k => ((F k).connection (base k)).scalarCurvature |
| 45 | ((H k).history.forward (base k) (ht k) (x k))) l atTop) |
| 46 | {A tau0 K : ℝ} (hA : 0 < A) (htau0 : 0 < tau0) : |
| 47 | let Q : α → ℝ := fun k => (H k).generalized.scalar ⟨base k, x k⟩ |
| 48 | let U : ∀ k, TopologicalSpace.Opens ((F k).slice (base k)).carrier := fun k => |
| 49 | ⟨((F k).metric (base k)).ball ((H k).history.forward (base k) (ht k) (x k)) |
| 50 | (A / Real.sqrt (Q k)), M04.initial_ball_isOpen _ _ _⟩ |
| 51 | let L : ℝ := max 1 (9 * K) |
| 52 | let tau : ℝ := min (tau0 / 2) (1 / (4 * blowupAnalyticConstant S B * L)) |
| 53 | 0 < tau ∧ tau < tau0 ∧ 1 ≤ L ∧ |
| 54 | ∀ e : ∀ k, SurgeryFlowCylinder (F k) ((F k).slice (base k)) (base k) (Q k) |
| 55 | (Icc (-tau0) 0) (U k), |
| 56 | (∀ k hs y, y ∈ U k → HEq ((e k).forward 0 hs y) y) → |
| 57 | (∀ k s hs y, y ∈ U k → ((F k).connection (base k + s / Q k)).curvatureTensorNorm |
| 58 | ((e k).forward s hs y) ≤ K * Q k) → |
| 59 | ∃ p0 : ∀ k, U k, |
| 60 | ∃ htime : ∀ k s, s ∈ Icc (-tau) 0 → base k + s / Q k ∈ (H k).generalized.interval, |
| 61 | ∃ d : ∀ k, GeneralizedFlowCylinder (H k).generalized ((F k).slice (base k)) |
| 62 | (base k) (Q k) (Icc (-tau) 0) (U k), |
| 63 | ∃ G : ∀ k, RicciFlow 3 (U k) (Icc (-tau) 0), |
| 64 | (∀ k, (p0 k).val = (H k).history.forward (base k) (ht k) (x k) ∧ |
| 65 | (∀ s hs y, y ∈ U k → (H k).history.forward (base k + s / Q k) (htime k s hs) |
| 66 | ((d k).forward s hs y) = (e k).forward s |
| 67 | ⟨(neg_le_neg (show tau ≤ tau0 from |
| 68 | (min_le_left _ _).trans (by linarith))).trans hs.1, hs.2⟩ y) ∧ |
| 69 | (∀ (s : ℝ) (hs : s ∈ Icc (-tau) 0) (z : U k), |
| 70 | (∀ v w : TangentSpace (𝓡 3) z, |
| 71 | ((G k).metric s).inner z v w = (d k).pullbackInner s hs z.val |
| 72 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U k → ((F k).slice (base k)).carrier) z v) |
| 73 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U k → ((F k).slice (base k)).carrier) z w)) ∧ |
| 74 | ((G k).connection s).scalarCurvature z = |
| 75 | ((H k).generalized.connection (base k + s / Q k)).scalarCurvature |
| 76 | ((d k).forward s hs z.val) / Q k ∧ |
| 77 | ((G k).connection s).curvatureTensorNorm z = |
| 78 | ((H k).generalized.connection (base k + s / Q k)).curvatureTensorNorm |
| 79 | ((d k).forward s hs z.val) / Q k) ∧ |
| 80 | (∀ s ∈ Icc (-tau) 0, ∀ z : U k, ((G k).connection s).curvatureTensorNorm z ≤ K) ∧ |
| 81 | (∀ z : U k, ((G k).connection 0).scalarCurvature z = |
| 82 | ((F k).connection (base k)).scalarCurvature z.val / Q k) ∧ |
| 83 | ((G k).connection 0).scalarCurvature (p0 k) = 1 ∧ |
| 84 | (∀ y, y ∈ U k → normalizedCylinderScalar (d k) y 0 ≤ L) ∧ |
| 85 | let h0 : (0 : ℝ) ∈ Icc (-tau) 0 := |
| 86 | ⟨neg_nonpos.mpr (by dsimp only [tau, L, blowupAnalyticConstant]; positivity), le_rfl⟩ |
| 87 | let j := terminalSourceNormal_terminalMap (U k) (p0 k) |
| 88 | (terminalSourceNormal_historyCylinder (H k) (U k) (htime k) (d k)) h0 |
| 89 | j.source = univ ∧ j.target = U k ∧ (∀ z : U k, j z = z.val)) ∧ |
| 90 | ∀ᶠ k in l, ∀ R : ℝ, ∀ C : TerminalSourceChart ((G k).metric 0) R, |
| 91 | TerminalSourceJetsG4Good S B p (O k) (H k) (U k) (d k) (G k) |
| 92 | (rNext := r k) (L := L) (eta := 1) C := by |
| 93 | classical |
| 94 | let Q : α → ℝ := fun k => (H k).generalized.scalar ⟨base k, x k⟩ |
| 95 | let U : ∀ k, TopologicalSpace.Opens ((F k).slice (base k)).carrier := fun k => |
| 96 | ⟨((F k).metric (base k)).ball ((H k).history.forward (base k) (ht k) (x k)) |
| 97 | (A / Real.sqrt (Q k)), M04.initial_ball_isOpen _ _ _⟩ |
| 98 | let L : ℝ := max 1 (9 * K) |
| 99 | let tau : ℝ := min (tau0 / 2) (1 / (4 * blowupAnalyticConstant S B * L)) |
| 100 | have hL : 1 ≤ L := le_max_left _ _ |
| 101 | have hLpos : 0 < L := zero_lt_one.trans_le hL |
| 102 | have hden : 0 < 4 * blowupAnalyticConstant S B * L := |
| 103 | mul_pos (mul_pos (by norm_num) (blowupAnalyticConstant_pos S B)) hLpos |
| 104 | have htau : 0 < tau := lt_min (half_pos htau0) (one_div_pos.mpr hden) |
| 105 | have htt : tau < tau0 := (min_le_left _ _).trans_lt (half_lt_self htau0) |
| 106 | have hshort : blowupAnalyticConstant S B * L * tau ≤ 1 / 4 := by |
| 107 | have h := (le_div_iff₀ hden).mp (min_le_right (tau0 / 2) |
| 108 | (1 / (4 * blowupAnalyticConstant S B * L))) |
| 109 | dsimp only [tau] |
| 110 | nlinarith |
| 111 | refine ⟨htau, htt, hL, ?_⟩ |
| 112 | intro e hbased hbound |
| 113 | choose p0 hp0 htime d G hmaps _hmetric hG _hphysical hnorm hscalar hone hterminal hmap |
| 114 | using fun k => terminalSource_realize_regular_stage (H k) (ht k) (x k) |
| 115 | P hA htau htt (e k) (hbased k) (hbound k) |
| 116 | have hterminalL (k : α) (y : ((F k).slice (base k)).carrier) (hy : y ∈ U k) : |
| 117 | normalizedCylinderScalar (d k) y 0 ≤ L := |
| 118 | (hterminal k y hy).trans (le_max_right _ _) |
| 119 | refine ⟨p0, htime, d, G, ?_, ?_⟩ |
| 120 | · intro k |
| 121 | exact ⟨hp0 k, hmaps k, hG k, hnorm k, hscalar k, hone k, hterminalL k, hmap k⟩ |
| 122 | · have hscale (k : α) : ((F k).connection (base k)).scalarCurvature |
| 123 | ((H k).history.forward (base k) (ht k) (x k)) = Q k := |
| 124 | (H k).scalar_pullback (base k) (ht k) (x k) |
| 125 | have hQ : Tendsto Q l atTop := by |
| 126 | simpa only [hscale] using hDiverges |
| 127 | have hdeltaSmall : ∀ᶠ k in l, delta k ≤ B.delta S.setup.standard_initial S.constants := |
| 128 | hdelta.eventually (eventually_le_nhds (B.delta_pos _ _)) |
| 129 | filter_upwards [hQ.eventually (eventually_ge_atTop (64 * (tau + 1))), |
| 130 | hQ.eventually (eventually_ge_atTop B.curvature_threshold), |
| 131 | hQ.eventually (eventually_ge_atTop (blowupPinchingThreshold (4 * L / 3) 1)), |
| 132 | hdeltaSmall] with k hscale64 hlarge hpinchingScale hdeltaK |
| 133 | intro R C |
| 134 | exact { |
| 135 | hInitial := by rw [(old k).standard_initial_eq, hp.setup_eq] |
| 136 | hConstants := (old k).local_constants_eq |
| 137 | hC := by rw [(old k).C_eq, hp.setup_eq] |
| 138 | hBase := hBase k |
| 139 | hTauNonneg := htau.le |
| 140 | hScale := hscale64 |
| 141 | hLarge := hlarge |
| 142 | hThreshold := by simpa only [hscale] using hFloor k |
| 143 | hPinched := hPinched k |
| 144 | hEarlier := fun s hs hsF y hy => hEarlier k s ⟨hs.1.1, hs.2⟩ hsF y hy |
| 145 | hOverlap := fun s hs => (hOverlap k s hs).trans hdeltaK |
| 146 | hne := ⟨p0 k, (p0 k).property⟩ |
| 147 | htime := htime k |
| 148 | hnorm := fun s hs z => (hG k s hs z).2.2 |
| 149 | hL := hL |
| 150 | hTerminal := hterminalL k |
| 151 | hShort := hshort |
| 152 | heta := zero_lt_one |
| 153 | hPinchingScale := hpinchingScale } |
| 154 | |
| 155 | end PoincareMT.M47 |