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.Assembly |
| 2 | import PoincareLib.Geometry.Spacetime.Horizontal.Regularity.Trace |
| 3 | import PoincareLib.Geometry.Spacetime.Horizontal.Regularity.Norm |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.Gauge.Cover |
| 5 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.AncientVolume.ScalarRatio.Annular.SpacetimeBounds |
| 6 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.Jacobi.Coefficients |
| 7 | |
| 8 | /-! |
| 9 | # Joint regularity producer for the horizontal Ricci calculus |
| 10 | |
| 11 | The adapted cover and the horizontal Koszul formula give joint smoothness of |
| 12 | the retained leafwise connection. Its commutator gives horizontal Riemann |
| 13 | regularity; inverse Gram contractions give Ricci, scalar curvature and the |
| 14 | squared curvature norm. The existing assembly then supplies all seven |
| 15 | regularity fields from the original data, including at interval endpoints. |
| 16 | |
| 17 | The coordinate helpers also establish joint smoothness of the spatial |
| 18 | Christoffel coefficients of a smooth positive-definite pullback metric. |
| 19 | |
| 20 | Source: Morgan-Tian, Definition 1.4, pp. 5-7, and Definitions 3.34-3.38, |
| 21 | pp. 59-61. |
| 22 | -/ |
| 23 | |
| 24 | set_option autoImplicit false |
| 25 | set_option synthInstance.maxHeartbeats 100000 |
| 26 | set_option maxSynthPendingDepth 12 |
| 27 | |
| 28 | open scoped Manifold ContDiff Bundle Topology |
| 29 | |
| 30 | universe u |
| 31 | |
| 32 | namespace PoincareMT |
| 33 | |
| 34 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 35 | {I : SpacetimeInterval} {F : GeneralizedFlowSpacetime n X time I} |
| 36 | {S : ∀ t : ℝ, SpacetimeSliceGeometry F t} |
| 37 | |
| 38 | section CoordinateCoefficients |
| 39 | |
| 40 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] |
| 41 | |
| 42 | /-- Spatial Christoffel contractions remain jointly smooth for a smooth |
| 43 | coefficient family, including points on a closed time boundary. -/ |
| 44 | theorem contDiffOn_spatialCoordinateChristoffel |
| 45 | {J : Set ℝ} {U : Set E} (hJ : UniqueDiffOn ℝ J) (hU : IsOpen U) |
| 46 | {B : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ} |
| 47 | (hB : ContDiffOn ℝ ∞ B (J ×ˢ U)) |
| 48 | (hInv : ∀ p ∈ J ×ˢ U, (B p).IsInvertible) (u v : E) : |
| 49 | ContDiffOn ℝ ∞ |
| 50 | (fun p : ℝ × E => coordinateChristoffel (fun x => B (p.1, x)) p.2 u v) |
| 51 | (J ×ˢ U) := by |
| 52 | have hD : ContDiffOn ℝ ∞ |
| 53 | (fun p : ℝ × E => fderiv ℝ (fun x => B (p.1, x)) p.2) |
| 54 | (J ×ˢ U) := |
| 55 | SpacetimeBounds.contDiffOn_spatialFDeriv_within hB hJ hU |
| 56 | intro p hp |
| 57 | have hBp : ContDiffWithinAt ℝ ∞ B (J ×ˢ U) p := hB p hp |
| 58 | have hIp : ContDiffWithinAt ℝ ∞ (fun q => (B q).inverse) (J ×ˢ U) p := |
| 59 | (hInv p hp).contDiffAt_map_inverse.comp_contDiffWithinAt p hBp |
| 60 | have hDp := hD p hp |
| 61 | have hDu : ContDiffWithinAt ℝ ∞ |
| 62 | (fun q : ℝ × E => (fderiv ℝ (fun x => B (q.1, x)) q.2) u) |
| 63 | (J ×ˢ U) p := |
| 64 | hDp.clm_apply (contDiffWithinAt_const (c := u)) |
| 65 | have hDuv : ContDiffWithinAt ℝ ∞ |
| 66 | (fun q : ℝ × E => (fderiv ℝ (fun x => B (q.1, x)) q.2) u v) |
| 67 | (J ×ˢ U) p := |
| 68 | hDu.clm_apply (contDiffWithinAt_const (c := v)) |
| 69 | have hDv : ContDiffWithinAt ℝ ∞ |
| 70 | (fun q : ℝ × E => (fderiv ℝ (fun x => B (q.1, x)) q.2) v) |
| 71 | (J ×ˢ U) p := |
| 72 | hDp.clm_apply (contDiffWithinAt_const (c := v)) |
| 73 | have hflip : ContDiff ℝ ∞ |
| 74 | (fun L : E →L[ℝ] E →L[ℝ] ℝ => L.flip) := |
| 75 | (ContinuousLinearMap.flipₗᵢ ℝ E E ℝ).contDiff |
| 76 | have hflip' : ContDiff ℝ ∞ |
| 77 | (fun L : E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ => L.flip) := |
| 78 | (ContinuousLinearMap.flipₗᵢ ℝ E E (E →L[ℝ] ℝ)).contDiff |
| 79 | have hflipDv : ContDiffWithinAt ℝ ∞ |
| 80 | (fun q : ℝ × E => ((fderiv ℝ (fun x => B (q.1, x)) q.2) v).flip) |
| 81 | (J ×ˢ U) p := |
| 82 | hflip.contDiffAt.comp_contDiffWithinAt p hDv |
| 83 | have hflipDv_u : ContDiffWithinAt ℝ ∞ |
| 84 | (fun q : ℝ × E => ((fderiv ℝ (fun x => B (q.1, x)) q.2) v).flip u) |
| 85 | (J ×ˢ U) p := |
| 86 | hflipDv.clm_apply (contDiffWithinAt_const (c := u)) |
| 87 | have hflipD : ContDiffWithinAt ℝ ∞ |
| 88 | (fun q : ℝ × E => (fderiv ℝ (fun x => B (q.1, x)) q.2).flip) |
| 89 | (J ×ˢ U) p := |
| 90 | hflip'.contDiffAt.comp_contDiffWithinAt p hDp |
| 91 | have hflipDu : ContDiffWithinAt ℝ ∞ |
| 92 | (fun q : ℝ × E => ((fderiv ℝ (fun x => B (q.1, x)) q.2).flip u)) |
| 93 | (J ×ˢ U) p := |
| 94 | hflipD.clm_apply (contDiffWithinAt_const (c := u)) |
| 95 | have hflipDu_flip : ContDiffWithinAt ℝ ∞ |
| 96 | (fun q : ℝ × E => ((fderiv ℝ (fun x => B (q.1, x)) q.2).flip u).flip) |
| 97 | (J ×ˢ U) p := |
| 98 | hflip.contDiffAt.comp_contDiffWithinAt p hflipDu |
| 99 | have hflipDu_v : ContDiffWithinAt ℝ ∞ |
| 100 | (fun q : ℝ × E => ((fderiv ℝ (fun x => B (q.1, x)) q.2).flip u).flip v) |
| 101 | (J ×ˢ U) p := |
| 102 | hflipDu_flip.clm_apply (contDiffWithinAt_const (c := v)) |
| 103 | have hK : ContDiffWithinAt ℝ ∞ |
| 104 | (fun q : ℝ × E => metricKoszulCovector |
| 105 | (fderiv ℝ (fun x => B (q.1, x)) q.2) u v) |
| 106 | (J ×ˢ U) p := by |
| 107 | unfold metricKoszulCovector |
| 108 | exact ((hDuv.add hflipDv_u).sub hflipDu_v).const_smul _ |
| 109 | have hInvApply : ContDiffWithinAt ℝ ∞ |
| 110 | (fun q : ℝ × E => (B q).inverse |
| 111 | (metricKoszulCovector (fderiv ℝ (fun x => B (q.1, x)) q.2) u v)) |
| 112 | (J ×ˢ U) p := |
| 113 | hIp.clm_apply hK |
| 114 | simpa only [coordinateChristoffel] using hInvApply |
| 115 | |
| 116 | variable [FiniteDimensional ℝ E] |
| 117 | |
| 118 | /-- The full bilinear Christoffel coefficient field is jointly smooth on the |
| 119 | same closed-time coordinate domain. -/ |
| 120 | theorem contDiffOn_spatialCoordinateChristoffel_bilinear |
| 121 | {J : Set ℝ} {U : Set E} (hJ : UniqueDiffOn ℝ J) (hU : IsOpen U) |
| 122 | {B : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ} |
| 123 | (hB : ContDiffOn ℝ ∞ B (J ×ˢ U)) |
| 124 | (hInv : ∀ p ∈ J ×ˢ U, (B p).IsInvertible) : |
| 125 | ContDiffOn ℝ ∞ |
| 126 | (fun p : ℝ × E => |
| 127 | PoincareMT.CoordinateExponential.christoffelBilinear |
| 128 | (fun x => B (p.1, x)) p.2) |
| 129 | (J ×ˢ U) := by |
| 130 | apply contDiffOn_clm_apply.mpr |
| 131 | intro u |
| 132 | apply contDiffOn_clm_apply.mpr |
| 133 | intro v |
| 134 | simpa only [PoincareMT.CoordinateExponential.christoffelBilinear_apply] using |
| 135 | contDiffOn_spatialCoordinateChristoffel hJ hU hB hInv u v |
| 136 | |
| 137 | end CoordinateCoefficients |
| 138 | |
| 139 | /-- The original-data regularity producer consumed by M12's horizontal calculus. |
| 140 | |
| 141 | The five fields are exactly the inputs of |
| 142 | `horizontalRicciCalculus_of_joint_regularity`; no stronger calculus structure |
| 143 | or jointly smooth connection family is assumed by this interface. |
| 144 | -/ |
| 145 | theorem horizontalRicciCalculus_of_adapted_cover |
| 146 | (hMetric : M12MetricPredecessors.{u} n) |
| 147 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 148 | (D : LeafwiseLeviCivitaFamily F S) |
| 149 | (T : SpacetimeIntervalSystem) |
| 150 | (cover : SpacetimeGaugeCover F T) : |
| 151 | HorizontalRicciCalculus D := by |
| 152 | have hR := horizontalRiemann_tensor hMetric hCoordinates D cover |
| 153 | have hRic := horizontalRicci_tensor_of_riemann D hR |
| 154 | exact horizontalRicciCalculus_of_curvature_regularity hMetric hCoordinates D cover |
| 155 | hR hRic (horizontalScalarCurvature_smooth_of_ricci D hRic) |
| 156 | (horizontalCurvatureNormSq_smooth_of_riemann D hR) |
| 157 | |
| 158 | end PoincareMT |