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