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.Regularity.Formulas.ScalarEvolutionTransportRicci |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.OrdinaryGauge |
| 3 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Divergence.Pullback |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.Gauge.CurvatureTransport |
| 5 | |
| 6 | /-! |
| 7 | # Slice transport of the two scalar-evolution terms |
| 8 | |
| 9 | The retained slice Laplacian and Ricci norm agree with their ordinary |
| 10 | gauge values. Morgan-Tian Theorem 3.13, equation (3.7), p. 41, |
| 11 | Definition 3.38, p. 61, and Section 6.5, pp. 126-127. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- Equal clock values select equal dependent slice instances. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | universe u v |
| 22 | |
| 23 | namespace PoincareMT.M14 |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 26 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 27 | {K : SpacetimeInterval} {T : SmoothSpacetimeInterval K} |
| 28 | {C : Type v} [TopologicalSpace C] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 30 | {e : MovingSpacetimeGauge G.spacetime T C} |
| 31 | {g : MovingSpacetimeGaugeGeometry e} {c : MetricLeviCivitaFamily g.metric} |
| 32 | (H : MovingGaugeCalculus G.leafwise g c) |
| 33 | |
| 34 | include H |
| 35 | |
| 36 | /-- The full Ricci contraction agrees on the actual gauge slice, |
| 37 | Theorem 3.13, equation (3.7), p. 41, and Definition 3.38, p. 61. -/ |
| 38 | theorem movingGauge_ricciNormSq (t : T.Point) (x : C) : |
| 39 | (c t.val).ricciNormSq x = |
| 40 | (G.leafwise.sliceConnection t.val).ricciNormSq |
| 41 | (movingGaugeSliceMap e G.slices t x) := |
| 42 | ricciNormSq_eq_of_local_isometry (c t.val) (G.leafwise.sliceConnection t.val) |
| 43 | isOpen_univ (H.slice_localDiffeomorph t).contMDiff.contMDiffOn |
| 44 | (fun y _ a b => (H.slice_metric_eq t y a b).symm) (mem_univ x) |
| 45 | |
| 46 | /-- The actual scalar Laplacian agrees on the gauge slice, |
| 47 | Theorem 3.13, equation (3.7), p. 41, and Section 6.5, pp. 126-127. -/ |
| 48 | theorem movingGauge_scalarLaplacian |
| 49 | (hscalar : ContMDiff (spacetimeModel n) 𝓘(ℝ) ∞ |
| 50 | (horizontalScalarCurvature G.leafwise)) (t : T.Point) (x : C) : |
| 51 | (c t.val).laplacian (c t.val).scalarCurvature x = |
| 52 | (G.leafwise.sliceConnection t.val).laplacian |
| 53 | (G.leafwise.sliceConnection t.val).scalarCurvature |
| 54 | (movingGaugeSliceMap e G.slices t x) := by |
| 55 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) (G.slices t.val).Point := |
| 56 | (G.slices t.val).chartedSpace |
| 57 | let f := movingGaugeSliceMap e G.slices t |
| 58 | let D := G.leafwise.sliceConnection t.val |
| 59 | have hscalarSlice : ContMDiff (𝓡 n) 𝓘(ℝ) ∞ D.scalarCurvature := by |
| 60 | have hi : ContMDiff (𝓡 n) (spacetimeModel n) ∞ |
| 61 | (Subtype.val : (G.slices t.val).Point → G.Point) := |
| 62 | (G.slices t.val).inclusion_smooth |
| 63 | have hs := hscalar.comp hi |
| 64 | have heq : horizontalScalarCurvature G.leafwise ∘ |
| 65 | (Subtype.val : (G.slices t.val).Point → G.Point) = D.scalarCurvature := by |
| 66 | funext q |
| 67 | exact horizontalScalarCurvature_eq_slice G.leafwise q.val q.property |
| 68 | rwa [heq] at hs |
| 69 | have heq : (c t.val).scalarCurvature = D.scalarCurvature ∘ f := by |
| 70 | funext y |
| 71 | exact (H.scalar_eq t y).trans |
| 72 | (horizontalScalarCurvature_eq_slice G.leafwise _ (e.time_eq (t, y))) |
| 73 | have hinv (y : C) : (mfderiv (𝓡 n) (𝓡 n) f y).IsInvertible := by |
| 74 | rw [← (H.slice_localDiffeomorph t).mfderivToContinuousLinearEquiv_coe (by simp) y] |
| 75 | exact ContinuousLinearMap.isInvertible_equiv |
| 76 | rw [heq] |
| 77 | exact (c t.val).laplacian_comp_of_metric_pullback D |
| 78 | ((H.slice_localDiffeomorph t).contMDiff x) (Eventually.of_forall hinv) |
| 79 | (Eventually.of_forall (fun y a b => (H.slice_metric_eq t y a b).symm)) |
| 80 | (hscalarSlice (f x)) |
| 81 | |
| 82 | end PoincareMT.M14 |