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.Limit.Retained.RetainedMetricLimit |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Coordinates.SpacetimeBounds.BilinearJets |
| 3 | import Mathlib.Data.Finset.Lattice.Fold |
| 4 | |
| 5 | /-! |
| 6 | # Retained convergence of the full bilinear metric jets |
| 7 | |
| 8 | The primitive scalar-component convergence determines compact-uniform |
| 9 | convergence of every bilinear spatial jet. The finite basis estimate |
| 10 | uses the actual smooth pullback coefficients on the retained interior. |
| 11 | Morgan--Tian, Proposition 16.5, pp. 374-375; see M44 derivation 51. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | -- Bilinear-valued iterated derivatives have nested operator instances. |
| 17 | set_option maxSynthPendingDepth 12 |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M44 |
| 25 | |
| 26 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 27 | local notation "Bilin" => E →L[ℝ] E →L[ℝ] ℝ |
| 28 | local notation "basis" => EuclideanSpace.basisFun (Fin 3) ℝ |
| 29 | |
| 30 | noncomputable local instance retainedBilinearNorm : NormedAddCommGroup Bilin := |
| 31 | ContinuousLinearMap.toNormedAddCommGroup |
| 32 | |
| 33 | noncomputable local instance retainedBilinearSpace : NormedSpace ℝ Bilin := |
| 34 | ContinuousLinearMap.toNormedSpace |
| 35 | |
| 36 | /-- Every compact-uniform scalar metric limit is a compact-uniform |
| 37 | limit of its full bilinear spatial jets on a smooth coordinate |
| 38 | domain. Source: retained transport in Proposition 16.5; derivation 51. -/ |
| 39 | theorem bilinear_jets_of_surgeryMetricLimitOn |
| 40 | {A B : GeneralizedSliceCarrier.{u}} |
| 41 | {g : ℝ → RiemannianMetric 3 A.carrier} {gT : RiemannianMetric 3 B.carrier} |
| 42 | {f : A.carrier → B.carrier} {V : Set A.carrier} {T : ℝ} |
| 43 | (hlim : SurgeryMetricLimitOn A B g gT f V T) |
| 44 | (q : A.carrier) (hq : q ∈ V) {U : Set E} (hU : IsOpen U) |
| 45 | (hchart : U ⊆ (extChartAt (𝓡 3) q).target) |
| 46 | (hV : (extChartAt (𝓡 3) q).symm '' U ⊆ V) |
| 47 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ (f ∘ (extChartAt (𝓡 3) q).symm) U) |
| 48 | (k : ℕ) {K : Set E} (hK : IsCompact K) (hKU : K ⊆ U) |
| 49 | {eta : ℝ} (heta : 0 < eta) : |
| 50 | ∃ d : ℝ, 0 < d ∧ ∀ t : ℝ, T - d < t → t < T → ∀ x ∈ K, |
| 51 | ‖iteratedFDeriv ℝ k ((g t).pullbackCoefficients (extChartAt (𝓡 3) q).symm) x - |
| 52 | iteratedFDeriv ℝ k (gT.pullbackCoefficients |
| 53 | (f ∘ (extChartAt (𝓡 3) q).symm)) x‖ < eta := by |
| 54 | classical |
| 55 | have hsmall : 0 < eta / 10 := div_pos heta (by norm_num) |
| 56 | have hKV : (extChartAt (𝓡 3) q).symm '' K ⊆ V := (image_mono hKU).trans hV |
| 57 | choose d hd hbound using fun i j : Fin 3 => |
| 58 | hlim q hq K hK (hKU.trans hchart) hKV k i j (eta / 10) hsmall |
| 59 | let delta := Finset.univ.inf' Finset.univ_nonempty |
| 60 | (fun p : Fin 3 × Fin 3 => d p.1 p.2) |
| 61 | have hdelta : 0 < delta := |
| 62 | (Finset.lt_inf'_iff _).mpr (fun p _ => hd p.1 p.2) |
| 63 | have hle (i j : Fin 3) : delta ≤ d i j := |
| 64 | Finset.inf'_le _ (Finset.mem_univ (i, j)) |
| 65 | refine ⟨delta, hdelta, ?_⟩ |
| 66 | intro t ht hT x hx |
| 67 | have hc := ((g t).contDiffOn_chartCoefficients q).contDiffAt |
| 68 | ((isOpen_extChartAt_target q).mem_nhds (hchart (hKU hx))) |
| 69 | have hf' := gT.contDiffAt_pullbackCoefficients (hf.contMDiffAt (hU.mem_nhds (hKU hx))) |
| 70 | have hk : (k : ℕ∞ω) ≤ ∞ := by exact_mod_cast le_top |
| 71 | rw [← iteratedFDeriv_sub_apply (hc.of_le hk) (hf'.of_le hk)] |
| 72 | have hcomponents (i j : Fin 3) : |
| 73 | ‖iteratedFDeriv ℝ k (fun y => |
| 74 | (((g t).pullbackCoefficients (extChartAt (𝓡 3) q).symm - |
| 75 | gT.pullbackCoefficients (f ∘ (extChartAt (𝓡 3) q).symm)) y) (basis i) (basis j)) |
| 76 | x‖ ≤ eta / 10 := by |
| 77 | have hc' := (hc.clm_apply (contDiffAt_const (c := basis i))).clm_apply |
| 78 | (contDiffAt_const (c := basis j)) |
| 79 | have hf'' := (hf'.clm_apply (contDiffAt_const (c := basis i))).clm_apply |
| 80 | (contDiffAt_const (c := basis j)) |
| 81 | change ‖iteratedFDeriv ℝ k (fun y => |
| 82 | ((g t).pullbackCoefficients (extChartAt (𝓡 3) q).symm y) (basis i) (basis j) - |
| 83 | (gT.pullbackCoefficients (f ∘ (extChartAt (𝓡 3) q).symm) y) |
| 84 | (basis i) (basis j)) x‖ ≤ eta / 10 |
| 85 | rw [fun_iteratedFDeriv_sub_apply (hc'.of_le hk) (hf''.of_le hk)] |
| 86 | exact (hbound i j t (by linarith [hle i j]) hT x hx).le |
| 87 | have hnorm := SpacetimeBounds.norm_iteratedFDeriv_bilinear_le_of_components |
| 88 | basis (hc.sub hf') k hcomponents |
| 89 | exact hnorm.trans_lt (by norm_num; linarith) |
| 90 | |
| 91 | /-- The actual retained post-surgery pullback is the full bilinear |
| 92 | spatial limit of the preterminal flow. Source: Proposition 16.5, |
| 93 | pp. 374-375; M44 derivation 51. -/ |
| 94 | theorem retained_bilinear_jet_limit |
| 95 | {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 96 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 97 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 98 | (event : SurgeryEventData g0 K P slice metric T) |
| 99 | (q : (slice event.tMinus).carrier) (hq : q ∈ interior event.retained_pre) |
| 100 | {U : Set E} (hU : IsOpen U) (hchart : U ⊆ (extChartAt (𝓡 3) q).target) |
| 101 | (hret : (extChartAt (𝓡 3) q).symm '' U ⊆ interior event.retained_pre) |
| 102 | (k : ℕ) {L : Set E} (hL : IsCompact L) (hLU : L ⊆ U) |
| 103 | {eta : ℝ} (heta : 0 < eta) : |
| 104 | ∃ d : ℝ, 0 < d ∧ ∀ t : ℝ, T - d < t → t < T → ∀ x ∈ L, |
| 105 | ‖iteratedFDeriv ℝ k |
| 106 | ((event.pre_flow.metric t).pullbackCoefficients (extChartAt (𝓡 3) q).symm) x - |
| 107 | iteratedFDeriv ℝ k ((metric T).pullbackCoefficients |
| 108 | (event.retention.map ∘ (extChartAt (𝓡 3) q).symm)) x‖ < eta := by |
| 109 | apply bilinear_jets_of_surgeryMetricLimitOn (metric_converges_retention event) |
| 110 | q hq hU hchart hret _ k hL hLU heta |
| 111 | exact (event.retention.map_smooth.mono interior_subset).comp |
| 112 | ((contMDiffOn_extChartAt_symm q).mono hchart) |
| 113 | (fun x hx => hret (mem_image_of_mem _ hx)) |
| 114 | |
| 115 | end PoincareMT.M44 |