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.Tube.CriticalBall.CriticalBallModerateProducer |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.CriticalBall.CriticalBallLocalShiProducer |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.CriticalBall.CriticalBallWitnessCofinality |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.CriticalBall.CriticalBallFrontierReachability |
| 6 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Ends.SourceTubeCriticalRadius |
| 7 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.Coordinates.SourceFiniteWalk |
| 8 | |
| 9 | /-! |
| 10 | # The verified critical-ball source packet |
| 11 | |
| 12 | The actual source constructor supplies one normalized tube family, its |
| 13 | critical radius, a varying near-frontier high-scalar sequence, local Shi |
| 14 | constants, and the moderate-scale witness producer. These outputs are |
| 15 | assembled here without upgrading the varying subsequence to a fixed-tube |
| 16 | radial spine. The latter remains a separate geometric obligation. |
| 17 | -/ |
| 18 | |
| 19 | noncomputable section |
| 20 | set_option autoImplicit false |
| 21 | set_option backward.isDefEq.respectTransparency false |
| 22 | |
| 23 | open Set Filter |
| 24 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT.M28.CounterexampleNeckFamily |
| 29 | |
| 30 | variable {epsilon C A : ℝ} |
| 31 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 32 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 33 | |
| 34 | /-- All source-side outputs currently justified for the strict critical ball. |
| 35 | The packet intentionally stores the high witnesses on their retained, |
| 36 | strictly increasing subsequence rather than asserting fixed-index cofinality. |
| 37 | -/ |
| 38 | structure CriticalBallSourcePacket |
| 39 | (H : CounterexampleNeckFamily E) where |
| 40 | tube : ∀ k, SourceTubeData (H.segment k) |
| 41 | radius : ℝ |
| 42 | radius_pos : 0 < radius |
| 43 | radius_lower : (4 * max C 2)⁻¹ * epsilon⁻¹ / 8 ≤ radius |
| 44 | radius_upper : radius ≤ A + 2 * endpointConnectorBudget epsilon C |
| 45 | radius_bound : ∀ r < radius, PoincareMT.M28.tube.eventuallyRadiusBound |
| 46 | (fun k x => ((H.tubeMetric tube k).edist (H.tubeBase tube k) x).toReal) |
| 47 | (fun k x => (H.tubeConnection tube k).scalarCurvature x) r |
| 48 | high_index : ℕ → ℕ |
| 49 | high_index_strictMono : StrictMono high_index |
| 50 | high_point : ∀ j : ℕ, (tube (high_index j)).carrierOpen |
| 51 | high_radius_upper : ∀ j : ℕ, |
| 52 | ((H.tubeMetric tube (high_index j)).edist |
| 53 | (H.tubeBase tube (high_index j)) (high_point j)).toReal < |
| 54 | radius + 1 / ((j : ℝ) + 1) |
| 55 | high_scalar_lower : ∀ j : ℕ, (j : ℝ) < |
| 56 | (H.tubeConnection tube (high_index j)).scalarCurvature (high_point j) |
| 57 | high_cofinal : ∀ n : ℕ, ∃ j : ℕ, |
| 58 | radius - 1 / ((n : ℝ) + 1) < |
| 59 | ((H.tubeMetric tube (high_index j)).edist |
| 60 | (H.tubeBase tube (high_index j)) (high_point j)).toReal |
| 61 | high_endpoint_eventually_near : ∀ n : ℕ, ∀ᶠ k in atTop, |
| 62 | radius - 1 / ((n : ℝ) + 1) < |
| 63 | ((H.tubeMetric tube k).edist (H.tubeBase tube k) |
| 64 | (H.tubeHigh tube k)).toReal |
| 65 | local_shi : CriticalBallLocalShi H tube |
| 66 | finite_walk : ∀ k, Nonempty (SourceFiniteWalk H tube k) |
| 67 | moderate_witness : ∀ {A1 delta : ℝ} {k : ℕ} |
| 68 | (x : H.tubeCriticalRegion tube A1 k) {i : ℤ}, |
| 69 | i ∈ (tube k).chain.shape.active → |
| 70 | (x : (tube k).carrierOpen).val ∈ ((tube k).chain.neck i).carrier → |
| 71 | |(((tube k).chain.neck i).coordinate_inverse |
| 72 | (x : (tube k).carrierOpen).val).2| ≤ |
| 73 | 3 * ((tube k).chain.neck i).epsilon⁻¹ / 4 → |
| 74 | 0 < delta → delta / 48 ≤ H.tubeNodeScale tube k i → |
| 75 | CriticalBallModerateWitness H tube (A1 := A1) (delta := delta) k x |
| 76 | |
| 77 | /-- The source constructor and the two local critical-ball producers have a |
| 78 | common accuracy threshold. Below it they produce one complete packet for |
| 79 | each retained counterexample family. |
| 80 | -/ |
| 81 | theorem exists_criticalBall_source_packet_accuracy |
| 82 | (P : RicciFlowCurvatureTheory.{u}) : |
| 83 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 84 | ∀ {epsilon C A : ℝ} |
| 85 | {E : ∀ n : ℕ, SameTimeCounterexample.{u} epsilon C A |
| 86 | ((n : ℝ) + 1) ((n : ℝ) + 1)} |
| 87 | (H : CounterexampleNeckFamily E), |
| 88 | epsilon ≤ epsilon₀ → Nonempty (CriticalBallSourcePacket H) := by |
| 89 | obtain ⟨epsilonR, hRpos, hRsmall, hR⟩ := |
| 90 | exists_actual_source_tube_critical_radius_accuracy.{u} |
| 91 | obtain ⟨epsilonS, hSpos, hSsmall, hS⟩ := |
| 92 | exists_criticalBallLocalShi_uniform_accuracy.{u} P |
| 93 | obtain ⟨epsilonM, hMpos, hMsmall, hM⟩ := |
| 94 | exists_criticalBall_moderate_witness_accuracy.{u} |
| 95 | obtain ⟨epsilonW, hWpos, hWsmall, hW⟩ := |
| 96 | exists_source_finite_walk_accuracy.{u} |
| 97 | let epsilon₀ := min epsilonR (min epsilonS (min epsilonM epsilonW)) |
| 98 | have hpos : 0 < epsilon₀ := lt_min hRpos (lt_min hSpos (lt_min hMpos hWpos)) |
| 99 | have hsmall : epsilon₀ ≤ (1 / 200 : ℝ) := |
| 100 | (min_le_left _ _).trans (hRsmall.trans (by norm_num)) |
| 101 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 102 | intro epsilon C A E H hE |
| 103 | have hER : epsilon ≤ epsilonR := hE.trans (min_le_left _ _) |
| 104 | have hES : epsilon ≤ epsilonS := |
| 105 | hE.trans ((min_le_right _ _).trans (min_le_left _ _)) |
| 106 | have hEM : epsilon ≤ epsilonM := |
| 107 | hE.trans ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) |
| 108 | have hEW : epsilon ≤ epsilonW := |
| 109 | hE.trans ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) |
| 110 | obtain ⟨T, A1, hA1, hA1lower, hA1upper, hbound, |
| 111 | phi, hphi, x, hx⟩ := hR H hER |
| 112 | have hshi := hS H T hES |
| 113 | refine ⟨{ |
| 114 | tube := T |
| 115 | radius := A1 |
| 116 | radius_pos := hA1 |
| 117 | radius_lower := hA1lower |
| 118 | radius_upper := hA1upper |
| 119 | radius_bound := hbound |
| 120 | high_index := phi |
| 121 | high_index_strictMono := hphi |
| 122 | high_point := x |
| 123 | high_radius_upper := fun j => (hx j).1 |
| 124 | high_scalar_lower := fun j => (hx j).2 |
| 125 | high_cofinal := |
| 126 | PoincareMT.M28.tube.critical_witnesses_cofinal_below |
| 127 | hbound hphi x hx |
| 128 | high_endpoint_eventually_near := |
| 129 | H.tube_high_eventually_near T hbound |
| 130 | local_shi := hshi |
| 131 | finite_walk := hW H T hEW |
| 132 | moderate_witness := ?_ }⟩ |
| 133 | intro A1' delta k x' i hi hx' hquarter hdelta hscale |
| 134 | exact hM H T hEM (A1 := A1') (delta := delta) (k := k) x' hi hx' |
| 135 | hquarter hdelta hscale |
| 136 | |
| 137 | end PoincareMT.M28.CounterexampleNeckFamily |