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.Minimum.Variation.Frame.GeometricConnection |
| 2 | |
| 3 | /-! |
| 4 | # The square-time transport coefficient and the Ricci tensor |
| 5 | |
| 6 | The algebraic metric-preserving coefficient, after adding the actual retained |
| 7 | connection term, is the square-time reduced-length Ricci transport coefficient. |
| 8 | This identifies the equation to be solved along a curve without a |
| 9 | curvature-theory service. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter Topology |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.ReducedLengthMinimum.Variation.Frame |
| 23 | |
| 24 | open PoincareMT.ReducedLengthMinimum.Variational |
| 25 | open PoincareMT.ReducedLengthMinimum.Variation.Geometry |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 29 | [IsManifold (𝓡 n) ∞ M] |
| 30 | |
| 31 | local instance adaptedDualGroup : NormedAddCommGroup (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 32 | ContinuousLinearMap.toNormedAddCommGroup |
| 33 | local instance adaptedDualSpace : NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 34 | ContinuousLinearMap.toNormedSpace |
| 35 | local instance adaptedBilinGroup : |
| 36 | NormedAddCommGroup (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 37 | ContinuousLinearMap.toNormedAddCommGroup |
| 38 | local instance adaptedBilinSpace : |
| 39 | NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 40 | ContinuousLinearMap.toNormedSpace |
| 41 | |
| 42 | /-- The algebraic chart connection and the retained connection are equal as |
| 43 | tangent vectors, since every tangent vector is in the chart-frame image. -/ |
| 44 | theorem chartConnection_eq_retainedConnection |
| 45 | {J : Set ℝ} (F : RicciFlow n M J) (T s : ℝ) (x y : M) |
| 46 | (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 47 | (ht : T - s ^ 2 ∈ interior J) (v w : EuclideanSpace ℝ (Fin n)) : |
| 48 | (F.connection (T - s ^ 2)).connection (chartFrame x w) y (chartFrame x v y) = |
| 49 | chartFrame x (chartConnection (chartActionMetric F T x) |
| 50 | (s, extChartAt (𝓡 n) x y) v w) y := by |
| 51 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 52 | ⟨(F.metric (T - s ^ 2)).toRiemannianMetric⟩ |
| 53 | apply ext_inner_right ℝ |
| 54 | intro z |
| 55 | let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x |
| 56 | let u := e.continuousLinearMapAt ℝ y z |
| 57 | have hu : chartFrame x u y = z := e.symmL_continuousLinearMapAt hy z |
| 58 | have h := chartConnection_pairing_eq_retainedConnection F T s x y hy ht v w u |
| 59 | rw [chartActionMetric_apply F T hy, hu] at h |
| 60 | exact h |
| 61 | |
| 62 | theorem chartActionMetric_time_fderiv |
| 63 | {J : Set ℝ} (F : RicciFlow n M J) (T s : ℝ) (x y : M) |
| 64 | (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 65 | (ht : T - s ^ 2 ∈ interior J) (v w : EuclideanSpace ℝ (Fin n)) : |
| 66 | fderiv ℝ (chartActionMetric F T x) (s, extChartAt (𝓡 n) x y) (1, 0) v w = |
| 67 | 4 * s * (F.connection (T - s ^ 2)).ricci y (chartFrame x v y) (chartFrame x w y) := by |
| 68 | have hy' : y ∈ (extChartAt (𝓡 n) x).source := by |
| 69 | simpa only [extChartAt_source] using hy |
| 70 | have hz : (s, extChartAt (𝓡 n) x y) ∈ chartActionDomain F T x := |
| 71 | ⟨squareTime_mem_interior_preimage ht, (extChartAt (𝓡 n) x).map_source hy'⟩ |
| 72 | have hG := (((chartActionMetric_contDiffOn F T x) _ hz).contDiffAt |
| 73 | ((chartActionDomain_open F T x).mem_nhds hz)).differentiableAt (by simp) |
| 74 | have hc := hG.hasFDerivAt.comp_hasDerivAt s |
| 75 | ((hasDerivAt_id s).prodMk (hasDerivAt_const s (extChartAt (𝓡 n) x y))) |
| 76 | have heval := (hc.clm_apply (hasDerivAt_const s v)).clm_apply (hasDerivAt_const s w) |
| 77 | have h := heval.unique (chartActionMetric_time_derivative F T hy ht v w) |
| 78 | simpa only [Function.comp_def, map_zero, add_zero, |
| 79 | ContinuousLinearMap.zero_apply, zero_add, ContinuousLinearMap.add_apply, |
| 80 | ContinuousLinearMap.flip_apply] using h |
| 81 | |
| 82 | /-- Adding the retained connection to the chart transport derivative gives |
| 83 | the reduced-length adapted equation, paired with an arbitrary chart vector. -/ |
| 84 | theorem chartTransportOperator_retainedConnection_pairing |
| 85 | {J : Set ℝ} (F : RicciFlow n M J) (T s : ℝ) (x y : M) |
| 86 | (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 87 | (ht : T - s ^ 2 ∈ interior J) (a v w : EuclideanSpace ℝ (Fin n)) : |
| 88 | (F.metric (T - s ^ 2)).inner y |
| 89 | (chartFrame x (chartTransportOperator (chartActionMetric F T x) |
| 90 | (s, extChartAt (𝓡 n) x y) a v) y) (chartFrame x w y) + |
| 91 | (F.metric (T - s ^ 2)).inner y |
| 92 | ((F.connection (T - s ^ 2)).connection (chartFrame x v) y |
| 93 | (chartFrame x a y)) (chartFrame x w y) = |
| 94 | -(2 * s) * (F.connection (T - s ^ 2)).ricci y |
| 95 | (chartFrame x v y) (chartFrame x w y) := by |
| 96 | have hy' : y ∈ (extChartAt (𝓡 n) x).source := by |
| 97 | simpa only [extChartAt_source] using hy |
| 98 | have hz : (s, extChartAt (𝓡 n) x y) ∈ chartActionDomain F T x := |
| 99 | ⟨squareTime_mem_interior_preimage ht, (extChartAt (𝓡 n) x).map_source hy'⟩ |
| 100 | rw [← chartActionMetric_apply F T hy, |
| 101 | chartConnection_pairing_eq_retainedConnection F T s x y hy ht a v w, |
| 102 | chartTransportOperator_pairing _ _ (chartActionMetric_pos F T x hz), |
| 103 | chartActionMetric_time_fderiv F T s x y hy ht v w] |
| 104 | ring |
| 105 | |
| 106 | /-- The local adapted equation is tested against every tangent vector, not |
| 107 | only the selected coordinate basis. -/ |
| 108 | theorem chartTransportOperator_adapted_pairing |
| 109 | {J : Set ℝ} (F : RicciFlow n M J) (T s : ℝ) (x y : M) |
| 110 | (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 111 | (ht : T - s ^ 2 ∈ interior J) (a v : EuclideanSpace ℝ (Fin n)) |
| 112 | (Z : TangentSpace (𝓡 n) y) : |
| 113 | (F.metric (T - s ^ 2)).inner y |
| 114 | (chartFrame x (chartTransportOperator (chartActionMetric F T x) |
| 115 | (s, extChartAt (𝓡 n) x y) a v) y + |
| 116 | (F.connection (T - s ^ 2)).connection (chartFrame x v) y |
| 117 | (chartFrame x a y)) Z = |
| 118 | -(2 * s) * (F.connection (T - s ^ 2)).ricci y (chartFrame x v y) Z := by |
| 119 | let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x |
| 120 | let w := e.continuousLinearMapAt ℝ y Z |
| 121 | have hw : chartFrame x w y = Z := e.symmL_continuousLinearMapAt hy Z |
| 122 | have h := chartTransportOperator_retainedConnection_pairing F T s x y hy ht a v w |
| 123 | rw [hw] at h |
| 124 | simpa only [map_add, add_apply] using h |
| 125 | |
| 126 | end PoincareMT.ReducedLengthMinimum.Variation.Frame |