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.Ramp.LocalFlow.Initial.ResponseTrace |
| 2 | import Mathlib.Topology.CompactOpen |
| 3 | |
| 4 | /-! |
| 5 | # Uniform domain control for the actual initial trace |
| 6 | |
| 7 | Compact-open neighborhoods and strong heat continuity keep every |
| 8 | sufficiently small forcing response in the physical coefficient domain. |
| 9 | MT2007 Claim 19.1, p. 437; `2026-09-21-initial-trace-neighborhood.md`. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace PoincareMT.M63 |
| 18 | |
| 19 | open SpectralHeatNative |
| 20 | |
| 21 | /-- One positive radius and time control every point of a compact |
| 22 | decoded initial trace for every smaller time interval and forcing. |
| 23 | MT2007 Claim 19.1, p. 437; initial trace neighborhood derivation. |
| 24 | No separation or local compactness assumptions on the compact |
| 25 | parameter space or the decoded target are required. -/ |
| 26 | theorem exists_initialResponseTrace_neighborhood |
| 27 | {iota K Y : Type*} [Countable iota] [TopologicalSpace K] [CompactSpace K] |
| 28 | [TopologicalSpace Y] (lambda : iota → NNReal) (w : State iota) |
| 29 | (D : State iota → C(K, Y)) (hD : Continuous D) |
| 30 | {O : Set (ℝ × Y)} (hO : IsOpen O) (hinit : ∀ x, (0, D w x) ∈ O) |
| 31 | {Tcap : ℝ} (hTcap : 0 < Tcap) : |
| 32 | ∃ r0 : ℝ, 0 < r0 ∧ ∃ T0 : ℝ, 0 < T0 ∧ T0 ≤ Tcap ∧ T0 ≤ 1 ∧ |
| 33 | ∀ T : ℝ, ∀ hT : 0 ≤ T, T ≤ T0 → ∀ F : ForcingSpace iota T, |
| 34 | ‖F‖ < r0 / 2 → ∀ t : Icc (0 : ℝ) T, ∀ x : K, |
| 35 | ((t : ℝ), D (initialResponseTrace lambda w hT F t) x) ∈ O := by |
| 36 | let H : ℝ × State iota → C(K, ℝ × Y) := fun z => |
| 37 | (ContinuousMap.const K z.1).prodMk (D z.2) |
| 38 | have hH : Continuous H := |
| 39 | ContinuousMap.continuous_prodMk_const.comp |
| 40 | (continuous_fst.prodMk (hD.comp continuous_snd)) |
| 41 | have hN : H ⁻¹' {g : C(K, ℝ × Y) | MapsTo g univ O} ∈ 𝓝 (0, w) := |
| 42 | ((ContinuousMap.isOpen_setOfPred_mapsTo isCompact_univ hO).preimage hH).mem_nhds |
| 43 | (fun x _ => hinit x) |
| 44 | obtain ⟨eps, heps, hnear⟩ := Metric.mem_nhds_iff.mp hN |
| 45 | have hheat : Continuous (fun t : ℝ => heat lambda t.toNNReal w) := |
| 46 | (continuous_heat_apply lambda w).comp continuous_real_toNNReal |
| 47 | obtain ⟨delta, hdelta, hheatNear⟩ := Metric.continuousAt_iff.mp |
| 48 | (hheat.continuousAt (x := 0)) (eps / 4) (by positivity) |
| 49 | let r0 := eps / 4 |
| 50 | let T0 := min Tcap (min 1 (min (eps / 2) (delta / 2))) |
| 51 | have hT0 : 0 < T0 := by dsimp [T0]; positivity |
| 52 | have hT01 : T0 ≤ 1 := (min_le_right _ _).trans (min_le_left _ _) |
| 53 | have hT0eps : T0 ≤ eps / 2 := |
| 54 | (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)) |
| 55 | have hT0delta : T0 ≤ delta / 2 := |
| 56 | (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 57 | refine ⟨r0, by dsimp [r0]; positivity, T0, hT0, min_le_left _ _, hT01, ?_⟩ |
| 58 | intro T hT hTT0 F hF t x |
| 59 | have ht0 : 0 ≤ (t : ℝ) := t.property.1 |
| 60 | have htT0 : (t : ℝ) ≤ T0 := t.property.2.trans hTT0 |
| 61 | have htdelta : dist (t : ℝ) 0 < delta := by |
| 62 | rw [Real.dist_eq, sub_zero, abs_of_nonneg ht0] |
| 63 | linarith only [htT0, hT0delta, hdelta] |
| 64 | have hheatBound : ‖heat lambda (t : ℝ).toNNReal w - w‖ < eps / 4 := by |
| 65 | have h := hheatNear htdelta |
| 66 | simpa only [Real.toNNReal_zero, heat_zero, ContinuousLinearMap.id_apply, |
| 67 | dist_eq_norm] using h |
| 68 | have hsqrt : Real.sqrt T ≤ 1 := by |
| 69 | simpa only [Real.sqrt_one] using Real.sqrt_le_sqrt (hTT0.trans hT01) |
| 70 | have htrace : ‖initialResponseTrace lambda w hT F t - heat lambda (t : ℝ).toNNReal w‖ < |
| 71 | r0 := by |
| 72 | apply ((initialResponseTrace_spec lambda w hT F).2.2.1 t).trans_lt |
| 73 | have hb : (Real.sqrt T + 1) * ‖F‖ ≤ 2 * ‖F‖ := by |
| 74 | gcongr |
| 75 | linarith only [hsqrt] |
| 76 | exact hb.trans_lt (by linarith only [hF]) |
| 77 | have hstate : dist (initialResponseTrace lambda w hT F t) w < eps := by |
| 78 | calc |
| 79 | _ ≤ dist (initialResponseTrace lambda w hT F t) (heat lambda (t : ℝ).toNNReal w) + |
| 80 | dist (heat lambda (t : ℝ).toNNReal w) w := dist_triangle _ _ _ |
| 81 | _ < r0 + eps / 4 := add_lt_add |
| 82 | (by simpa only [dist_eq_norm] using htrace) |
| 83 | (by simpa only [dist_eq_norm] using hheatBound) |
| 84 | _ < eps := by dsimp only [r0]; linarith only [heps] |
| 85 | have htime : dist (t : ℝ) 0 < eps := by |
| 86 | rw [Real.dist_eq, sub_zero, abs_of_nonneg ht0] |
| 87 | linarith only [htT0, hT0eps, heps] |
| 88 | have hpair : dist ((t : ℝ), initialResponseTrace lambda w hT F t) (0, w) < eps := by |
| 89 | rw [Prod.dist_eq] |
| 90 | exact max_lt htime hstate |
| 91 | have hmaps : MapsTo (H ((t : ℝ), initialResponseTrace lambda w hT F t)) univ O := hnear hpair |
| 92 | exact hmaps (mem_univ x) |
| 93 | |
| 94 | end PoincareMT.M63 |