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.Riemannian.Metric.Gluing.Descent |
| 2 | import PoincareLib.Geometry.Riemannian.Connection.Construction |
| 3 | import PoincareLib.Geometry.RicciFlow.MetricFamily.Descent |
| 4 | import PoincareLib.Geometry.RicciFlow.Limit.Descent |
| 5 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometryInvariants |
| 6 | |
| 7 | /-! |
| 8 | # Local chart limits descend on the retained static stage |
| 9 | |
| 10 | Morgan--Tian Proposition 5.14, pp. 90--91, and Claim 11.5, p. 270. |
| 11 | Limits of one common metric family are compatible on fixed chart overlaps. |
| 12 | Actual local flows therefore descend, preserving the prescribed terminal |
| 13 | metric and curvature-operator sign throughout the included time domain. |
| 14 | Endpoint conventions follow reviews/errata/2026-09-10-source-audit.md:56. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | universe uI uU uM |
| 24 | |
| 25 | namespace PoincareMT.M30 |
| 26 | |
| 27 | /-- Chart flows obtained as limits of one common metric family descend to |
| 28 | an actual flow with the prescribed reference metric and nonnegative |
| 29 | curvature operator (Proposition 5.14 and Claim 11.5, pp. 90--91 and 270). |
| 30 | The comparison metric family need not itself solve a flow equation. -/ |
| 31 | theorem exists_flow_of_common_metric_chart_limits |
| 32 | {n : ℕ} {ι : Type uI} [Nonempty ι] {U : ι → Type uU} {M : Type uM} |
| 33 | [∀ i, TopologicalSpace (U i)] [TopologicalSpace M] |
| 34 | [∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (U i)] |
| 35 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 36 | [∀ i, IsManifold (𝓡 n) ∞ (U i)] [IsManifold (𝓡 n) ∞ M] |
| 37 | {J : Set ℝ} (t₀ : ℝ) (ht₀ : t₀ ∈ J) |
| 38 | (g₀ : RiemannianMetric n M) (h : ℕ → ℝ → RiemannianMetric n M) |
| 39 | (Fchart : ∀ i, RicciFlow n (U i) J) |
| 40 | (q : ∀ i, U i → M) |
| 41 | (hq : ∀ i, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (q i)) |
| 42 | (hcover : ∀ y, ∃ i x, q i x = y) |
| 43 | (hlimit : ∀ t ∈ J, ∀ i (x : U i) (v w : TangentSpace (𝓡 n) x), |
| 44 | Tendsto (fun k => (h k t).inner (q i x) |
| 45 | (mfderiv (𝓡 n) (𝓡 n) (q i) x v) |
| 46 | (mfderiv (𝓡 n) (𝓡 n) (q i) x w)) atTop |
| 47 | (𝓝 (((Fchart i).metric t).inner x v w))) |
| 48 | (hterminal : ∀ i (x : U i) (v w : TangentSpace (𝓡 n) x), |
| 49 | ((Fchart i).metric t₀).inner x v w = g₀.inner (q i x) |
| 50 | (mfderiv (𝓡 n) (𝓡 n) (q i) x v) |
| 51 | (mfderiv (𝓡 n) (𝓡 n) (q i) x w)) |
| 52 | (hoperator : ∀ i t, t ∈ J → ∀ x : U i, |
| 53 | ((Fchart i).connection t).NonnegativeCurvatureOperator x) : |
| 54 | ∃ F : RicciFlow n M J, F.metric t₀ = g₀ ∧ |
| 55 | (∀ t ∈ J, ∀ i (x : U i) (v w : TangentSpace (𝓡 n) x), |
| 56 | ((Fchart i).metric t).inner x v w = (F.metric t).inner (q i x) |
| 57 | (mfderiv (𝓡 n) (𝓡 n) (q i) x v) |
| 58 | (mfderiv (𝓡 n) (𝓡 n) (q i) x w)) ∧ |
| 59 | ∀ t ∈ J, ∀ x : M, (F.connection t).NonnegativeCurvatureOperator x := by |
| 60 | classical |
| 61 | have hinv (t : ℝ) (ht : t ∈ J) (i j : ι) (x : U i) (y : U j) |
| 62 | (hxy : q i x = q j y) |
| 63 | (v w : TangentSpace (𝓡 n) x) (v' w' : TangentSpace (𝓡 n) y) |
| 64 | (hv : mfderiv (𝓡 n) (𝓡 n) (q i) x v = mfderiv (𝓡 n) (𝓡 n) (q j) y v') |
| 65 | (hw : mfderiv (𝓡 n) (𝓡 n) (q i) x w = mfderiv (𝓡 n) (𝓡 n) (q j) y w') : |
| 66 | ((Fchart i).metric t).inner x v w = ((Fchart j).metric t).inner y v' w' := by |
| 67 | have hseq : (fun k => (h k t).inner (q i x) |
| 68 | (mfderiv (𝓡 n) (𝓡 n) (q i) x v) |
| 69 | (mfderiv (𝓡 n) (𝓡 n) (q i) x w)) = |
| 70 | (fun k => (h k t).inner (q j y) |
| 71 | (mfderiv (𝓡 n) (𝓡 n) (q j) y v') |
| 72 | (mfderiv (𝓡 n) (𝓡 n) (q j) y w')) := by |
| 73 | funext k |
| 74 | let B : M → EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 75 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := fun z => (h k t).inner z |
| 76 | change B (q i x) _ _ = B (q j y) _ _ |
| 77 | rw [hv, hw, hxy] |
| 78 | have hi := hlimit t ht i x v w |
| 79 | rw [hseq] at hi |
| 80 | exact tendsto_nhds_unique hi (hlimit t ht j y v' w') |
| 81 | let selectedTime (t : ℝ) := if t ∈ J then t else t₀ |
| 82 | have hselected (t : ℝ) : selectedTime t ∈ J := by |
| 83 | dsimp [selectedTime] |
| 84 | split_ifs with ht |
| 85 | · exact ht |
| 86 | · exact ht₀ |
| 87 | have hselected_eq (t : ℝ) (ht : t ∈ J) : selectedTime t = t := |
| 88 | if_pos ht |
| 89 | have hex (t : ℝ) := Poincare.Gluing.exists_unique_metric_of_covering_local_diffeomorphisms |
| 90 | (fun i => (Fchart i).metric (selectedTime t)) q hq hcover |
| 91 | (hinv (selectedTime t) (hselected t)) |
| 92 | let g (t : ℝ) := Classical.choose (hex t) |
| 93 | have hpres (t : ℝ) (ht : t ∈ J) (i : ι) (x : U i) |
| 94 | (v w : TangentSpace (𝓡 n) x) : |
| 95 | ((Fchart i).metric t).inner x v w = (g t).inner (q i x) |
| 96 | (mfderiv (𝓡 n) (𝓡 n) (q i) x v) |
| 97 | (mfderiv (𝓡 n) (𝓡 n) (q i) x w) := by |
| 98 | have hp := (Classical.choose_spec (hex t)).1 i x v w |
| 99 | change ((Fchart i).metric (selectedTime t)).inner x v w = (g t).inner (q i x) |
| 100 | (mfderiv (𝓡 n) (𝓡 n) (q i) x v) |
| 101 | (mfderiv (𝓡 n) (𝓡 n) (q i) x w) at hp |
| 102 | rwa [hselected_eq t ht] at hp |
| 103 | have hzero : g t₀ = g₀ := by |
| 104 | symm |
| 105 | apply (Classical.choose_spec (hex t₀)).2 g₀ |
| 106 | intro i x v w |
| 107 | simpa only [hselected_eq t₀ ht₀] using hterminal i x v w |
| 108 | have hsmooth : RiemannianMetric.IsSmoothFamilyOn g J := |
| 109 | Poincare.Gluing.isSmoothFamilyOn_of_local_diffeomorphisms |
| 110 | (fun i => (Fchart i).metric) g (fun i => (Fchart i).smooth) q hq hcover hpres |
| 111 | obtain ⟨F, hF⟩ := RicciFlow.exists_of_covering_local_diffeomorphisms |
| 112 | Fchart g hsmooth t₀ (g t₀).leviCivitaData q hq hcover hpres |
| 113 | have hpresF : ∀ t ∈ J, ∀ i (x : U i) (v w : TangentSpace (𝓡 n) x), |
| 114 | ((Fchart i).metric t).inner x v w = (F.metric t).inner (q i x) |
| 115 | (mfderiv (𝓡 n) (𝓡 n) (q i) x v) |
| 116 | (mfderiv (𝓡 n) (𝓡 n) (q i) x w) := by |
| 117 | simpa only [hF] using hpres |
| 118 | refine ⟨F, by simpa only [hF] using hzero, hpresF, ?_⟩ |
| 119 | intro t ht z |
| 120 | obtain ⟨i, x, rfl⟩ := hcover z |
| 121 | exact (((Fchart i).connection t).nonnegativeCurvatureOperator_iff_of_local_isometry |
| 122 | (F.connection t) isOpen_univ (hq i).contMDiff.contMDiffOn |
| 123 | (fun y _ v w => hpresF t ht i y v w) (mem_univ x)).mp (hoperator i t ht x) |
| 124 | |
| 125 | end PoincareMT.M30 |