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.Realization.Slice.HorizontalMap |
| 2 | import PoincareLib.Geometry.Spacetime.Realization.Bundle.BilinearSmooth |
| 3 | import PoincareLib.Geometry.Spacetime.Realization.Geometry |
| 4 | |
| 5 | /-! |
| 6 | # Pullback of the horizontal metric to the actual slices |
| 7 | -/ |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Bundle |
| 13 | open scoped Manifold ContDiff Bundle Topology |
| 14 | |
| 15 | open PoincareMT |
| 16 | |
| 17 | namespace Poincare.Spacetime.Realization |
| 18 | |
| 19 | variable {n : ℕ} {X : Type*} [TopologicalSpace X] |
| 20 | |
| 21 | noncomputable def sliceMetricForm (A : AdaptedMetricAtlas n X) (t : ℝ) |
| 22 | (p : spacetimeSlice A.time t) : |
| 23 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 24 | (adaptedHorizontalMetric A p.val).bilinearComp |
| 25 | (sliceHorizontalEquiv A t p).toContinuousLinearMap |
| 26 | (sliceHorizontalEquiv A t p).toContinuousLinearMap |
| 27 | |
| 28 | theorem sliceMetricForm_pos (A : AdaptedMetricAtlas n X) (t : ℝ) |
| 29 | (p : spacetimeSlice A.time t) (v : EuclideanSpace ℝ (Fin n)) (hv : v ≠ 0) : |
| 30 | 0 < sliceMetricForm A t p v v := by |
| 31 | apply adaptedHorizontalMetric_pos A p.val |
| 32 | exact fun h ↦ hv ((sliceHorizontalEquiv A t p).injective (h.trans (map_zero _).symm)) |
| 33 | |
| 34 | theorem sliceMetricForm_smooth (A : AdaptedMetricAtlas n X) (t : ℝ) : |
| 35 | letI := adaptedSliceChartedSpace A t |
| 36 | letI : IsManifold (𝓡 n) ∞ (spacetimeSlice A.time t) := adaptedSlice_isManifold A t |
| 37 | ContMDiff (𝓡 n) |
| 38 | ((𝓡 n).prod |
| 39 | 𝓘(ℝ, EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ)) ∞ |
| 40 | (fun p ↦ TotalSpace.mk' (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 41 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 42 | (E := fun p : spacetimeSlice A.time t ↦ |
| 43 | TangentSpace (𝓡 n) p →L[ℝ] TangentSpace (𝓡 n) p →L[ℝ] ℝ) |
| 44 | p (sliceMetricForm A t p)) := by |
| 45 | let := adaptedChartedSpace A |
| 46 | let : IsManifold (spacetimeModel n) ∞ X := adapted_isManifold A |
| 47 | let := adaptedSliceChartedSpace A t |
| 48 | let : IsManifold (𝓡 n) ∞ (spacetimeSlice A.time t) := adaptedSlice_isManifold A t |
| 49 | let := adaptedHorizontalTopology A |
| 50 | let := adaptedHorizontalFiberBundle A |
| 51 | let := adaptedHorizontalVectorBundle A |
| 52 | let := adaptedHorizontalSmoothBundle A |
| 53 | intro p |
| 54 | rw [← contMDiffWithinAt_univ] |
| 55 | apply contMDiffWithinAt_bilinear_of_eval (IB := 𝓡 n) (J := 𝓡 n) |
| 56 | (F := EuclideanSpace ℝ (Fin n)) |
| 57 | (E := (TangentSpace (𝓡 n) : spacetimeSlice A.time t → Type _)) |
| 58 | (b := id) (g := sliceMetricForm A t) contMDiffWithinAt_id |
| 59 | intro v w |
| 60 | have hg := (adaptedHorizontalMetric_smooth A).contMDiffAt.comp p |
| 61 | (slice_inclusion_smooth A t p) |
| 62 | have hv := (sliceHorizontalTangentMap_smooth A t).contMDiffAt.comp p |
| 63 | (frameVector_contMDiffAt (IB := 𝓡 n) |
| 64 | (E := (TangentSpace (𝓡 n) : spacetimeSlice A.time t → Type _)) p v) |
| 65 | have hw := (sliceHorizontalTangentMap_smooth A t).contMDiffAt.comp p |
| 66 | (frameVector_contMDiffAt (IB := 𝓡 n) |
| 67 | (E := (TangentSpace (𝓡 n) : spacetimeSlice A.time t → Type _)) p w) |
| 68 | have h := ContMDiffAt.clm_bundle_apply₂ |
| 69 | (F₃ := ℝ) (E₃ := fun _ : X ↦ ℝ) |
| 70 | (b := (Subtype.val : spacetimeSlice A.time t → X)) |
| 71 | (ψ := fun x ↦ adaptedHorizontalMetric A x.val) hg hv hw |
| 72 | exact (contMDiffAt_totalSpace.mp h).2.contMDiffWithinAt |
| 73 | |
| 74 | noncomputable def adaptedSliceMetric (A : AdaptedMetricAtlas n X) (t : ℝ) : |
| 75 | letI := adaptedSliceChartedSpace A t |
| 76 | letI : IsManifold (𝓡 n) ∞ (spacetimeSlice A.time t) := adaptedSlice_isManifold A t |
| 77 | RiemannianMetric n (spacetimeSlice A.time t) := |
| 78 | letI := adaptedSliceChartedSpace A t |
| 79 | letI : IsManifold (𝓡 n) ∞ (spacetimeSlice A.time t) := adaptedSlice_isManifold A t |
| 80 | { |
| 81 | inner := sliceMetricForm A t |
| 82 | symm := fun p v w ↦ adaptedHorizontalMetric_symm A p.val |
| 83 | (sliceHorizontalEquiv A t p v) (sliceHorizontalEquiv A t p w) |
| 84 | pos := sliceMetricForm_pos A t |
| 85 | isVonNBounded := fun p ↦ positiveForm_isVonNBounded (sliceMetricForm A t p) |
| 86 | (sliceMetricForm_pos A t p) |
| 87 | contMDiff := sliceMetricForm_smooth A t |
| 88 | } |
| 89 | |
| 90 | end Poincare.Spacetime.Realization |