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.Tensor.CenteredHessian |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.SquareChartCurvature |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.BasisContractions |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.TensorTrace |
| 5 | import PoincareLib.Geometry.RicciFlow.Curvature.Theory |
| 6 | |
| 7 | /-! |
| 8 | # The scalar Hessian and its orthonormal trace |
| 9 | |
| 10 | The actual centered-chart formula constructs a continuous bilinear form. |
| 11 | Algebraic repackaging makes changes of fiber norm explicit. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option maxSynthPendingDepth 3 |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle BigOperators |
| 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 squareTime_hessian_exists_bilinear {J : Set ℝ} (F : RicciFlow n M J) |
| 31 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 32 | (p : M) (s : ℝ) (hs : s ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 33 | (f : M → ℝ) (hf : ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ)) ∞ f (chartAt E p).source) : |
| 34 | ∃ H : E →L[ℝ] E →L[ℝ] ℝ, |
| 35 | ∀ U V : E, (F.connection (T - s ^ 2)).hessian f p U V = H U V := by |
| 36 | let φ : E → ℝ := fun y ↦ f ((chartAt E p).symm y) |
| 37 | let y0 := (chartAt E p) p |
| 38 | let C := coordinateConnectionBilinear (squareChartMetric F T p) (s, y0) |
| 39 | have hφ : ContDiffOn ℝ ∞ φ (chartAt E p).target := |
| 40 | (hf.comp contMDiffOn_chart_symm (fun y hy ↦ (chartAt E p).map_target hy)).contDiffOn |
| 41 | have hy : y0 ∈ (chartAt E p).target := (chartAt E p).map_source (mem_chart_source E p) |
| 42 | have hD : DifferentiableAt ℝ (fderiv ℝ φ) y0 := |
| 43 | (((hφ.contDiffAt ((chartAt E p).open_target.mem_nhds hy)).fderiv_right |
| 44 | (m := ∞) (by simp)).differentiableAt (by simp)) |
| 45 | let H : E →L[ℝ] E →L[ℝ] ℝ := fderiv ℝ (fderiv ℝ φ) y0 - |
| 46 | (ContinuousLinearMap.compL ℝ E E ℝ (fderiv ℝ φ y0)).comp C |
| 47 | refine ⟨H, ?_⟩ |
| 48 | intro U V |
| 49 | have hd : fderiv ℝ (fun y ↦ fderiv ℝ φ y V) y0 U = |
| 50 | fderiv ℝ (fderiv ℝ φ) y0 U V := by |
| 51 | have h := hD.hasFDerivAt.clm_apply (hasFDerivAt_const V y0) |
| 52 | simpa using congrArg (fun L : E →L[ℝ] ℝ ↦ L U) h.fderiv |
| 53 | rw [hessian_centeredCoordinates (F.connection (T - s ^ 2)) f p hf U V] |
| 54 | change fderiv ℝ (fun y ↦ fderiv ℝ φ y V) y0 U - |
| 55 | fderiv ℝ φ y0 ((F.connection (T - s ^ 2)).connection (chartVectorField p V) p U) = H U V |
| 56 | rw [hd, ← squareChartConnection_at_center F T b hb hwindow p s hs U V] |
| 57 | rfl |
| 58 | |
| 59 | theorem squareTime_laplacian_orthonormal_trace {J : Set ℝ} (F : RicciFlow n M J) |
| 60 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 61 | (p : M) (s : ℝ) (hs : s ∈ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 62 | (f : M → ℝ) (hf : ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ)) ∞ f (chartAt E p).source) |
| 63 | {ι : Type*} [Fintype ι] : |
| 64 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 65 | ⟨(F.metric (T - s ^ 2)).toRiemannianMetric⟩ |
| 66 | ∀ e : OrthonormalBasis ι ℝ (TangentSpace (𝓡 n) p), |
| 67 | (∑ i, (F.connection (T - s ^ 2)).hessian f p (e i) (e i)) = |
| 68 | (F.connection (T - s ^ 2)).laplacian f p := by |
| 69 | obtain ⟨H, hH⟩ := squareTime_hessian_exists_bilinear F T b hb hwindow p s hs f hf |
| 70 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 71 | ⟨(F.metric (T - s ^ 2)).toRiemannianMetric⟩ |
| 72 | letI : FiniteDimensional ℝ (TangentSpace (𝓡 n) p) := |
| 73 | VectorBundle.finiteDimensional ℝ E (TangentSpace (𝓡 n) : M → Type _) p |
| 74 | let L : TangentSpace (𝓡 n) p →ₗ[ℝ] TangentSpace (𝓡 n) p →ₗ[ℝ] ℝ := { |
| 75 | toFun := fun v ↦ (H v).toLinearMap |
| 76 | map_add' := by intro v w; ext z; exact congrArg (fun B : E →L[ℝ] ℝ ↦ B z) (H.map_add v w) |
| 77 | map_smul' := by intro c v; ext z; exact congrArg (fun B : E →L[ℝ] ℝ ↦ B z) (H.map_smul c v) |
| 78 | } |
| 79 | let B : TangentSpace (𝓡 n) p →L[ℝ] TangentSpace (𝓡 n) p →L[ℝ] ℝ := |
| 80 | ((LinearMap.toContinuousLinearMap : (TangentSpace (𝓡 n) p →ₗ[ℝ] ℝ) ≃ₗ[ℝ] |
| 81 | (TangentSpace (𝓡 n) p →L[ℝ] ℝ)).toLinearMap.comp L).toContinuousLinearMap |
| 82 | intro e |
| 83 | have h := bilinear_trace_basis_eq B e ((F.metric (T - s ^ 2)).orthonormalBasis p) |
| 84 | change (∑ i, H (e i) (e i)) = |
| 85 | ∑ j, H ((F.metric (T - s ^ 2)).orthonormalBasis p j) |
| 86 | ((F.metric (T - s ^ 2)).orthonormalBasis p j) at h |
| 87 | change (∑ i, (F.connection (T - s ^ 2)).hessian f p (e i) (e i)) = |
| 88 | ∑ j, (F.connection (T - s ^ 2)).hessian f p |
| 89 | ((F.metric (T - s ^ 2)).orthonormalBasis p j) |
| 90 | ((F.metric (T - s ^ 2)).orthonormalBasis p j) |
| 91 | exact (Finset.sum_congr rfl (fun i _ ↦ hH (e i) (e i))).trans |
| 92 | (h.trans (Finset.sum_congr rfl (fun j _ ↦ hH _ _)).symm) |
| 93 | |
| 94 | theorem scalarCurvature_contMDiff (hM04 : RicciFlowCurvatureTheory.{u}) |
| 95 | {g : RiemannianMetric n M} (D : LeviCivitaData g) : |
| 96 | ContMDiff (𝓡 n) (𝓘(ℝ, ℝ)) ∞ D.scalarCurvature := |
| 97 | tensorMetricTrace_smooth g D.ricciEvaluation (hM04.tensor_calculus n M g D).2.1 |
| 98 | |
| 99 | end PoincareMT.ReducedLength |