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.Spacetime.Horizontal.ConnectionSmooth |
| 2 | import PoincareLib.Geometry.Spacetime.Horizontal.Choice |
| 3 | |
| 4 | /-! |
| 5 | # Assembly of horizontal Ricci calculus |
| 6 | |
| 7 | The joint-regularity conclusions combine with the canonical connection, |
| 8 | slice tensor calculus and independence of retained connection choices. |
| 9 | |
| 10 | Source: Morgan-Tian, Theorem 1.2, pp. 3-4, and Definition 3.36, p. 60. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | open Bundle Set |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {F : GeneralizedFlowSpacetime n X time I} |
| 24 | {S : ∀ t : ℝ, SpacetimeSliceGeometry F t} |
| 25 | |
| 26 | theorem horizontalRicciCalculus_of_joint_regularity |
| 27 | (hMetric : M12MetricPredecessors.{u} n) (D : LeafwiseLeviCivitaFamily F S) |
| 28 | (hRiemann : IsSmoothHorizontalCovariantTensor F (k := 4) |
| 29 | (fun p v => horizontalRiemann D p (v 0) (v 1) (v 2) (v 3))) |
| 30 | (hRicci : IsSmoothHorizontalCovariantTensor F (k := 2) |
| 31 | (fun p v => horizontalRicci D p (v 0) (v 1))) |
| 32 | (hScalar : ContMDiff (spacetimeModel n) 𝓘(ℝ) ∞ (horizontalScalarCurvature D)) |
| 33 | (hNormSq : ContMDiff (spacetimeModel n) 𝓘(ℝ) ∞ (horizontalCurvatureNormSq D)) |
| 34 | (hLeaf : ∀ U : Set F.Point, IsOpen U → |
| 35 | ∀ V : HorizontalSection F, IsSmoothHorizontalSectionOn F V U → |
| 36 | ContMDiffOn (spacetimeModel n) |
| 37 | ((spacetimeModel n).prod |
| 38 | 𝓘(ℝ, EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n))) ∞ |
| 39 | (fun p => TotalSpace.mk' |
| 40 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) |
| 41 | p (rawLeafwiseCovariantDerivative D V p)) U) : HorizontalRicciCalculus D := by |
| 42 | refine |
| 43 | { lie_tensor := horizontalMetricLieDerivative_tensor |
| 44 | lie_symmetric := horizontalMetricLieDerivative_symmetric |
| 45 | lie_on_fields := ?_ |
| 46 | time_bracket_horizontal := ?_ |
| 47 | riemann_tensor := hRiemann |
| 48 | ricci_tensor := hRicci |
| 49 | ricci_symmetric := D.horizontalRicci_symmetric hMetric |
| 50 | scalar_smooth := hScalar |
| 51 | normSq_smooth := hNormSq |
| 52 | norm_continuous := ?_ |
| 53 | slice_calculus := fun t => hMetric.curvature_calculus (S t).Point |
| 54 | (S t).metricOnPoints (D.sliceConnection t) |
| 55 | riemann_choice := D.horizontalRiemann_eq |
| 56 | ricci_choice := D.horizontalRicci_eq |
| 57 | scalar_choice := D.horizontalScalarCurvature_eq |
| 58 | norm_choice := D.horizontalCurvatureNorm_eq |
| 59 | normSq_choice := D.horizontalCurvatureNormSq_eq |
| 60 | equation_choice := D.intrinsicGeneralizedRicciEquation_iff |
| 61 | leafwise_smooth := hLeaf |
| 62 | leafwise_apply_smooth := ?_ |
| 63 | leafwise_choice := ?_ |
| 64 | horizontal_choice := ?_ |
| 65 | horizontal_connection := ⟨spacetimeHorizontalConnection_of_leafwise_smooth D hLeaf⟩ } |
| 66 | · intro U hU V W hV hW p hp |
| 67 | exact horizontalMetricLieDerivative_on_fields hU hV hW hp |
| 68 | · intro U hU V hV p hp |
| 69 | exact horizontalTimeBracket_is_horizontal hU hV hp |
| 70 | · have heq : horizontalCurvatureNorm D = |
| 71 | fun p => Real.sqrt (horizontalCurvatureNormSq D p) := by |
| 72 | funext p |
| 73 | exact (Real.sqrt_sq (show 0 ≤ horizontalCurvatureNorm D p from |
| 74 | Real.sqrt_nonneg _)).symm |
| 75 | rw [heq] |
| 76 | exact Real.continuous_sqrt.comp hNormSq.continuous |
| 77 | · intro U hU V W hV hW |
| 78 | exact (hLeaf U hU W hW).clm_bundle_apply hV |
| 79 | · intro D' U hU V hV p hp |
| 80 | exact D.rawLeafwiseCovariantDerivative_eq D' |
| 81 | ((hV.contMDiffAt (hU.mem_nhds hp)).mdifferentiableAt (by simp)) |
| 82 | · intro D' U hU V hV p hp |
| 83 | exact D.rawHorizontalCovariantDerivative_eq D' |
| 84 | ((hV.contMDiffAt (hU.mem_nhds hp)).mdifferentiableAt (by simp)) |
| 85 | |
| 86 | /-- The horizontal connection and its regularity now come from the original |
| 87 | data; only joint curvature regularity remains to assemble. -/ |
| 88 | theorem horizontalRicciCalculus_of_curvature_regularity |
| 89 | (hMetric : M12MetricPredecessors.{u} n) |
| 90 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 91 | (D : LeafwiseLeviCivitaFamily F S) {T : SpacetimeIntervalSystem} |
| 92 | (cover : SpacetimeGaugeCover F T) |
| 93 | (hRiemann : IsSmoothHorizontalCovariantTensor F (k := 4) |
| 94 | (fun p v => horizontalRiemann D p (v 0) (v 1) (v 2) (v 3))) |
| 95 | (hRicci : IsSmoothHorizontalCovariantTensor F (k := 2) |
| 96 | (fun p v => horizontalRicci D p (v 0) (v 1))) |
| 97 | (hScalar : ContMDiff (spacetimeModel n) 𝓘(ℝ) ∞ (horizontalScalarCurvature D)) |
| 98 | (hNormSq : ContMDiff (spacetimeModel n) 𝓘(ℝ) ∞ (horizontalCurvatureNormSq D)) : |
| 99 | HorizontalRicciCalculus D := |
| 100 | horizontalRicciCalculus_of_joint_regularity hMetric D hRiemann hRicci hScalar hNormSq |
| 101 | (fun _ hO _ hV => rawLeafwiseCovariantDerivative_smooth hCoordinates D cover hO hV) |
| 102 | |
| 103 | end PoincareMT |