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.Minimum.Variation.Frame.Field |
| 2 | |
| 3 | /-! |
| 4 | # Local adapted transport with arbitrary initial vectors |
| 5 | |
| 6 | A fixed chart interval works for every initial vector. Shrinking that time |
| 7 | interval gives a restart radius independent of the vector being transported. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open Set Filter Topology |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.ReducedLengthMinimum.Variation.Frame |
| 21 | |
| 22 | open PoincareMT.ReducedLengthMinimum.Variational |
| 23 | open PoincareMT.ReducedLengthMinimum.Variation.Geometry |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 27 | [IsManifold (𝓡 n) ∞ M] |
| 28 | |
| 29 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 30 | |
| 31 | theorem exists_adapted_field_in_chart {J : Set ℝ} (F : RicciFlow n M J) |
| 32 | (T : ℝ) (x : M) (γ : ℝ → M) {a b s₀ : ℝ} (hs₀ : s₀ ∈ Ioo a b) |
| 33 | (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ γ (Ioo a b)) |
| 34 | (hchart : ∀ s ∈ Ioo a b, γ s ∈ (chartAt E x).source) |
| 35 | (htime : ∀ s ∈ Ioo a b, s ∈ interior ((fun r : ℝ ↦ T - r ^ 2) ⁻¹' J)) |
| 36 | (v₀ : TangentSpace (𝓡 n) (γ s₀)) : |
| 37 | ∃ P : ∀ s, TangentSpace (𝓡 n) (γ s), |
| 38 | P s₀ = v₀ ∧ IsAdaptedFieldOn F T γ P (Ioo a b) := by |
| 39 | let y : ℝ → E := fun s ↦ extChartAt (𝓡 n) x (γ s) |
| 40 | have hy : ContDiffOn ℝ ∞ y (Ioo a b) := by |
| 41 | apply ContMDiffOn.contDiffOn |
| 42 | exact (contMDiffOn_extChartAt (I := 𝓡 n) (x := x)).comp hγ (fun s hs ↦ by |
| 43 | simpa only [extChartAt_source, mem_preimage] using hchart s hs) |
| 44 | have hgraph (s : ℝ) (hs : s ∈ Ioo a b) : (s, y s) ∈ chartActionDomain F T x := |
| 45 | ⟨htime s hs, (extChartAt (𝓡 n) x).map_source (by |
| 46 | simpa only [extChartAt_source] using hchart s hs)⟩ |
| 47 | let e := trivializationAt E (TangentSpace (𝓡 n)) x |
| 48 | let w₀ := e.continuousLinearMapAt ℝ (γ s₀) v₀ |
| 49 | obtain ⟨v, hv, hv₀, hd, _⟩ := exists_smooth_coordinate_transport |
| 50 | (chartActionMetric F T x) (chartActionDomain F T x) |
| 51 | (chartActionDomain_open F T x) (chartActionMetric_contDiffOn F T x) |
| 52 | (fun z hz ↦ chartActionMetric_pos F T x hz) |
| 53 | (fun z hz ↦ chartActionMetric_symm F T x hz) y hs₀ hy hgraph (fun _ : Unit ↦ w₀) |
| 54 | let P : ∀ s, TangentSpace (𝓡 n) (γ s) := fun s ↦ chartFrame x (v () s) (γ s) |
| 55 | have hP := chartFrame_curve_contMDiffOn x γ (v ()) (Ioo a b) hγ (hv ()) hchart |
| 56 | let H : ParametricAlongCurveExtensionOn (Ioo a b) γ P := |
| 57 | chartSectionExtension isOpen_Ioo Subset.rfl x γ (v ()) (hv ()) |
| 58 | (fun s hs ↦ hchart s hs) P (fun _ _ ↦ rfl) |
| 59 | refine ⟨P, ?_, hP, ?_⟩ |
| 60 | · change chartFrame x (v () s₀) (γ s₀) = v₀ |
| 61 | rw [hv₀ ()] |
| 62 | exact e.symmL_continuousLinearMapAt (hchart s₀ hs₀) v₀ |
| 63 | · intro s hs |
| 64 | have hγs := ((hγ s hs).contMDiffAt (isOpen_Ioo.mem_nhds hs)).mdifferentiableAt (by simp) |
| 65 | apply localAdaptedEquation_of_pullback F T γ P H isOpen_Ioo hγ hP |
| 66 | hs hs (isOpen_Ioo.uniqueDiffOn s hs) (htime s hs) |
| 67 | intro Z |
| 68 | rw [pullbackCovariantDerivative_chart_formula F (fun r ↦ T - r ^ 2) |
| 69 | isOpen_Ioo Subset.rfl x γ (v ()) (hv ()) (fun s hs ↦ hchart s hs) P |
| 70 | (fun _ _ ↦ rfl) H hs (isOpen_Ioo.uniqueDiffOn s hs) hγs, (hd () s hs).deriv] |
| 71 | exact chartTransportOperator_adapted_pairing_squareDomain F T s x (γ s) |
| 72 | (hchart s hs) (htime s hs) (deriv y s) (v () s) Z |
| 73 | |
| 74 | theorem exists_uniform_local_isAdaptedFieldOn {J : Set ℝ} (F : RicciFlow n M J) |
| 75 | (T : ℝ) (γ : ℝ → M) (U : Set ℝ) (hU : IsOpen U) |
| 76 | (htime : ∀ s ∈ U, s ∈ interior ((fun r : ℝ ↦ T - r ^ 2) ⁻¹' J)) |
| 77 | (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ γ U) (s₀ : ℝ) (hs₀ : s₀ ∈ U) : |
| 78 | ∃ (W : Set ℝ) (d : ℝ), IsOpen W ∧ s₀ ∈ W ∧ W ⊆ U ∧ 0 < d ∧ |
| 79 | ∀ t₀ ∈ W, ∀ v₀ : TangentSpace (𝓡 n) (γ t₀), |
| 80 | ∃ P : ∀ s, TangentSpace (𝓡 n) (γ s), |
| 81 | Ioo (t₀ - d) (t₀ + d) ⊆ U ∧ P t₀ = v₀ ∧ |
| 82 | IsAdaptedFieldOn F T γ P (Ioo (t₀ - d) (t₀ + d)) := by |
| 83 | let x := γ s₀ |
| 84 | let D := U ∩ γ ⁻¹' (chartAt E x).source |
| 85 | have hD : IsOpen D := hγ.continuousOn.isOpen_inter_preimage hU (chartAt E x).open_source |
| 86 | have hsD : s₀ ∈ D := ⟨hs₀, mem_chart_source E x⟩ |
| 87 | obtain ⟨l, r, hlr, hsub⟩ := mem_nhds_iff_exists_Ioo_subset.mp (hD.mem_nhds hsD) |
| 88 | let d := min (s₀ - l) (r - s₀) / 4 |
| 89 | have hd : 0 < d := div_pos (lt_min (sub_pos.mpr hlr.1) (sub_pos.mpr hlr.2)) (by norm_num) |
| 90 | have hleft : 4 * d ≤ s₀ - l := by |
| 91 | dsimp only [d] |
| 92 | linarith only [min_le_left (s₀ - l) (r - s₀)] |
| 93 | have hright : 4 * d ≤ r - s₀ := by |
| 94 | dsimp only [d] |
| 95 | linarith only [min_le_right (s₀ - l) (r - s₀)] |
| 96 | let W := Ioo (s₀ - d) (s₀ + d) |
| 97 | have hWD : W ⊆ D := by |
| 98 | intro t ht |
| 99 | apply hsub |
| 100 | constructor <;> linarith [ht.1, ht.2] |
| 101 | refine ⟨W, d, isOpen_Ioo, ⟨by linarith, by linarith⟩, |
| 102 | hWD.trans inter_subset_left, hd, ?_⟩ |
| 103 | intro t₀ ht₀ v₀ |
| 104 | have hID : Ioo (t₀ - d) (t₀ + d) ⊆ D := by |
| 105 | intro t ht |
| 106 | apply hsub |
| 107 | constructor <;> linarith [ht₀.1, ht₀.2, ht.1, ht.2] |
| 108 | have hIU : Ioo (t₀ - d) (t₀ + d) ⊆ U := hID.trans inter_subset_left |
| 109 | obtain ⟨P, hP₀, hP⟩ := exists_adapted_field_in_chart F T x γ |
| 110 | (show t₀ ∈ Ioo (t₀ - d) (t₀ + d) from ⟨by linarith, by linarith⟩) |
| 111 | (hγ.mono hIU) (fun _ ht ↦ (hID ht).2) (fun _ ht ↦ htime _ (hIU ht)) v₀ |
| 112 | exact ⟨P, hIU, hP₀, hP⟩ |
| 113 | |
| 114 | end PoincareMT.ReducedLengthMinimum.Variation.Frame |