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.Lipschitz.LocalLipschitzInverse |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzStableSlice |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzBranchSmooth |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzBounds |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzMinimizers |
| 6 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzBranches |
| 7 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzTail |
| 8 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzSmooth |
| 9 | |
| 10 | /-! |
| 11 | # Actual local Lipschitz reduced length at a stable endpoint |
| 12 | |
| 13 | Fixed-time stability, confined minimizing paths, and the stated Ricci |
| 14 | and scalar-gradient bounds identify the raw reduced length locally |
| 15 | with one smooth survivor branch. Uniform auxiliary speed controls the |
| 16 | future terminal tails; strict-prefix minimality handles earlier times. |
| 17 | The resulting chart estimate is exactly Proposition 6.56, p. 133, |
| 18 | with the energy control of Proposition 6.59 and Lemma 6.60, pp. 134-137. |
| 19 | -/ |
| 20 | |
| 21 | set_option autoImplicit false |
| 22 | |
| 23 | open Set Filter |
| 24 | open scoped Manifold ContDiff Bundle Topology |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT.M14 |
| 29 | |
| 30 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 31 | {I : SpacetimeInterval} |
| 32 | |
| 33 | /-- The exact frozen local Lipschitz statement for actual raw reduced |
| 34 | length, including physical time endpoints. Only fixed-time stability |
| 35 | and the supplied confined minimizers are used, Proposition 6.56 and |
| 36 | Proposition 6.59, pp. 133-137. -/ |
| 37 | theorem localLipschitzStatement |
| 38 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 39 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 40 | (G : GeneralizedLGeometryTransport n X time I) : M14LocalLipschitzStatement G := by |
| 41 | intro T τ x E H Z hZ N F0 hN hZN hNtime _hNF0 hmin hRic hgrad |
| 42 | obtain ⟨CR, hCR, hRic⟩ := hRic |
| 43 | obtain ⟨Cgrad, hCgrad, hgrad⟩ := hgrad |
| 44 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 45 | let : NormedAddCommGroup (G.Horizontal x) := |
| 46 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 47 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 48 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 49 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 50 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 51 | obtain ⟨hsurv, hbij, _⟩ := (H.carrier_exact Z).mp hZ |
| 52 | obtain ⟨P, hP, hzP, O, hO, hzO, inv, hinv, hmem, hright, hleft⟩ := |
| 53 | exists_survivor_local_inverse E hsurv (Real.sqrt_pos.mpr H.tau_pos) hbij |
| 54 | have hqO : H.endpoint_map Z ∈ O := by |
| 55 | rwa [← H.endpoint_map_eq Z hZ] at hzO |
| 56 | have hcenter : inv (H.endpoint_map Z) = (Z, Real.sqrt τ) := by |
| 57 | rw [H.endpoint_map_eq Z hZ] |
| 58 | exact hleft _ ⟨hzP, hsurv⟩ |
| 59 | have hmap (q : G.Point) (hq : q ∈ O) : inv q ∈ E.domain ∧ 0 < (inv q).2 := |
| 60 | ⟨(hmem q hq).1.2, (hmem q hq).2⟩ |
| 61 | have hclock (q : G.Point) (hq : q ∈ O) : |
| 62 | (inv q).2 = Real.sqrt (T - G.spacetime.timeFunction q) := by |
| 63 | have ht := E.clock (inv q).1 (inv q).2 (hmap q hq).1 |
| 64 | rw [hright q hq] at ht |
| 65 | rw [ht, sub_sub_cancel, Real.sqrt_sq (hmap q hq).2.le] |
| 66 | have hqtime : 0 < T - G.spacetime.timeFunction (H.endpoint_map Z) := by |
| 67 | rw [H.endpoint_time Z hZ, sub_sub_cancel] |
| 68 | exact H.tau_pos |
| 69 | obtain ⟨ha, hl⟩ := survivorInverse_actions_contMDiffOn hM04 hM12 E hinv hmap |
| 70 | obtain ⟨B, hB, hqB, hBN, hBO, δ, S, D, hδ, hD, hBclock, hBL⟩ := |
| 71 | exists_survivor_action_neighborhood E hN hZN hO hqO hqtime ha.continuousOn hmap hright |
| 72 | obtain ⟨C, hC, hpaths⟩ := exists_confined_minimizers_with_uniform_square_speed |
| 73 | hCoordinates hM12 hδ hD hCR hCgrad hBclock |
| 74 | (fun q hq => hmin q (hBN hq)) hBL hRic hgrad |
| 75 | obtain ⟨V, hV, hqV, J, hJ, hsJ, hcapture⟩ := |
| 76 | exists_stable_slice_neighborhood E H hZ hP hzP |
| 77 | obtain ⟨A, hA, hqA, htail⟩ := exists_terminal_tail_neighborhood (x := x) |
| 78 | H.tau_pos (H.endpoint_time Z hZ) (hV.mem_nhds hqV) hC |
| 79 | have hcarrier : IsOpen (O ∩ (fun q => (inv q).1) ⁻¹' H.carrier) := |
| 80 | hinv.continuousOn.fst.isOpen_inter_preimage hO H.carrier_open |
| 81 | have ht : ContMDiff (spacetimeModel n) 𝓘(ℝ) ∞ G.spacetime.timeFunction := |
| 82 | G.spacetime.time_smooth |
| 83 | have hc : Continuous (fun q : G.Point => Real.sqrt (T - G.spacetime.timeFunction q)) := |
| 84 | Real.continuous_sqrt.comp (continuous_const.sub ht.continuous) |
| 85 | let U := ((B ∩ (O ∩ (fun q => (inv q).1) ⁻¹' H.carrier)) ∩ A) ∩ |
| 86 | (fun q => Real.sqrt (T - G.spacetime.timeFunction q)) ⁻¹' J |
| 87 | have hU : IsOpen U := ((hB.inter hcarrier).inter hA).inter (hJ.preimage hc) |
| 88 | have hqU : H.endpoint_map Z ∈ U := by |
| 89 | refine ⟨⟨⟨hqB, hqO, ?_⟩, hqA⟩, ?_⟩ |
| 90 | · change (inv (H.endpoint_map Z)).1 ∈ H.carrier |
| 91 | simpa only [hcenter] using hZ |
| 92 | · change Real.sqrt (T - G.spacetime.timeFunction (H.endpoint_map Z)) ∈ J |
| 93 | simpa only [H.endpoint_time Z hZ, sub_sub_cancel] using hsJ |
| 94 | have hUO : U ⊆ O := fun _ hq => hBO hq.1.1.1 |
| 95 | have heq : EqOn (M14ReducedLengthAt G T 0 x) |
| 96 | (fun q => E.action (inv q).1 (inv q).2 / (2 * (inv q).2)) U := by |
| 97 | intro q hq |
| 98 | change M14ReducedLengthAt G T 0 x q = E.action (inv q).1 (inv q).2 / (2 * (inv q).2) |
| 99 | have hqO' := hUO hq |
| 100 | have hqB' := hq.1.1.1 |
| 101 | have hs := (hmap q hqO').2 |
| 102 | have hsurv' := (hmap q hqO').1 |
| 103 | have hbpos : 0 < T - G.spacetime.timeFunction q := hNtime (hBN hqB') |
| 104 | by_cases hfuture : τ < T - G.spacetime.timeFunction q |
| 105 | · obtain ⟨p, hp, R, ER, hEuler, henergy⟩ := hpaths q hqB' |
| 106 | have hpV : p.curve τ ∈ V := htail q hq.1.2 p R henergy hfuture |
| 107 | have hptime : G.spacetime.timeFunction (p.curve τ) = T - τ := |
| 108 | p.curve_time τ ⟨H.tau_pos.le, hfuture.le⟩ |
| 109 | obtain ⟨W, hW, hWP, hWeq⟩ := hcapture (p.curve τ) hpV hptime _ hq.2 |
| 110 | obtain ⟨W0, hW0, hcurve⟩ := exists_exponential_branch_of_square_euler E R ER hEuler |
| 111 | have hW0eq : W0 = W := initialVector_eq_of_minimizing_stable_prefix hM12 E H hW |
| 112 | p hp hW0 hfuture hcurve hWeq.symm |
| 113 | subst W0 |
| 114 | have hpoint : E.gamma W (Real.sqrt (T - G.spacetime.timeFunction q)) = q := |
| 115 | (hcurve ⟨p.tau_lt.le, le_rfl⟩).symm.trans p.curve_end |
| 116 | have hinvq : inv q = (W, Real.sqrt (T - G.spacetime.timeFunction q)) := by |
| 117 | have h := hleft _ ⟨hWP, hW0⟩ |
| 118 | rwa [hpoint] at h |
| 119 | have haction := action_eq_exponentialAction_of_curve_eqOn E p hW0 |
| 120 | (Real.sqrt_pos.mpr p.tau_lt) hpoint hcurve |
| 121 | unfold M14ReducedLengthAt |
| 122 | rw [reducedLengthValue_eq_of_minimizing p hp, haction, hinvq] |
| 123 | · have hstime : (inv q).2 ^ 2 ≤ τ := by |
| 124 | rw [hclock q hqO', Real.sq_sqrt hbpos.le] |
| 125 | exact le_of_not_gt hfuture |
| 126 | have hp := exponentialPath_minimizing_of_stable_prefix hCoordinates hM04 hM12 E H |
| 127 | hq.1.1.2.2 hs hstime hsurv' |
| 128 | exact (congrArg (M14ReducedLengthAt G T 0 x) (hright q hqO')).symm.trans |
| 129 | (reducedLengthAt_exponential_of_minimizing E hsurv' hs hp) |
| 130 | have hsmooth : ContMDiffAt (spacetimeModel n) 𝓘(ℝ) 1 (M14ReducedLengthAt G T 0 x) |
| 131 | (H.endpoint_map Z) := |
| 132 | (((hl.mono hUO).congr heq).contMDiffAt (hU.mem_nhds hqU)).of_le (by simp) |
| 133 | exact exists_chartProductLipschitzOn_of_contMDiffAt hsmooth (hN.mem_nhds hZN) |
| 134 | |
| 135 | end PoincareMT.M14 |