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.Attainment.Minimum.ExponentialSublevel |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Attainment.Minimum.VaryingTimeSurvival |
| 3 | |
| 4 | /-! |
| 5 | # Compact action sublevels across a closed interval of times |
| 6 | |
| 7 | Morgan--Tian Proposition 16.4 and Corollary 6.67, pp. 389-391 and |
| 8 | 139-140. Uniform actual phase estimates on a time interval separated |
| 9 | from zero give compactness jointly in the initial vector and terminal |
| 10 | square-root time. This is the compactness input for slice minimum values. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.Proofs.M46 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T : ℝ} {x : G.Point} |
| 25 | |
| 26 | /-- The full actual action sublevel is compact in initial vector and |
| 27 | positive terminal time. Only confinement and the literal phase/action |
| 28 | theorems are used, not regularity of any minimizing value function. -/ |
| 29 | theorem exponential_joint_action_sublevel_compact |
| 30 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 31 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 32 | (LG : GeneralizedLGeometryConclusion G) |
| 33 | (E : M14ExponentialFamily G T x) {a c D : ℝ} (ha : 0 < a) (hD : 0 ≤ D) |
| 34 | (htime : ∀ b ∈ Icc a c, T - b ^ 2 ∈ I.domain) |
| 35 | {K : Set G.Point} (hK : IsCompact K) |
| 36 | (hconf : ∀ Z b, b ∈ Icc a c → (Z, b) ∈ E.domain → E.action Z b ≤ D → |
| 37 | MapsTo (E.gamma Z) (Icc 0 b) K) : |
| 38 | IsCompact {z : G.Horizontal x × ℝ | |
| 39 | z.2 ∈ Icc a c ∧ z ∈ E.domain ∧ E.action z.1 z.2 ≤ D} := by |
| 40 | classical |
| 41 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 42 | let : NormedAddCommGroup (G.Horizontal x) := |
| 43 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 44 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 45 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 46 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 47 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 48 | let : FiniteDimensional ℝ (G.Horizontal x) := |
| 49 | VectorBundle.finiteDimensional ℝ (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 50 | let : FirstCountableTopology (G.Horizontal x × ℝ) := UniformSpace.firstCountableTopology _ |
| 51 | let : SequentialSpace (G.Horizontal x × ℝ) := |
| 52 | @FrechetUrysohnSpace.to_sequentialSpace _ _ |
| 53 | FirstCountableTopology.frechetUrysohnSpace |
| 54 | obtain ⟨CR, Cgrad, hCR, hCgrad, hRic, hgrad⟩ := compact_cage_analytic_bounds hM12 hK |
| 55 | obtain ⟨C, hC, henergy⟩ := exponential_square_energy_uniform_bound hM12 E |
| 56 | (H := c) ha hD hCR hCgrad hRic hgrad |
| 57 | let B : Set (G.Horizontal x × ℝ) := |
| 58 | {z | z.2 ∈ Icc a c ∧ z ∈ E.domain ∧ E.action z.1 z.2 ≤ D} |
| 59 | have henergyB (z : G.Horizontal x × ℝ) (hz : z ∈ B) |
| 60 | (s : ℝ) (hs : s ∈ Icc 0 z.2) : |
| 61 | G.spacetime.horizontalMetric.inner |
| 62 | ((E.square_path z.1 z.2 hz.2.1 (ha.trans_le hz.1.1)).curve s) |
| 63 | ((E.square_path z.1 z.2 hz.2.1 (ha.trans_le hz.1.1)).horizontal_velocity s) |
| 64 | ((E.square_path z.1 z.2 hz.2.1 (ha.trans_le hz.1.1)).horizontal_velocity s) ≤ C := |
| 65 | henergy z.1 z.2 hz.1.1 hz.1.2 hz.2.1 hz.2.2 |
| 66 | (fun r hr => hconf z.1 z.2 hz.1 hz.2.1 hz.2.2 hr) s hs |
| 67 | have hclosed : IsClosed B := by |
| 68 | apply IsSeqClosed.isClosed |
| 69 | intro zs z hzs hlim |
| 70 | have ht : z.2 ∈ Icc a c := isClosed_Icc.mem_of_tendsto |
| 71 | (continuous_snd.continuousAt.tendsto.comp hlim) |
| 72 | (Eventually.of_forall fun k => (hzs k).1) |
| 73 | have hz : z ∈ E.domain := exponential_survival_of_varying_phase_limit hM04 hM12 E |
| 74 | (ha.trans_le ht.1) (htime z.2 ht) |
| 75 | (continuous_fst.continuousAt.tendsto.comp hlim) |
| 76 | (continuous_snd.continuousAt.tendsto.comp hlim) |
| 77 | (fun k => ha.trans_le (hzs k).1.1) (fun k => (hzs k).2.1) hK C |
| 78 | (fun k s hs => hconf (zs k).1 (zs k).2 (hzs k).1 (hzs k).2.1 (hzs k).2.2 hs) |
| 79 | (fun k s hs => henergyB (zs k) (hzs k) s hs) |
| 80 | have hwithin : Tendsto zs atTop (𝓝[E.domain ∩ {w | 0 < w.2}] z) := |
| 81 | tendsto_nhdsWithin_iff.mpr ⟨hlim, |
| 82 | Eventually.of_forall fun k => ⟨(hzs k).2.1, ha.trans_le (hzs k).1.1⟩⟩ |
| 83 | have haction := (LG.exponential.action_differential T x E).1.continuousOn |
| 84 | z ⟨hz, ha.trans_le ht.1⟩ |
| 85 | exact ⟨ht, hz, le_of_tendsto (Filter.Tendsto.comp haction hwithin) |
| 86 | (Eventually.of_forall fun k => (hzs k).2.2)⟩ |
| 87 | have hbounded : B ⊆ Metric.closedBall (0 : G.Horizontal x) (Real.sqrt C) ×ˢ Icc a c := by |
| 88 | intro z hz |
| 89 | have hb : 0 < z.2 := ha.trans_le hz.1.1 |
| 90 | let Q : M14SquareRootInitialValuePath G T (z.2 ^ 2) x (E.gamma z.1 z.2) z.1 := { |
| 91 | path := E.path z.1 z.2 hz.2.1 hb |
| 92 | square_path := E.square_path z.1 z.2 hz.2.1 hb |
| 93 | extension := E.square_extension z.1 z.2 hz.2.1 hb |
| 94 | euler := E.square_euler z.1 z.2 hz.2.1 hb |
| 95 | initial_velocity := E.square_initial_velocity z.1 z.2 hz.2.1 hb } |
| 96 | have hbound := henergyB z hz 0 ⟨le_rfl, hb.le⟩ |
| 97 | change G.spacetime.horizontalMetric.inner (Q.square_path.curve 0) |
| 98 | (Q.square_path.horizontal_velocity 0) (Q.square_path.horizontal_velocity 0) ≤ C at hbound |
| 99 | rw [initialValue_energy_zero Q] at hbound |
| 100 | change 4 * inner ℝ z.1 z.1 ≤ C at hbound |
| 101 | rw [real_inner_self_eq_norm_sq] at hbound |
| 102 | have hnorm : ‖z.1‖ ≤ Real.sqrt C := by |
| 103 | nlinarith [Real.sq_sqrt hC, Real.sqrt_nonneg C, norm_nonneg z.1, sq_nonneg ‖z.1‖] |
| 104 | exact ⟨by simpa only [Metric.mem_closedBall, dist_zero_right] using hnorm, hz.1⟩ |
| 105 | have hcompact := (isCompact_closedBall (0 : G.Horizontal x) (Real.sqrt C)).prod |
| 106 | (isCompact_Icc : IsCompact (Icc a c)) |
| 107 | exact hcompact.of_isClosed_subset hclosed hbounded |
| 108 | |
| 109 | end PoincareMT.Proofs.M46 |