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.Generalized.ReducedGeometry.Calculus.ODE.Local.ClosedODEUniqueness |
| 2 | |
| 3 | /-! |
| 4 | # The bounded range of a closed-time Picard solution |
| 5 | |
| 6 | Morgan-Tian Lemma 6.18, pp. 113-114, uses local ODE solutions in |
| 7 | the valid coordinate domain. We retain the range bound already |
| 8 | proved for Mathlib's Picard fixed point and transfer it to Mathlib's |
| 9 | jointly continuous local family by closed-interval uniqueness. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Metric |
| 15 | open scoped ContDiff NNReal |
| 16 | |
| 17 | namespace PoincareMT.M14 |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] |
| 20 | |
| 21 | /-- Mathlib's Picard fixed point retains its actual closed state-ball |
| 22 | bound along with the initial value and within ODE. This is the |
| 23 | domain control needed in Lemma 6.18, pp. 113-114. -/ |
| 24 | theorem exists_closedPicard_solution_in_ball |
| 25 | {f : ℝ → E → E} {a b : ℝ} {t₀ : Icc a b} {x₀ x : E} {A r L K : ℝ≥0} |
| 26 | (hf : IsPicardLindelof f t₀ x₀ A r L K) (hx : x ∈ closedBall x₀ r) : |
| 27 | ∃ α : ℝ → E, α t₀ = x ∧ MapsTo α (Icc a b) (closedBall x₀ A) ∧ |
| 28 | ∀ t ∈ Icc a b, HasDerivWithinAt α (f t (α t)) (Icc a b) t := by |
| 29 | obtain ⟨α, hα⟩ := ODE.FunSpace.exists_isFixedPt_next hf hx |
| 30 | refine ⟨α.compProj, ?_, fun _ _ => α.compProj_mem_closedBall hf.mul_max_le, ?_⟩ |
| 31 | · rw [ODE.FunSpace.compProj_val, ← hα, ODE.FunSpace.next_apply₀] |
| 32 | · intro t ht |
| 33 | apply ODE.hasDerivWithinAt_picard_Icc t₀.property hf.continuousOn_uncurry |
| 34 | α.continuous_compProj.continuousOn (fun _ _ => α.compProj_mem_closedBall hf.mul_max_le) |
| 35 | x ht |>.congr_of_mem _ ht |
| 36 | intro t' ht' |
| 37 | nth_rw 1 [← hα] |
| 38 | rw [ODE.FunSpace.compProj_of_mem ht', ODE.FunSpace.next_apply] |
| 39 | |
| 40 | /-- A closed-time Picard family is jointly continuous, stays in the |
| 41 | prescribed open state domain, and is smooth in time for each initial |
| 42 | state. Joint smoothness in the initial state is not asserted here. |
| 43 | This is part of the local existence input for Lemma 6.18, pp. 113-114. -/ |
| 44 | theorem exists_closedPicard_family_in_domain |
| 45 | {f : ℝ → E → E} {a b : ℝ} (hab : a < b) {t₀ : Icc a b} |
| 46 | {x₀ : E} {A r L K : ℝ≥0} (hf : IsPicardLindelof f t₀ x₀ A r L K) |
| 47 | {U : Set E} (hU : IsOpen U) (hball : closedBall x₀ A ⊆ U) |
| 48 | (hsm : ContDiffOn ℝ ∞ (Function.uncurry f) (Icc a b ×ˢ U)) : |
| 49 | ∃ α : E × ℝ → E, ContinuousOn α (closedBall x₀ r ×ˢ Icc a b) ∧ |
| 50 | ∀ x ∈ closedBall x₀ r, α (x, t₀) = x ∧ |
| 51 | MapsTo (fun t => α (x, t)) (Icc a b) U ∧ |
| 52 | ContDiffOn ℝ ∞ (fun t => α (x, t)) (Icc a b) ∧ |
| 53 | ∀ t ∈ Icc a b, |
| 54 | HasDerivWithinAt (fun s => α (x, s)) (f t (α (x, t))) (Icc a b) t := by |
| 55 | obtain ⟨α, hα, hc⟩ := hf.exists_forall_mem_closedBall_eq_hasDerivWithinAt_continuousOn |
| 56 | refine ⟨α, hc, ?_⟩ |
| 57 | intro x hx |
| 58 | obtain ⟨β, hβ₀, hβmap, hβ⟩ := exists_closedPicard_solution_in_ball hf hx |
| 59 | have hmap : MapsTo β (Icc a b) U := fun t ht => hball (hβmap ht) |
| 60 | have heq := closedODE_interval_solution_unique hab hU (Function.uncurry f) hsm hmap |
| 61 | hβ (hα x hx).2 t₀.property (hβ₀.trans (hα x hx).1.symm) |
| 62 | have hαmap : MapsTo (fun t => α (x, t)) (Icc a b) U := by |
| 63 | intro t ht |
| 64 | rw [← heq ht] |
| 65 | exact hmap ht |
| 66 | exact ⟨(hα x hx).1, hαmap, |
| 67 | ODE.contDiffOn_enat_Icc_of_hasDerivWithinAt (n := ⊤) hsm (hα x hx).2 hαmap, |
| 68 | (hα x hx).2⟩ |
| 69 | |
| 70 | end PoincareMT.M14 |