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.CanonicalInduction.Limit.Finite.LimitFiniteEndpointExtraction |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Germs.TerminalGermsMetricRealization |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.LocalFlows |
| 4 | |
| 5 | /-! |
| 6 | # An actual local Ricci flow across the missing finite time |
| 7 | |
| 8 | Positive extracted coefficients realize the metric. The given source |
| 9 | flows and their actual mixed jets supply the Ricci equation on the same |
| 10 | canonical ball. MT Proposition 17.1; endpoint-extraction.md, AG3. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter Poincare.Gluing |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M47 |
| 22 | |
| 23 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 24 | local notation "V" => E →L[ℝ] E →L[ℝ] ℝ |
| 25 | |
| 26 | private noncomputable local instance finiteEndpointFlowDualAdd : |
| 27 | NormedAddCommGroup (E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 28 | private noncomputable local instance finiteEndpointFlowDualSpace : |
| 29 | NormedSpace ℝ (E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace |
| 30 | private noncomputable local instance finiteEndpointFlowBilinAdd : |
| 31 | NormedAddCommGroup V := ContinuousLinearMap.toNormedAddCommGroup |
| 32 | private noncomputable local instance finiteEndpointFlowBilinSpace : |
| 33 | NormedSpace ℝ V := ContinuousLinearMap.toNormedSpace |
| 34 | |
| 35 | /-- The same positive mixed-jet limit of actual source flows is a Ricci |
| 36 | flow on a two-sided neighborhood of the missing raw time. -/ |
| 37 | theorem limitFinite_endpoint_chart_flow |
| 38 | {M : Type u} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 39 | {T d R ρ a : ℝ} (hd : 0 < d) (hc : -T + d / 4 ≤ 0) |
| 40 | (hρ : 0 < ρ) (hρR : ρ < R) (ha : 0 < a) |
| 41 | (A : ℕ → RicciFlow 3 M (Icc (-(T + d / 2)) 0)) |
| 42 | (Φ : PartialDiffeomorph (𝓡 3) (𝓡 3) E M ∞) |
| 43 | (hsource : Φ.source = Metric.ball 0 R) |
| 44 | (B : ℝ × E → V) |
| 45 | (hB : ContDiffOn ℝ ∞ B (Ioo (-((3 * d / 4) / 2)) 0 ×ˢ Metric.ball 0 ρ)) |
| 46 | (hsymm : ∀ p ∈ Ioo (-((3 * d / 4) / 2)) 0 ×ˢ Metric.ball 0 ρ, |
| 47 | ∀ v w, B p v w = B p w v) |
| 48 | (hlower : ∀ p ∈ Ioo (-((3 * d / 4) / 2)) 0 ×ˢ Metric.ball 0 ρ, |
| 49 | ∀ v, a * ‖v‖ ^ 2 ≤ B p v v) |
| 50 | (hjets : ∀ m C, IsCompact C → |
| 51 | C ⊆ Ioo (-((3 * d / 4) / 2)) 0 ×ˢ Metric.ball 0 ρ → TendstoUniformlyOn |
| 52 | (fun k => iteratedFDeriv ℝ m (fun p : ℝ × E => |
| 53 | ((A k).metric (p.1 + (-T + d / 4))).pullbackCoefficients Φ p.2)) |
| 54 | (iteratedFDeriv ℝ m B) atTop C) : |
| 55 | let W := fun _ : Unit => Metric.ball (0 : E) ρ |
| 56 | let hW : ∀ i, IsOpen (W i) := fun _ => Metric.isOpen_ball |
| 57 | letI : Nonempty (W ()) := ⟨⟨0, Metric.mem_ball_self hρ⟩⟩ |
| 58 | letI := (hW ()).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 59 | letI := (hW ()).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 3) (n := ∞) |
| 60 | ∃ F : RicciFlow 3 (Piece W ()) (Ioo (-T - d / 8) (-T + d / 4)), |
| 61 | -T ∈ Ioo (-T - d / 8) (-T + d / 4) ∧ |
| 62 | ∀ t ∈ Ioo (-T - d / 8) (-T + d / 4), ∀ (x : Piece W ()) v w, |
| 63 | (F.metric t).inner x v w = B (t - (-T + d / 4), x) v w := by |
| 64 | classical |
| 65 | let W := fun _ : Unit => Metric.ball (0 : E) ρ |
| 66 | let hW : ∀ i, IsOpen (W i) := fun _ => Metric.isOpen_ball |
| 67 | let : Nonempty (W ()) := ⟨⟨0, Metric.mem_ball_self hρ⟩⟩ |
| 68 | let : ∀ i, Nonempty (Piece W i) := fun _ => ⟨⟨0, Metric.mem_ball_self hρ⟩⟩ |
| 69 | let := (hW ()).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 70 | let := (hW ()).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 3) (n := ∞) |
| 71 | let J := Ioo (-((3 * d / 4) / 2)) 0 |
| 72 | let c := -T + d / 4 |
| 73 | have ht0 : -d / 4 ∈ J := ⟨by linarith, by linarith⟩ |
| 74 | obtain ⟨g0, hg0⟩ := ChartDistance.exists_canonicalMetric_of_coordinate_limit W hW |
| 75 | (fun _ z => B (-d / 4, z)) (fun z => B (-d / 4, z)) () |
| 76 | (hB.comp (contDiffOn_const.prodMk contDiffOn_id) (fun z hz => ⟨ht0, hz⟩)) |
| 77 | (fun _ z hz v w => hsymm (-d / 4, z) ⟨ht0, hz⟩ v w) |
| 78 | (fun _ _ _ _ => tendsto_const_nhds) |
| 79 | (fun z hz => ⟨a, ha, Eventually.of_forall fun _ v => hlower (-d / 4, z) ⟨ht0, hz⟩ v⟩) |
| 80 | obtain ⟨g, hg, hcoeff, _hg0⟩ := terminalGerms_realize_chart_metric W hW () ht0 |
| 81 | (fun _ => B) B hB (fun _ t ht z hz v w => hsymm (t, z) ⟨ht, hz⟩ v w) |
| 82 | (fun _ _ _ _ _ _ => tendsto_const_nhds) |
| 83 | (fun t ht z hz => ⟨a, ha, Eventually.of_forall fun _ v => hlower (t, z) ⟨ht, hz⟩ v⟩) |
| 84 | g0 hg0 |
| 85 | let e : Piece W () → M := fun x => Φ x |
| 86 | have he : IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ e := by |
| 87 | intro x |
| 88 | have hx : (x : E) ∈ Φ.source := by |
| 89 | rw [hsource] |
| 90 | exact Metric.ball_subset_ball hρR.le x.property |
| 91 | exact (Poincare.isLocalDiffeomorph_subtypeVal (𝓡 3) (W ()) (hW ()) ∞ x).comp |
| 92 | (𝓡 3) M (Φ.isLocalDiffeomorphAt (𝓡 3) (𝓡 3) ∞ hx) |
| 93 | have hnear (z : E) (hz : z ∈ W ()) : |
| 94 | ChartDistance.chartParametrization W hW e =ᶠ[𝓝 z] Φ := by |
| 95 | filter_upwards [(hW ()).mem_nhds hz] with y hy |
| 96 | exact ChartDistance.chartParametrization_apply W hW e ⟨y, hy⟩ |
| 97 | have hmap : (fun s : ℝ => s + c) '' J ⊆ Icc (-(T + d / 2)) 0 := by |
| 98 | rintro _ ⟨s, hs, rfl⟩ |
| 99 | dsimp [J, c] at hs ⊢ |
| 100 | constructor <;> linarith [hs.1, hs.2] |
| 101 | have hne : J.Nontrivial := by |
| 102 | exact ⟨-d / 4, ht0, -d / 8, ⟨by linarith, by linarith⟩, by linarith⟩ |
| 103 | let A' : ℕ → RicciFlow 3 M J := fun k => (A k).translate c hmap ordConnected_Ioo hne |
| 104 | have hactual (k : ℕ) : EqOn |
| 105 | (fun p : ℝ × E => ((A k).metric (p.1 + c)).pullbackCoefficients Φ p.2) |
| 106 | (fun p : ℝ × E => ((A' k).metric p.1).pullbackCoefficients |
| 107 | (ChartDistance.chartParametrization W hW e) p.2) (J ×ˢ W ()) := by |
| 108 | intro p hp |
| 109 | have hn := hnear p.2 hp.2 |
| 110 | change ((A k).metric (p.1 + c)).pullbackCoefficients Φ p.2 = |
| 111 | ((A k).metric (p.1 + c)).pullbackCoefficients |
| 112 | (ChartDistance.chartParametrization W hW e) p.2 |
| 113 | unfold RiemannianMetric.pullbackCoefficients |
| 114 | rw [hn.self_of_nhds, hn.mfderiv_eq] |
| 115 | have hjetActual : ∀ m C, IsCompact C → C ⊆ J ×ˢ W () → TendstoUniformlyOn |
| 116 | (fun k => iteratedFDeriv ℝ m (fun p : ℝ × E => |
| 117 | ((A' k).metric p.1).pullbackCoefficients |
| 118 | (ChartDistance.chartParametrization W hW e) p.2)) |
| 119 | (iteratedFDeriv ℝ m B) atTop C := by |
| 120 | intro m C hC hCΩ |
| 121 | exact (hjets m C hC hCΩ).congr (Eventually.of_forall fun k => |
| 122 | (Poincare.Analysis.Calculus.eqOn_iteratedFDeriv_of_isOpen |
| 123 | (isOpen_Ioo.prod (hW ())) (hactual k) m).mono hCΩ) |
| 124 | obtain ⟨Fchart, hFchart⟩ := ChartDistance.exists_ricciFlow_on_coordinate_limit W hW |
| 125 | isOpen_Ioo A' () (fun _ => e) (fun _ => he) g hg B hcoeff hjetActual |
| 126 | let Jraw := Ioo (-T - d / 8) (-T + d / 4) |
| 127 | have hrawmap : (fun t : ℝ => t + -c) '' Jraw ⊆ J := by |
| 128 | rintro _ ⟨t, ht, rfl⟩ |
| 129 | dsimp [Jraw, J, c] at ht ⊢ |
| 130 | constructor <;> linarith [ht.1, ht.2] |
| 131 | have hrawne : Jraw.Nontrivial := by |
| 132 | exact ⟨-T, ⟨by linarith, by linarith⟩, -T + d / 8, |
| 133 | ⟨by linarith, by linarith⟩, by linarith⟩ |
| 134 | let F := Fchart.translate (-c) hrawmap ordConnected_Ioo hrawne |
| 135 | refine ⟨F, ⟨by linarith, by linarith⟩, ?_⟩ |
| 136 | intro t ht x v w |
| 137 | change (Fchart.metric (t + -c)).inner x v w = B (t - c, x) v w |
| 138 | rw [hFchart] |
| 139 | simpa only [sub_eq_add_neg] using hcoeff (t + -c) (hrawmap ⟨t, ht, rfl⟩) x v w |
| 140 | |
| 141 | end PoincareMT.M47 |