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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Topology.Manifold.Poincare.Final.Compatibility.Metric |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureSectionalLimit |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureSourcePinching |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Germs.TerminalGermsChartFlow |
| 6 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Tensor.FlowRiemannRegularity |
| 7 | import PoincareLib.Geometry.Curvature.Operator.SectionalBounds |
| 8 | |
| 9 | /-! |
| 10 | # Curvature sign on the same closed extracted chart flows |
| 11 | |
| 12 | Actual compact-uniform coefficient jets give the strict-interior |
| 13 | operator. Curvature continuity of the retained closed flow includes |
| 14 | both endpoints, without a common source lifetime. |
| 15 | Source: terminal-germs-pinched-operator.md, Stages C-D. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set Filter Poincare.Gluing |
| 22 | open scoped Manifold ContDiff Bundle Topology |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.M47 |
| 27 | |
| 28 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 29 | normedSpaceTangentSpaceVectorSpace |
| 30 | |
| 31 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 32 | |
| 33 | private noncomputable local instance pinchedOperatorDualAdd : NormedAddCommGroup (E →L[ℝ] ℝ) := |
| 34 | ContinuousLinearMap.toNormedAddCommGroup |
| 35 | |
| 36 | private noncomputable local instance pinchedOperatorDualSpace : NormedSpace ℝ (E →L[ℝ] ℝ) := |
| 37 | ContinuousLinearMap.toNormedSpace |
| 38 | |
| 39 | private noncomputable local instance pinchedOperatorBilinAdd : |
| 40 | NormedAddCommGroup (E →L[ℝ] E →L[ℝ] ℝ) := |
| 41 | ContinuousLinearMap.toNormedAddCommGroup |
| 42 | |
| 43 | private noncomputable local instance pinchedOperatorBilinSpace : |
| 44 | NormedSpace ℝ (E →L[ℝ] E →L[ℝ] ℝ) := |
| 45 | ContinuousLinearMap.toNormedSpace |
| 46 | |
| 47 | /-- Continuity of the actual included flow extends its interior |
| 48 | curvature sign to each endpoint. -/ |
| 49 | theorem terminalGerms_operator_on_closed_of_interior |
| 50 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 51 | {a : ℝ} (ha : a < 0) (F : RicciFlow 3 M (Icc a 0)) |
| 52 | (hinterior : ∀ t ∈ Ioo a 0, ∀ x, (F.connection t).NonnegativeCurvatureOperator x) : |
| 53 | ∀ t ∈ Icc a 0, ∀ x, (F.connection t).NonnegativeCurvatureOperator x := by |
| 54 | intro t ht x |
| 55 | apply (F.connection t).nonnegativeCurvatureOperator_of_nonnegative_sectional_three |
| 56 | (F.connection t).intrinsicCurvatureTensorCalculus x |
| 57 | intro v w |
| 58 | have hclosure : t ∈ closure (Ioo a 0) := by |
| 59 | rw [closure_Ioo ha.ne] |
| 60 | exact ht |
| 61 | have := mem_closure_iff_nhdsWithin_neBot.mp hclosure |
| 62 | apply ge_of_tendsto |
| 63 | (((M04.contDiffOn_curvatureTensor_timeSlice F x v w v w).continuousOn t ht).mono |
| 64 | Ioo_subset_Icc_self) |
| 65 | filter_upwards [self_mem_nhdsWithin] with s hs |
| 66 | exact (F.connection s).curvatureTensor_self_nonneg_of_nonnegative_curvatureOperator |
| 67 | x (hinterior s hs x) v w |
| 68 | |
| 69 | /-- The retained mixed coefficient jets discharge all pointwise |
| 70 | two-jet inputs on a fixed chart carrier. -/ |
| 71 | theorem terminalGerms_operator_of_bilinear_jets |
| 72 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 73 | {a : ℝ} (ha : a < 0) |
| 74 | (Fseq : ℕ → RicciFlow 3 M (Icc a 0)) (F : RicciFlow 3 M (Icc a 0)) |
| 75 | (hjet : ∀ (x : M) (r : ℕ) (K : Set (ℝ × E)), IsCompact K → |
| 76 | K ⊆ Ioo a 0 ×ˢ (extChartAt (𝓡 3) x).target → TendstoUniformlyOn |
| 77 | (fun k => iteratedFDeriv ℝ r (fun p : ℝ × E => |
| 78 | ((Fseq k).metric p.1).pullbackCoefficients (extChartAt (𝓡 3) x).symm p.2)) |
| 79 | (iteratedFDeriv ℝ r (fun p : ℝ × E => |
| 80 | (F.metric p.1).pullbackCoefficients (extChartAt (𝓡 3) x).symm p.2)) atTop K) |
| 81 | (hlower : ∀ eta : ℝ, 0 < eta → ∀ᶠ k in atTop, ∀ t ∈ Icc a 0, |
| 82 | ∀ (x : M) (v w : TangentSpace (𝓡 3) x), |
| 83 | -eta ≤ ((Fseq k).connection t).sectionalCurvature x v w) : |
| 84 | ∀ t ∈ Icc a 0, ∀ x, (F.connection t).NonnegativeCurvatureOperator x := by |
| 85 | have hscalar (x : M) (r : ℕ) (j b : Fin 3) (K : Set (ℝ × E)) |
| 86 | (hK : IsCompact K) (hKU : K ⊆ Ioo a 0 ×ˢ (extChartAt (𝓡 3) x).target) : |
| 87 | TendstoUniformlyOn |
| 88 | (fun k => iteratedFDeriv ℝ r (fun p : ℝ × E => |
| 89 | ((Fseq k).metric p.1).pullbackCoefficients (extChartAt (𝓡 3) x).symm p.2 |
| 90 | (EuclideanSpace.basisFun (Fin 3) ℝ j) (EuclideanSpace.basisFun (Fin 3) ℝ b))) |
| 91 | (iteratedFDeriv ℝ r (fun p : ℝ × E => |
| 92 | (F.metric p.1).pullbackCoefficients (extChartAt (𝓡 3) x).symm p.2 |
| 93 | (EuclideanSpace.basisFun (Fin 3) ℝ j) (EuclideanSpace.basisFun (Fin 3) ℝ b))) |
| 94 | atTop K := by |
| 95 | let V := Ioo a 0 ×ˢ (extChartAt (𝓡 3) x).target |
| 96 | have hV : IsOpen V := isOpen_Ioo.prod (isOpen_extChartAt_target x) |
| 97 | have hsmooth (G : RicciFlow 3 M (Icc a 0)) : |
| 98 | ContDiffOn ℝ ∞ (fun p : ℝ × E => |
| 99 | (G.metric p.1).pullbackCoefficients (extChartAt (𝓡 3) x).symm p.2) V := by |
| 100 | intro p hp |
| 101 | have hg : RiemannianMetric.IsSmoothFamilyOn G.metric (Ioo a 0) := |
| 102 | G.smooth.mono (prod_mono Ioo_subset_Icc_self subset_rfl) |
| 103 | exact (hg.contDiffAt_spacetime_pullbackCoefficients isOpen_Ioo |
| 104 | ((contMDiffWithinAt_extChartAt_symm_target (n := ∞) x hp.2).contMDiffAt |
| 105 | (extChartAt_target_mem_nhds' hp.2)) hp.1).contDiffWithinAt |
| 106 | let L : (E →L[ℝ] E →L[ℝ] ℝ) →L[ℝ] ℝ := |
| 107 | (ContinuousLinearMap.apply ℝ ℝ (EuclideanSpace.basisFun (Fin 3) ℝ b)).comp |
| 108 | (ContinuousLinearMap.apply ℝ (E →L[ℝ] ℝ) (EuclideanSpace.basisFun (Fin 3) ℝ j)) |
| 109 | have h := Poincare.Analysis.Calculus.smooth_convergence_continuousLinearMap_comp |
| 110 | L hV (hsmooth F) (fun p hp => ⟨V, hV, hp, |
| 111 | Eventually.of_forall fun k => hsmooth (Fseq k)⟩) (hjet x) |
| 112 | exact h.2 r K hK hKU |
| 113 | apply terminalGerms_operator_on_closed_of_interior ha F |
| 114 | intro t ht x |
| 115 | have hj := RiemannianMetric.spatial_and_time_jets_of_spacetime_jets |
| 116 | (fun k => (Fseq k).metric) F.metric |
| 117 | (fun k => (Fseq k).smooth.mono (prod_mono Ioo_subset_Icc_self subset_rfl)) |
| 118 | (F.smooth.mono (prod_mono Ioo_subset_Icc_self subset_rfl)) isOpen_Ioo ht x |
| 119 | (fun r _ a b => RiemannianMetric.tendsto_spacetime_jet_of_compact_uniform r |
| 120 | (hscalar x r a b) ⟨ht, mem_extChartAt_target x⟩) |
| 121 | apply terminalCurvature_operator_of_coordinate_jets |
| 122 | (fun k => (Fseq k).connection t) (F.connection t) x hj.1 |
| 123 | intro eta heta |
| 124 | exact (hlower eta heta).mono fun k hk => hk t (Ioo_subset_Icc_self ht) |
| 125 | |
| 126 | /-- The original varying source maps and extracted coefficient fields |
| 127 | give the included operator on the same selected closed chart flow. -/ |
| 128 | theorem terminalGerms_operator_of_original_chart_jets |
| 129 | {ι : Type*} (U : ι → Set E) (hU : ∀ i, IsOpen (U i)) |
| 130 | [∀ i, Nonempty (Piece U i)] |
| 131 | {M : ℕ → Type*} [∀ k, TopologicalSpace (M k)] |
| 132 | [∀ k, ChartedSpace E (M k)] [∀ k, IsManifold (𝓡 3) ∞ (M k)] |
| 133 | {a : ℝ} (ha : a < 0) (Fseq : ∀ k, RicciFlow 3 (M k) (Icc a 0)) |
| 134 | (i : ι) (e : ∀ k, Piece U i → M k) |
| 135 | (he : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 136 | ∀ k, IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ (e k)) |
| 137 | (F : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 138 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 3) (n := ∞) |
| 139 | RicciFlow 3 (Piece U i) (Icc a 0)) |
| 140 | (B : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ) |
| 141 | (hcoeff : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 142 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 3) (n := ∞) |
| 143 | ∀ t ∈ Icc a 0, ∀ (x : Piece U i) v w, (F.metric t).inner x v w = B (t, x) v w) |
| 144 | (hjet : ∀ m K, IsCompact K → K ⊆ Ioo a 0 ×ˢ U i → TendstoUniformlyOn |
| 145 | (fun k => iteratedFDeriv ℝ m (fun p : ℝ × E => |
| 146 | ((Fseq k).metric p.1).pullbackCoefficients |
| 147 | (ChartDistance.chartParametrization U hU (e k)) p.2)) |
| 148 | (iteratedFDeriv ℝ m B) atTop K) |
| 149 | (hlower : ∀ eta : ℝ, 0 < eta → ∀ᶠ k in atTop, ∀ t ∈ Icc a 0, |
| 150 | ∀ (x : M k) (v w : TangentSpace (𝓡 3) x), |
| 151 | -eta ≤ ((Fseq k).connection t).sectionalCurvature x v w) : |
| 152 | letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 153 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 3) (n := ∞) |
| 154 | ∀ t ∈ Icc a 0, ∀ x, (F.connection t).NonnegativeCurvatureOperator x := by |
| 155 | let := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 156 | let := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 3) (n := ∞) |
| 157 | let Fchart := fun k => (Fseq k).pullbackToCanonicalDomain (U i) (hU i) (e k) (he k) |
| 158 | apply terminalGerms_operator_of_bilinear_jets ha Fchart F |
| 159 | · intro x m K hK hKU |
| 160 | rw [ChartDistance.canonical_extChartAt_target U hU] at hKU |
| 161 | have hseq (k : ℕ) : EqOn |
| 162 | (fun p : ℝ × E => ((Fseq k).metric p.1).pullbackCoefficients |
| 163 | (ChartDistance.chartParametrization U hU (e k)) p.2) |
| 164 | (fun p : ℝ × E => ((Fchart k).metric p.1).pullbackCoefficients |
| 165 | (extChartAt (𝓡 3) x).symm p.2) (Ioo a 0 ×ˢ U i) := by |
| 166 | intro p hp |
| 167 | exact (ChartDistance.canonical_pullbackMetric_coefficients U hU |
| 168 | ((Fseq k).metric p.1) (e k) (he k) x ⟨p.2, hp.2⟩).symm |
| 169 | have hlim : EqOn B (fun p : ℝ × E => (F.metric p.1).pullbackCoefficients |
| 170 | (extChartAt (𝓡 3) x).symm p.2) (Ioo a 0 ×ˢ U i) := by |
| 171 | intro p hp |
| 172 | have hform : B p = (F.metric p.1).inner ⟨p.2, hp.2⟩ := by |
| 173 | ext v w |
| 174 | exact (hcoeff p.1 (Ioo_subset_Icc_self hp.1) ⟨p.2, hp.2⟩ v w).symm |
| 175 | exact hform.trans (RiemannianMetric.pullbackCoefficients_canonicalChart |
| 176 | (U i) (hU i) (F.metric p.1) x ⟨p.2, hp.2⟩).symm |
| 177 | exact ((hjet m K hK hKU).congr (Eventually.of_forall fun k => |
| 178 | (Poincare.Analysis.Calculus.eqOn_iteratedFDeriv_of_isOpen |
| 179 | (isOpen_Ioo.prod (hU i)) (hseq k) m).mono hKU)).congr_right |
| 180 | ((Poincare.Analysis.Calculus.eqOn_iteratedFDeriv_of_isOpen |
| 181 | (isOpen_Ioo.prod (hU i)) hlim m).mono hKU) |
| 182 | · intro eta heta |
| 183 | filter_upwards [hlower eta heta] with k hk t ht x v w |
| 184 | rw [M36.sectionalCurvature_eq_of_local_isometry ((Fchart k).connection t) |
| 185 | ((Fseq k).connection t) (f := e k) isOpen_univ (he k).contMDiff.contMDiffOn |
| 186 | (fun _ _ _ _ => rfl) (mem_univ x) v w] |
| 187 | exact hk t ht _ _ _ |
| 188 | |
| 189 | end PoincareMT.M47 |