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.CanonicalInduction.Terminal.Germs.TerminalGermsExtraction |
| 2 | |
| 3 | /-! |
| 4 | # The actual terminal value of a local backward coefficient limit |
| 5 | |
| 6 | A shared source time estimate identifies the included terminal limit |
| 7 | along the same subsequence. This asserts terminal continuity only. |
| 8 | Source: MT Proposition 5.14, pp. 90-91; |
| 9 | derivations/terminal-germs-extraction.md, Stage A2. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace PoincareMT.M47 |
| 18 | |
| 19 | /-- The same actual source values at negative time and at zero retain |
| 20 | their time estimate in the limit, and hence have the same terminal value. -/ |
| 21 | theorem terminalGerms_limit_at_terminal |
| 22 | {E : Type*} [NormedAddCommGroup E] |
| 23 | {tau C : ℝ} (htau : 0 < tau) |
| 24 | (f : ℕ → ℝ → E) (B : ℝ → E) (B0 : E) |
| 25 | (hzero : Tendsto (fun k => f k 0) atTop (𝓝 B0)) |
| 26 | (hminus : ∀ t ∈ Ioo (-tau) 0, Tendsto (fun k => f k t) atTop (𝓝 (B t))) |
| 27 | (hbound : ∀ t ∈ Ioo (-tau) 0, ∀ᶠ k in atTop, |
| 28 | ‖f k t - f k 0‖ ≤ C * |t|) : |
| 29 | (∀ t ∈ Ioo (-tau) 0, ‖B t - B0‖ ≤ C * |t|) ∧ |
| 30 | Tendsto B (𝓝[<] 0) (𝓝 B0) := by |
| 31 | have hlimit (t : ℝ) (ht : t ∈ Ioo (-tau) 0) : ‖B t - B0‖ ≤ C * |t| := |
| 32 | le_of_tendsto ((hminus t ht).sub hzero).norm (hbound t ht) |
| 33 | refine ⟨hlimit, ?_⟩ |
| 34 | rw [Metric.tendsto_nhds] |
| 35 | intro epsilon hepsilon |
| 36 | have hden : 0 < |C| + 1 := by positivity |
| 37 | have hnear : ∀ᶠ t in 𝓝[<] (0 : ℝ), |t| < epsilon / (|C| + 1) := by |
| 38 | have hcont : Tendsto (fun t : ℝ => |t|) (𝓝[<] 0) (𝓝 |(0 : ℝ)|) := |
| 39 | (continuous_abs.tendsto 0).mono_left nhdsWithin_le_nhds |
| 40 | exact hcont.eventually (gt_mem_nhds (by simpa only [abs_zero] using div_pos hepsilon hden)) |
| 41 | filter_upwards [Ioo_mem_nhdsLT (neg_lt_zero.mpr htau), hnear] with t ht hsmall |
| 42 | rw [dist_eq_norm] |
| 43 | have hstep : C * |t| ≤ (|C| + 1) * |t| := |
| 44 | mul_le_mul_of_nonneg_right ((le_abs_self C).trans (le_add_of_nonneg_right zero_le_one)) |
| 45 | (abs_nonneg t) |
| 46 | exact ((hlimit t ht).trans hstep).trans_lt (by |
| 47 | simpa only [mul_comm] using (lt_div_iff₀ hden).mp hsmall) |
| 48 | |
| 49 | end PoincareMT.M47 |