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.Compactness.GeometricLimit.SourceCharts |
| 2 | |
| 3 | /-! |
| 4 | # Metric coefficients of the countable source charts |
| 5 | |
| 6 | The canonical parametrization of a rescaled unit-ball chart agrees locally |
| 7 | with the original chart after linear dilation. The chain rule multiplies its |
| 8 | metric coefficients by the square of the dilation, retaining the positive |
| 9 | lower bounds needed by geometric compactness. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | noncomputable section |
| 15 | |
| 16 | open Set Filter Metric Poincare.Gluing |
| 17 | open scoped Topology Manifold ContDiff |
| 18 | |
| 19 | namespace PoincareMT.NormalChartCover |
| 20 | |
| 21 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | {g : ℝ → RiemannianMetric n M} {p : M} {T' T A R ρ a b : ℝ} {N : ℕ} |
| 24 | |
| 25 | local instance : Nonempty (ball (0 : EuclideanSpace ℝ (Fin n)) 1) := ⟨⟨0, by simp⟩⟩ |
| 26 | |
| 27 | /-- The coefficients in a rescaled unit chart are the original coefficients |
| 28 | at the dilated point, multiplied by the square of the scale. -/ |
| 29 | theorem unitBallMap_pullbackCoefficients |
| 30 | (C : NormalChartCover g p T' T A R ρ a b N) |
| 31 | (hρ : 0 < ρ) (hρR : ρ / 2 ≤ R) (i : Fin (N + 1)) (t : ℝ) |
| 32 | {x : EuclideanSpace ℝ (Fin n)} (hx : x ∈ ball 0 1) |
| 33 | (v w : EuclideanSpace ℝ (Fin n)) : |
| 34 | (g t).pullbackCoefficients |
| 35 | (ChartDistance.chartParametrization (fun _ : ℕ => ball 0 1) |
| 36 | (fun _ => isOpen_ball) (i := 0) (C.unitBallMap i)) x v w = |
| 37 | (ρ / 2) ^ 2 * (g t).pullbackCoefficients (C.chart i) ((ρ / 2) • x) v w := by |
| 38 | let L : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 39 | (ρ / 2) • ContinuousLinearMap.id ℝ _ |
| 40 | let f := ChartDistance.chartParametrization (fun _ : ℕ => ball 0 1) |
| 41 | (fun _ => isOpen_ball) (i := 0) (C.unitBallMap i) |
| 42 | have heq : (C.chart i) ∘ L =ᶠ[𝓝 x] f := by |
| 43 | filter_upwards [isOpen_ball.mem_nhds hx] with y hy |
| 44 | change C.chart i ((ρ / 2) • y) = f (⟨y, hy⟩ : ball (0 : EuclideanSpace ℝ (Fin n)) 1) |
| 45 | exact (ChartDistance.chartParametrization_apply (fun _ : ℕ => ball 0 1) |
| 46 | (fun _ => isOpen_ball) (i := 0) (C.unitBallMap i) ⟨y, hy⟩).symm |
| 47 | have hxsource : L x ∈ (C.chart i).source := by |
| 48 | rw [C.source] |
| 49 | exact (ball_subset_ball hρR) (rescale_mem_half_ball hρ ⟨x, hx⟩) |
| 50 | have he := ((C.chart i).contMDiffOn.contMDiffAt |
| 51 | ((C.chart i).open_source.mem_nhds hxsource)).mdifferentiableAt (by simp) |
| 52 | have hd := mfderiv_comp x he L.differentiableAt.mdifferentiableAt |
| 53 | rw [heq.mfderiv_eq, mfderiv_eq_fderiv, L.fderiv] at hd |
| 54 | change (g t).inner (f x) (mfderiv (𝓡 n) (𝓡 n) f x v) |
| 55 | (mfderiv (𝓡 n) (𝓡 n) f x w) = |
| 56 | (ρ / 2) ^ 2 * (g t).inner (C.chart i (L x)) |
| 57 | (mfderiv (𝓡 n) (𝓡 n) (C.chart i) (L x) v) |
| 58 | (mfderiv (𝓡 n) (𝓡 n) (C.chart i) (L x) w) |
| 59 | rw [hd] |
| 60 | have hpoint := heq.self_of_nhds |
| 61 | change C.chart i (L x) = f x at hpoint |
| 62 | rw [← hpoint] |
| 63 | simp only [ContinuousLinearMap.comp_apply, L, smul_apply, map_smul, smul_eq_mul] |
| 64 | change (ρ / 2) * ((ρ / 2) * (g t).inner (C.chart i ((ρ / 2) • x)) |
| 65 | (mfderiv (𝓡 n) (𝓡 n) (C.chart i) ((ρ / 2) • x) v) |
| 66 | (mfderiv (𝓡 n) (𝓡 n) (C.chart i) ((ρ / 2) • x) w)) = |
| 67 | (ρ / 2) ^ 2 * (g t).inner (C.chart i ((ρ / 2) • x)) |
| 68 | (mfderiv (𝓡 n) (𝓡 n) (C.chart i) ((ρ / 2) • x) v) |
| 69 | (mfderiv (𝓡 n) (𝓡 n) (C.chart i) ((ρ / 2) • x) w) |
| 70 | ring |
| 71 | |
| 72 | /-- All interior times retain the normalized lower coefficient bound on the |
| 73 | unit ball; the scale is fixed by the chart stage, independently of time. -/ |
| 74 | theorem unitBallMap_lower_coefficients |
| 75 | (C : NormalChartCover g p T' T A R ρ a b N) |
| 76 | (hρ : 0 < ρ) (hρR : ρ / 2 ≤ R) (i : Fin (N + 1)) |
| 77 | {t : ℝ} (ht : t ∈ Ioo T' T) {x : EuclideanSpace ℝ (Fin n)} (hx : x ∈ ball 0 1) |
| 78 | (v : EuclideanSpace ℝ (Fin n)) : |
| 79 | (a * (ρ / 2) ^ 2) * ‖v‖ ^ 2 ≤ |
| 80 | (g t).pullbackCoefficients |
| 81 | (ChartDistance.chartParametrization (fun _ : ℕ => ball 0 1) |
| 82 | (fun _ => isOpen_ball) (i := 0) (C.unitBallMap i)) x v v := by |
| 83 | rw [unitBallMap_pullbackCoefficients C hρ hρR i t hx] |
| 84 | have hx' : (ρ / 2) • x ∈ closedBall 0 (2 * ρ) := |
| 85 | (ball_subset_closedBall.trans (closedBall_subset_closedBall (by linarith))) |
| 86 | (rescale_mem_half_ball hρ ⟨x, hx⟩) |
| 87 | have h := mul_le_mul_of_nonneg_left (C.coefficients i t ht _ hx' v).1 (sq_nonneg (ρ / 2)) |
| 88 | nlinarith only [h] |
| 89 | |
| 90 | section Sequence |
| 91 | |
| 92 | variable {S : PointedFlowSequence n T' T} |
| 93 | |
| 94 | local instance (k : ℕ) : TopologicalSpace (S.carrier k).carrier := |
| 95 | (S.carrier k).topologicalSpace |
| 96 | local instance (k : ℕ) : ChartedSpace (EuclideanSpace ℝ (Fin n)) (S.carrier k).carrier := |
| 97 | (S.carrier k).chartedSpace |
| 98 | local instance (k : ℕ) : IsManifold (𝓡 n) ∞ (S.carrier k).carrier := |
| 99 | (S.carrier k).isManifold |
| 100 | |
| 101 | variable {R ρ a b : ℕ → ℝ} {N : ℕ → ℕ} |
| 102 | (cover : ∀ k j, j ≤ k → NormalChartCover ((S.flow k).flow.metric) |
| 103 | (S.flow k).base T' T ((j : ℝ) + 1) (R j) (ρ j) (a j) (b j) (N j)) |
| 104 | |
| 105 | /-- Each enumerated chart eventually has a common positive coefficient lower |
| 106 | bound for every interior time and every point of its unit-ball domain. -/ |
| 107 | theorem diagonalUnitBallMap_eventually_lower_coefficients |
| 108 | (hρ : ∀ j, 0 < ρ j) (hρR : ∀ j, ρ j / 2 ≤ R j) (ha : ∀ j, 0 < a j) |
| 109 | (i : ℕ) : |
| 110 | ∃ c : ℝ, 0 < c ∧ ∀ᶠ k in atTop, ∀ t ∈ Ioo T' T, |
| 111 | ∀ x ∈ ball (0 : EuclideanSpace ℝ (Fin n)) 1, ∀ v, |
| 112 | c * ‖v‖ ^ 2 ≤ ((S.flow k).flow.metric t).pullbackCoefficients |
| 113 | (ChartDistance.chartParametrization (fun _ : ℕ => ball 0 1) |
| 114 | (fun _ => isOpen_ball) (i := i) (diagonalUnitBallMap cover k i)) x v v := by |
| 115 | let j := (Nat.unpair i).1 |
| 116 | refine ⟨a j * (ρ j / 2) ^ 2, |
| 117 | mul_pos (ha j) (sq_pos_of_pos (half_pos (hρ j))), ?_⟩ |
| 118 | filter_upwards [eventually_ge_atTop j] with k hk t ht x hx v |
| 119 | rw [diagonalUnitBallMap_of_le cover k i hk] |
| 120 | exact unitBallMap_lower_coefficients (cover k j hk) (hρ j) (hρR j) _ ht hx v |
| 121 | |
| 122 | end Sequence |
| 123 | |
| 124 | end PoincareMT.NormalChartCover |