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 | /- Adapted from Mapher `PoincareMT/Proofs/Ch01/CurvatureConnection.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.Riemannian.Curvature.Basic |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Connection.Regularity |
| 7 | |
| 8 | /-! |
| 9 | # Curvature independence from the retained connection |
| 10 | |
| 11 | For one smooth metric, the curvature evaluations agree for any two retained |
| 12 | Levi-Civita connections. The proofs use local connection regularity and are |
| 13 | relative to its inventoried proof obligation. See Morgan-Tian, printed pp. 3-7. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.LeviCivitaData |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | {g : RiemannianMetric n M} |
| 27 | |
| 28 | /-- Curvature agrees on smooth local fields for two connections of the same metric. -/ |
| 29 | theorem curvatureOnFields_eq (D D' : LeviCivitaData g) |
| 30 | {U : Set M} (hU : IsOpen U) |
| 31 | (X Y Z : (x : M) → TangentSpace (𝓡 n) x) |
| 32 | (hX : ContMDiffOn (𝓡 n) |
| 33 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% X) U) |
| 34 | (hY : ContMDiffOn (𝓡 n) |
| 35 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Y) U) |
| 36 | (hZ : ContMDiffOn (𝓡 n) |
| 37 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Z) U) |
| 38 | {x : M} (hx : x ∈ U) : |
| 39 | D.curvatureOnFields X Y Z x = D'.curvatureOnFields X Y Z x := by |
| 40 | have hconn (W : (y : M) → TangentSpace (𝓡 n) y) |
| 41 | (hW : ContMDiffOn (𝓡 n) |
| 42 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% W) U) : |
| 43 | D.connection (fun y ↦ D.connection Z y (W y)) x = |
| 44 | D'.connection (fun y ↦ D'.connection Z y (W y)) x := by |
| 45 | have hD := D.contMDiffOn_connection_apply hU W Z hW hZ |
| 46 | have hD' := D'.contMDiffOn_connection_apply hU W Z hW hZ |
| 47 | rw [D.connection_eq_at D' _ |
| 48 | ((hD.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp))] |
| 49 | apply D'.connection.isCovariantDerivativeOn.congr_of_eqOn |
| 50 | ((hD.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp)) |
| 51 | ((hD'.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp)) |
| 52 | (hU.mem_nhds hx) |
| 53 | intro y hy |
| 54 | rw [D.connection_eq_at D' Z |
| 55 | ((hZ.contMDiffAt (hU.mem_nhds hy)).mdifferentiableAt (by simp))] |
| 56 | unfold curvatureOnFields |
| 57 | rw [hconn Y hY, hconn X hX, D.connection_eq_at D' Z |
| 58 | ((hZ.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp))] |
| 59 | |
| 60 | /-- The fixed-extension curvature is independent of the compatible connection choice. -/ |
| 61 | theorem localTheory_curvature_eq (D D' : LeviCivitaData g) (x : M) |
| 62 | (u v w : TangentSpace (𝓡 n) x) : |
| 63 | D.curvature x u v w = D'.curvature x u v w := by |
| 64 | obtain ⟨U, hU, hu⟩ := |
| 65 | FiberBundle.exists_contMDiffOn_extend (k := ∞) (𝓡 n) (EuclideanSpace ℝ (Fin n)) u |
| 66 | obtain ⟨V, hV, hv⟩ := |
| 67 | FiberBundle.exists_contMDiffOn_extend (k := ∞) (𝓡 n) (EuclideanSpace ℝ (Fin n)) v |
| 68 | obtain ⟨W, hW, hw⟩ := |
| 69 | FiberBundle.exists_contMDiffOn_extend (k := ∞) (𝓡 n) (EuclideanSpace ℝ (Fin n)) w |
| 70 | obtain ⟨S, hS, hSopen, hx⟩ := |
| 71 | mem_nhds_iff.mp (Filter.inter_mem hU (Filter.inter_mem hV hW)) |
| 72 | exact D.curvatureOnFields_eq D' hSopen _ _ _ |
| 73 | (hu.mono fun _ hy ↦ (hS hy).1) |
| 74 | (hv.mono fun _ hy ↦ (hS hy).2.1) |
| 75 | (hw.mono fun _ hy ↦ (hS hy).2.2) hx |
| 76 | |
| 77 | /-- Lowered curvature is independent of the compatible connection choice. -/ |
| 78 | theorem localTheory_curvatureTensor_eq (D D' : LeviCivitaData g) (x : M) |
| 79 | (u v w z : TangentSpace (𝓡 n) x) : |
| 80 | D.curvatureTensor x u v w z = D'.curvatureTensor x u v w z := by |
| 81 | unfold curvatureTensor |
| 82 | rw [D.localTheory_curvature_eq D'] |
| 83 | |
| 84 | /-- Ricci curvature is independent of the compatible connection choice. -/ |
| 85 | theorem ricci_eq (D D' : LeviCivitaData g) (x : M) |
| 86 | (u v : TangentSpace (𝓡 n) x) : |
| 87 | D.ricci x u v = D'.ricci x u v := by |
| 88 | simp only [ricci, D.localTheory_curvatureTensor_eq D'] |
| 89 | |
| 90 | /-- Scalar curvature is independent of the compatible connection choice. -/ |
| 91 | theorem scalarCurvature_eq (D D' : LeviCivitaData g) (x : M) : |
| 92 | D.scalarCurvature x = D'.scalarCurvature x := by |
| 93 | simp only [scalarCurvature, D.ricci_eq D'] |
| 94 | |
| 95 | /-- Sectional curvature, including totalized inputs, is independent of the connection choice. -/ |
| 96 | theorem sectionalCurvature_eq (D D' : LeviCivitaData g) (x : M) |
| 97 | (u v : TangentSpace (𝓡 n) x) : |
| 98 | D.sectionalCurvature x u v = D'.sectionalCurvature x u v := by |
| 99 | simp only [sectionalCurvature, D.localTheory_curvatureTensor_eq D'] |
| 100 | |
| 101 | /-- The full four-tensor norm is independent of the compatible connection choice. -/ |
| 102 | theorem localTheory_curvatureTensorNorm_eq (D D' : LeviCivitaData g) (x : M) : |
| 103 | D.curvatureTensorNorm x = D'.curvatureTensorNorm x := by |
| 104 | simp only [curvatureTensorNorm, D.localTheory_curvatureTensor_eq D'] |
| 105 | |
| 106 | end PoincareMT.LeviCivitaData |