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.ReducedGeometry.ReducedLength.ODE.MaximalRegularizedCurve |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Exponential.LocalRegularizedFamily |
| 3 | |
| 4 | /-! |
| 5 | # The normalized maximal square-time family near zero |
| 6 | |
| 7 | Its initial phase is (p,2Z). A constructed common initial neighborhood, |
| 8 | followed by maximal-curve uniqueness, supplies joint smoothness there. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] |
| 23 | |
| 24 | noncomputable def normalizedSquareFamily {J : Set ℝ} (F : RicciFlow n M J) |
| 25 | (T b : ℝ) (p : M) (Z : TangentSpace (𝓡 n) p) : ℝ → M := |
| 26 | maximalRegularizedCurve F T b 0 ⟨p, (2 : ℝ) • Z⟩ |
| 27 | |
| 28 | theorem normalizedSquareFamily_initial_phase {J : Set ℝ} [T2Space M] |
| 29 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 30 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 31 | (p : M) (Z : TangentSpace (𝓡 n) p) : |
| 32 | curvePhase (n := n) (normalizedSquareFamily F T b p Z) 0 = |
| 33 | (⟨p, (2 : ℝ) • Z⟩ : TangentBundle (𝓡 n) M) := |
| 34 | (maximalRegularizedSolution F hM04 T b hb hwindow 0 |
| 35 | ⟨neg_lt_zero.mpr (Real.sqrt_pos.mpr hb), Real.sqrt_pos.mpr hb⟩ ⟨p, (2 : ℝ) • Z⟩).initial_phase |
| 36 | |
| 37 | theorem normalizedSquareFamily_zero {J : Set ℝ} [T2Space M] |
| 38 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 39 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 40 | (p : M) (Z : TangentSpace (𝓡 n) p) : normalizedSquareFamily F T b p Z 0 = p := |
| 41 | congrArg Bundle.TotalSpace.proj (normalizedSquareFamily_initial_phase F hM04 T b hb hwindow p Z) |
| 42 | |
| 43 | set_option backward.isDefEq.respectTransparency false in |
| 44 | theorem exists_normalizedSquareFamily_smooth_zero {J : Set ℝ} [T2Space M] |
| 45 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 46 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 47 | (p : M) (Z0 : TangentSpace (𝓡 n) p) : |
| 48 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 49 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 50 | ∃ (W : Set (TangentSpace (𝓡 n) p)) (d : ℝ), IsOpen W ∧ Z0 ∈ W ∧ |
| 51 | 0 < d ∧ d < Real.sqrt b ∧ |
| 52 | ContMDiffOn (𝓘(ℝ, TangentSpace (𝓡 n) p × ℝ)) (𝓡 n) ∞ |
| 53 | (fun z ↦ normalizedSquareFamily F T b p z.1 z.2) (W ×ˢ Set.Ioo (-d) d) := by |
| 54 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 55 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 56 | obtain ⟨A⟩ := nonempty_localRegularizedInitialFamily F hM04 T b hb hwindow p Z0 |
| 57 | let I := Set.Ioo (-A.radius) A.radius |
| 58 | let d := min A.radius (Real.sqrt b / 2) |
| 59 | let K := Set.Ioo (-d) d |
| 60 | have hsqrt : 0 < Real.sqrt b := Real.sqrt_pos.mpr hb |
| 61 | have hd : 0 < d := lt_min A.radius_pos (by positivity) |
| 62 | have hdr : d ≤ A.radius := min_le_left _ _ |
| 63 | have hdb : d < Real.sqrt b := (min_le_right _ _).trans_lt (by linarith) |
| 64 | have hKI : K ⊆ I := by intro s hs; constructor <;> linarith [hs.1, hs.2] |
| 65 | have htime : K ⊆ Set.Ioo (-Real.sqrt b) (Real.sqrt b) := by |
| 66 | intro s hs |
| 67 | constructor <;> linarith [hs.1, hs.2] |
| 68 | have h0 : (0 : ℝ) ∈ K := ⟨neg_lt_zero.mpr hd, hd⟩ |
| 69 | have hsmooth (Z : TangentSpace (𝓡 n) p) (hZ : Z ∈ A.neighborhood) : |
| 70 | ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ (A.curve Z) I := |
| 71 | A.curve_smooth.comp (contMDiff_const.prodMk contMDiff_id).contMDiffOn |
| 72 | (fun s hs ↦ ⟨hZ, hs⟩) |
| 73 | have hphase (Z : TangentSpace (𝓡 n) p) (hZ : Z ∈ A.neighborhood) : |
| 74 | curvePhase (n := n) (A.curve Z) 0 = |
| 75 | (⟨p, (2 : ℝ) • Z⟩ : TangentBundle (𝓡 n) M) := by |
| 76 | have hcast (x y : M) (h : x = y) (v : TangentSpace (𝓡 n) x) : |
| 77 | (h ▸ v : TangentSpace (𝓡 n) y) = (show TangentSpace (𝓡 n) y from v) := by |
| 78 | cases h |
| 79 | rfl |
| 80 | have hv := A.initial_derivative Z hZ |
| 81 | rw [hcast _ _ (A.curve_start Z hZ) (curveVelocity (n := n) (A.curve Z) 0)] at hv |
| 82 | exact Bundle.TotalSpace.ext (A.curve_start Z hZ) (heq_of_eq hv) |
| 83 | have heq (Z : TangentSpace (𝓡 n) p) (hZ : Z ∈ A.neighborhood) : |
| 84 | Set.EqOn (normalizedSquareFamily F T b p Z) (A.curve Z) K := by |
| 85 | let S : RegularizedIntervalSolution F T b 0 ⟨p, (2 : ℝ) • Z⟩ := { |
| 86 | domain := K |
| 87 | open_domain := isOpen_Ioo |
| 88 | preconnected_domain := isPreconnected_Ioo |
| 89 | initial_mem := h0 |
| 90 | time_mem := htime |
| 91 | curve := A.curve Z |
| 92 | isLocal := { |
| 93 | smooth := (hsmooth Z hZ).mono hKI |
| 94 | equation := fun s hs ↦ (regularizedEquation_iff_local F hM04 T b hb hwindow |
| 95 | (A.curve Z) I I isOpen_Ioo (Set.Subset.refl _) isOpen_Ioo.uniqueDiffOn |
| 96 | (hsmooth Z hZ) (A.velocity_extension Z hZ) s (hKI hs) (htime hs)).mp |
| 97 | (A.equation Z hZ s (hKI hs)) |
| 98 | } |
| 99 | initial_phase := hphase Z hZ |
| 100 | } |
| 101 | exact maximalRegularizedCurve_eqOn F hM04 T b hb hwindow 0 ⟨p, (2 : ℝ) • Z⟩ S |
| 102 | have hfamily : ContMDiffOn (𝓘(ℝ, TangentSpace (𝓡 n) p × ℝ)) (𝓡 n) ∞ |
| 103 | (fun z ↦ A.curve z.1 z.2) (A.neighborhood ×ˢ I) := by |
| 104 | convert! A.curve_smooth using 1 <;> |
| 105 | simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 106 | refine ⟨A.neighborhood, d, A.neighborhood_open, A.center_mem, hd, hdb, ?_⟩ |
| 107 | apply (hfamily.mono (Set.prod_mono (Set.Subset.refl _) hKI)).congr |
| 108 | intro z hz |
| 109 | exact heq z.1 hz.1 hz.2 |
| 110 | |
| 111 | end PoincareMT.ReducedLength |