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.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularStageFamily |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularAtlasCapture |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularComponentInverse |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularAtlasInverse |
| 6 | |
| 7 | /-! |
| 8 | # Growing actual ordinary sources for the original terminal exhaustion |
| 9 | |
| 10 | Fixed compact image bounds choose available source stages before the |
| 11 | diagonal. Every selected flow and inverse belongs to the same raw index |
| 12 | as its original atlas map, with both metric slots and the base retained. |
| 13 | MT Theorem 5.11; terminal-regular-growing-capture.md, H1b. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter TopologicalSpace |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u v |
| 23 | |
| 24 | namespace PoincareMT.M47 |
| 25 | |
| 26 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 27 | |
| 28 | private theorem component_chart |
| 29 | {S : RepairedControlledSchedulesData.{u}} |
| 30 | {B : M47ComponentAnalyticBounds.{u} S.setup.C} {p : SurgeryParameterPrefix S.constants} |
| 31 | {F : SurgeryFlowData.{u}} {O : SurgeryObservation F} {W : M33RegularHistoryWindow F} |
| 32 | {H : M33RegularHistoryData W} {base Q r A tau0 tau K L a R rho : ℝ} {N : ℕ} |
| 33 | {center : (F.slice base).carrier} |
| 34 | (data : TerminalRegularStageData S B p O H base Q r A tau0 tau K L a R rho N center) |
| 35 | (htau : 0 < tau) : |
| 36 | let U := terminalRegularStageSource F base Q A center |
| 37 | let h : RiemannianMetric 3 (F.slice base).carrier := |
| 38 | M13.scaleSmoothMetric (F.metric base) Q data.original.scale_pos |
| 39 | let C := Poincare.connectedComponentOpens E center |
| 40 | letI := terminalSourceComponentMetricSpace h center |
| 41 | ∃ j : PartialDiffeomorph (𝓡 3) (𝓡 3) U C ∞, |
| 42 | j.source = univ ∧ j.target = Metric.ball ⟨center, mem_connectedComponent⟩ A ∧ |
| 43 | (∀ z : U, (j z).val = z.val) ∧ j data.point = ⟨center, mem_connectedComponent⟩ ∧ |
| 44 | ∀ z (v w : TangentSpace (𝓡 3) z), |
| 45 | (data.flow.metric 0).inner z v w = (h.connectedComponentMetric center).inner (j z) |
| 46 | (mfderiv (𝓡 3) (𝓡 3) j z v) (mfderiv (𝓡 3) (𝓡 3) j z w) := by |
| 47 | let U := terminalRegularStageSource F base Q A center |
| 48 | let h0 : (0 : ℝ) ∈ Icc (-tau) 0 := ⟨neg_nonpos.mpr htau.le, le_rfl⟩ |
| 49 | let e := terminalSourceNormal_historyCylinder H U data.time data.cylinder |
| 50 | have he := terminalSourceNormal_historyCylinder_maps H U data.time data.cylinder |
| 51 | have hm (z : U) (v w : TangentSpace (𝓡 3) z) : |
| 52 | (data.flow.metric 0).inner z v w = e.pullbackInner 0 h0 z.val |
| 53 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → (F.slice base).carrier) z v) |
| 54 | (mfderiv (𝓡 3) (𝓡 3) (Subtype.val : U → (F.slice base).carrier) z w) := |
| 55 | (data.metric 0 h0 z v w).trans (he.2 0 h0 z.val z.property _ _).symm |
| 56 | have hn (z : U) : (data.flow.connection 0).curvatureTensorNorm z = |
| 57 | (F.connection (base + 0 / Q)).curvatureTensorNorm (e.forward 0 h0 z.val) / Q := by |
| 58 | rw [congrFun (he.1 0 h0) z, H.curvature_norm_pullback] |
| 59 | exact data.norm 0 h0 z |
| 60 | exact terminalSource_regular_component_inverse center data.point data.point_eq e h0 |
| 61 | (data.flow.metric 0) (data.terminal h0).2.2 |
| 62 | (terminalSourceNormal_terminal_readouts U data.point e h0 data.flow hm hn).1 |
| 63 | |
| 64 | section Family |
| 65 | |
| 66 | variable (S : RepairedControlledSchedulesData.{u}) |
| 67 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) (p : SurgeryParameterPrefix S.constants) |
| 68 | (F : ℕ → SurgeryFlowData.{u}) (O : ∀ k, SurgeryObservation (F k)) |
| 69 | (W : ∀ k, M33RegularHistoryWindow (F k)) (H : ∀ k, M33RegularHistoryData (W k)) |
| 70 | (base Q r A tau0 tau K L R rho : ℕ → ℝ) (N : ℕ → ℕ) |
| 71 | (center : ∀ k, ((F k).slice (base k)).carrier) |
| 72 | (data : ∀ k j, j ≤ k → TerminalRegularStageData S B p (O k) (H k) |
| 73 | (base k) (Q k) (r k) (A j) (tau0 j) (tau j) (K j) (L j) |
| 74 | ((j : ℝ) + 1) (R j) (rho j) (N j) (center k)) |
| 75 | |
| 76 | local notation "M" => (fun k : ℕ => Poincare.connectedComponentOpens E (center k)) |
| 77 | local notation "gPhysical" => (fun k : ℕ => |
| 78 | M13.scaleSmoothMetric (SurgeryFlowData.metric (F k) (base k)) (Q k) |
| 79 | (SurgeryFlowCylinder.scale_pos (TerminalRegularStageData.original (data k 0 (Nat.zero_le k))))) |
| 80 | local notation "g" => (fun k : ℕ => |
| 81 | RiemannianMetric.connectedComponentMetric (gPhysical k) (center k)) |
| 82 | local notation "point" => (fun k : ℕ => (Subtype.mk (center k) mem_connectedComponent : M k)) |
| 83 | |
| 84 | variable {X : Type v} [TopologicalSpace X] [ChartedSpace E X] |
| 85 | [IsManifold (𝓡 3) ∞ X] [T3Space X] |
| 86 | (nu : ℕ → ℕ) (V : ℕ → Set X) (pX : X) |
| 87 | (f : ∀ k : ℕ, X → Poincare.connectedComponentOpens E (center (nu k))) |
| 88 | |
| 89 | /-- Compact approximation in the original atlas selects genuine |
| 90 | available ordinary sources at the same physical indices as its maps. -/ |
| 91 | theorem terminalSource_regular_growing_sources |
| 92 | (hnu : StrictMono nu) (htau : ∀ j, 0 < tau j) |
| 93 | (hA : ∀ s : ℝ, 0 < s → ∃ j, s ≤ A j) |
| 94 | (hV : ∀ k, IsOpen (V k)) (hmono : Monotone V) |
| 95 | (hcompact : ∀ j, IsCompact (closure (V j))) (hpX : ∀ j, pX ∈ V j) |
| 96 | (hgeometry : ∀ k, Topology.IsOpenEmbedding (fun x : V k => f k x) ∧ |
| 97 | IsLocalDiffeomorphOn (𝓡 3) (𝓡 3) ∞ (f k) (V k)) |
| 98 | (hbase : ∀ k, f k pX = point (nu k)) |
| 99 | (c : ℕ → PartialDiffeomorph (𝓡 3) (𝓡 3) X E ∞) |
| 100 | (hcoverC : ∀ x : X, ∃ i, x ∈ (c i).source) |
| 101 | (e : ∀ k, ℕ → E → M (nu k)) (bound : ℕ → ℝ) |
| 102 | (hbound : letI : ∀ k, MetricSpace (M k) := |
| 103 | fun k => terminalSourceComponentMetricSpace (gPhysical k) (center k) |
| 104 | ∀ k i z, z ∈ (c i).target → dist (point (nu k)) (e k i z) ≤ bound i) |
| 105 | (happrox : letI : ∀ k, MetricSpace (M k) := |
| 106 | fun k => terminalSourceComponentMetricSpace (gPhysical k) (center k) |
| 107 | ∀ i C, IsCompact C → C ⊆ (c i).target → TendstoUniformlyOn |
| 108 | (fun k z => dist (f k ((c i).symm z)) (e k i z)) (fun _ => 0) atTop C) : |
| 109 | ∃ J lambda : ℕ → ℕ, StrictMono lambda ∧ |
| 110 | ∃ available : ∀ k : ℕ, J k ≤ nu (lambda k), |
| 111 | ∃ j : ∀ k, PartialDiffeomorph (𝓡 3) (𝓡 3) |
| 112 | (terminalRegularStageSource (F (nu (lambda k))) (base (nu (lambda k))) |
| 113 | (Q (nu (lambda k))) (A (J k)) (center (nu (lambda k)))) (M (nu (lambda k))) ∞, |
| 114 | (∀ k, (j k).source = univ) ∧ |
| 115 | (∀ k, (j k).target = (g (nu (lambda k))).ball (point (nu (lambda k))) (A (J k))) ∧ |
| 116 | (∀ k z, (j k z).val = z.val) ∧ |
| 117 | (∀ k, j k (data (nu (lambda k)) (J k) (available k)).point = point (nu (lambda k))) ∧ |
| 118 | (∀ k z (v w : TangentSpace (𝓡 3) z), |
| 119 | ((data (nu (lambda k)) (J k) (available k)).flow.metric 0).inner z v w = |
| 120 | (g (nu (lambda k))).inner (j k z) |
| 121 | (mfderiv (𝓡 3) (𝓡 3) (j k) z v) (mfderiv (𝓡 3) (𝓡 3) (j k) z w)) ∧ |
| 122 | ∃ phi : ∀ k, PartialDiffeomorph (𝓡 3) (𝓡 3) X |
| 123 | (terminalRegularStageSource (F (nu (lambda k))) (base (nu (lambda k))) |
| 124 | (Q (nu (lambda k))) (A (J k)) (center (nu (lambda k)))) ∞, |
| 125 | (∀ k, (phi k : X → _) = (j k).symm ∘ f (lambda k)) ∧ |
| 126 | (∀ k, (phi k).source = V k) ∧ |
| 127 | (∀ (k : ℕ) (x : X), x ∈ V k → j k (phi k x) = f (lambda k) x) ∧ |
| 128 | ∀ k, phi k pX = (data (nu (lambda k)) (J k) (available k)).point := by |
| 129 | classical |
| 130 | let : ∀ k, MetricSpace (M k) := |
| 131 | fun k => terminalSourceComponentMetricSpace (gPhysical k) (center k) |
| 132 | let : Nonempty X := ⟨pX⟩ |
| 133 | choose radius hradius hcapture using fun j => |
| 134 | terminalSource_compact_atlas_image_radius c hcoverC (fun k => M (nu k)) |
| 135 | (fun k => point (nu k)) f e bound hbound happrox (hcompact j) |
| 136 | choose J hJ using fun j => hA (radius j + 1) (by linarith [hradius j]) |
| 137 | have hstage (j : ℕ) : ∀ᶠ k in atTop, |
| 138 | J j ≤ nu k ∧ MapsTo (f k) (closure (V j)) |
| 139 | (Metric.ball (point (nu k)) (A (J j))) := by |
| 140 | filter_upwards [hnu.tendsto_atTop.eventually (eventually_ge_atTop (J j)), hcapture j] |
| 141 | with k hk hc |
| 142 | refine ⟨hk, fun x hx => ?_⟩ |
| 143 | exact Metric.ball_subset_ball (by linarith [hJ j]) (hc hx) |
| 144 | obtain ⟨lambda, hlambda, hselected⟩ := |
| 145 | Poincare.exists_strictMono_forall_le_of_eventually hstage |
| 146 | let available := fun k => (hselected k k le_rfl).1 |
| 147 | let selected := fun k => data (nu (lambda k)) (J k) (available k) |
| 148 | choose j hsource htarget hprojection hpoint hmetric using |
| 149 | fun k => component_chart (selected k) (htau (J k)) |
| 150 | have htarget' (k : ℕ) : (j k).target = |
| 151 | (g (nu (lambda k))).ball (point (nu (lambda k))) (A (J k)) := |
| 152 | (htarget k).trans (terminalSourceComponent_balls (gPhysical (nu (lambda k))) |
| 153 | (center (nu (lambda k))) (point (nu (lambda k))) (A (J k))).1 |
| 154 | have hinverse (k : ℕ) : |
| 155 | ∃ phi : PartialDiffeomorph (𝓡 3) (𝓡 3) X |
| 156 | (terminalRegularStageSource (F (nu (lambda k))) (base (nu (lambda k))) |
| 157 | (Q (nu (lambda k))) (A (J k)) (center (nu (lambda k)))) ∞, |
| 158 | (phi : X → _) = (j k).symm ∘ f (lambda k) ∧ phi.source = V k ∧ |
| 159 | (∀ x ∈ V k, j k (phi x) = f (lambda k) x) ∧ phi pX = (selected k).point := by |
| 160 | have hsubset : V k ⊆ V (lambda k) := hmono (hlambda.id_le k) |
| 161 | have hembed : Topology.IsOpenEmbedding (fun x : V k => f (lambda k) x) := |
| 162 | (hgeometry (lambda k)).1.comp |
| 163 | (Topology.IsOpenEmbedding.inclusion hsubset ((hV k).preimage continuous_subtype_val)) |
| 164 | have hcap : MapsTo (f (lambda k)) (V k) (j k).target := by |
| 165 | rw [htarget k] |
| 166 | exact fun x hx => (hselected k k le_rfl).2 (subset_closure hx) |
| 167 | obtain ⟨phi, hphi, hdom, hfactor, hbased⟩ := terminalSource_atlas_actual_inverse |
| 168 | (j k) (hsource k) (hV k) (f (lambda k)) hembed |
| 169 | (fun x => (hgeometry (lambda k)).2 ⟨x.val, hsubset x.property⟩) hcap |
| 170 | exact ⟨phi, hphi, hdom, hfactor, |
| 171 | hbased pX (hpX k) (selected k).point ((hbase (lambda k)).trans (hpoint k).symm)⟩ |
| 172 | choose phi hphi hdom hfactor hbased using hinverse |
| 173 | exact ⟨J, lambda, hlambda, available, j, hsource, htarget', hprojection, hpoint, hmetric, |
| 174 | phi, hphi, hdom, hfactor, hbased⟩ |
| 175 | |
| 176 | end Family |
| 177 | |
| 178 | end PoincareMT.M47 |