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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.MetricConvergence.FixedMetricJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.MetricConvergence.MetricFamilyWithin |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Mathlib.SpatialJetsWithin |
| 5 | |
| 6 | /-! |
| 7 | # Smoothness of the actual fixed-coordinate blowup coefficients |
| 8 | |
| 9 | Morgan-Tian Theorem 12.28, pp. 323-324, through Theorem 11.8. |
| 10 | The actual ordinary metric and the cylinder's fixed spatial map supply |
| 11 | smooth coefficient representatives on the retained time-space product. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M35.OrdinaryRealization |
| 20 | |
| 21 | /-- Theorem 12.28: the fixed-cylinder coefficient is the actual |
| 22 | rescaled pullback coefficient of the composite source chart. -/ |
| 23 | theorem fixedCylinderMetricCoefficient_eq_pullback {J : Set ℝ} |
| 24 | (F : RicciFlow 3 StandardCapSpace J) (C : GeneralizedSliceCarrier) |
| 25 | (a Q : ℝ) (f : C.carrier → StandardCapSpace) (q : C.carrier) |
| 26 | (i j : Fin 3) (p : ℝ × EuclideanSpace ℝ (Fin 3)) |
| 27 | (hp : p.2 ∈ (extChartAt (𝓡 3) q).target) |
| 28 | (hf : ContMDiffAt (𝓡 3) (𝓡 3) ∞ f ((extChartAt (𝓡 3) q).symm p.2)) : |
| 29 | fixedCylinderMetricCoefficient F C a Q f q i j p = |
| 30 | Q * (F.metric (a + p.1 / Q)).pullbackCoefficients |
| 31 | (f ∘ (extChartAt (𝓡 3) q).symm) p.2 |
| 32 | (EuclideanSpace.basisFun (Fin 3) ℝ i) (EuclideanSpace.basisFun (Fin 3) ℝ j) := by |
| 33 | have hc := (contMDiffOn_extChartAt_symm (n := ∞) q).contMDiffAt |
| 34 | ((isOpen_extChartAt_target (I := 𝓡 3) q).mem_nhds hp) |
| 35 | have hd := mfderiv_comp p.2 (hf.mdifferentiableAt (by simp)) |
| 36 | (hc.mdifferentiableAt (by simp)) |
| 37 | have hv (v : EuclideanSpace ℝ (Fin 3)) := |
| 38 | congrArg (fun L : EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) => L v) hd |
| 39 | exact congrArg (fun r : ℝ => Q * r) |
| 40 | (congrArg₂ (fun v w : EuclideanSpace ℝ (Fin 3) => |
| 41 | (F.metric (a + p.1 / Q)).inner (f ((extChartAt (𝓡 3) q).symm p.2)) v w) |
| 42 | (hv (EuclideanSpace.basisFun (Fin 3) ℝ i)).symm |
| 43 | (hv (EuclideanSpace.basisFun (Fin 3) ℝ j)).symm) |
| 44 | |
| 45 | /-- Theorem 12.28: every actual fixed-cylinder spatial coefficient is |
| 46 | smooth at each retained source point, at any fixed time of the metric family. -/ |
| 47 | theorem fixedCylinderMetricCoefficient_contDiffAt_spatial {J : Set ℝ} |
| 48 | (F : RicciFlow 3 StandardCapSpace J) (C : GeneralizedSliceCarrier) |
| 49 | (a Q : ℝ) (f : C.carrier → StandardCapSpace) (q : C.carrier) |
| 50 | (i j : Fin 3) {U : Set C.carrier} (hU : IsOpen U) |
| 51 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) (u : ℝ) (p : EuclideanSpace ℝ (Fin 3)) |
| 52 | (hp : p ∈ (extChartAt (𝓡 3) q).target) |
| 53 | (hpU : (extChartAt (𝓡 3) q).symm p ∈ U) : |
| 54 | ContDiffAt ℝ ∞ (fun y => fixedCylinderMetricCoefficient F C a Q f q i j (u, y)) p := by |
| 55 | have hc := (contMDiffOn_extChartAt_symm (n := ∞) q).contMDiffAt |
| 56 | ((isOpen_extChartAt_target (I := 𝓡 3) q).mem_nhds hp) |
| 57 | have hparam := (hf.contMDiffAt (hU.mem_nhds hpU)).comp p hc |
| 58 | have hmetric := (F.metric (a + u / Q)).contDiffAt_pullbackCoefficients hparam |
| 59 | have hfirst := hmetric.clm_apply (contDiffAt_const (c := EuclideanSpace.basisFun (Fin 3) ℝ i)) |
| 60 | have hs := hfirst.clm_apply (contDiffAt_const (c := EuclideanSpace.basisFun (Fin 3) ℝ j)) |
| 61 | apply ((contDiffAt_const (c := Q)).mul hs).congr_of_eventuallyEq |
| 62 | have hnear := (continuousAt_extChartAt_symm'' hp).preimage_mem_nhds (hU.mem_nhds hpU) |
| 63 | filter_upwards [(isOpen_extChartAt_target (I := 𝓡 3) q).mem_nhds hp, hnear] with y hy hyU |
| 64 | exact fixedCylinderMetricCoefficient_eq_pullback F C a Q f q i j (u, y) hy |
| 65 | (hf.contMDiffAt (hU.mem_nhds hyU)) |
| 66 | |
| 67 | /-- Theorem 12.28: the original metric's fixed-cylinder coefficients |
| 68 | are jointly smooth within every retained time interval and open source chart. -/ |
| 69 | theorem fixedCylinderMetricCoefficient_contDiffOn {J I : Set ℝ} |
| 70 | (F : RicciFlow 3 StandardCapSpace J) (C : GeneralizedSliceCarrier) |
| 71 | (a Q : ℝ) (f : C.carrier → StandardCapSpace) (q : C.carrier) |
| 72 | (i j : Fin 3) {U : Set C.carrier} (hU : IsOpen U) |
| 73 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) |
| 74 | {V : Set (EuclideanSpace ℝ (Fin 3))} |
| 75 | (hV : V ⊆ (extChartAt (𝓡 3) q).target) |
| 76 | (hVU : MapsTo (extChartAt (𝓡 3) q).symm V U) |
| 77 | (htime : MapsTo (fun s : ℝ => a + s / Q) I J) : |
| 78 | ContDiffOn ℝ ∞ (fixedCylinderMetricCoefficient F C a Q f q i j) (I ×ˢ V) := by |
| 79 | have hfAt (z : EuclideanSpace ℝ (Fin 3)) (hz : z ∈ V) : |
| 80 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ f ((extChartAt (𝓡 3) q).symm z) := |
| 81 | hf.contMDiffAt (hU.mem_nhds (hVU hz)) |
| 82 | have hparam (z : EuclideanSpace ℝ (Fin 3)) (hz : z ∈ V) : |
| 83 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ (f ∘ (extChartAt (𝓡 3) q).symm) z := |
| 84 | (hfAt z hz).comp z ((contMDiffOn_extChartAt_symm q).contMDiffAt |
| 85 | ((isOpen_extChartAt_target (I := 𝓡 3) q).mem_nhds (hV hz))) |
| 86 | have hs := metricFamily_contDiffOn_rescaled_pullbackCoefficients F.smooth hparam a Q htime |
| 87 | have hfirst := hs.clm_apply (contDiffOn_const (c := EuclideanSpace.basisFun (Fin 3) ℝ i)) |
| 88 | have hcoeff := hfirst.clm_apply (contDiffOn_const (c := EuclideanSpace.basisFun (Fin 3) ℝ j)) |
| 89 | apply hcoeff.congr |
| 90 | intro p hp |
| 91 | exact fixedCylinderMetricCoefficient_eq_pullback F C a Q f q i j p |
| 92 | (hV hp.2) (hfAt p.2 hp.2) |
| 93 | |
| 94 | /-- Theorem 12.28: the actual fixed-cylinder metric's spatial jet |
| 95 | at any included time is the spatial restriction of its M30 within-domain jet. -/ |
| 96 | theorem fixedCylinderMetricCoefficient_spatialJetAt {J I : Set ℝ} |
| 97 | (F : RicciFlow 3 StandardCapSpace J) (C : GeneralizedSliceCarrier) |
| 98 | (a Q : ℝ) (f : C.carrier → StandardCapSpace) (q : C.carrier) |
| 99 | (i j : Fin 3) {U : Set C.carrier} (hU : IsOpen U) |
| 100 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) |
| 101 | (hI : UniqueDiffOn ℝ I) {u : ℝ} (hu : u ∈ I) |
| 102 | (htime : MapsTo (fun s : ℝ => a + s / Q) I J) |
| 103 | {p : EuclideanSpace ℝ (Fin 3)} (hp : p ∈ (extChartAt (𝓡 3) q).target) |
| 104 | (hpU : (extChartAt (𝓡 3) q).symm p ∈ U) (r : ℕ) : |
| 105 | iteratedFDeriv ℝ r (fun z => fixedCylinderMetricCoefficient F C a Q f q i j (u, z)) p = |
| 106 | (iteratedFDerivWithin ℝ r (fixedCylinderMetricCoefficient F C a Q f q i j) |
| 107 | (I ×ˢ (extChartAt (𝓡 3) q).target) (u, p)).compContinuousLinearMap |
| 108 | (fun _ => ContinuousLinearMap.inr ℝ ℝ (EuclideanSpace ℝ (Fin 3))) := by |
| 109 | let V := (extChartAt (𝓡 3) q).target ∩ (extChartAt (𝓡 3) q).symm ⁻¹' U |
| 110 | have hV : IsOpen V := (continuousOn_extChartAt_symm q).isOpen_inter_preimage |
| 111 | (isOpen_extChartAt_target q) hU |
| 112 | have hpV : p ∈ V := ⟨hp, hpU⟩ |
| 113 | have hs := fixedCylinderMetricCoefficient_contDiffOn (I := I) F C a Q f q i j hU hf (V := V) |
| 114 | (fun _ hz => hz.1) (fun _ hz => hz.2) htime |
| 115 | have hspatial := iteratedFDeriv_time_slice_of_contDiffOn hI hu hV hs hpV r |
| 116 | have hset : I ×ˢ V =ᶠ[𝓝 (u, p)] I ×ˢ (extChartAt (𝓡 3) q).target := by |
| 117 | filter_upwards [continuousAt_snd.preimage_mem_nhds (hV.mem_nhds hpV)] with z hz |
| 118 | exact propext ⟨fun h => ⟨h.1, h.2.1⟩, fun h => ⟨h.1, hz⟩⟩ |
| 119 | have hjet := iteratedFDerivWithin_congr_set (𝕜 := ℝ) |
| 120 | (f := fixedCylinderMetricCoefficient F C a Q f q i j) hset r |
| 121 | exact hspatial.trans (congrArg (fun A => A.compContinuousLinearMap |
| 122 | (fun _ => ContinuousLinearMap.inr ℝ ℝ (EuclideanSpace ℝ (Fin 3)))) hjet) |
| 123 | |
| 124 | /-- Theorem 12.28: the included terminal time is a special case of |
| 125 | the actual fixed-cylinder spatial-jet identity. -/ |
| 126 | theorem fixedCylinderMetricCoefficient_spatialJet {J I : Set ℝ} |
| 127 | (F : RicciFlow 3 StandardCapSpace J) (C : GeneralizedSliceCarrier) |
| 128 | (a Q : ℝ) (f : C.carrier → StandardCapSpace) (q : C.carrier) |
| 129 | (i j : Fin 3) {U : Set C.carrier} (hU : IsOpen U) |
| 130 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) |
| 131 | (hI : UniqueDiffOn ℝ I) (hzero : (0 : ℝ) ∈ I) |
| 132 | (htime : MapsTo (fun s : ℝ => a + s / Q) I J) |
| 133 | {p : EuclideanSpace ℝ (Fin 3)} (hp : p ∈ (extChartAt (𝓡 3) q).target) |
| 134 | (hpU : (extChartAt (𝓡 3) q).symm p ∈ U) (r : ℕ) : |
| 135 | iteratedFDeriv ℝ r (fun z => fixedCylinderMetricCoefficient F C a Q f q i j (0, z)) p = |
| 136 | (iteratedFDerivWithin ℝ r (fixedCylinderMetricCoefficient F C a Q f q i j) |
| 137 | (I ×ˢ (extChartAt (𝓡 3) q).target) (0, p)).compContinuousLinearMap |
| 138 | (fun _ => ContinuousLinearMap.inr ℝ ℝ (EuclideanSpace ℝ (Fin 3))) := |
| 139 | fixedCylinderMetricCoefficient_spatialJetAt F C a Q f q i j hU hf hI hzero htime hp hpU r |
| 140 | |
| 141 | end PoincareMT.M35.OrdinaryRealization |