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.Comparison.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Local.DeTurck.Construction.QuasilinearDeTurck |
| 3 | |
| 4 | /-! |
| 5 | # One smooth fixed-point branch on an open domain |
| 6 | |
| 7 | A strict partial derivative bound and smoothness on an open physical |
| 8 | domain give one branch smooth throughout an open parameter neighborhood. |
| 9 | MT2007 Claim 19.1, p. 437; |
| 10 | `2026-09-22-open-smooth-spectral-branch.md`, statement 1. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Topology ContDiff |
| 17 | |
| 18 | /-- A fixed point with strictly contractive partial linearization has |
| 19 | one smooth branch on an open parameter neighborhood, retaining actual |
| 20 | domain membership and local uniqueness. MT2007 Claim 19.1, p. 437; |
| 21 | open smooth spectral branch derivation, statement 1. -/ |
| 22 | theorem exists_contDiffOn_fixedPoint_of_open_domain |
| 23 | {P X : Type*} [NormedAddCommGroup P] [NormedSpace ℝ P] [CompleteSpace P] |
| 24 | [NormedAddCommGroup X] [NormedSpace ℝ X] [CompleteSpace X] |
| 25 | (R : P × X → X) {O : Set (P × X)} (hO : IsOpen O) |
| 26 | {p : P} {x : X} (hp : (p, x) ∈ O) (hR : ContDiffOn ℝ ∞ R O) |
| 27 | (hfix : R (p, x) = x) |
| 28 | (hsmall : ‖(fderiv ℝ R (p, x)).comp (ContinuousLinearMap.inr ℝ P X)‖ < 1) : |
| 29 | ∃ (U : Set P) (V : Set (P × X)) (u : P → X), |
| 30 | IsOpen U ∧ p ∈ U ∧ IsOpen V ∧ (p, x) ∈ V ∧ u p = x ∧ |
| 31 | ContDiffOn ℝ ∞ u U ∧ |
| 32 | (∀ q ∈ U, (q, u q) ∈ O ∧ R (q, u q) = u q) ∧ |
| 33 | ∀ z ∈ V, R z = z.2 ↔ u z.1 = z.2 := by |
| 34 | obtain ⟨u, hup, hu, hueq, hunique⟩ := |
| 35 | PoincareMT.QuasilinearDeTurckNative.exists_contDiffAt_fixedPoint R |
| 36 | (k := 1) (by norm_num) ((hR.contDiffAt (hO.mem_nhds hp)).of_le (by simp)) |
| 37 | hfix hsmall |
| 38 | have hD : ContinuousAt (fun z : P × X => |
| 39 | ‖(fderiv ℝ R z).comp (ContinuousLinearMap.inr ℝ P X)‖) (p, x) := |
| 40 | (((hR.continuousOn_fderiv_of_isOpen hO (by simp)).continuousAt |
| 41 | (hO.mem_nhds hp)).clm_comp continuousAt_const).norm |
| 42 | have hgraph : Tendsto (fun q : P => (q, u q)) (𝓝 p) (𝓝 (p, x)) := by |
| 43 | simpa only [hup, id_eq] using (continuousAt_id.prodMk hu.continuousAt).tendsto |
| 44 | have hnear : ∀ᶠ q in 𝓝 p, ContDiffAt ℝ 1 u q ∧ (q, u q) ∈ O ∧ |
| 45 | ‖(fderiv ℝ R (q, u q)).comp (ContinuousLinearMap.inr ℝ P X)‖ < 1 ∧ |
| 46 | R (q, u q) = u q := by |
| 47 | filter_upwards [hu.eventually (by simp), hgraph.eventually (hO.mem_nhds hp), |
| 48 | hgraph.eventually (hD.eventually (isOpen_Iio.mem_nhds hsmall)), hueq] |
| 49 | with q hq hqO hqsmall hqfix |
| 50 | exact ⟨hq, hqO, hqsmall, hqfix⟩ |
| 51 | obtain ⟨U, hUS, hU, hpU⟩ := mem_nhds_iff.mp hnear |
| 52 | obtain ⟨V, hVS, hV, hpV⟩ := mem_nhds_iff.mp hunique |
| 53 | refine ⟨U, V, u, hU, hpU, hV, hpV, hup, ?_, ?_, fun z hz => hVS hz⟩ |
| 54 | · apply hU.contDiffOn_iff.mpr |
| 55 | intro q hq |
| 56 | obtain ⟨v, _hvq, hv, _hveq, hvunique⟩ := |
| 57 | PoincareMT.QuasilinearDeTurckNative.exists_contDiffAt_fixedPoint R |
| 58 | (k := ∞) (by simp) (hR.contDiffAt (hO.mem_nhds (hUS hq).2.1)) |
| 59 | (hUS hq).2.2.2 (hUS hq).2.2.1 |
| 60 | apply hv.congr_of_eventuallyEq |
| 61 | have hgraphq : ContinuousAt (fun z : P => (z, u z)) q := |
| 62 | continuousAt_id.prodMk (hUS hq).1.continuousAt |
| 63 | filter_upwards [hU.mem_nhds hq, hgraphq.eventually hvunique] with z hz hzu |
| 64 | exact (hzu.mp (hUS hz).2.2.2).symm |
| 65 | · intro q hq |
| 66 | exact ⟨(hUS hq).2.1, (hUS hq).2.2.2⟩ |