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.Surgery.Induction.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.EntryAlternative |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.PhysicalTopEntry |
| 4 | |
| 5 | /-! |
| 6 | # The actual full-cap entry action barrier |
| 7 | |
| 8 | Proposition 16.13 and Lemma 16.15, pp. 377-381. Last entry into the |
| 9 | actual cap image is handled by physical side energy or by the scalar |
| 10 | integral at its normalized top. Both alternatives retain the original |
| 11 | backward parameter and the literal admissible path. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set MeasureTheory Function |
| 18 | open scoped Manifold ContDiff Topology intervalIntegral |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M12 |
| 23 | end PoincareMT.Proofs.M12 |
| 24 | open PoincareMT.EpochExtension.Spacetime |
| 25 | |
| 26 | namespace PoincareMT.Proofs.M46 |
| 27 | |
| 28 | open PoincareMT.Proofs.M12 |
| 29 | |
| 30 | /-- Every actual entry into an early inner point of a full persistence |
| 31 | cap has a suffix above the selected action threshold. Source: |
| 32 | Proposition 16.13 and equation (16.2), pp. 377-378 and 381. -/ |
| 33 | theorem exists_actualFullCapEntry_action_gt |
| 34 | {F : GeneralizedRicciFlowData.{u}} (G : FlowBoxRicciGeometry F) |
| 35 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 36 | {C : GeneralizedSliceCarrier.{u}} [CompactSpace C.carrier] |
| 37 | {origin scale : ℝ} {J : SpacetimeInterval} |
| 38 | {U : TopologicalSpace.Opens C.carrier} |
| 39 | (e : GeneralizedFlowCylinder F C origin scale J.domain U) |
| 40 | (hI : (cylinderPhysicalInterval origin scale e.scale_pos J).domain ⊆ F.interval) |
| 41 | (gBirth : RiemannianMetric 3 C.carrier) {mu A h c ell theta : ℝ} |
| 42 | (hphysical : (cylinderPhysicalInterval origin scale e.scale_pos J).domain = |
| 43 | Ioo origin (origin + theta * h ^ 2)) |
| 44 | (hmu : 0 < mu) (hA : 0 < A) (hh : 0 < h) (hc : 0 < c) |
| 45 | (htheta : theta < 1) |
| 46 | (hside : ell < mu * A ^ 2 / 4) |
| 47 | (htop : ell < -(c / 2) * (Real.log (1 - theta) + Real.log 2)) |
| 48 | (hbound : ∀ (s : ℝ) (hs : s ∈ J.domain) (z : U) |
| 49 | (v : TangentSpace (𝓡 3) z.val), |
| 50 | scale * (mu * gBirth.inner z.val v v) ≤ e.pullbackInner s hs z.val v v) |
| 51 | (hscalar : ∀ w : (G.realization.timeIntervals.interval |
| 52 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U, |
| 53 | c / (2 * (1 - (w.1.val - origin) / h ^ 2) * h ^ 2) ≤ |
| 54 | horizontalScalarCurvature G.toLGeometry.leafwise (rawCylinderMap G.realization e w)) |
| 55 | (center : C.carrier) (hsource : (U : Set C.carrier) = gBirth.ball center (A * h)) |
| 56 | {T tau a b : ℝ} {x y : G.toLGeometry.Point} |
| 57 | (p : M14BackwardPath G.toLGeometry T 0 tau x y) |
| 58 | (ha : 0 < a) (hab : a < b) (hbtau : b ≤ tau) |
| 59 | (hout : p.curve a ∉ range (rawCylinderMap G.realization e)) |
| 60 | (z : (G.realization.timeIntervals.interval |
| 61 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U) |
| 62 | (hend : p.curve b = rawCylinderMap G.realization e z) |
| 63 | (hinner : z.2.val ∈ gBirth.ball center (A * h / 2)) |
| 64 | (hinnerTime : (z.1.val - origin) / h ^ 2 ≤ 1 / 2) : |
| 65 | ∃ r ∈ Ico a b, ell < ∫ t in r..b, pathPositiveDensity p t := by |
| 66 | have hwidth : origin + theta * h ^ 2 - origin ≤ h ^ 2 := by |
| 67 | nlinarith [sq_nonneg h] |
| 68 | obtain ⟨r, hr, _, hinside, _, hcase⟩ := |
| 69 | exists_actualCap_sideEntry_or_top G hM12 e hI hphysical gBirth hmu hA hh hwidth |
| 70 | hbound center hsource p ha hab hbtau hout z hend hinner |
| 71 | refine ⟨r, hr, ?_⟩ |
| 72 | rcases hcase with hsideActual | htopActual |
| 73 | · exact hside.trans_le hsideActual |
| 74 | have htimeR := p.curve_time r ⟨ha.le.trans hr.1, hr.2.le.trans hbtau⟩ |
| 75 | have htimeB := p.curve_time b ⟨ha.le.trans hab.le, hbtau⟩ |
| 76 | have hclockB : G.toLGeometry.spacetime.timeFunction (p.curve b) = z.1.val := by |
| 77 | rw [hend] |
| 78 | exact rawCylinderMap_time G.realization e z |
| 79 | have hnormalizedTop : (T - origin - r) / h ^ 2 = theta := by |
| 80 | change G.toLGeometry.spacetime.timeFunction (p.curve r) = |
| 81 | origin + theta * h ^ 2 at htopActual |
| 82 | apply (div_eq_iff (sq_pos_of_pos hh).ne').mpr |
| 83 | linarith |
| 84 | have hnormalizedInner : (T - origin - b) / h ^ 2 ≤ 1 / 2 := by |
| 85 | have hnum : T - origin - b = z.1.val - origin := by linarith |
| 86 | rwa [hnum] |
| 87 | apply actualCapTopEntry_action_gt hM12 p hc htheta htop hh (ha.trans_le hr.1) |
| 88 | hr.2.le hbtau hnormalizedTop hnormalizedInner |
| 89 | intro t ht |
| 90 | obtain ⟨w, hw⟩ := hinside ⟨ht.1, ht.2.le⟩ |
| 91 | have htimeT := p.curve_time t |
| 92 | ⟨(ha.le.trans hr.1).trans ht.1.le, ht.2.le.trans hbtau⟩ |
| 93 | have hclock : w.1.val = T - t := by |
| 94 | rw [← rawCylinderMap_time G.realization e w, hw] |
| 95 | exact htimeT |
| 96 | have h := hscalar w |
| 97 | rw [hw, hclock] at h |
| 98 | convert h using 1 |
| 99 | congr 2 |
| 100 | ring |
| 101 | |
| 102 | end PoincareMT.Proofs.M46 |