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.Basic |
| 2 | import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace |
| 3 | |
| 4 | /-! |
| 5 | # Smooth backward metrics in one fixed tangent frame |
| 6 | |
| 7 | Interior metric smoothness passes to the backward time variable and to the |
| 8 | preferred tangent frame at a fixed point. The coordinate bilinear form is |
| 9 | identified with the actual metric on the whole frame domain. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Bundle ContinuousLinearMap Filter Set |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedVolume |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} |
| 24 | |
| 25 | /-- The backward-time metric section is smooth at every strict interior point. -/ |
| 26 | theorem backward_metric_contMDiffAt |
| 27 | (hwindow : Icc (T - τmax) T ⊆ J) |
| 28 | (z : M × ℝ) (hz : z ∈ univ ×ˢ Ioo 0 τmax) : |
| 29 | ContMDiffAt ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 30 | ((𝓡 n).prod 𝓘(ℝ, |
| 31 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ)) ∞ |
| 32 | (fun w : M × ℝ ↦ Bundle.TotalSpace.mk' |
| 33 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 34 | (E := fun q : M ↦ TangentSpace (𝓡 n) q →L[ℝ] TangentSpace (𝓡 n) q →L[ℝ] ℝ) |
| 35 | w.1 ((F.metric (T - w.2)).inner w.1)) z := by |
| 36 | have htime : T - z.2 ∈ Ioo (T - τmax) T := by |
| 37 | constructor <;> linarith [hz.2.1, hz.2.2] |
| 38 | have hnhds : J ×ˢ (univ : Set M) ∈ 𝓝 (T - z.2, z.1) := |
| 39 | Filter.mem_of_superset |
| 40 | ((isOpen_Ioo.prod isOpen_univ).mem_nhds ⟨htime, mem_univ _⟩) |
| 41 | (fun _ hw ↦ ⟨hwindow ⟨hw.1.1.le, hw.1.2.le⟩, hw.2⟩) |
| 42 | have hmetric := F.smooth.contMDiffAt hnhds |
| 43 | exact hmetric.comp z |
| 44 | ((contMDiffAt_const.sub contMDiffAt_snd).prodMk contMDiffAt_fst) |
| 45 | |
| 46 | /-- The actual backward metric expressed in the preferred tangent frame at a fixed point. -/ |
| 47 | noncomputable def backwardMetricCoordinates (F : RicciFlow n M J) (T : ℝ) (q₀ : M) |
| 48 | (w : M × ℝ) : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 49 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 50 | inCoordinates (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) |
| 51 | (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 52 | (fun q ↦ TangentSpace (𝓡 n) q →L[ℝ] ℝ) |
| 53 | q₀ w.1 q₀ w.1 ((F.metric (T - w.2)).inner w.1) |
| 54 | |
| 55 | set_option backward.isDefEq.respectTransparency false in |
| 56 | /-- The actual bilinear operator in the fixed frame has a smooth spacetime germ. -/ |
| 57 | theorem backwardMetricCoordinates_contMDiffAt |
| 58 | (hwindow : Icc (T - τmax) T ⊆ J) |
| 59 | (z : M × ℝ) (hz : z ∈ univ ×ˢ Ioo 0 τmax) : |
| 60 | ContMDiffAt ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 61 | 𝓘(ℝ, EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 62 | ∞ (backwardMetricCoordinates F T z.1) z := by |
| 63 | have h := backward_metric_contMDiffAt (F := F) hwindow z hz |
| 64 | rw [contMDiffAt_hom_bundle] at h |
| 65 | exact h.2 |
| 66 | |
| 67 | set_option backward.isDefEq.respectTransparency false in |
| 68 | /-- Frame evaluation preserves both arguments of the selected metric exactly. -/ |
| 69 | theorem backwardMetricCoordinates_apply (q₀ : M) (w : M × ℝ) |
| 70 | (hw : w.1 ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 71 | (TangentSpace (𝓡 n)) q₀).baseSet) |
| 72 | (v v' : TangentSpace (𝓡 n) w.1) : |
| 73 | backwardMetricCoordinates F T q₀ w |
| 74 | ((trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 75 | (TangentSpace (𝓡 n)) q₀).continuousLinearMapAt ℝ w.1 v) |
| 76 | ((trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 77 | (TangentSpace (𝓡 n)) q₀).continuousLinearMapAt ℝ w.1 v') = |
| 78 | (F.metric (T - w.2)).inner w.1 v v' := by |
| 79 | unfold backwardMetricCoordinates |
| 80 | rw [inCoordinates_apply_eq₂ hw hw (mem_univ _)] |
| 81 | simp only [Trivialization.continuousLinearMapAt_apply, |
| 82 | Trivialization.symm_linearMapAt _ hw] |
| 83 | change (Bundle.Trivial.trivialization M ℝ).linearMapAt ℝ w.1 _ = _ |
| 84 | simp only [Bundle.Trivial.linearMapAt_trivialization, LinearMap.id_apply] |
| 85 | |
| 86 | /-- The same metric in the preferred manifold chart and backward time. -/ |
| 87 | noncomputable def coordinateBackwardMetric (F : RicciFlow n M J) (T : ℝ) (q₀ : M) |
| 88 | (z : EuclideanSpace ℝ (Fin n) × ℝ) : |
| 89 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 90 | backwardMetricCoordinates F T q₀ ((extChartAt (𝓡 n) q₀).symm z.1, z.2) |
| 91 | |
| 92 | set_option backward.isDefEq.respectTransparency false in |
| 93 | /-- In chart coordinates the actual backward metric is an ordinary smooth operator germ. -/ |
| 94 | theorem coordinateBackwardMetric_contDiffAt |
| 95 | (hwindow : Icc (T - τmax) T ⊆ J) |
| 96 | (q₀ : M) {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) : |
| 97 | ContDiffAt ℝ ∞ (coordinateBackwardMetric F T q₀) |
| 98 | (extChartAt (𝓡 n) q₀ q₀, τ) := by |
| 99 | have hi : ContMDiffAt (𝓡 n) (𝓡 n) ∞ (extChartAt (𝓡 n) q₀).symm |
| 100 | (extChartAt (𝓡 n) q₀ q₀) := |
| 101 | (contMDiffOn_extChartAt_symm q₀).contMDiffAt |
| 102 | (extChartAt_target_mem_nhds (I := 𝓡 n) q₀) |
| 103 | have h := backwardMetricCoordinates_contMDiffAt (F := F) hwindow |
| 104 | (q₀, τ) ⟨mem_univ _, hτ, hmax⟩ |
| 105 | have hpre : ContMDiffAt ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 106 | ((𝓡 n).prod (𝓘(ℝ, ℝ))) ∞ |
| 107 | (fun w : EuclideanSpace ℝ (Fin n) × ℝ ↦ |
| 108 | ((extChartAt (𝓡 n) q₀).symm w.1, w.2)) |
| 109 | (extChartAt (𝓡 n) q₀ q₀, τ) := |
| 110 | (hi.comp (f := fun w : EuclideanSpace ℝ (Fin n) × ℝ ↦ w.1) |
| 111 | (extChartAt (𝓡 n) q₀ q₀, τ) contMDiffAt_fst).prodMk contMDiffAt_snd |
| 112 | have h' : ContMDiffAt ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 113 | 𝓘(ℝ, EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 114 | ∞ (backwardMetricCoordinates F T q₀) |
| 115 | ((extChartAt (𝓡 n) q₀).symm (extChartAt (𝓡 n) q₀ q₀), τ) := by |
| 116 | simpa only [extChartAt_to_inv] using h |
| 117 | have hcomp := h'.comp |
| 118 | (f := fun w : EuclideanSpace ℝ (Fin n) × ℝ ↦ |
| 119 | ((extChartAt (𝓡 n) q₀).symm w.1, w.2)) |
| 120 | (extChartAt (𝓡 n) q₀ q₀, τ) hpre |
| 121 | rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] at hcomp |
| 122 | exact hcomp.contDiffAt |
| 123 | |
| 124 | end PoincareMT.ReducedVolume |