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.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Families.ClosedODEParameterSmooth |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Local.ClosedODELocalExistence |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Extension.ClosedStateExtension |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Paths.ContinuousPathFamily |
| 6 | |
| 7 | /-! |
| 8 | # Actual local closed ODE families smooth in the initial state |
| 9 | |
| 10 | Morgan-Tian Lemma 6.18, pp. 113-114. State localization and compact |
| 11 | derivative bounds allow the closed Picard family to be constructed on a |
| 12 | short interval where the implicit-function estimate holds uniformly. |
| 13 | The original family is smooth into the sup-norm space of continuous paths, |
| 14 | retaining the original closed ODE, state domain and smooth time curves. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter Metric |
| 20 | open scoped Topology ContDiff |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 25 | |
| 26 | /-- An actual smooth closed-time field admits a local family smooth in |
| 27 | the initial state as a map into continuous paths. The actual within ODE, |
| 28 | state range and smooth individual time curves are retained, including |
| 29 | initial closed endpoints, as required in Lemma 6.18, pp. 113-114. -/ |
| 30 | theorem closedODE_exists_smooth_path_family {a b : ℝ} (hab : a < b) (t₀ : Icc a b) |
| 31 | {U : Set E} (hU : IsOpen U) (f : ℝ × E → E) |
| 32 | (hf : ContDiffOn ℝ ∞ f (Icc a b ×ˢ U)) {x₀ : E} (hx₀ : x₀ ∈ U) : |
| 33 | ∃ c d : ℝ, ∃ t₁ : Icc c d, |
| 34 | c < d ∧ a ≤ c ∧ d ≤ b ∧ t₁.val = t₀.val ∧ Icc c d ∈ 𝓝[Icc a b] t₀.val ∧ |
| 35 | ∃ ρ > (0 : ℝ), ∃ Φ : E → C(Icc c d, E), |
| 36 | ContDiffOn ℝ ∞ Φ (ball x₀ ρ) ∧ ∀ x ∈ ball x₀ ρ, |
| 37 | Φ x t₁ = x ∧ (∀ s : Icc c d, Φ x s ∈ U) ∧ |
| 38 | ContDiffOn ℝ ∞ |
| 39 | (fun s => Φ x (projIcc c d (t₁.property.1.trans t₁.property.2) s)) (Icc c d) ∧ |
| 40 | ∀ s : Icc c d, HasDerivWithinAt |
| 41 | (fun r => Φ x (projIcc c d (t₁.property.1.trans t₁.property.2) r)) |
| 42 | (f (s.val, Φ x s)) (Icc c d) s.val := by |
| 43 | obtain ⟨R, hR, g, hRU, hg, hgf⟩ := exists_closedTime_state_extension hU f hf hx₀ |
| 44 | have hD := M08.spatialWithinFDeriv_contDiffOn (uniqueDiffOn_Icc hab) isOpen_univ g hg |
| 45 | obtain ⟨K, hK⟩ := (isCompact_Icc.prod (isCompact_closedBall x₀ R)).exists_bound_of_continuousOn |
| 46 | (hD.continuousOn.mono (prod_mono Subset.rfl (subset_univ _))) |
| 47 | let η := 1 / (4 * (|K| + 1)) |
| 48 | have hη : 0 < η := by dsimp only [η]; positivity |
| 49 | have hηK : (2 * η) * |K| < 1 := by |
| 50 | calc |
| 51 | (2 * η) * |K| = (2 * |K|) / (4 * (|K| + 1)) := by dsimp only [η]; ring |
| 52 | _ < 1 := (div_lt_iff₀ (by positivity : 0 < 4 * (|K| + 1))).mpr |
| 53 | (by nlinarith [abs_nonneg K]) |
| 54 | let c₀ := max a (t₀.val - η) |
| 55 | let d₀ := min b (t₀.val + η) |
| 56 | have hc₀d₀ : c₀ < d₀ := max_lt (lt_min hab (by linarith [t₀.property.1])) |
| 57 | (lt_min (by linarith [t₀.property.2]) (by linarith)) |
| 58 | have ht₀ : t₀.val ∈ Icc c₀ d₀ := |
| 59 | ⟨max_le t₀.property.1 (by linarith), le_min t₀.property.2 (by linarith)⟩ |
| 60 | have hsub₀ : Icc c₀ d₀ ⊆ Icc a b := Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) |
| 61 | have hballU : ball x₀ R ⊆ U := ball_subset_closedBall.trans hRU |
| 62 | obtain ⟨δ, hδ, ρ, hρ, hcd, α, hα, hsol⟩ := closedODE_exists_local_family hc₀d₀ |
| 63 | isOpen_ball f (hf.mono (prod_mono hsub₀ hballU)) ht₀ (mem_ball_self hR) |
| 64 | let c := max c₀ (t₀.val - δ) |
| 65 | let d := min d₀ (t₀.val + δ) |
| 66 | have ht₁ : c ≤ t₀.val ∧ t₀.val ≤ d := |
| 67 | ⟨max_le ht₀.1 (by linarith), le_min ht₀.2 (by linarith)⟩ |
| 68 | let t₁ : Icc c d := ⟨t₀.val, ht₁⟩ |
| 69 | have hc₀c : c₀ ≤ c := le_max_left _ _ |
| 70 | have hdd₀ : d ≤ d₀ := min_le_left _ _ |
| 71 | have hac : a ≤ c := (le_max_left _ _).trans hc₀c |
| 72 | have hdb : d ≤ b := hdd₀.trans (min_le_left _ _) |
| 73 | have hsub : Icc c d ⊆ Icc a b := Icc_subset_Icc hac hdb |
| 74 | have hlen : d - c ≤ 2 * η := by |
| 75 | have hc : t₀.val - η ≤ c₀ := le_max_right _ _ |
| 76 | have hd : d₀ ≤ t₀.val + η := min_le_right _ _ |
| 77 | linarith |
| 78 | have hnear : Icc c d ∈ 𝓝[Icc a b] t₀.val := by |
| 79 | have hε := lt_min hη hδ |
| 80 | filter_upwards [self_mem_nhdsWithin, mem_nhdsWithin_of_mem_nhds |
| 81 | (Ioo_mem_nhds (show t₀.val - min η δ < t₀.val by linarith) |
| 82 | (show t₀.val < t₀.val + min η δ by linarith))] with t ht htε |
| 83 | refine ⟨max_le (max_le ht.1 ?_) ?_, le_min (le_min ht.2 ?_) ?_⟩ <;> |
| 84 | linarith [min_le_left η δ, min_le_right η δ, htε.1, htε.2] |
| 85 | have hfamily : ContinuousOn (fun z : E × Icc c d => α (z.1, z.2.val)) |
| 86 | (ball x₀ ρ ×ˢ univ) := |
| 87 | hα.comp (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd)).continuousOn |
| 88 | (fun z hz => ⟨ball_subset_closedBall hz.1, z.2.property⟩) |
| 89 | obtain ⟨Φ, hΦ, hΦeq⟩ := exists_continuousOn_pathFamily _ hfamily |
| 90 | (ContinuousMap.const (Icc c d) x₀) |
| 91 | have hdata (x : E) (hx : x ∈ ball x₀ ρ) : |
| 92 | Φ x t₁ = x ∧ (∀ s : Icc c d, Φ x s ∈ ball x₀ R) ∧ |
| 93 | ContDiffOn ℝ ∞ |
| 94 | (fun s => Φ x (projIcc c d (ht₁.1.trans ht₁.2) s)) (Icc c d) ∧ |
| 95 | ∀ s : Icc c d, HasDerivWithinAt |
| 96 | (fun r => Φ x (projIcc c d (ht₁.1.trans ht₁.2) r)) |
| 97 | (f (s.val, Φ x s)) (Icc c d) s.val := by |
| 98 | obtain ⟨hi, hmap, hsm, hd⟩ := hsol x (ball_subset_closedBall hx) |
| 99 | have heq : EqOn (fun s => Φ x (projIcc c d (ht₁.1.trans ht₁.2) s)) |
| 100 | (fun s => α (x, s)) (Icc c d) := by |
| 101 | intro s hs |
| 102 | change Φ x (projIcc c d (ht₁.1.trans ht₁.2) s) = α (x, s) |
| 103 | rw [projIcc_of_mem (ht₁.1.trans ht₁.2) hs] |
| 104 | exact hΦeq x hx ⟨s, hs⟩ |
| 105 | refine ⟨(hΦeq x hx t₁).trans hi, ?_, hsm.congr heq, ?_⟩ |
| 106 | · intro s |
| 107 | rw [hΦeq x hx s] |
| 108 | exact hmap s.property |
| 109 | · intro s |
| 110 | have h := hd s.val s.property |
| 111 | rw [← hΦeq x hx s] at h |
| 112 | exact h.congr_of_mem heq s.property |
| 113 | have hg' : ContDiffOn ℝ ∞ g (Icc c d ×ˢ univ) := hg.mono (prod_mono hsub Subset.rfl) |
| 114 | refine ⟨c, d, t₁, hcd, hac, hdb, rfl, hnear, ρ, hρ, Φ, ?_, ?_⟩ |
| 115 | · apply isOpen_ball.contDiffOn_iff.mpr |
| 116 | intro x hx |
| 117 | have hnorm : ‖closedTimePostcomp (M08.spatialWithinFDeriv (Icc c d) univ g) |
| 118 | (M08.spatialWithinFDeriv_contDiffOn (uniqueDiffOn_Icc hcd) isOpen_univ g hg').continuousOn |
| 119 | (Φ x)‖ ≤ |K| := by |
| 120 | apply (ContinuousMap.norm_le _ (abs_nonneg K)).2 |
| 121 | intro s |
| 122 | change ‖M08.spatialWithinFDeriv (Icc c d) univ g (s.val, Φ x s)‖ ≤ |K| |
| 123 | rw [spatialWithinFDeriv_subset_time isOpen_univ g hg hsub s.property (mem_univ _)] |
| 124 | exact (hK (s.val, Φ x s) ⟨hsub s.property, |
| 125 | ball_subset_closedBall ((hdata x hx).2.1 s)⟩).trans (le_abs_self K) |
| 126 | apply closedODEFamily_contDiffAt hcd t₁ g hg' Φ |
| 127 | (hΦ.continuousAt (isOpen_ball.mem_nhds hx)) |
| 128 | · filter_upwards [isOpen_ball.mem_nhds hx] with y hy |
| 129 | exact (hdata y hy).1 |
| 130 | · filter_upwards [isOpen_ball.mem_nhds hx] with y hy |
| 131 | intro s |
| 132 | rw [hgf ⟨hsub s.property, ball_subset_closedBall ((hdata y hy).2.1 s)⟩] |
| 133 | exact (hdata y hy).2.2.2 s |
| 134 | · exact (mul_le_mul hlen hnorm (norm_nonneg _) (by positivity)).trans_lt hηK |
| 135 | · intro x hx |
| 136 | exact ⟨(hdata x hx).1, fun s => hballU ((hdata x hx).2.1 s), (hdata x hx).2.2⟩ |
| 137 | |
| 138 | end PoincareMT.M14 |