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.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.OpenGeometry.OpenHeightNoncompact |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CriticalBall.SourceCriticalBallInitialSides |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.InitialGeometry.SourceInitialGraphIsotopy |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Cylinders.CylinderSphereSides |
| 6 | |
| 7 | /-! |
| 8 | # Noncompact closure of either actual retained initial side |
| 9 | |
| 10 | A hypothetical compact closure lies in one valid source stage. Its open |
| 11 | image admits the actual cylinder height of the retained initial graph, |
| 12 | constant on the boundary. The open-height extremum theorem excludes |
| 13 | compactness. Source: Morgan--Tian Claim 10.8, p. 254; M28 derivation 120. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 25 | |
| 26 | set_option maxHeartbeats 2400000 in |
| 27 | -- The source maps keep both open subtypes and the same composite source index. |
| 28 | /-- Every nonempty open side with the retained initial sphere as frontier |
| 29 | has noncompact closure in the SAME spatial limit. No source-label tail |
| 30 | or completeness is assumed. Source: Claim 10.8; M28 derivation 120. -/ |
| 31 | theorem not_isCompact_closure_retained_initial_side |
| 32 | {epsilon C A : ℝ} |
| 33 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 34 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 35 | (H : CounterexampleNeckFamily E) (W : CriticalBallSourcePacket H) |
| 36 | (G : RegularPointedMetricConvergence |
| 37 | (fun k => H.tubeCriticalMetric W.tube W.radius (W.high_index k)) |
| 38 | (fun k => H.tubeCriticalBase W.tube W.radius W.radius_pos (W.high_index k))) : |
| 39 | letI := G.limitCarrier.topologicalSpace |
| 40 | letI := G.limitCarrier.chartedSpace |
| 41 | letI := G.limitCarrier.isManifold |
| 42 | ∀ (L : EpsilonNeck G.limitMetric) (X : Set G.limitCarrier.carrier), |
| 43 | IsOpen X → X.Nonempty → frontier X = L.central_sphere → |
| 44 | ∀ (sigma : ℕ → ℕ), StrictMono sigma → |
| 45 | ∀ (f : ℕ → UnitTwoSphere → ℝ), |
| 46 | (∀ k, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ (f k)) → |
| 47 | (∀ k z, |f k z| < epsilon⁻¹ / 32) → |
| 48 | (∀ k, (H.regularRawStageDiffeomorph W.tube W.radius W.radius_pos |
| 49 | W.high_index G (sigma k)) '' L.central_sphere = |
| 50 | range (fun z => |
| 51 | ((W.tube (W.high_index (G.subsequence (sigma k)))).list.node 0).2.coordinate_map |
| 52 | (z, f k z))) → |
| 53 | ¬ IsCompact (closure X) := by |
| 54 | let := G.limitCarrier.topologicalSpace |
| 55 | let := G.limitCarrier.chartedSpace |
| 56 | let := G.limitCarrier.isManifold |
| 57 | intro L X hX hne hfront sigma hsigma f hf hbound hgraphs hcompact |
| 58 | have hmono : Monotone G.exhaustion := monotone_nat_of_le_succ |
| 59 | (fun j => subset_closure.trans (G.exhaustion_step j)) |
| 60 | obtain ⟨j, hj⟩ := hcompact.elim_directed_cover G.exhaustion G.exhaustion_open |
| 61 | (by rw [G.exhaustion_covers]; exact subset_univ _) hmono.directed_le |
| 62 | let k := sigma j |
| 63 | let i := W.high_index (G.subsequence k) |
| 64 | let T := W.tube i |
| 65 | have hstage : closure X ⊆ G.exhaustion k := hj.trans (hmono (hsigma.id_le j)) |
| 66 | let F : G.limitCarrier.carrier → T.carrierOpen := fun x => (G.embedding k x).val |
| 67 | have hF : ContinuousOn F (closure X) := |
| 68 | (continuous_subtype_val.comp_continuousOn |
| 69 | (G.embedding_smooth k).contMDiffOn.continuousOn).mono hstage |
| 70 | let e : G.exhaustion k → H.tubeCriticalRegion W.tube W.radius i := |
| 71 | fun x => G.embedding k x |
| 72 | have heopen : IsOpen (e '' ((Subtype.val : G.exhaustion k → _) ⁻¹' X)) := |
| 73 | (G.embedding_open k).isOpenMap _ (hX.preimage continuous_subtype_val) |
| 74 | have hFopen : IsOpen (F '' X) := by |
| 75 | have hh : IsOpen |
| 76 | ((Subtype.val : H.tubeCriticalRegion W.tube W.radius i → T.carrierOpen) '' |
| 77 | (e '' ((Subtype.val : G.exhaustion k → _) ⁻¹' X))) := |
| 78 | (H.tubeCriticalRegion W.tube W.radius i).isOpen.isOpenMap_subtype_val _ heopen |
| 79 | have heq : (Subtype.val : H.tubeCriticalRegion W.tube W.radius i → T.carrierOpen) '' |
| 80 | (e '' ((Subtype.val : G.exhaustion k → _) ⁻¹' X)) = F '' X := by |
| 81 | ext x |
| 82 | constructor |
| 83 | · rintro ⟨y, ⟨z, hz, rfl⟩, rfl⟩ |
| 84 | exact ⟨z.val, hz, rfl⟩ |
| 85 | · rintro ⟨y, hy, rfl⟩ |
| 86 | exact ⟨G.embedding k y, ⟨⟨y, hstage (subset_closure hy)⟩, hy, rfl⟩, rfl⟩ |
| 87 | exact heq ▸ hh |
| 88 | obtain ⟨phi, a, b, _ha, _ha', _hb, _hb', hzero, _htail⟩ := |
| 89 | T.tube.cylinder.exists_isotopic_sphere_coordinates (U := T.carrierOpen) |
| 90 | (T.initial_graph_isotopic_middle (f j) (hf j) (hbound j)) |
| 91 | let height := cylinderSignedHeight phi ∘ F |
| 92 | have hcontinuous : ContinuousOn height (closure X) := |
| 93 | (continuous_cylinderSignedHeight phi).comp_continuousOn hF |
| 94 | have hopen : IsOpen (height '' X) := by |
| 95 | rw [show height '' X = cylinderSignedHeight phi '' (F '' X) from |
| 96 | (image_image (cylinderSignedHeight phi) F X).symm] |
| 97 | exact isOpenMap_cylinderSignedHeight phi _ hFopen |
| 98 | apply Poincare.not_isCompact_closure_of_open_height hX hne hcontinuous hopen |
| 99 | (c := 0) _ hcompact |
| 100 | intro x hx |
| 101 | have hxS : x ∈ L.central_sphere := hfront ▸ hx |
| 102 | have hxgraph : (F x).val ∈ range (fun z : UnitTwoSphere => |
| 103 | (T.list.node 0).2.coordinate_map (z, f j z)) := by |
| 104 | rw [← hgraphs j] |
| 105 | exact mem_image_of_mem _ hxS |
| 106 | have hh := (hzero (F x)).mpr hxgraph |
| 107 | exact sub_eq_zero.mpr hh |
| 108 | |
| 109 | end PoincareMT.M28.CounterexampleNeckFamily |