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.ReducedGeometry.ReducedLength.Variation.Differential.SquareChartJacobiCoefficients |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Variation.Differential.CoordinateJacobiCommutation |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Variation.Differential.CoordinateEulerLinearization |
| 4 | |
| 5 | /-! |
| 6 | # The geometric Jacobi residual of the actual coordinate linearization |
| 7 | |
| 8 | The time-dependent connection commutator is retained when identifying the |
| 9 | second covariant derivative with the linearized square-time phase equation. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option maxSynthPendingDepth 3 |
| 14 | set_option maxHeartbeats 800000 |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | open Filter |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.ReducedLength |
| 22 | |
| 23 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 25 | [IsManifold (𝓡 n) ∞ M] |
| 26 | |
| 27 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 28 | |
| 29 | set_option backward.isDefEq.respectTransparency false in |
| 30 | theorem centered_coordinate_jacobi_residual {J : Set ℝ} (F : RicciFlow n M J) |
| 31 | (hM04 : RicciFlowCurvatureTheory.{u}) |
| 32 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 33 | (p : M) (x Y : ℝ → E) (s : ℝ) |
| 34 | (hs : s ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 35 | (hxcenter : x s = (chartAt E p) p) |
| 36 | (hx : DifferentiableAt ℝ x s) (hx2 : DifferentiableAt ℝ (deriv x) s) |
| 37 | (hY : DifferentiableAt ℝ Y s) (hY2 : DifferentiableAt ℝ (deriv Y) s) |
| 38 | (hphase : deriv (deriv x) s = |
| 39 | (regularizedCoordinatePhase (squareChartMetric F T p) (squareChartScalar F T p) |
| 40 | (s, (x s, deriv x s))).2) |
| 41 | (hlinear : deriv (deriv Y) s = |
| 42 | (fderiv ℝ (regularizedCoordinatePhase (squareChartMetric F T p) |
| 43 | (squareChartScalar F T p)) (s, (x s, deriv x s)) (0, (Y s, deriv Y s))).2) |
| 44 | (W : E) : |
| 45 | let C := coordinateConnectionBilinear (squareChartMetric F T p) |
| 46 | let d : ℝ → E := fun r ↦ deriv Y r + C (r, x r) (deriv x r) (Y r) |
| 47 | let D := F.connection (T - s ^ 2) |
| 48 | (F.metric (T - s ^ 2)).inner p (deriv d s + C (s, x s) (deriv x s) (d s)) W + |
| 49 | D.curvatureTensor p (Y s) (deriv x s) W (deriv x s) - |
| 50 | 2 * s * backwardConnectionVariationPairing D p (deriv x s) (Y s) W - |
| 51 | 2 * s ^ 2 * D.hessian D.scalarCurvature p (Y s) W + |
| 52 | 4 * s * ricciDerivativePairing D p (Y s) (deriv x s) W + |
| 53 | 4 * s * D.ricci p (d s) W = 0 := by |
| 54 | let G := squareChartMetric F T p |
| 55 | let R := squareChartScalar F T p |
| 56 | let C := coordinateConnectionBilinear G |
| 57 | let Ω := Set.Ioo (-Real.sqrt b) (Real.sqrt b) ×ˢ (chartAt E p).target |
| 58 | have hΩ : IsOpen Ω := isOpen_Ioo.prod (chartAt E p).open_target |
| 59 | have hz : (s, x s) ∈ Ω := by |
| 60 | rw [hxcenter] |
| 61 | exact ⟨hs, (chartAt E p).map_source (mem_chart_source E p)⟩ |
| 62 | have hG := squareChartMetric_smooth F T b hb hwindow p |
| 63 | have hR := squareChartScalar_smooth F hM04 T b hb hwindow p |
| 64 | have hpos : ∀ z ∈ Ω, ∀ v : E, v ≠ 0 → 0 < G z v v := |
| 65 | fun z hz v hv ↦ squareChartMetric_pos F T p z hz.2 v hv |
| 66 | have hC : DifferentiableAt ℝ C (s, x s) := |
| 67 | ((coordinateConnectionBilinear_contDiffOn G Ω hΩ hG hpos).contDiffAt |
| 68 | (hΩ.mem_nhds hz)).differentiableAt (by simp) |
| 69 | have hCs : ∀ᶠ z in 𝓝 (s, x s), ∀ v w, C z v w = C z w v := by |
| 70 | filter_upwards [hΩ.mem_nhds hz] with z hz' |
| 71 | exact fun v w ↦ coordinateConnection_symm G z |
| 72 | ((hG.contDiffAt (hΩ.mem_nhds hz')).differentiableAt (by simp)) |
| 73 | (Eventually.of_forall (fun z v w ↦ squareChartMetric_symm F T p z v w)) v w |
| 74 | have hcomm := coordinate_jacobi_commutation C x Y s hC hCs hx hx2 hY hY2 |
| 75 | dsimp only at hcomm |
| 76 | rw [hphase, hlinear] at hcomm |
| 77 | have hlin := regularizedCoordinatePhase_covariant_linearized_pairing G R Ω hΩ hG hR hpos |
| 78 | (fun z _ v w ↦ squareChartMetric_symm F T p z v w) s (x s) hz |
| 79 | (deriv x s) (Y s) (deriv Y s) W |
| 80 | dsimp only at hlin |
| 81 | rw [← hcomm, hxcenter] at hlin |
| 82 | have hcurv := squareChartCurvature_bilinear_at_center F hM04 T b hb hwindow p s hs |
| 83 | (Y s) (deriv x s) (deriv x s) |
| 84 | dsimp only at hcurv |
| 85 | rw [← hcurv] at hlin |
| 86 | rw [squareChartScalar_hessian_at_center F hM04 T b hb hwindow p s hs, |
| 87 | squareChartMetric_time_covariant_at_center F hM04 T b hb hwindow p s hs, |
| 88 | squareChartMetric_time_at_center F T b hb hwindow p s hs] at hlin |
| 89 | simp only [map_add, map_sub, ContinuousLinearMap.add_apply, |
| 90 | ContinuousLinearMap.sub_apply] at hlin |
| 91 | rw [squareChartConnection_time_at_center F hM04 T b hb hwindow p s hs] at hlin |
| 92 | simp only [G, squareChartMetric_at_center] at hlin |
| 93 | dsimp only |
| 94 | rw [hxcenter] |
| 95 | simpa only [LeviCivitaData.curvatureTensor, C, map_add, add_apply, |
| 96 | inner_add_left, add_assoc] using hlin |
| 97 | |
| 98 | end PoincareMT.ReducedLength |