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.Variation.Extension.ClosedAffineFamily |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Families.SquareVariationRestriction |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Local.CompactFamilyTube |
| 4 | |
| 5 | /-! |
| 6 | # Actual supported affine variations on the closed time interval |
| 7 | |
| 8 | Two relative compact tubes keep the old family in its gauge inverse |
| 9 | domain and the shifted spatial point in its actual open spatial set. |
| 10 | This realizes the local composition step in Morgan-Tian Proposition 6.37 |
| 11 | and Lemma 6.40, pp. 123-127, including both time endpoints. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T τ₁ τ₂ : ℝ} {x y : G.Point} {p : M14BackwardPath G T τ₁ τ₂ x y} |
| 26 | {R : M14SquareRootPath G p} (V : M14LVariationData G p R) (b : G.gaugeCover.index) |
| 27 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 28 | G.gaugeCover.spatial b) (η : ℝ → EuclideanSpace ℝ (Fin n)) (c : ℝ) |
| 29 | |
| 30 | /-- A compact relative tube gives one radius for all supported affine |
| 31 | shifts on the closed time interval, Proposition 6.37, pp. 123-127. -/ |
| 32 | theorem exists_supportedAffineGauge_radius_closed {U : Set G.Point} (hU : IsOpen U) |
| 33 | (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift U) |
| 34 | (hη : ContDiffOn ℝ ∞ η (M14SqrtParameterInterval τ₁ τ₂)) |
| 35 | (hsrc : ∀ s ∈ M14SqrtParameterInterval τ₁ τ₂ ∩ tsupport η, R.curve s ∈ U) : |
| 36 | ∃ r : ℝ, 0 < r ∧ r ≤ V.radius ∧ |
| 37 | ∀ s ∈ M14SqrtParameterInterval τ₁ τ₂ ∩ tsupport η, ∀ v ∈ Ioo (-r) r, |
| 38 | V.squareFamily s v ∈ U ∧ |
| 39 | (lift (V.squareFamily s v)).2.val + (c * v) • η s ∈ G.gaugeCover.spatial b := by |
| 40 | let K := M14SqrtParameterInterval τ₁ τ₂ ∩ tsupport η |
| 41 | let α : ℝ × ℝ → G.Point := fun z => V.squareFamily z.1 z.2 |
| 42 | have hK : IsCompact K := isCompact_Icc.inter_right (isClosed_tsupport η) |
| 43 | have hP : IsOpen V.parameterDomain := V.parameterDomain_eq ▸ isOpen_Ioo |
| 44 | have hzero : (0 : ℝ) ∈ V.parameterDomain := by |
| 45 | rw [V.parameterDomain_eq] |
| 46 | exact ⟨neg_lt_zero.mpr V.radius_pos, V.radius_pos⟩ |
| 47 | have hα : ContinuousOn α (K ×ˢ V.parameterDomain) := V.square_smooth.continuousOn.mono |
| 48 | (fun _ hz => V.square_contains ⟨hz.1.1, hz.2⟩) |
| 49 | obtain ⟨N, hN, h0N, hNP, hNU⟩ := exists_open_parameter_tube hK hP hα hU hzero |
| 50 | (fun s hs => by |
| 51 | change V.squareFamily s 0 ∈ U |
| 52 | rw [V.square_base] |
| 53 | exact hsrc s hs) |
| 54 | have hL : ContinuousOn (lift ∘ α) (K ×ˢ N) := hlift.continuousOn.comp |
| 55 | (hα.mono (fun _ hz => ⟨hz.1, hNP hz.2⟩)) (fun _ hz => hNU _ hz.1 _ hz.2) |
| 56 | let shift := fun z : ℝ × ℝ => (lift (α z)).2.val + (c * z.2) • η z.1 |
| 57 | have hshift : ContinuousOn shift (K ×ˢ N) := |
| 58 | (continuous_subtype_val.comp_continuousOn hL.snd).add |
| 59 | ((continuousOn_const.mul continuousOn_snd).smul |
| 60 | (hη.continuousOn.comp continuousOn_fst (fun _ hz => hz.1.1))) |
| 61 | obtain ⟨O, hO, h0O, hON, hOS⟩ := exists_open_parameter_tube hK hN hshift |
| 62 | (G.gaugeCover.spatial b).isOpen h0N (fun s _ => by |
| 63 | change (lift (V.squareFamily s 0)).2.val + (c * 0) • η s ∈ |
| 64 | G.gaugeCover.spatial b |
| 65 | simpa only [mul_zero, zero_smul, add_zero] using |
| 66 | (lift (V.squareFamily s 0)).2.property) |
| 67 | obtain ⟨ε, hε, hεO⟩ := Metric.mem_nhds_iff.mp (hO.mem_nhds h0O) |
| 68 | refine ⟨min ε V.radius, lt_min hε V.radius_pos, min_le_right _ _, ?_⟩ |
| 69 | intro s hs v hv |
| 70 | have hvO : v ∈ O := hεO (by |
| 71 | simp only [Metric.mem_ball, Real.dist_eq, sub_zero, abs_lt] |
| 72 | exact ⟨lt_of_le_of_lt (neg_le_neg (min_le_left ε V.radius)) hv.1, |
| 73 | hv.2.trans_le (min_le_left ε V.radius)⟩) |
| 74 | exact ⟨hNU s hs v (hON hvO), hOS s hs v hvO⟩ |
| 75 | |
| 76 | /-- A supported closed-time affine shift gives an actual admissible |
| 77 | variation on a smaller parameter interval, Proposition 6.37, pp. 123-127. -/ |
| 78 | theorem exists_supportedAffineGauge_variation_closed |
| 79 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) {U : Set G.Point} (hU : IsOpen U) |
| 80 | (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift U) |
| 81 | (hright : ∀ q ∈ U, (G.gaugeCover.cylinder b).toSpacetime (lift q) = q) |
| 82 | (hη : ContDiffOn ℝ ∞ η (M14SqrtParameterInterval τ₁ τ₂)) |
| 83 | (hsrc : ∀ s ∈ M14SqrtParameterInterval τ₁ τ₂ ∩ tsupport η, R.curve s ∈ U) : |
| 84 | ∃ W : M14LVariationData G p R, W.parameterDomain ⊆ V.parameterDomain ∧ |
| 85 | ∀ s ∈ M14SqrtParameterInterval τ₁ τ₂, ∀ v, |
| 86 | W.squareFamily s v = supportedAffineGaugeFamily V b lift η c (s, v) := by |
| 87 | obtain ⟨r, hr, hrv, hshift⟩ := exists_supportedAffineGauge_radius_closed V b lift η c |
| 88 | hU hlift hη hsrc |
| 89 | have hparam : Ioo (-r) r ⊆ V.parameterDomain := by |
| 90 | rw [V.parameterDomain_eq] |
| 91 | exact Ioo_subset_Ioo (neg_le_neg hrv) hrv |
| 92 | have hH := supportedAffineGaugeFamily_contMDiffOn_closed V b lift η c hU hlift hright hη |
| 93 | hparam (fun s hs v hv => (hshift s hs v hv).1) (fun s hs v hv => (hshift s hs v hv).2) |
| 94 | have hclock : ∀ s ∈ M14SqrtParameterInterval τ₁ τ₂, ∀ v ∈ Ioo (-r) r, |
| 95 | G.spacetime.timeFunction (supportedAffineGaugeFamily V b lift η c (s, v)) = T - s ^ 2 := |
| 96 | fun s hs v hv => supportedAffineGaugeFamily_time_closed V b lift η c hparam |
| 97 | (fun t ht u hu => hright _ (hshift t ht u hu).1) hs hv |
| 98 | have hzero : ∀ s ∈ M14SqrtParameterInterval τ₁ τ₂, |
| 99 | supportedAffineGaugeFamily V b lift η c (s, 0) = R.curve s := |
| 100 | fun s hs => supportedAffineGaugeFamily_zero_closed V b lift η c |
| 101 | (fun t ht => hright _ (hsrc t ht)) hs |
| 102 | obtain ⟨W, hWparam, hW⟩ := exists_variationOfSquare_eqOn hM12 R |
| 103 | (supportedAffineGaugeFamily V b lift η c) hr hH hclock hzero |
| 104 | exact ⟨W, hWparam ▸ hparam, hW⟩ |
| 105 | |
| 106 | end PoincareMT.M14 |