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.Singular.RegularLimit.Canonical.RoundComparison.SphereModel |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.CanonicalNeighborhood |
| 3 | import PoincareLib.Geometry.Riemannian.Metric.Induced.Immersion |
| 4 | import PoincareLib.Geometry.Riemannian.Normalization.Scaling.Curvature |
| 5 | |
| 6 | /-! |
| 7 | # Scalar comparison on the actual round component certificate |
| 8 | |
| 9 | The normalized pullback metric on the certificate's retained compact model |
| 10 | has scalar curvature between five and seven when the accuracy is small |
| 11 | enough. This gives one universal scalar ratio on the whole carrier. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | set_option maxHeartbeats 800000 |
| 19 | |
| 20 | open Set Filter Bundle |
| 21 | open scoped Manifold ContDiff Topology BigOperators |
| 22 | |
| 23 | namespace PoincareMT.SingularRegularLimit.RoundComparison |
| 24 | |
| 25 | /-- The uniform accuracy used for intrinsic round-component comparison. -/ |
| 26 | def roundComparisonThreshold : ℝ := min roundScalarTolerance (1 / 200) |
| 27 | |
| 28 | theorem roundComparisonThreshold_pos : 0 < roundComparisonThreshold := |
| 29 | lt_min roundScalarTolerance_pos (by norm_num) |
| 30 | |
| 31 | theorem roundComparisonThreshold_le : roundComparisonThreshold ≤ 1 / 200 := min_le_right _ _ |
| 32 | |
| 33 | end PoincareMT.SingularRegularLimit.RoundComparison |
| 34 | |
| 35 | namespace PoincareMT.SingularRoundComponent |
| 36 | |
| 37 | open SingularRegularLimit.RoundComparison |
| 38 | |
| 39 | variable {M : Type*} [TopologicalSpace M] |
| 40 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 41 | {g : RiemannianMetric 3 M} {epsilon : ℝ} |
| 42 | |
| 43 | theorem forward_mfderiv_injective (N : SingularRoundComponent g epsilon) |
| 44 | (x : N.model.carrier) : Function.Injective (mfderiv (𝓡 3) (𝓡 3) N.forward x) := by |
| 45 | have hopen : IsOpen N.carrier := N.forward_image ▸ N.forward_openEmbedding.isOpen_range |
| 46 | have hx : N.forward x ∈ N.carrier := N.forward_image ▸ mem_range_self x |
| 47 | have hi := N.inverse_smooth.contMDiffAt (hopen.mem_nhds hx) |
| 48 | have hchain := mfderiv_comp x (hi.mdifferentiableAt (by simp)) |
| 49 | ((N.forward_smooth x).mdifferentiableAt (by simp)) |
| 50 | have heq : N.inverse ∘ N.forward = id := funext N.left_inverse |
| 51 | rw [heq, mfderiv_id] at hchain |
| 52 | intro v w hvw |
| 53 | have h := congrArg (fun z => mfderiv (𝓡 3) (𝓡 3) N.inverse (N.forward x) z) hvw |
| 54 | change ((mfderiv (𝓡 3) (𝓡 3) N.inverse (N.forward x)).comp |
| 55 | (mfderiv (𝓡 3) (𝓡 3) N.forward x)) v = |
| 56 | ((mfderiv (𝓡 3) (𝓡 3) N.inverse (N.forward x)).comp |
| 57 | (mfderiv (𝓡 3) (𝓡 3) N.forward x)) w at h |
| 58 | rw [← hchain] at h |
| 59 | exact h |
| 60 | |
| 61 | /-- The certificate's normalized ambient pullback is an actual smooth metric. -/ |
| 62 | def normalizedMetric (N : SingularRoundComponent g epsilon) : |
| 63 | RiemannianMetric 3 N.model.carrier := |
| 64 | RiemannianMetric.Induced.pullbackMetric (rescaledMetric g N.scale N.scale_pos) |
| 65 | N.forward N.forward_smooth N.forward_mfderiv_injective |
| 66 | |
| 67 | theorem normalizedMetric_inner (N : SingularRoundComponent g epsilon) |
| 68 | (x : N.model.carrier) (v w : TangentSpace (𝓡 3) x) : |
| 69 | N.normalizedMetric.inner x v w = N.scale * g.inner (N.forward x) |
| 70 | (mfderiv (𝓡 3) (𝓡 3) N.forward x v) |
| 71 | (mfderiv (𝓡 3) (𝓡 3) N.forward x w) := rfl |
| 72 | |
| 73 | theorem normalizedMetric_scalar (N : SingularRoundComponent g epsilon) |
| 74 | (D : LeviCivitaData g) (x : N.model.carrier) : |
| 75 | N.normalizedMetric.leviCivitaData.scalarCurvature x = |
| 76 | N.scale⁻¹ * D.scalarCurvature (N.forward x) := by |
| 77 | have h := N.normalizedMetric.leviCivitaData.scalarCurvature_eq_of_local_isometry |
| 78 | (rescaledMetric_connection g D N.scale N.scale_pos) isOpen_univ |
| 79 | N.forward_smooth.contMDiffOn (fun _ _ _ _ => rfl) (mem_univ x) |
| 80 | simpa only [rescaledMetric_scalarCurvature] using h |
| 81 | |
| 82 | /-- Every retained intrinsic error term is controlled by the exact finite |
| 83 | jet-error sum in the round certificate. -/ |
| 84 | theorem normalizedMetric_error_norm_lt (N : SingularRoundComponent g epsilon) |
| 85 | {r : ℕ} (hr : r ≤ ⌊epsilon⁻¹⌋₊) (x : N.model.carrier) : |
| 86 | N.model_metric.tensorNorm |
| 87 | (N.model_connection.iteratedCovariantTensorDerivative |
| 88 | (fun y (v : Fin 2 → TangentSpace (𝓡 3) y) => |
| 89 | N.normalizedMetric.inner y (v 0) (v 1) - |
| 90 | N.model_metric.inner y (v 0) (v 1)) r) x < epsilon := by |
| 91 | obtain ⟨b, hb, hbound⟩ := N.metric_comparison |
| 92 | have hterm := Finset.single_le_sum |
| 93 | (s := Finset.range (⌊epsilon⁻¹⌋₊ + 1)) (a := r) |
| 94 | (f := fun j => (N.model_metric.tensorNorm |
| 95 | (N.model_connection.iteratedCovariantTensorDerivative |
| 96 | (fun y v => N.scale * singularMetricPullback g N.forward y v - |
| 97 | N.model_metric.inner y (v 0) (v 1)) j) x) ^ 2) |
| 98 | (fun _ _ => sq_nonneg _) (Finset.mem_range.mpr (by omega)) |
| 99 | have hs := hterm.trans_lt ((hbound x).trans_lt hb) |
| 100 | change (N.model_metric.tensorNorm |
| 101 | (N.model_connection.iteratedCovariantTensorDerivative |
| 102 | (fun y v => N.normalizedMetric.inner y (v 0) (v 1) - |
| 103 | N.model_metric.inner y (v 0) (v 1)) r) x) ^ 2 < epsilon ^ 2 at hs |
| 104 | nlinarith [N.epsilon_pos] |
| 105 | |
| 106 | /-- Small round accuracy controls the actual scaled scalar curvature on |
| 107 | every point of the retained compact model. -/ |
| 108 | theorem normalized_scalar_close (N : SingularRoundComponent g epsilon) |
| 109 | (D : LeviCivitaData g) (hepsilon : epsilon ≤ roundComparisonThreshold) |
| 110 | (x : N.model.carrier) : |
| 111 | |N.scale⁻¹ * D.scalarCurvature (N.forward x) - 6| < 1 := by |
| 112 | let : CompactSpace N.model.carrier := isCompact_univ_iff.mp N.model_compact |
| 113 | have htwo : 2 ≤ ⌊epsilon⁻¹⌋₊ := by |
| 114 | apply (Nat.le_floor_iff (inv_nonneg.mpr N.epsilon_pos.le)).mpr |
| 115 | rw [inv_eq_one_div, le_div_iff₀ N.epsilon_pos] |
| 116 | have he := hepsilon.trans roundComparisonThreshold_le |
| 117 | norm_num |
| 118 | linarith |
| 119 | have h := scalar_close_of_unit_curvature N.model_connection |
| 120 | N.normalizedMetric.leviCivitaData N.model_curvature_one x (fun r hr => |
| 121 | (N.normalizedMetric_error_norm_lt (hr.trans htwo) x).trans_le |
| 122 | (hepsilon.trans (min_le_left _ _))) |
| 123 | rwa [N.normalizedMetric_scalar D x] at h |
| 124 | |
| 125 | /-- Scalar curvature varies by a factor of at most two on the full round |
| 126 | component carrier, with a threshold independent of the component. -/ |
| 127 | theorem scalar_le_two_mul (N : SingularRoundComponent g epsilon) |
| 128 | (D : LeviCivitaData g) (hepsilon : epsilon ≤ roundComparisonThreshold) |
| 129 | {x y : M} (hx : x ∈ N.carrier) (hy : y ∈ N.carrier) : |
| 130 | D.scalarCurvature y ≤ 2 * D.scalarCurvature x := by |
| 131 | have hx' := N.normalized_scalar_close D hepsilon (N.inverse x) |
| 132 | have hy' := N.normalized_scalar_close D hepsilon (N.inverse y) |
| 133 | rw [N.right_inverse hx] at hx' |
| 134 | rw [N.right_inverse hy] at hy' |
| 135 | have hlx := (abs_lt.mp hx').1 |
| 136 | have huy := (abs_lt.mp hy').2 |
| 137 | have hh : N.scale⁻¹ * D.scalarCurvature y ≤ |
| 138 | N.scale⁻¹ * (2 * D.scalarCurvature x) := by linarith |
| 139 | exact (mul_le_mul_iff_right₀ (inv_pos.mpr N.scale_pos)).mp hh |
| 140 | |
| 141 | end PoincareMT.SingularRoundComponent |