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.ReducedGeometry.Regularity.PositiveStart.PositiveStartContactBounds |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Fields.VariationContact |
| 3 | |
| 4 | /-! |
| 5 | # Smooth raw reduced length is an actual variation contact |
| 6 | |
| 7 | Past-tube comparison and continuity give lower action bounds on the |
| 8 | final slice. Every initial-fixed actual variation therefore has the |
| 9 | required local action-gap minimum. Morgan-Tian Lemma 6.40, pp. 126-127; |
| 10 | see the positive-start-contact derivation, steps 4-5. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 25 | {R : M14SquareRootPath G p} |
| 26 | |
| 27 | /-- Smoothness of raw reduced length near a minimizing endpoint gives |
| 28 | genuine lower bounds for nearby final-time action sets, Lemma 6.40, |
| 29 | pp. 126-127; see the positive-start-contact derivation, step 4. -/ |
| 30 | theorem exists_local_fixedTime_actionSet_bddBelow |
| 31 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (hp : M14IsMinimizing p) |
| 32 | (U : Set G.Point) (hU : IsOpen U) (hy : y ∈ U) |
| 33 | (hf : ContMDiffOn (spacetimeModel n) (𝓘(ℝ, ℝ)) ∞ |
| 34 | (M14ReducedLengthAt G T a x) U) : |
| 35 | ∃ N : Set G.Point, IsOpen N ∧ y ∈ N ∧ |
| 36 | ∀ q ∈ N, BddBelow (M14ActionSet G T a b x q) := by |
| 37 | obtain ⟨N, hN, hyN, _, hfinite⟩ := exists_pastTube_finiteValueDomain hM12 p hp |
| 38 | refine ⟨N ∩ U, hN.inter hU, ⟨hyN, hy⟩, ?_⟩ |
| 39 | intro q hq |
| 40 | exact actionSet_bddBelow_of_pastFinite (p.tau_nonneg.trans_lt p.tau_lt) |
| 41 | (hN.mem_nhds hq.1) ((hf q hq.2).contMDiffAt (hU.mem_nhds hq.2)).continuousAt hfinite |
| 42 | |
| 43 | /-- Every initial-fixed actual variation of a minimizing path gives |
| 44 | a local action-gap minimum for smooth raw reduced length, without |
| 45 | nearby finite-domain assumptions. The argument also allows a=0, |
| 46 | Lemma 6.40, pp. 126-127; see the positive-start-contact derivation, step 5. -/ |
| 47 | theorem isLocalMin_variationAction_gap_of_smooth_minimizing |
| 48 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (V : M14LVariationData G p R) |
| 49 | (hp : M14IsMinimizing p) (hfix : V.left_endpoint_fixed) |
| 50 | (U : Set G.Point) (hU : IsOpen U) (hy : y ∈ U) |
| 51 | (hf : ContMDiffOn (spacetimeModel n) (𝓘(ℝ, ℝ)) ∞ |
| 52 | (M14ReducedLengthAt G T a x) U) : |
| 53 | IsLocalMin (fun v => M14VariationAction V v - |
| 54 | (2 * Real.sqrt b) * M14ReducedLengthAt G T a x |
| 55 | (V.squareFamily (Real.sqrt b) v)) 0 := by |
| 56 | have hb : 0 < b := p.tau_nonneg.trans_lt p.tau_lt |
| 57 | have hc : 0 < 2 * Real.sqrt b := mul_pos zero_lt_two (Real.sqrt_pos.mpr hb) |
| 58 | have hs : Real.sqrt b ∈ M14SqrtParameterInterval a b := |
| 59 | ⟨Real.sqrt_le_sqrt p.tau_lt.le, le_rfl⟩ |
| 60 | have hpoint : R.curve (Real.sqrt b) = y := by |
| 61 | rw [R.agrees (Real.sqrt b) hs, Real.sq_sqrt hb.le, p.curve_end] |
| 62 | obtain ⟨N, hN, hyN, hbound⟩ := exists_local_fixedTime_actionSet_bddBelow hM12 hp U hU hy hf |
| 63 | have hP : IsOpen V.parameterDomain := V.parameterDomain_eq ▸ isOpen_Ioo |
| 64 | have hzero : (0 : ℝ) ∈ V.parameterDomain := by |
| 65 | rw [V.parameterDomain_eq] |
| 66 | exact ⟨neg_lt_zero.mpr V.radius_pos, V.radius_pos⟩ |
| 67 | have hη := ((variationEndpoint_contMDiffOn V hs).contMDiffAt |
| 68 | (hP.mem_nhds hzero)).continuousAt |
| 69 | have hnear : ∀ᶠ v in 𝓝 (0 : ℝ), V.squareFamily (Real.sqrt b) v ∈ N := |
| 70 | hη.preimage_mem_nhds (hN.mem_nhds (by rw [V.square_base, hpoint]; exact hyN)) |
| 71 | have hgap : M14VariationAction V 0 - (2 * Real.sqrt b) * |
| 72 | M14ReducedLengthAt G T a x (V.squareFamily (Real.sqrt b) 0) = 0 := by |
| 73 | rw [variationAction_zero V, V.square_base, hpoint, M14ReducedLengthAt, |
| 74 | p.endpoint_time, sub_sub_cancel, reducedLengthValue_eq_of_minimizing p hp, |
| 75 | mul_div_cancel₀ _ hc.ne', sub_self] |
| 76 | filter_upwards [hP.mem_nhds hzero, hnear] with v hv hvN |
| 77 | change M14VariationAction V 0 - (2 * Real.sqrt b) * |
| 78 | M14ReducedLengthAt G T a x (V.squareFamily (Real.sqrt b) 0) ≤ _ |
| 79 | rw [hgap] |
| 80 | obtain ⟨q, _⟩ := exists_initialFixed_variationEndpointPath hM12 V hfix hv |
| 81 | have hfinite : M14FiniteValueDomain G T a b x (V.squareFamily (Real.sqrt b) v) := |
| 82 | ⟨⟨_, action_mem_actionSet q⟩, hbound _ hvN⟩ |
| 83 | have hle := reducedLengthAt_le_variationAction hM12 V hfix hv hfinite |
| 84 | exact sub_nonneg.mpr (by simpa only [mul_comm] using (le_div_iff₀ hc).mp hle) |
| 85 | |
| 86 | end PoincareMT.M14 |