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.Persistence.Removal.Terminal.TerminalMetricJets |
| 2 | |
| 3 | /-! |
| 4 | # Actual terminal metric values in fixed reference maps |
| 5 | |
| 6 | The primitive regular limit determines the metric on every tangent |
| 7 | pair, and hence on every smooth fixed preterminal pullback. Eventual |
| 8 | quadratic bounds pass to the actual terminal metric. |
| 9 | Morgan--Tian, Claim 16.10, p. 375; M44 derivation 74. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M44 |
| 21 | |
| 22 | open SpacetimeBounds |
| 23 | |
| 24 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 25 | |
| 26 | noncomputable local instance terminalMetricCoefficientNorm : |
| 27 | NormedAddCommGroup (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 28 | |
| 29 | noncomputable local instance terminalMetricCoefficientSpace : |
| 30 | NormedSpace ℝ (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 31 | |
| 32 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 33 | normedSpaceTangentSpaceVectorSpace |
| 34 | |
| 35 | variable {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 36 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 37 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 38 | |
| 39 | /-- The actual coefficient two-jet at a regular point converges |
| 40 | to the terminal metric through its actual identification. |
| 41 | Source: Claim 16.10, p. 375; M44 derivation 74. -/ |
| 42 | theorem tendsto_preterminal_twoJet |
| 43 | (event : SurgeryEventData g0 K P slice metric T) |
| 44 | {q : (slice event.tMinus).carrier} (hq : q ∈ event.regular_limit) : |
| 45 | Tendsto (fun t => metricTwoJet |
| 46 | ((event.pre_flow.metric t).pullbackCoefficients (extChartAt (𝓡 3) q).symm) |
| 47 | (extChartAt (𝓡 3) q q)) (𝓝[<] T) |
| 48 | (𝓝 (metricTwoJet (event.limit_metric.pullbackCoefficients |
| 49 | (event.limit_identify.map ∘ (extChartAt (𝓡 3) q).symm)) (extChartAt (𝓡 3) q q))) := by |
| 50 | let c := extChartAt (𝓡 3) q |
| 51 | let U := c.target ∩ c.symm ⁻¹' event.regular_limit |
| 52 | have hU : IsOpen U := |
| 53 | (contMDiffOn_extChartAt_symm (I := 𝓡 3) (n := ∞) q).continuousOn.isOpen_inter_preimage |
| 54 | (isOpen_extChartAt_target q) event.regular_limit_open |
| 55 | have hchart : U ⊆ c.target := inter_subset_left |
| 56 | have hregular : c.symm '' U ⊆ event.regular_limit := by |
| 57 | rintro _ ⟨x, hx, rfl⟩ |
| 58 | exact hx.2 |
| 59 | have hc := (contMDiffOn_extChartAt_symm (I := 𝓡 3) (n := ∞) q).mono hchart |
| 60 | have hf := event.limit_identify.map_smooth.comp hc (fun x hx => hx.2) |
| 61 | have hx : c q ∈ U := ⟨c.map_source (mem_extChartAt_source q), by |
| 62 | change c.symm (c q) ∈ event.regular_limit |
| 63 | rwa [c.left_inv (mem_extChartAt_source q)]⟩ |
| 64 | exact tendsto_twoJet_of_surgeryMetricLimitOn event.metric_converges q hq |
| 65 | hU hchart hregular hf hx |
| 66 | |
| 67 | /-- Both tangent slots of the actual preterminal metric converge |
| 68 | through the primitive regular identification. Source: Claim 16.10, |
| 69 | p. 375; M44 derivation 74. -/ |
| 70 | theorem tendsto_preterminal_metric_inner |
| 71 | (event : SurgeryEventData g0 K P slice metric T) |
| 72 | {q : (slice event.tMinus).carrier} (hq : q ∈ event.regular_limit) |
| 73 | (v w : TangentSpace (𝓡 3) q) : |
| 74 | Tendsto (fun t => (event.pre_flow.metric t).inner q v w) (𝓝[<] T) |
| 75 | (𝓝 (event.limit_metric.inner (event.limit_identify.map q) |
| 76 | (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map q v) |
| 77 | (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map q w))) := by |
| 78 | let c := extChartAt (𝓡 3) q |
| 79 | let p := c q |
| 80 | have hp : p ∈ c.target := c.map_source (mem_extChartAt_source q) |
| 81 | have hcp : c.symm p = q := c.left_inv (mem_extChartAt_source q) |
| 82 | have hi : (mfderiv (𝓡 3) (𝓡 3) c.symm p).IsInvertible := by |
| 83 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 84 | isInvertible_mfderivWithin_extChartAt_symm hp |
| 85 | obtain ⟨a, ha⟩ := hi.surjective v |
| 86 | obtain ⟨b, hb⟩ := hi.surjective w |
| 87 | have hc := (contMDiffOn_extChartAt_symm (I := 𝓡 3) (n := ∞) q).contMDiffAt |
| 88 | ((isOpen_extChartAt_target q).mem_nhds hp) |
| 89 | have hl := event.limit_identify.map_smooth.contMDiffAt |
| 90 | (event.regular_limit_open.mem_nhds (show c.symm p ∈ event.regular_limit by rwa [hcp])) |
| 91 | have hderiv := mfderiv_comp p (hl.mdifferentiableAt (by simp)) |
| 92 | (hc.mdifferentiableAt (by simp)) |
| 93 | have hread (t : ℝ) : (event.pre_flow.metric t).pullbackCoefficients c.symm p a b = |
| 94 | (event.pre_flow.metric t).inner q v w := by |
| 95 | change (event.pre_flow.metric t).inner (c.symm p) |
| 96 | (mfderiv (𝓡 3) (𝓡 3) c.symm p a) (mfderiv (𝓡 3) (𝓡 3) c.symm p b) = _ |
| 97 | rw [ha, hb, hcp] |
| 98 | have hreadT : event.limit_metric.pullbackCoefficients |
| 99 | (event.limit_identify.map ∘ c.symm) p a b = |
| 100 | event.limit_metric.inner (event.limit_identify.map q) |
| 101 | (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map q v) |
| 102 | (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map q w) := by |
| 103 | change event.limit_metric.inner (event.limit_identify.map (c.symm p)) |
| 104 | (mfderiv (𝓡 3) (𝓡 3) (event.limit_identify.map ∘ c.symm) p a) |
| 105 | (mfderiv (𝓡 3) (𝓡 3) (event.limit_identify.map ∘ c.symm) p b) = _ |
| 106 | rw [hderiv] |
| 107 | change event.limit_metric.inner (event.limit_identify.map (c.symm p)) |
| 108 | (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map (c.symm p) |
| 109 | (mfderiv (𝓡 3) (𝓡 3) c.symm p a)) |
| 110 | (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map (c.symm p) |
| 111 | (mfderiv (𝓡 3) (𝓡 3) c.symm p b)) = _ |
| 112 | rw [ha, hb, hcp] |
| 113 | have hconv : Tendsto (fun t => (event.pre_flow.metric t).pullbackCoefficients c.symm p) |
| 114 | (𝓝[<] T) (𝓝 (event.limit_metric.pullbackCoefficients |
| 115 | (event.limit_identify.map ∘ c.symm) p)) := |
| 116 | continuous_fst.continuousAt.tendsto.comp (tendsto_preterminal_twoJet event hq) |
| 117 | have heval := (ContinuousLinearMap.apply ℝ ℝ b).continuous.continuousAt.tendsto.comp |
| 118 | ((ContinuousLinearMap.apply ℝ (E →L[ℝ] ℝ) a).continuous.continuousAt.tendsto.comp hconv) |
| 119 | change Tendsto (fun t => (event.pre_flow.metric t).pullbackCoefficients c.symm p a b) |
| 120 | (𝓝[<] T) (𝓝 (event.limit_metric.pullbackCoefficients |
| 121 | (event.limit_identify.map ∘ c.symm) p a b)) at heval |
| 122 | simpa only [hread, hreadT] using heval |
| 123 | |
| 124 | /-- Every smooth fixed reference map has the actual terminal |
| 125 | metric pullback as its left limit, with both differentiated |
| 126 | tangent slots. Source: Claim 16.10; M44 derivation 74. -/ |
| 127 | theorem tendsto_preterminal_pullback_inner |
| 128 | (event : SurgeryEventData g0 K P slice metric T) |
| 129 | {f : E → (slice event.tMinus).carrier} {x : E} |
| 130 | (hf : ContMDiffAt (𝓡 3) (𝓡 3) ∞ f x) (hx : f x ∈ event.regular_limit) |
| 131 | (v w : E) : |
| 132 | Tendsto (fun t => (event.pre_flow.metric t).pullbackCoefficients f x v w) (𝓝[<] T) |
| 133 | (𝓝 (event.limit_metric.pullbackCoefficients (event.limit_identify.map ∘ f) x v w)) := by |
| 134 | have hl := event.limit_identify.map_smooth.contMDiffAt (event.regular_limit_open.mem_nhds hx) |
| 135 | have hd := mfderiv_comp x (hl.mdifferentiableAt (by simp)) (hf.mdifferentiableAt (by simp)) |
| 136 | have h := tendsto_preterminal_metric_inner event hx |
| 137 | (mfderiv (𝓡 3) (𝓡 3) f x v) (mfderiv (𝓡 3) (𝓡 3) f x w) |
| 138 | change Tendsto (fun t => (event.pre_flow.metric t).inner (f x) |
| 139 | (mfderiv (𝓡 3) (𝓡 3) f x v) (mfderiv (𝓡 3) (𝓡 3) f x w)) (𝓝[<] T) |
| 140 | (𝓝 (event.limit_metric.inner (event.limit_identify.map (f x)) |
| 141 | (mfderiv (𝓡 3) (𝓡 3) (event.limit_identify.map ∘ f) x v) |
| 142 | (mfderiv (𝓡 3) (𝓡 3) (event.limit_identify.map ∘ f) x w))) |
| 143 | rw [hd] |
| 144 | exact h |
| 145 | |
| 146 | /-- Eventual quadratic upper bounds hold for the actual |
| 147 | terminal pullback at every regular reference point. Source: |
| 148 | Claim 16.10, p. 375; M44 derivation 74. -/ |
| 149 | theorem terminal_pullback_quadratic_le |
| 150 | (event : SurgeryEventData g0 K P slice metric T) |
| 151 | {f : E → (slice event.tMinus).carrier} {x : E} |
| 152 | (hf : ContMDiffAt (𝓡 3) (𝓡 3) ∞ f x) (hx : f x ∈ event.regular_limit) |
| 153 | (v : E) {L : ℝ} (hbound : ∀ᶠ t in 𝓝[<] T, |
| 154 | (event.pre_flow.metric t).pullbackCoefficients f x v v ≤ L) : |
| 155 | event.limit_metric.pullbackCoefficients (event.limit_identify.map ∘ f) x v v ≤ L := |
| 156 | le_of_tendsto (tendsto_preterminal_pullback_inner event hf hx v v) hbound |
| 157 | |
| 158 | end PoincareMT.M44 |