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.Comparison.Initial.AdjustedMetricConvergence |
| 2 | |
| 3 | /-! |
| 4 | # Comparison certificates for the actual exact-ball charts |
| 5 | |
| 6 | The smooth exponential chart and its intrinsic jet bound give a new |
| 7 | M36-shaped comparison certificate for the same physical metric. This |
| 8 | retains the literal physical map and all its nested ball images. |
| 9 | Morgan--Tian, Corollary 16.7, p. 372; see derivation 23. |
| 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 | local notation "E" => StandardCapSpace |
| 23 | |
| 24 | /-- An exact-ball smooth chart with the actual normalized intrinsic |
| 25 | bound gives a `SurgeryCapClose` for precisely that chart and inverse. |
| 26 | Source: Corollary 16.7, p. 372. -/ |
| 27 | theorem comparison_of_exactBall_chart |
| 28 | {g₀ : StandardInitialMetric} {S : GeneralizedSliceCarrier.{u}} |
| 29 | {g : RiemannianMetric 3 S.carrier} {tip : S.carrier} {scale eta : ℝ} |
| 30 | (hscale : 0 < scale) (heta : 0 < eta) |
| 31 | (C : PartialDiffeomorph (𝓡 3) (𝓡 3) E S.carrier ∞) |
| 32 | (hsource : C.source = g₀.metric.ball 0 eta⁻¹) |
| 33 | (htarget : C.target = g.ball tip (scale * eta⁻¹)) (htip : C 0 = tip) |
| 34 | (hjets : ∃ bound : ℝ, bound < eta ^ 2 ∧ ∀ x ∈ g₀.metric.ball 0 eta⁻¹, |
| 35 | singularMetricJetErrorSquared g₀.metric g₀.connection |
| 36 | (fun y v => scale⁻¹ ^ 2 * surgeryCapPullback g C y v) ⌊eta⁻¹⌋₊ x ≤ bound) : |
| 37 | ∃ Q : SurgeryCapClose g₀ S g tip scale eta, |
| 38 | Q.map = C ∧ Q.inverse = C.symm := by |
| 39 | have himage : C '' g₀.metric.ball 0 eta⁻¹ = C.target := by |
| 40 | rw [← hsource] |
| 41 | exact C.toPartialEquiv.image_source_eq_target |
| 42 | refine ⟨{ |
| 43 | eta_pos := heta |
| 44 | scale_pos := hscale |
| 45 | map := C |
| 46 | inverse := C.symm |
| 47 | map_tip := htip |
| 48 | map_smooth := hsource ▸ C.contMDiffOn |
| 49 | inverse_smooth := himage ▸ C.symm.contMDiffOn |
| 50 | image_contains := ?_ |
| 51 | left_inverse := ?_ |
| 52 | right_inverse := ?_ |
| 53 | coefficient_smooth := ?_ |
| 54 | jets := hjets }, rfl, rfl⟩ |
| 55 | · rw [himage, htarget] |
| 56 | · intro x hx |
| 57 | exact C.left_inv (hsource.symm ▸ hx) |
| 58 | · intro x hx |
| 59 | exact C.right_inv (himage ▸ hx) |
| 60 | · intro a b x hx |
| 61 | have hc := g.contDiffAt_pullbackCoefficients |
| 62 | (C.contMDiffOn.contMDiffAt (C.open_source.mem_nhds (hsource.symm ▸ hx))) |
| 63 | exact ((hc.clm_apply contDiffAt_const).clm_apply contDiffAt_const).contDiffWithinAt |
| 64 | |
| 65 | variable (g₀ : StandardInitialMetric) (S : ℕ → GeneralizedSliceCarrier.{u}) |
| 66 | (g : (n : ℕ) → RiemannianMetric 3 (S n).carrier) |
| 67 | (tip : (n : ℕ) → (S n).carrier) (scale eta : ℕ → ℝ) {R : ℝ} |
| 68 | (Q : (n : ℕ) → SurgeryCapClose g₀ (S n) (g n) (tip n) (scale n) (eta n)) |
| 69 | (D : (n : ℕ) → NormalizedCapExponential (Q n) R) |
| 70 | |
| 71 | /-- The actual adjusted charts eventually satisfy any fixed comparison |
| 72 | tolerance whose whole source ball lies in the common smaller domain. |
| 73 | All smaller balls have their exact physical images for this same map. |
| 74 | Source: Corollary 16.7, p. 372. -/ |
| 75 | theorem eventually_adjusted_comparisons |
| 76 | (heta : Tendsto eta atTop (𝓝 0)) (L : E ≃L[ℝ] E) |
| 77 | (hL : Tendsto (fun n => fderiv ℝ (D n).coordinateMap 0) atTop |
| 78 | (𝓝 L.toContinuousLinearMap)) |
| 79 | (hLinner : ∀ v w, g₀.metric.inner 0 (L v) (L w) = inner ℝ v w) |
| 80 | {tolerance : ℝ} (htol : 0 < tolerance) (hfit : tolerance⁻¹ < R / 2) : |
| 81 | ∀ᶠ n in atTop, ∃ Q' : SurgeryCapClose g₀ (S n) (g n) (tip n) (scale n) tolerance, |
| 82 | Q'.map = (D n).map ∘ standardFrameLogarithm g₀ L ∧ |
| 83 | ∀ r : ℝ, 0 < r → r ≤ tolerance⁻¹ → |
| 84 | Q'.map '' g₀.metric.ball 0 r = (g n).ball (tip n) (scale n * r) := by |
| 85 | obtain ⟨bound, hb, hjets⟩ := eventually_adjusted_intrinsic_jet_error_bound |
| 86 | g₀ S g tip scale eta Q D heta L hL hLinner (inv_pos.mpr htol) hfit |
| 87 | ⌊tolerance⁻¹⌋₊ (sq_pos_of_pos htol) |
| 88 | filter_upwards [hjets, eventually_initial_exactBall_charts g₀ S g tip scale eta Q D |
| 89 | heta L hL hLinner (inv_pos.mpr htol) hfit] with n hn hchart |
| 90 | obtain ⟨C, hmap, hsource, htarget, htip, hballs⟩ := hchart |
| 91 | rw [(Q n).normalizedMetric_ball] at htarget |
| 92 | have hCjets : ∃ bound : ℝ, bound < tolerance ^ 2 ∧ |
| 93 | ∀ x ∈ g₀.metric.ball 0 tolerance⁻¹, |
| 94 | singularMetricJetErrorSquared g₀.metric g₀.connection |
| 95 | (fun y v => (scale n)⁻¹ ^ 2 * surgeryCapPullback (g n) C y v) |
| 96 | ⌊tolerance⁻¹⌋₊ x ≤ bound := by |
| 97 | refine ⟨bound, hb, ?_⟩ |
| 98 | rw [hmap] |
| 99 | exact hn |
| 100 | obtain ⟨Q', hQmap, _⟩ := comparison_of_exactBall_chart |
| 101 | (Q n).scale_pos htol C hsource htarget htip hCjets |
| 102 | refine ⟨Q', hQmap.trans hmap, ?_⟩ |
| 103 | intro r hr hrt |
| 104 | rw [hQmap, hballs r hr hrt, (Q n).normalizedMetric_ball] |
| 105 | |
| 106 | end PoincareMT.M44 |