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.AncientKappa.Compactness.Boundedness.TerminalParameters |
| 2 | import PoincareLib.Geometry.RicciFlow.AncientKappa.Compactness.Boundedness.TerminalScalar |
| 3 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Convergence.Bounds.Initial |
| 4 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Convergence.ParameterRegularity |
| 5 | import PoincareLib.Geometry.RicciFlow.Compactness.Embedding.CompactBallTransfer |
| 6 | |
| 7 | /-! |
| 8 | # Terminal cylinder jets through the actual raw convergence maps |
| 9 | |
| 10 | Finite cylinder jets at time zero of the selected source flows are compared |
| 11 | with the buffered reference slice through the same spatial embeddings. Model |
| 12 | jet bounds and ellipticity are produced by the actual round product limit. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | set_option maxSynthPendingDepth 12 |
| 18 | set_option maxHeartbeats 800000 |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 22 | |
| 23 | namespace PoincareMT.RawAncientSequence |
| 24 | |
| 25 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.measurableSpace |
| 26 | FlowCarrier.borelSpace FlowCarrier.chartedSpace FlowCarrier.isManifold |
| 27 | FlowCarrier.t2Space FlowCarrier.t3Space FlowCarrier.secondCountable |
| 28 | normedAddCommGroupTangentSpaceVectorSpace normedSpaceTangentSpaceVectorSpace |
| 29 | |
| 30 | variable (C : ℕ → FlowCarrier.{0} 3) |
| 31 | (F : ∀ k, RicciFlow 3 (C k).carrier (Iic 0)) (p : ∀ k, (C k).carrier) |
| 32 | |
| 33 | /-- Quantified finite cylinder jets retain the actual terminal source metric, |
| 34 | subsequence, and spatial maps. The uniform constant is chosen before the |
| 35 | buffer and before any actual scalar-normalized round product limit. -/ |
| 36 | theorem exists_terminal_cylinder_jet_constant |
| 37 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 38 | (hc : ∀ k t, t ≤ 0 → MetricComplete ((F k).metric t)) |
| 39 | (hop : ∀ k t, t ≤ 0 → ∀ x, ((F k).connection t).NonnegativeCurvatureOperator x) |
| 40 | (radius : ℕ → ℝ) (hradius : Tendsto radius atTop atTop) |
| 41 | (hbound : ∀ k t, t ≤ 0 → ∀ x ∈ ((F k).metric 0).ball (p k) (radius k), |
| 42 | |((F k).connection t).curvatureTensorNorm x| ≤ 4) |
| 43 | {J : Set ℝ} (hJ : IsCompact J) (d : ℕ) : |
| 44 | ∃ B : ℝ, 0 ≤ B ∧ ∀ {δ s : ℝ}, 0 < δ → δ ≤ 1 → |
| 45 | (1 / 2 : ℝ) ≤ s → s ≤ 1 → |
| 46 | ∀ G : AncientPointedGeometricConvergence C (fun k t => (F k).metric (t - δ)) p δ, |
| 47 | G.limitCarrier.metricComplete (G.limitFlow.metric 0) → |
| 48 | ∀ Φ : RoundCylinderSpace ≃ₘ⟮(𝓡 2).prod 𝓘(ℝ, ℝ), 𝓡 3⟯ G.limitCarrier.carrier, |
| 49 | (fun z v w => s * roundCylinderPullback (G.limitFlow.metric 0) Φ z v w) = |
| 50 | EvolvingRoundCylinderMetric 0 → |
| 51 | ∀ᶠ i in atTop, ∀ q : UnitTwoSphere, ∀ r ∈ J, ∀ j ≤ d, |
| 52 | let e : RoundCylinderCoordinates → (C (G.subsequence i)).carrier := |
| 53 | fun y => G.embedding i (Φ ((chartAt (EuclideanSpace ℝ (Fin 2)) q).symm y.1, y.2)) |
| 54 | ‖iteratedFDeriv ℝ j (((F (G.subsequence i)).metric 0).parametrizedCoefficients e) |
| 55 | (0, r) - |
| 56 | iteratedFDeriv ℝ j (((F (G.subsequence i)).metric (-δ)).parametrizedCoefficients e) |
| 57 | (0, r)‖ ≤ B * δ := by |
| 58 | let K : Set RoundCylinderCoordinates := {0} ×ˢ J |
| 59 | have hK : IsCompact K := isCompact_singleton.prod hJ |
| 60 | have hKU : K ⊆ Metric.ball (0 : EuclideanSpace ℝ (Fin 2)) (1 / 2) ×ˢ univ := by |
| 61 | rintro x ⟨hx, _⟩ |
| 62 | exact ⟨by simpa only [mem_singleton_iff.mp hx] using |
| 63 | (Metric.mem_ball_self (by norm_num : (0 : ℝ) < 1 / 2)), mem_univ _⟩ |
| 64 | obtain ⟨Z, hZ, hinit⟩ := |
| 65 | PointedGeometricConvergence.exists_eventual_cylinder_parametrized_jet_bounds |
| 66 | hK hKU (by norm_num : (0 : ℝ) < 1 / 2) |
| 67 | let A : EuclideanSpace ℝ (Fin 3) ≃L[ℝ] RoundCylinderCoordinates := |
| 68 | ContinuousLinearEquiv.ofFinrankEq (by simp) |
| 69 | obtain ⟨B, hB, htime⟩ := exists_eventually_terminal_parametrizedJet_time_constant C F p |
| 70 | P hc hop radius hradius hbound A d Z (a := 1 / 2) (b := 7) (by norm_num) (by norm_num) |
| 71 | refine ⟨B, hB, ?_⟩ |
| 72 | intro δ s hδ hδone hs hsone G hcomplete Φ hround |
| 73 | let Fseq (k : ℕ) := (F k).bufferedExpandingFlow δ |
| 74 | have hab : (-1 : ℝ) < δ / 2 := by linarith |
| 75 | have hbδ : δ / 2 ≤ δ := by linarith |
| 76 | have hsub : ∀ k : ℕ, Ioo (-1) (δ / 2) ⊆ (fun t : ℝ => t - δ) ⁻¹' Iic 0 := by |
| 77 | intro k t ht |
| 78 | change t - δ ≤ 0 |
| 79 | linarith [ht.2] |
| 80 | let W := G.window Fseq hab hbδ 0 hsub |
| 81 | have hzero : (-1 : ℝ) < 0 ∧ 0 < δ / 2 := ⟨by norm_num, by linarith⟩ |
| 82 | have hcompact : IsCompact (Φ '' (univ ×ˢ J)) := |
| 83 | (isCompact_univ.prod hJ).image Φ.continuous |
| 84 | obtain ⟨R, hR, hdist⟩ := W.exists_pos_eventually_image_subset_ballAt |
| 85 | hzero hzero hcomplete hcompact |
| 86 | have hterminaldist : ∀ᶠ i in atTop, ∀ x ∈ Φ '' (univ ×ˢ J), |
| 87 | ((F (G.subsequence i)).metric 0).edist (p (G.subsequence i)) |
| 88 | (G.embedding i x) ≤ ENNReal.ofReal R := by |
| 89 | filter_upwards [hdist] with i hi x hx |
| 90 | have h := hi (mem_image_of_mem (fun y => ((W.embedding i).toFun (0, y)).2) hx) |
| 91 | change G.embedding i x ∈ ((F (G.subsequence i)).metric (0 + -δ)).ball |
| 92 | (p (G.subsequence i)) R at h |
| 93 | rw [zero_add] at h |
| 94 | exact (ball_subset_terminal C F P hop (G.subsequence i) (-δ) (by linarith) |
| 95 | (p (G.subsequence i)) R h).le |
| 96 | have hinitial := hinit W hzero Φ.contMDiff hzero hs hround d |
| 97 | have helliptic := W.eventually_cylinder_parametrized_center_ellipticity |
| 98 | hzero Φ.contMDiff hzero (rmin := 1 / 2) (rmax := 1) |
| 99 | (by norm_num) hs hsone hround hJ |
| 100 | filter_upwards [G.subsequence_strictMono.tendsto_atTop.eventually (htime R hR.le), |
| 101 | hinitial, helliptic, W.eventually_cylinder_parametrizations_regular hzero Φ hK, |
| 102 | hterminaldist] with i ht hi hell hreg hd q r hr j hj |
| 103 | obtain ⟨U, hU, hKU', hmap, hinvert⟩ := hreg q |
| 104 | let e : RoundCylinderCoordinates → (C (G.subsequence i)).carrier := |
| 105 | fun y => G.embedding i (Φ ((chartAt (EuclideanSpace ℝ (Fin 2)) q).symm y.1, y.2)) |
| 106 | have hx : (0, r) ∈ U := hKU' ⟨rfl, hr⟩ |
| 107 | have hd' : ((F (G.subsequence i)).metric 0).edist (p (G.subsequence i)) (e (0, r)) ≤ |
| 108 | ENNReal.ofReal R := by |
| 109 | simpa only [e, Poincare.Geometry.Riemannian.SpaceForm.sphere_chart_symm_zero] using |
| 110 | hd (Φ (q, r)) (mem_image_of_mem Φ ⟨mem_univ _, hr⟩) |
| 111 | apply ht hU hmap hinvert hδ hδone hx hd' ?_ ?_ j hj |
| 112 | · intro v |
| 113 | have h := hell q r hr v |
| 114 | change (1 : ℝ)⁻¹ / 2 * ‖v‖ ^ 2 ≤ |
| 115 | ((F (G.subsequence i)).metric (0 + -δ)).parametrizedCoefficients e (0, r) v v ∧ |
| 116 | ((F (G.subsequence i)).metric (0 + -δ)).parametrizedCoefficients e (0, r) v v ≤ |
| 117 | (3 * (1 / 2 : ℝ)⁻¹ + 1) * ‖v‖ ^ 2 at h |
| 118 | norm_num at h |
| 119 | exact h |
| 120 | · intro l hl |
| 121 | have h := hi l hl q (0, r) ⟨rfl, hr⟩ |
| 122 | change ‖iteratedFDeriv ℝ l |
| 123 | (((F (G.subsequence i)).metric (0 + -δ)).parametrizedCoefficients e) (0, r)‖ ≤ Z l at h |
| 124 | rwa [zero_add] at h |
| 125 | |
| 126 | end PoincareMT.RawAncientSequence |