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.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Variation.GaugePhaseCoordinates |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Variation.UniformGaugeRestart |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.GaugeLift |
| 5 | |
| 6 | /-! |
| 7 | # Uniform restarts for actual nearby horizontal phases |
| 8 | |
| 9 | Proposition 16.4 and Lemma 6.18, pp. 389-391 and 113-114. |
| 10 | One inverse gauge identifies a neighborhood of an actual horizontal |
| 11 | phase with the chart position and momentum. Nearby actual phases at |
| 12 | nearby compatible times therefore restart on one fixed closed window. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- The fixed gauge reconstructs horizontal vectors over equal actual points. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Bundle Metric |
| 20 | open scoped Topology Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M08 |
| 25 | export PoincareMT.LGeometry (chartMetricOperator) |
| 26 | end PoincareMT.M08 |
| 27 | |
| 28 | namespace PoincareMT.Proofs.M46 |
| 29 | |
| 30 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 31 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 32 | |
| 33 | /-- A neighborhood in the actual horizontal phase bundle admits |
| 34 | genuine Euler restarts on one common closed interval, with time |
| 35 | neighborhoods relative to physical admissibility. Source: Proposition |
| 36 | 16.4 and Lemma 6.18, pp. 389-391 and 113-114. -/ |
| 37 | theorem exists_actualPhase_uniform_restart |
| 38 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 39 | {T s : ℝ} (hT : T ∈ I.domain) (hs : 0 < s) |
| 40 | (z₀ : TotalSpace (EuclideanSpace ℝ (Fin n)) G.Horizontal) |
| 41 | (hclock : G.spacetime.timeFunction z₀.proj = T - s ^ 2) : |
| 42 | ∃ l r : ℝ, 0 < l ∧ l < s ∧ s ≤ r ∧ |
| 43 | Icc l r ∈ 𝓝[{w | 0 ≤ w ∧ T - w ^ 2 ∈ I.domain}] s ∧ |
| 44 | ∀ᶠ z in 𝓝[{w | 0 ≤ w ∧ T - w ^ 2 ∈ I.domain}] s ×ˢ 𝓝 z₀, |
| 45 | z.1 ∈ Icc l r ∧ |
| 46 | (G.spacetime.timeFunction z.2.proj = T - z.1 ^ 2 → |
| 47 | ∃ q₀ q₁ : G.Point, ∃ p : M14BackwardPath G T (l ^ 2) (r ^ 2) q₀ q₁, |
| 48 | ∃ R : M14SquareRootPath G p, |
| 49 | ∃ E : M14PullbackExtension G R.curve |
| 50 | (M14SqrtParameterInterval (l ^ 2) (r ^ 2)) R.horizontal_velocity, |
| 51 | (∀ w ∈ M14SqrtParameterInterval (l ^ 2) (r ^ 2), ∀ V, |
| 52 | M14SquareRootEulerResidual G R E w V = 0) ∧ |
| 53 | R.curve z.1 = z.2.proj ∧ HEq (R.horizontal_velocity z.1) z.2.2) := by |
| 54 | obtain ⟨b, U, lift, hU, hzU, hlift, hrec, htimeLift⟩ := |
| 55 | M14.exists_smooth_gauge_lift G z₀.proj |
| 56 | let S : Set (TotalSpace (EuclideanSpace ℝ (Fin n)) G.Horizontal) := {z | z.proj ∈ U} |
| 57 | have hS : IsOpen S := hU.preimage (FiberBundle.continuous_proj _ _) |
| 58 | have hzS : z₀ ∈ S := hzU |
| 59 | obtain ⟨v, hv, hvelocity⟩ := exists_continuous_gaugeVelocity_coordinates b lift hlift hrec |
| 60 | let t₀ := (lift z₀.proj).1 |
| 61 | let x₀ := (lift z₀.proj).2 |
| 62 | let V₀ := (G.gaugeCover.metric b).spatialTangentEquiv t₀ x₀ (v z₀) |
| 63 | have hCoordinates := hM12.coordinate_gauges X time I G.spacetime G.slices |
| 64 | G.timeIntervals G.gaugeCover G.leafwise |
| 65 | obtain ⟨W⟩ := M14.ordinaryGaugeWitness_nonempty b hCoordinates |
| 66 | have htime₀ : T - s ^ 2 = t₀.val := hclock.symm.trans (htimeLift z₀.proj hzU).symm |
| 67 | obtain ⟨a, c, ha, has, hsc, htime, hwindow⟩ := |
| 68 | M14.exists_gauge_positive_squareClock_window b t₀ x₀ hT hs htime₀ |
| 69 | obtain ⟨l, r, hal, _, _, hnear, rho, hrho, hrestart⟩ := |
| 70 | exists_gaugeEulerPath_uniform_restart_neighborhood hM04 hM12 b W t₀ x₀ V₀ |
| 71 | ha.le (has.trans_le hsc) ⟨s, has.le, hsc⟩ htime |
| 72 | have hls : l < s := M14.left_lt_of_Icc_mem_nhdsWithin has hsc hnear |
| 73 | have hsr : s ≤ r := |
| 74 | (mem_of_mem_nhdsWithin (show s ∈ Icc a c from ⟨has.le, hsc⟩) hnear).2 |
| 75 | let f := fun z : ℝ × TotalSpace (EuclideanSpace ℝ (Fin n)) G.Horizontal => |
| 76 | ((lift z.2.proj).2.val, |
| 77 | M08.chartMetricOperator W.flow T x₀ (z.1, (lift z.2.proj).2.val) (v z.2)) |
| 78 | have hf : ContinuousOn f (Icc a c ×ˢ S) := |
| 79 | gaugeMomentum_coordinates_continuousOn b W lift hlift v hv T x₀ htime |
| 80 | have hfnear : {z | f z ∈ ball (f (s, z₀)) rho} ∈ 𝓝[Icc a c ×ˢ S] (s, z₀) := |
| 81 | (hf (s, z₀) ⟨⟨has.le, hsc⟩, hzS⟩).preimage_mem_nhdsWithin |
| 82 | (ball_mem_nhds _ hrho) |
| 83 | rw [nhdsWithin_prod_eq, nhdsWithin_eq_nhds.mpr (hS.mem_nhds hzS)] at hfnear |
| 84 | have hfilter : 𝓝[{w | 0 ≤ w ∧ T - w ^ 2 ∈ I.domain}] s ≤ 𝓝[Icc a c] s := |
| 85 | nhdsWithin_le_of_mem hwindow |
| 86 | have hfnear' := (Filter.prod_mono hfilter (le_refl (𝓝 z₀))) hfnear |
| 87 | have hrestart' := hrestart.filter_mono hfilter |
| 88 | have hSnear : ∀ᶠ z in 𝓝 z₀, z ∈ S := hS.mem_nhds hzS |
| 89 | refine ⟨l, r, ha.trans_le hal, hls, hsr, nhdsWithin_le_of_mem hwindow hnear, ?_⟩ |
| 90 | filter_upwards [hrestart'.prod_inl (𝓝 z₀), hfnear', |
| 91 | hSnear.prod_inr (𝓝[{w | 0 ≤ w ∧ T - w ^ 2 ∈ I.domain}] s)] |
| 92 | with z hzRestart hzNear hzS' |
| 93 | refine ⟨hzRestart.1, ?_⟩ |
| 94 | intro hzClock |
| 95 | let t := (lift z.2.proj).1 |
| 96 | let x := (lift z.2.proj).2 |
| 97 | let V := (G.gaugeCover.metric b).spatialTangentEquiv t x (v z.2) |
| 98 | have htClock : T - z.1 ^ 2 = t.val := |
| 99 | hzClock.symm.trans (htimeLift z.2.proj hzS').symm |
| 100 | have hphaseNear : (x.val, M08.chartMetricOperator W.flow T x₀ (z.1, x.val) |
| 101 | (((G.gaugeCover.metric b).spatialTangentEquiv t x).symm V)) ∈ |
| 102 | ball (x₀.val, M08.chartMetricOperator W.flow T x₀ (s, x₀.val) |
| 103 | (((G.gaugeCover.metric b).spatialTangentEquiv t₀ x₀).symm V₀)) rho := by |
| 104 | simpa only [V, V₀, ContinuousLinearEquiv.symm_apply_apply] using hzNear |
| 105 | obtain ⟨q₀, q₁, p, R, E, hEuler, hpoint, hvel⟩ := |
| 106 | hzRestart.2 t x V htClock hphaseNear |
| 107 | exact ⟨q₀, q₁, p, R, E, hEuler, hpoint.trans (hrec z.2.proj hzS'), |
| 108 | hvel.trans (hvelocity z.2 hzS').symm⟩ |
| 109 | |
| 110 | end PoincareMT.Proofs.M46 |