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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.MetricConvergence.CurvatureMetricJets |
| 3 | |
| 4 | /-! |
| 5 | # Retaining the actual parallel unit direction |
| 6 | |
| 7 | The metric and first field jets identify the limit of the actual |
| 8 | Levi-Civita derivative. The retained squared derivative estimate then |
| 9 | forces that actual derivative to vanish, while unit length is preserved. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | namespace PoincareMT.M35 |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 23 | |
| 24 | local instance radialLimitDualNormedGroup : NormedAddCommGroup (V →L[ℝ] ℝ) := inferInstance |
| 25 | local instance radialLimitDualNormedSpace : NormedSpace ℝ (V →L[ℝ] ℝ) := inferInstance |
| 26 | local instance radialLimitMetricNormedGroup : NormedAddCommGroup (V →L[ℝ] V →L[ℝ] ℝ) := |
| 27 | inferInstance |
| 28 | local instance radialLimitMetricNormedSpace : NormedSpace ℝ (V →L[ℝ] V →L[ℝ] ℝ) := inferInstance |
| 29 | |
| 30 | /-- Actual unit fields whose actual covariant derivatives vanish retain |
| 31 | a unit parallel direction after metric and field jet convergence. -/ |
| 32 | theorem parallel_unit_of_metric_and_field_jets |
| 33 | {gseq : ℕ → RiemannianMetric 3 V} {g : RiemannianMetric 3 V} |
| 34 | (Dseq : ∀ k, LeviCivitaData (gseq k)) (D : LeviCivitaData g) |
| 35 | {Zseq : ℕ → V → V} {Z : V → V} (pseq : ℕ → V) (p : V) |
| 36 | (hZ : ContDiffAt ℝ ∞ Z p) (hZseq : ∀ k, ContDiffAt ℝ ∞ (Zseq k) (pseq k)) |
| 37 | (hmetric : ∀ m ≤ 1, Tendsto |
| 38 | (fun k => iteratedFDeriv ℝ m (gseq k).euclideanCoefficients (pseq k)) atTop |
| 39 | (𝓝 (iteratedFDeriv ℝ m g.euclideanCoefficients p))) |
| 40 | (hfield : ∀ m ≤ 1, Tendsto (fun k => iteratedFDeriv ℝ m (Zseq k) (pseq k)) atTop |
| 41 | (𝓝 (iteratedFDeriv ℝ m Z p))) |
| 42 | (hunit : ∀ᶠ k in atTop, (gseq k).inner (pseq k) |
| 43 | (Zseq k (pseq k)) (Zseq k (pseq k)) = 1) |
| 44 | (hparallel : ∀ ε : ℝ, 0 < ε → ∀ᶠ k in atTop, ∀ w : V, |
| 45 | (gseq k).inner (pseq k) ((Dseq k).connection (Zseq k) (pseq k) w) |
| 46 | ((Dseq k).connection (Zseq k) (pseq k) w) ≤ |
| 47 | ε ^ 2 * (gseq k).inner (pseq k) w w) : |
| 48 | g.inner p (Z p) (Z p) = 1 ∧ ∀ w : V, D.connection Z p w = 0 := by |
| 49 | have hB : Tendsto (fun k => (gseq k).euclideanCoefficients (pseq k)) atTop |
| 50 | (𝓝 (g.euclideanCoefficients p)) := by |
| 51 | have h := ((continuousMultilinearCurryFin0 ℝ V (V →L[ℝ] V →L[ℝ] ℝ)).continuous.tendsto _).comp |
| 52 | (hmetric 0 (by omega)) |
| 53 | simpa only [iteratedFDeriv_zero_eq_comp, Function.comp_def, |
| 54 | LinearIsometryEquiv.apply_symm_apply] using h |
| 55 | have hV : Tendsto (fun k => Zseq k (pseq k)) atTop (𝓝 (Z p)) := by |
| 56 | have h := ((continuousMultilinearCurryFin0 ℝ V V).continuous.tendsto _).comp |
| 57 | (hfield 0 (by omega)) |
| 58 | simpa only [iteratedFDeriv_zero_eq_comp, Function.comp_def, |
| 59 | LinearIsometryEquiv.apply_symm_apply] using h |
| 60 | have hDV : Tendsto (fun k => fderiv ℝ (Zseq k) (pseq k)) atTop |
| 61 | (𝓝 (fderiv ℝ Z p)) := by |
| 62 | let C := continuousMultilinearCurryFin1 ℝ V V |
| 63 | have heq (f : V → V) (x : V) : C (iteratedFDeriv ℝ 1 f x) = fderiv ℝ f x := by |
| 64 | ext v |
| 65 | simp [C, continuousMultilinearCurryFin1_apply, iteratedFDeriv_one_apply] |
| 66 | have h := (C.continuous.tendsto _).comp (hfield 1 le_rfl) |
| 67 | simpa only [Function.comp_def, heq] using h |
| 68 | have hev₁ : Continuous (fun z : (V →L[ℝ] V →L[ℝ] ℝ) × V => z.1 z.2) := |
| 69 | continuous_fst.clm_apply continuous_snd |
| 70 | have hev₂ : Continuous (fun z : (V →L[ℝ] ℝ) × V => z.1 z.2) := |
| 71 | continuous_fst.clm_apply continuous_snd |
| 72 | have hlength := (hev₂.tendsto _).comp |
| 73 | (((hev₁.tendsto _).comp (hB.prodMk_nhds hV)).prodMk_nhds hV) |
| 74 | have hunit' : (fun k => (gseq k).euclideanCoefficients (pseq k) |
| 75 | (Zseq k (pseq k)) (Zseq k (pseq k))) =ᶠ[atTop] (fun _ => (1 : ℝ)) := hunit |
| 76 | refine ⟨tendsto_nhds_unique hlength (tendsto_const_nhds.congr' hunit'.symm), ?_⟩ |
| 77 | intro w |
| 78 | have hGamma : Tendsto |
| 79 | (fun k => (Dseq k).euclideanConnection w (Zseq k (pseq k)) (pseq k)) atTop |
| 80 | (𝓝 (D.euclideanConnection w (Z p) p)) := by |
| 81 | have hj := euclideanConnection_field_jets_tendsto Dseq D pseq p w 0 hZ hZseq |
| 82 | (fun m hm => hmetric m (by omega)) (fun m hm => hfield m (by omega)) |
| 83 | have h := ((continuousMultilinearCurryFin0 ℝ V V).continuous.tendsto _).comp hj |
| 84 | simpa only [iteratedFDeriv_zero_eq_comp, Function.comp_def, |
| 85 | LinearIsometryEquiv.apply_symm_apply] using h |
| 86 | have hconn : Tendsto (fun k => (Dseq k).connection (Zseq k) (pseq k) w) atTop |
| 87 | (𝓝 (D.connection Z p w)) := by |
| 88 | have heq k := (Dseq k).connection_eq_fderiv_add |
| 89 | ((hZseq k).differentiableAt (by simp)) w |
| 90 | have he := D.connection_eq_fderiv_add (hZ.differentiableAt (by simp)) w |
| 91 | have hev : Continuous (fun z : (V →L[ℝ] V) × V => z.1 z.2) := |
| 92 | continuous_fst.clm_apply continuous_snd |
| 93 | have hd := (hev.tendsto _).comp (hDV.prodMk_nhds (tendsto_const_nhds (x := w))) |
| 94 | simpa only [heq, he] using! hd.add hGamma |
| 95 | have hnorm := (hev₂.tendsto _).comp |
| 96 | (((hev₁.tendsto _).comp (hB.prodMk_nhds hconn)).prodMk_nhds hconn) |
| 97 | have hnormw := (hev₂.tendsto _).comp |
| 98 | (((hev₁.tendsto _).comp (hB.prodMk_nhds (tendsto_const_nhds (x := w)))).prodMk_nhds |
| 99 | (tendsto_const_nhds (x := w))) |
| 100 | have hle (ε : ℝ) (hε : 0 < ε) : |
| 101 | g.inner p (D.connection Z p w) (D.connection Z p w) ≤ ε ^ 2 * g.inner p w w := |
| 102 | le_of_tendsto_of_tendsto hnorm (tendsto_const_nhds.mul hnormw) |
| 103 | ((hparallel ε hε).mono fun k hk => hk w) |
| 104 | have hz : Tendsto (fun n : ℕ => (1 / ((n : ℝ) + 1)) ^ 2 * g.inner p w w) |
| 105 | atTop (𝓝 0) := by |
| 106 | simpa using (tendsto_one_div_add_atTop_nhds_zero_nat.pow 2).mul |
| 107 | (tendsto_const_nhds (x := g.inner p w w)) |
| 108 | have hnonpos : g.inner p (D.connection Z p w) (D.connection Z p w) ≤ 0 := |
| 109 | le_of_tendsto_of_tendsto tendsto_const_nhds hz |
| 110 | (Eventually.of_forall fun n => hle _ (by positivity)) |
| 111 | by_contra hne |
| 112 | exact (not_le_of_gt (g.pos p (D.connection Z p w) hne)) hnonpos |
| 113 | |
| 114 | end |
| 115 | |
| 116 | end PoincareMT.M35 |