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.Exponential.Families.ParameterizedGaugeTube |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Local.FamilyCutoff |
| 3 | |
| 4 | /-! |
| 5 | # A closed-time family of endpoint displacements |
| 6 | |
| 7 | Morgan--Tian Proposition 16.4, p. 369, using the local variations of |
| 8 | Proposition 6.30, pp. 118-119. An independent spatial displacement gives |
| 9 | a smooth actual family on the retained closed time interval. No extension |
| 10 | across a physical endpoint is required. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M46 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | |
| 26 | /-- An actual displacement family on a retained square-time interval. |
| 27 | The cutoff stays independent of the varying terminal time. Source: |
| 28 | Proposition 16.4, p. 369, and Proposition 6.30, pp. 118-119. -/ |
| 29 | structure EndpointDisplacementFamily (gamma : ℝ → G.Point) (T b c : ℝ) |
| 30 | (j : G.gaugeCover.index) |
| 31 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval j)).Point × |
| 32 | G.gaugeCover.spatial j) (U : Set G.Point) where |
| 33 | cutoff : ℝ → ℝ |
| 34 | cutoff_smooth : ContDiff ℝ ∞ cutoff |
| 35 | cutoff_center : cutoff c = 1 |
| 36 | parameters : Set (EuclideanSpace ℝ (Fin n)) |
| 37 | parameters_open : IsOpen parameters |
| 38 | zero_mem : 0 ∈ parameters |
| 39 | family : ℝ × EuclideanSpace ℝ (Fin n) → G.Point |
| 40 | smooth : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, EuclideanSpace ℝ (Fin n)))) |
| 41 | (spacetimeModel n) ∞ family (Icc 0 b ×ˢ parameters) |
| 42 | clock : ∀ s ∈ Icc 0 b, ∀ v ∈ parameters, |
| 43 | G.spacetime.timeFunction (family (s, v)) = T - s ^ 2 |
| 44 | initial : ∀ v ∈ parameters, family (0, v) = gamma 0 |
| 45 | recovery : ∀ s ∈ Icc 0 b, family (s, 0) = gamma s |
| 46 | target : ∀ s ∈ Icc 0 b, gamma s ∈ U → cutoff s ≠ 0 → ∀ q ∈ U, |
| 47 | G.spacetime.timeFunction q = T - s ^ 2 → |
| 48 | family (s, (cutoff s)⁻¹ • ((lift q).2.val - (lift (gamma s)).2.val)) = q |
| 49 | |
| 50 | /-- Every smooth actual square curve admits a local displacement |
| 51 | family, including at its final physical endpoint. Source: |
| 52 | Proposition 16.4, p. 369; see the round-14 derivation. -/ |
| 53 | theorem endpointDisplacementFamily_nonempty {T b c : ℝ} |
| 54 | (gamma : ℝ → G.Point) (hc : c ∈ Ioc 0 b) |
| 55 | (hgamma : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ gamma (Icc 0 b)) |
| 56 | (hclock : ∀ s ∈ Icc 0 b, G.spacetime.timeFunction (gamma s) = T - s ^ 2) |
| 57 | (j : G.gaugeCover.index) |
| 58 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval j)).Point × |
| 59 | G.gaugeCover.spatial j) {U : Set G.Point} (hU : IsOpen U) |
| 60 | (hlift : ContMDiffOn (spacetimeModel n) (spacetimeModel n) ∞ lift U) |
| 61 | (hright : ∀ q ∈ U, (G.gaugeCover.cylinder j).toSpacetime (lift q) = q) |
| 62 | (hliftClock : ∀ q ∈ U, (lift q).1.val = G.spacetime.timeFunction q) |
| 63 | (hcenter : gamma c ∈ U) : |
| 64 | Nonempty (EndpointDisplacementFamily gamma T b c j lift U) := by |
| 65 | have hcC : c ∈ Icc 0 b := ⟨hc.1.le, hc.2⟩ |
| 66 | obtain ⟨O, hO, hcO, hOU⟩ := mem_nhdsWithin.mp |
| 67 | ((hgamma c hcC).continuousWithinAt.preimage_mem_nhdsWithin (hU.mem_nhds hcenter)) |
| 68 | obtain ⟨chi, hsupport, _, hchi, _, hchic⟩ := |
| 69 | exists_contDiff_tsupport_subset (n := (⊤ : ℕ∞)) |
| 70 | ((hO.inter isOpen_Ioi).mem_nhds ⟨hcO, hc.1⟩) |
| 71 | let f : ℝ × EuclideanSpace ℝ (Fin n) → G.Point := fun z => gamma z.1 |
| 72 | have hf : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, EuclideanSpace ℝ (Fin n)))) |
| 73 | (spacetimeModel n) ∞ f (Icc 0 b ×ˢ (univ : Set (EuclideanSpace ℝ (Fin n)))) := |
| 74 | hgamma.comp contMDiff_fst.contMDiffOn (fun _ hz => hz.1) |
| 75 | have hsrc : ∀ z ∈ Icc 0 b ×ˢ (univ : Set (EuclideanSpace ℝ (Fin n))), |
| 76 | z.1 ∈ tsupport chi → f z ∈ U := by |
| 77 | intro z hz hs |
| 78 | exact hOU ⟨(hsupport hs).1, hz.1⟩ |
| 79 | obtain ⟨N, hN, hzero, _, hshift⟩ := M14.exists_supportedGaugeTranslate_tube |
| 80 | f j lift chi id isCompact_Icc isOpen_univ hf.continuousOn hlift.continuousOn |
| 81 | hchi.continuous continuousOn_id hsrc (mem_univ (0 : EuclideanSpace ℝ (Fin n))) rfl |
| 82 | let F := M14.supportedGaugeTranslateFamily f j lift chi id |
| 83 | have hsrcN : ∀ z ∈ Icc 0 b ×ˢ N, z.1 ∈ tsupport chi → f z ∈ U := |
| 84 | fun z hz hs => hsrc z ⟨hz.1, mem_univ _⟩ hs |
| 85 | refine ⟨{ |
| 86 | cutoff := chi |
| 87 | cutoff_smooth := hchi |
| 88 | cutoff_center := hchic |
| 89 | parameters := N |
| 90 | parameters_open := hN |
| 91 | zero_mem := hzero |
| 92 | family := F |
| 93 | smooth := M14.supportedGaugeTranslateFamily_contMDiffOn f j lift chi id |
| 94 | (hf.mono (fun _ hz => ⟨hz.1, mem_univ _⟩)) hU hlift hright hchi |
| 95 | contDiffOn_id hsrcN hshift |
| 96 | clock := ?_ |
| 97 | initial := ?_ |
| 98 | recovery := ?_ |
| 99 | target := ?_ }⟩ |
| 100 | · intro s hs v hv |
| 101 | exact (M14.supportedGaugeTranslateFamily_time f j lift chi id |
| 102 | (fun ht => hright _ (hsrcN (s, v) ⟨hs, hv⟩ ht))).trans (hclock s hs) |
| 103 | · intro v _ |
| 104 | exact M14.supportedGaugeTranslateFamily_eq_of_not_tsupport f j lift chi id |
| 105 | (fun hs => (lt_irrefl (0 : ℝ)) (hsupport hs).2) |
| 106 | · intro s hs |
| 107 | by_cases ht : s ∈ tsupport chi |
| 108 | · exact M14.supportedGaugeTranslateFamily_eq_of_zero f j lift chi id |
| 109 | (hright _ (hsrcN (s, 0) ⟨hs, hzero⟩ ht)) rfl |
| 110 | · exact M14.supportedGaugeTranslateFamily_eq_of_not_tsupport f j lift chi id ht |
| 111 | · intro s hs hgs hchis q hq hqt |
| 112 | have hshiftval : (lift (gamma s)).2.val + |
| 113 | chi s • ((chi s)⁻¹ • ((lift q).2.val - (lift (gamma s)).2.val)) = (lift q).2.val := by |
| 114 | rw [smul_smul, mul_inv_cancel₀ hchis, one_smul, add_comm, sub_add_cancel] |
| 115 | have hshiftpoint : (G.gaugeCover.spatial j).affineShift (lift (gamma s)).2 |
| 116 | (chi s • ((chi s)⁻¹ • ((lift q).2.val - (lift (gamma s)).2.val))) = (lift q).2 := by |
| 117 | have hm : (lift (gamma s)).2.val + |
| 118 | chi s • ((chi s)⁻¹ • ((lift q).2.val - (lift (gamma s)).2.val)) ∈ |
| 119 | G.gaugeCover.spatial j := by |
| 120 | rw [hshiftval] |
| 121 | exact (lift q).2.property |
| 122 | apply Subtype.ext |
| 123 | rw [(G.gaugeCover.spatial j).affineShift_val hm, hshiftval] |
| 124 | have ht : (lift (gamma s)).1 = (lift q).1 := by |
| 125 | apply Subtype.ext |
| 126 | rw [hliftClock _ hgs, hliftClock _ hq, hclock s hs, hqt] |
| 127 | change M14.supportedGaugeTranslateFamily f j lift chi id _ = q |
| 128 | rw [M14.supportedGaugeTranslateFamily_eq_gauge f j lift chi id (hright _ hgs)] |
| 129 | change (G.gaugeCover.cylinder j).toSpacetime ((lift (gamma s)).1, |
| 130 | (G.gaugeCover.spatial j).affineShift (lift (gamma s)).2 _) = q |
| 131 | dsimp only [id_eq, Prod.fst, Prod.snd] |
| 132 | rw [hshiftpoint, ht] |
| 133 | exact hright q hq |
| 134 | |
| 135 | end PoincareMT.Proofs.M46 |