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.Generalized.ReducedGeometry.Variation.AdaptedFields.AdaptedIndexTrace |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.IndexForm.IndexPair |
| 3 | |
| 4 | /-! |
| 5 | # The actual horizontal adapted index trace |
| 6 | |
| 7 | The selected slice tangent equivalence identifies every term of the |
| 8 | frozen horizontal index. Its metric identity transfers a horizontal |
| 9 | orthonormal frame and its actual derivative pairings. |
| 10 | Morgan-Tian Proposition 6.43, pp. 127-128. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- The specified slice geometry retains the actual horizontal tangent fibers. |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle BigOperators |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 26 | (R : M14SquareRootPath G p) |
| 27 | |
| 28 | /-- The diagonal actual horizontal index is precisely the specified |
| 29 | slice index, Proposition 6.33, pp. 120-121. -/ |
| 30 | theorem horizontalIndexPairDensity_eq_slice (s : ℝ) |
| 31 | (Y W : G.Horizontal (R.curve s)) : |
| 32 | let q := spacetimeSlicePoint G.slices (R.curve s) |
| 33 | let D := G.leafwise.sliceConnection (G.spacetime.timeFunction (R.curve s)) |
| 34 | let j := (G.slices (G.spacetime.timeFunction (R.curve s))).tangentEquiv q |
| 35 | horizontalIndexPairDensity R s Y Y W W = |
| 36 | sliceIndexDensity D q s (j.symm (R.horizontal_velocity s)) (j.symm Y) (j.symm W) := by |
| 37 | let q := spacetimeSlicePoint G.slices (R.curve s) |
| 38 | let S := G.slices (G.spacetime.timeFunction (R.curve s)) |
| 39 | let D := G.leafwise.sliceConnection (G.spacetime.timeFunction (R.curve s)) |
| 40 | let j := S.tangentEquiv q |
| 41 | have hm := S.metric_eq q (j.symm W) (j.symm W) |
| 42 | dsimp only [j, S, q, spacetimeSlicePoint] at hm |
| 43 | simp only [ContinuousLinearEquiv.apply_symm_apply] at hm |
| 44 | have hR := D.curvatureTensor_swap_last q (j.symm Y) (j.symm (R.horizontal_velocity s)) |
| 45 | (j.symm Y) (j.symm (R.horizontal_velocity s)) |
| 46 | unfold horizontalIndexPairDensity sliceIndexDensity |
| 47 | simp only [M14BcalPairing, add_sub_cancel_right] |
| 48 | change G.spacetime.horizontalMetric.inner (R.curve s) W W - |
| 49 | D.curvatureTensor q (j.symm Y) (j.symm (R.horizontal_velocity s)) |
| 50 | (j.symm Y) (j.symm (R.horizontal_velocity s)) + |
| 51 | 2 * s * ricciDerivativePairing D q (j.symm (R.horizontal_velocity s)) (j.symm Y) |
| 52 | (j.symm Y) + 2 * s ^ 2 * D.hessian D.scalarCurvature q (j.symm Y) (j.symm Y) - |
| 53 | 4 * s * ricciDerivativePairing D q (j.symm Y) (j.symm (R.horizontal_velocity s)) |
| 54 | (j.symm Y) = _ |
| 55 | rw [hR] |
| 56 | change _ = S.metricOnPoints.inner q (j.symm W) (j.symm W) + _ + _ - _ + _ |
| 57 | dsimp only [D, j, S, q, spacetimeSlicePoint] |
| 58 | rw [hm] |
| 59 | ring |
| 60 | |
| 61 | /-- An actual horizontal orthonormal frame with adapted derivative |
| 62 | pairings gives the full five-term index trace, Proposition 6.43, |
| 63 | pp. 127-128. -/ |
| 64 | theorem horizontalIndexPairDensity_adapted_trace |
| 65 | (hM04 : RicciFlowCurvatureTheory.{u}) (s : ℝ) |
| 66 | (e : Module.Basis (Fin n) ℝ (G.Horizontal (R.curve s))) |
| 67 | (he : ∀ i j, G.spacetime.horizontalMetric.inner (R.curve s) (e i) (e j) = |
| 68 | if i = j then 1 else 0) (f fp : ℝ) |
| 69 | (W : Fin n → G.Horizontal (R.curve s)) |
| 70 | (hW : ∀ i v, G.spacetime.horizontalMetric.inner (R.curve s) (W i) v = |
| 71 | fp * G.spacetime.horizontalMetric.inner (R.curve s) (e i) v - |
| 72 | 2 * s * f * horizontalRicci G.leafwise (R.curve s) (e i) v) : |
| 73 | let q := spacetimeSlicePoint G.slices (R.curve s) |
| 74 | let D := G.leafwise.sliceConnection (G.spacetime.timeFunction (R.curve s)) |
| 75 | (∑ i, horizontalIndexPairDensity R s (f • e i) (f • e i) (W i) (W i)) = |
| 76 | (n : ℝ) * fp ^ 2 - 4 * s * f * fp * horizontalScalarCurvature G.leafwise (R.curve s) + |
| 77 | f ^ 2 * (4 * s ^ 2 * D.ricciNormSq q + |
| 78 | 2 * s ^ 2 * D.laplacian D.scalarCurvature q - |
| 79 | horizontalRicci G.leafwise (R.curve s) (R.horizontal_velocity s) |
| 80 | (R.horizontal_velocity s)) := by |
| 81 | let S := G.slices (G.spacetime.timeFunction (R.curve s)) |
| 82 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) S.Point := S.chartedSpace |
| 83 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : S.Point → Type _) := |
| 84 | ⟨S.metricOnPoints.toRiemannianMetric⟩ |
| 85 | let q := spacetimeSlicePoint G.slices (R.curve s) |
| 86 | let D := G.leafwise.sliceConnection (G.spacetime.timeFunction (R.curve s)) |
| 87 | let j := S.tangentEquiv q |
| 88 | let es := e.map j.symm.toLinearEquiv |
| 89 | have hes : Orthonormal ℝ es := by |
| 90 | apply orthonormal_iff_ite.mpr |
| 91 | intro i k |
| 92 | change S.metricOnPoints.inner q (es i) (es k) = _ |
| 93 | rw [S.metric_eq] |
| 94 | simpa only [es, j, S, q, spacetimeSlicePoint, Module.Basis.map_apply, |
| 95 | ContinuousLinearEquiv.coe_toLinearEquiv, |
| 96 | ContinuousLinearEquiv.apply_symm_apply] using he i k |
| 97 | have hWs (i : Fin n) (v : TangentSpace (𝓡 n) q) : |
| 98 | S.metricOnPoints.inner q (j.symm (W i)) v = |
| 99 | fp * S.metricOnPoints.inner q (es i) v - 2 * s * f * D.ricci q (es i) v := by |
| 100 | rw [S.metric_eq, S.metric_eq] |
| 101 | simpa only [es, j, S, q, D, spacetimeSlicePoint, Module.Basis.map_apply, |
| 102 | ContinuousLinearEquiv.coe_toLinearEquiv, |
| 103 | ContinuousLinearEquiv.apply_symm_apply, horizontalRicci, |
| 104 | ContinuousLinearEquiv.symm_apply_apply] using hW i (j v) |
| 105 | have ht := sliceIndexDensity_adapted_trace_of_pair hM04 D q s |
| 106 | (j.symm (R.horizontal_velocity s)) f fp (es.toOrthonormalBasis hes) |
| 107 | (fun i => j.symm (W i)) (by simpa only [Module.Basis.coe_toOrthonormalBasis] using hWs) |
| 108 | simp_rw [horizontalIndexPairDensity_eq_slice R] |
| 109 | dsimp only [Module.Basis.coe_toOrthonormalBasis, es, j, S, q, D, spacetimeSlicePoint, |
| 110 | Module.Basis.map_apply, ContinuousLinearEquiv.coe_toLinearEquiv, |
| 111 | horizontalScalarCurvature, horizontalRicci] at ht ⊢ |
| 112 | simp only [Module.Basis.coe_toOrthonormalBasis, Module.Basis.map_apply, |
| 113 | ContinuousLinearEquiv.coe_toLinearEquiv] at ht |
| 114 | refine Eq.trans ?_ ht |
| 115 | apply Finset.sum_congr rfl |
| 116 | intro i _ |
| 117 | exact congrArg (fun v => sliceIndexDensity D q s (j.symm (R.horizontal_velocity s)) v |
| 118 | (j.symm (W i))) (j.symm.map_smul f (e i)) |
| 119 | |
| 120 | end PoincareMT.M14 |