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.AncientKappa.Compactness.Boundedness.Projective.TerminalCloseness |
| 2 | import PoincareLib.Geometry.RicciFlow.AncientKappa.Compactness.Boundedness.Projective.Topology |
| 3 | import PoincareLib.Geometry.RicciFlow.AncientKappa.Compactness.Boundedness.BlowupProduct |
| 4 | |
| 5 | /-! |
| 6 | # Projective necks in the original unbounded slice |
| 7 | |
| 8 | The terminal threshold is chosen from the selected M13 sequence before its |
| 9 | buffered round limit is constructed. The projective branch transfers back to |
| 10 | the original metric with the actual scalar rescaling factor and same maps. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | set_option maxSynthPendingDepth 12 |
| 17 | set_option maxHeartbeats 800000 |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | namespace PoincareMT.RicciFlow |
| 23 | |
| 24 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.measurableSpace |
| 25 | FlowCarrier.borelSpace FlowCarrier.chartedSpace FlowCarrier.isManifold |
| 26 | FlowCarrier.t2Space FlowCarrier.t3Space FlowCarrier.secondCountable |
| 27 | |
| 28 | local instance projectiveSelectedCarrierConnected {n : ℕ} (C : FlowCarrier n) : |
| 29 | ConnectedSpace C.carrier := connectedSpace_iff_univ.mpr C.connected |
| 30 | |
| 31 | variable {M : Type} [TopologicalSpace M] [T2Space M] [T3Space M] |
| 32 | [SecondCountableTopology M] [ConnectedSpace M] [MeasurableSpace M] [BorelSpace M] |
| 33 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 34 | |
| 35 | namespace SelectedAncientRescalings |
| 36 | |
| 37 | variable {b κ : ℝ} {F : RicciFlow 3 M (Iic b)} {p : M} |
| 38 | (S : SelectedAncientRescalings F κ p) |
| 39 | |
| 40 | /-- The projective terminal threshold belongs to this same selected source |
| 41 | sequence and can be fixed before the buffer and its limit are chosen. -/ |
| 42 | theorem exists_terminal_projectiveNeck_threshold |
| 43 | (P : M23NormalizedKappaCompactnessPredecessors) |
| 44 | {ε : ℝ} (hε : 0 < ε) : |
| 45 | ∃ η : ℝ, 0 < η ∧ ∀ {δ : ℝ}, 0 < δ → δ ≤ 1 → δ ≤ η → |
| 46 | ∀ B : RoundProductBlowup S δ, |
| 47 | ∀ (Φ : RoundCylinderSpace → B.convergence.limitCarrier.carrier) (x : UnitTwoSphere), |
| 48 | IsLocalDiffeomorph ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ Φ → |
| 49 | Φ (x, 0) = B.convergence.base → |
| 50 | (∀ z w, Φ z = Φ w ↔ w = z ∨ w = (-z.1, z.2)) → |
| 51 | (fun z v w => (B.convergence.limitFlow.connection 0).scalarCurvature B.convergence.base * |
| 52 | roundCylinderPullback (B.convergence.limitFlow.metric 0) Φ z v w) = |
| 53 | EvolvingRoundCylinderMetric 0 → |
| 54 | ∀ᶠ i in atTop, |
| 55 | IsLocalDiffeomorphOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ |
| 56 | (B.convergence.embedding i ∘ Φ) (univ ×ˢ Ioo (-ε⁻¹) ε⁻¹) ∧ |
| 57 | (∀ z ∈ univ ×ˢ Icc (-ε⁻¹) ε⁻¹, ∀ w ∈ univ ×ˢ Icc (-ε⁻¹) ε⁻¹, |
| 58 | B.convergence.embedding i (Φ z) = B.convergence.embedding i (Φ w) ↔ |
| 59 | w = z ∨ w = (-z.1, z.2)) ∧ |
| 60 | B.convergence.embedding i (Φ (x, 0)) = S.center (B.convergence.subsequence i) ∧ |
| 61 | RoundCylinderClose ε 0 (fun z v w => |
| 62 | (F.connection b).scalarCurvature (S.center (B.convergence.subsequence i)) * |
| 63 | roundCylinderPullback (F.metric b) (B.convergence.embedding i ∘ Φ) z v w) ∧ |
| 64 | ∃ e : RealProjectiveTwo ≃ₜ Set.range (fun q : UnitTwoSphere => |
| 65 | B.convergence.embedding i (Φ (q, 0))), |
| 66 | ∀ q : UnitTwoSphere, (e (Quotient.mk realProjectiveTwoSetoid q)).val = |
| 67 | B.convergence.embedding i (Φ (q, 0)) := by |
| 68 | obtain ⟨η, hη, hterminal⟩ := RawAncientSequence.exists_terminal_projectiveNeck_threshold |
| 69 | (fun _ => FlowCarrier.ofConnectedManifold 3 M) S.flow S.center P |
| 70 | S.complete S.nonnegative |
| 71 | (fun i => S.radius i * Real.sqrt ((F.connection b).scalarCurvature (S.center i))) |
| 72 | S.radii_diverge S.curvature_bound S.normalized S.scalar_base_le hε |
| 73 | refine ⟨η, hη, ?_⟩ |
| 74 | intro δ hδ hδone hδη B Φ x hΦ hx hfiber hround |
| 75 | filter_upwards [hterminal hδ hδone hδη B.convergence (B.complete 0 hδ) |
| 76 | B.scalar_base_ge Φ x hΦ hx hfiber hround, |
| 77 | B.convergence.eventually_projectiveCentralSection_homeomorph Φ hΦ hfiber] |
| 78 | with i hneck htop |
| 79 | refine ⟨hneck.1, hneck.2.1, hneck.2.2.1, ?_, htop⟩ |
| 80 | have hcl := hneck.2.2.2 |
| 81 | rw [S.terminal_metric_eq_rescaled] at hcl |
| 82 | exact hcl |
| 83 | |
| 84 | /-- Choose a buffer after fixing the projective threshold. The actual |
| 85 | round-product limit and its terminal projective branch use the same selected |
| 86 | rescalings and the original slice scalar scales. -/ |
| 87 | theorem exists_roundProductBlowup_with_terminal_projective_necks |
| 88 | (P : M23NormalizedKappaCompactnessPredecessors) (hκ : 0 < κ) |
| 89 | (hc : MetricComplete (F.metric b)) |
| 90 | (hop : ∀ x, (F.connection b).NonnegativeCurvatureOperator x) |
| 91 | (hmono : ∀ s t, s ≤ t → t ≤ b → ∀ x, |
| 92 | (F.connection s).scalarCurvature x ≤ (F.connection t).scalarCurvature x) |
| 93 | {ε : ℝ} (hε : 0 < ε) : |
| 94 | ∃ δ, 0 < δ ∧ δ < 1 ∧ ∃ B : RoundProductBlowup S δ, |
| 95 | ∀ (Φ : RoundCylinderSpace → B.convergence.limitCarrier.carrier) (x : UnitTwoSphere), |
| 96 | IsLocalDiffeomorph ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ Φ → |
| 97 | Φ (x, 0) = B.convergence.base → |
| 98 | (∀ z w, Φ z = Φ w ↔ w = z ∨ w = (-z.1, z.2)) → |
| 99 | (fun z v w => (B.convergence.limitFlow.connection 0).scalarCurvature B.convergence.base * |
| 100 | roundCylinderPullback (B.convergence.limitFlow.metric 0) Φ z v w) = |
| 101 | EvolvingRoundCylinderMetric 0 → |
| 102 | ∀ᶠ i in atTop, |
| 103 | IsLocalDiffeomorphOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ |
| 104 | (B.convergence.embedding i ∘ Φ) (univ ×ˢ Ioo (-ε⁻¹) ε⁻¹) ∧ |
| 105 | (∀ z ∈ univ ×ˢ Icc (-ε⁻¹) ε⁻¹, ∀ w ∈ univ ×ˢ Icc (-ε⁻¹) ε⁻¹, |
| 106 | B.convergence.embedding i (Φ z) = B.convergence.embedding i (Φ w) ↔ |
| 107 | w = z ∨ w = (-z.1, z.2)) ∧ |
| 108 | B.convergence.embedding i (Φ (x, 0)) = S.center (B.convergence.subsequence i) ∧ |
| 109 | RoundCylinderClose ε 0 (fun z v w => |
| 110 | (F.connection b).scalarCurvature (S.center (B.convergence.subsequence i)) * |
| 111 | roundCylinderPullback (F.metric b) (B.convergence.embedding i ∘ Φ) z v w) ∧ |
| 112 | ∃ e : RealProjectiveTwo ≃ₜ Set.range (fun q : UnitTwoSphere => |
| 113 | B.convergence.embedding i (Φ (q, 0))), |
| 114 | ∀ q : UnitTwoSphere, (e (Quotient.mk realProjectiveTwoSetoid q)).val = |
| 115 | B.convergence.embedding i (Φ (q, 0)) := by |
| 116 | obtain ⟨η, hη, hterminal⟩ := S.exists_terminal_projectiveNeck_threshold P hε |
| 117 | obtain ⟨δ, hδ, hδone, hδη, ⟨B⟩⟩ := S.exists_roundProductBlowup P hκ hc hop hmono η hη |
| 118 | exact ⟨δ, hδ, hδone, B, hterminal hδ hδone.le hδη B⟩ |
| 119 | |
| 120 | end SelectedAncientRescalings |
| 121 | |
| 122 | end PoincareMT.RicciFlow |