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.SourceNames.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.SourceNames.Normalization |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Schedules.Models.NormalizedChart |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Schedules.Models.MetricRealization |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Scalar.Calculus.NeckFourJets |
| 6 | |
| 7 | /-! |
| 8 | # The model analytic estimate at a neck center |
| 9 | |
| 10 | Use M44's actual centered coefficient bounds and ellipticity, normalize the |
| 11 | Euclidean realization, then transport to the supplied physical connection. |
| 12 | Morgan--Tian Definition 2.18, p. 31, with Definition 2.16, p. 30. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | open PoincareMT.MetricSurgery |
| 22 | |
| 23 | namespace PoincareMT.M45 |
| 24 | |
| 25 | open PoincareMT.M44 PoincareMT.M36 |
| 26 | |
| 27 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 28 | |
| 29 | /-- A fixed numerical coefficient-jet bound selected solely from the |
| 30 | round-cylinder model. This number does not depend on a carrier universe. |
| 31 | Source: Definition 2.16, equation (2.1), p. 30. -/ |
| 32 | noncomputable def modelNeckCoordinateBound : ℝ := |
| 33 | Classical.choose exists_centeredCylinderMetric_fourJet_bound |
| 34 | |
| 35 | /-- The canonical accuracy supplies four spatial derivatives and the |
| 36 | ellipticity threshold used by the model calculations. |
| 37 | Source: Definitions 2.16 and 2.18, pp. 30-31. -/ |
| 38 | theorem model_four_jet_order {epsilon : ℝ} |
| 39 | (hepsilon : 0 < epsilon) (hsmall : epsilon ≤ 1 / 200) : |
| 40 | epsilon ≤ 1 / 36 ∧ 4 ≤ ⌊epsilon⁻¹⌋₊ := by |
| 41 | refine ⟨by linarith, ?_⟩ |
| 42 | have hinv : (4 : ℝ) ≤ epsilon⁻¹ := by |
| 43 | rw [inv_eq_one_div, le_div_iff₀ hepsilon] |
| 44 | linarith |
| 45 | exact Nat.le_floor hinv |
| 46 | |
| 47 | /-- Fixed Euclidean finite-jet constants yield the neck estimate on |
| 48 | every actual carrier. The same numerical hypotheses can be applied at |
| 49 | Type u and Type 0. Source: Definition 2.18, p. 31. -/ |
| 50 | theorem model_neck_analytic |
| 51 | {Cg Ce : ℝ} (hCg : 0 < Cg) (hCe : 0 < Ce) |
| 52 | (hgradient : ∀ (gE : RiemannianMetric 3 E) (DE : LeviCivitaData gE), |
| 53 | (∀ j ≤ 4, ‖iteratedFDeriv ℝ j gE.euclideanCoefficients 0‖ ≤ |
| 54 | modelNeckCoordinateBound) → |
| 55 | (∀ v : E, (1 / 2 : ℝ) * ‖v‖ ^ 2 ≤ gE.inner 0 v v) → |
| 56 | ∀ v : E, gE.inner 0 v v = 1 → |fderiv ℝ DE.scalarCurvature 0 v| ≤ Cg) |
| 57 | (hevolution : ∀ (gE : RiemannianMetric 3 E) (DE : LeviCivitaData gE), |
| 58 | (∀ j ≤ 4, ‖iteratedFDeriv ℝ j gE.euclideanCoefficients 0‖ ≤ |
| 59 | modelNeckCoordinateBound) → |
| 60 | (∀ v : E, (1 / 2 : ℝ) * ‖v‖ ^ 2 ≤ gE.inner 0 v v) → |
| 61 | |DE.laplacian DE.scalarCurvature 0 + 2 * DE.ricciNormSq 0| ≤ Ce) |
| 62 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 63 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) (N : EpsilonNeck g) |
| 64 | (hsmall : N.epsilon ≤ 1 / 200) : |
| 65 | M45PointwiseAnalyticEstimate g D N.center (max Cg Ce) := by |
| 66 | have hB := (Classical.choose_spec exists_centeredCylinderMetric_fourJet_bound).2 N.epsilon_pos |
| 67 | obtain ⟨hepsilon, horder⟩ := model_four_jet_order N.epsilon_pos hsmall |
| 68 | let z := N.coordinate_inverse N.center |
| 69 | have hcenter : N.center ∈ N.carrier := |
| 70 | N.central_sphere_subset N.center_on_central_sphere |
| 71 | have hz : z.2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := |
| 72 | (N.coordinate_inverse_mem N.center hcenter).2 |
| 73 | let f := centeredNeckLift N z.1 z.2 |
| 74 | let U := centeredNeckDomain N z.2 |
| 75 | have hU : IsOpen U := centeredNeckDomain_isOpen N z.2 |
| 76 | have hzero : (0 : E) ∈ U := zero_mem_centeredNeckDomain N hz |
| 77 | have hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U := fun y hy => |
| 78 | (centeredNeckLift_contMDiffAt N z.1 z.2 hy).contMDiffWithinAt |
| 79 | have hinv : ∀ y ∈ U, (mfderiv (𝓡 3) (𝓡 3) f y).IsInvertible := |
| 80 | fun y hy => centeredNeckLift_mfderiv_isInvertible N z.1 z.2 hy |
| 81 | obtain ⟨gE, DE, W, hW, hzeroW, hWU, hmetric⟩ := |
| 82 | model_metric_realization g hU hzero hf hinv |
| 83 | let Q := N.connection.scalarCurvature N.center |
| 84 | have hQ : 0 < Q := N.scalar_center_pos |
| 85 | let gQ := m01RescaledMetric gE Q hQ |
| 86 | let DQ := m01RescaledMetric_connection gE DE Q hQ |
| 87 | have hcoeff : gQ.euclideanCoefficients =ᶠ[𝓝 0] |
| 88 | centeredCylinderMetric (fun q v w => normalizedNeckForm N q v w) z.1 z.2 := by |
| 89 | filter_upwards [hW.mem_nhds hzeroW] with y hy |
| 90 | calc |
| 91 | gQ.euclideanCoefficients y = Q • gE.euclideanCoefficients y := rfl |
| 92 | _ = Q • g.pullbackCoefficients f y := congrArg (fun B => Q • B) (hmetric y hy) |
| 93 | _ = (normalizedNeckMetric N).pullbackCoefficients f y := rfl |
| 94 | _ = _ := normalizedNeckMetric_pullbackCoefficients N z.1 z.2 (hWU hy) |
| 95 | have hclose : RoundCylinderClose N.epsilon 0 (fun q v w => normalizedNeckForm N q v w) := |
| 96 | N.metric_comparison.close |
| 97 | have hjets : ∀ j ≤ 4, ‖iteratedFDeriv ℝ j gQ.euclideanCoefficients 0‖ ≤ |
| 98 | modelNeckCoordinateBound := by |
| 99 | intro j hj |
| 100 | rw [(hcoeff.iteratedFDeriv (𝕜 := ℝ) j).self_of_nhds] |
| 101 | exact hB (by linarith) hclose horder z hz j hj |
| 102 | have hell : ∀ v : E, (1 / 2 : ℝ) * ‖v‖ ^ 2 ≤ gQ.inner 0 v v := by |
| 103 | intro v |
| 104 | change (1 / 2 : ℝ) * ‖v‖ ^ 2 ≤ gQ.euclideanCoefficients 0 v v |
| 105 | rw [hcoeff.self_of_nhds] |
| 106 | exact centeredCylinderMetric_lower N.epsilon_pos hepsilon hclose (by omega) z hz v |
| 107 | have hgeom (y : E) (hy : y ∈ W) (v w : E) : |
| 108 | gE.inner y v w = g.inner (f y) (mfderiv (𝓡 3) (𝓡 3) f y v) |
| 109 | (mfderiv (𝓡 3) (𝓡 3) f y w) := |
| 110 | congrArg (fun B => B v w) (hmetric y hy) |
| 111 | have hfzero : f 0 = N.center := by |
| 112 | rw [show f 0 = N.coordinate_map (z.1, z.2) from centeredNeckLift_zero N z.1 z.2] |
| 113 | exact neck_coordinate_inverse N hcenter |
| 114 | have hscalar : Q ≤ D.scalarCurvature (f 0) := by |
| 115 | have hsame := N.connection.scalarCurvature_eq_of_local_isometry D (f := id) |
| 116 | isOpen_univ contMDiff_id.contMDiffOn |
| 117 | (fun y _ v w => by simp only [mfderiv_id, ContinuousLinearMap.id_apply, id_eq]) |
| 118 | (mem_univ N.center) |
| 119 | simp only [id_eq] at hsame |
| 120 | rw [hfzero, ← hsame] |
| 121 | have h := model_analytic_of_normalized_chart D gE DE hQ hCg hCe hW hzeroW |
| 122 | (hf.mono hWU) (fun y hy => hinv y (hWU hy)) hgeom hscalar |
| 123 | (hgradient gQ DQ hjets hell) (hevolution gQ DQ hjets hell) |
| 124 | simpa only [hfzero] using h |
| 125 | |
| 126 | end PoincareMT.M45 |