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.ReducedGeometry.ReducedLength.Minimum.Variation.Endpoint |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.MinimizingCurve |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variational.Extension.Manifold |
| 4 | |
| 5 | /-! |
| 6 | # Smooth free-endpoint minimizers on ancient surfaces |
| 7 | |
| 8 | The compactness, recovery, chart regularity, extension, and first-variation |
| 9 | producers are composed while retaining their actual common curve. The result |
| 10 | includes the intrinsic Euler equation and the free terminal boundary condition. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open Set Filter Topology MeasureTheory |
| 19 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 20 | |
| 21 | namespace PoincareMT.AncientKappaSolution |
| 22 | |
| 23 | open ReducedLengthMinimum ReducedLengthMinimum.Variational |
| 24 | open ReducedLengthMinimum.Variation ReducedLengthMinimum.Variation.Geometry |
| 25 | |
| 26 | variable {M : Type*} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 28 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 29 | [SecondCountableTopology M] [ConnectedSpace M] |
| 30 | |
| 31 | set_option maxHeartbeats 1600000 in |
| 32 | /-- The original ancient-solution hypotheses produce a smooth minimizing Euler path |
| 33 | with its natural zero-velocity condition at the free terminal point. -/ |
| 34 | theorem exists_spatial_minimizing_sqrtRegularPath (K : AncientKappaSolution 2 M) |
| 35 | (p : M) {τ : ℝ} (hτ : 0 < τ) : |
| 36 | ∃ q : BackwardTimePath K.flow 0 0 τ, ∃ S : SqrtRegularPath q, |
| 37 | ∃ E : ParametricAlongCurveExtensionOn (Icc 0 (Real.sqrt τ)) S.curve |
| 38 | (curveVelocityWithin (n := 2) S.curve (Icc 0 (Real.sqrt τ))), |
| 39 | q.curve 0 = p ∧ |
| 40 | backwardLLength K.flow 0 0 τ q.curve = |
| 41 | 2 * Real.sqrt τ * K.spatialReducedLengthInfimum p τ ∧ |
| 42 | (∀ r : BackwardTimePath K.flow 0 0 τ, r.curve 0 = p → |
| 43 | backwardLLength K.flow 0 0 τ q.curve ≤ backwardLLength K.flow 0 0 τ r.curve) ∧ |
| 44 | (∀ s ∈ Ioo 0 (Real.sqrt τ), |
| 45 | regularizedLGeodesicEquation K.flow 0 S.curve (Icc 0 (Real.sqrt τ)) E s) ∧ |
| 46 | curveVelocityWithin (n := 2) S.curve (Icc 0 (Real.sqrt τ)) (Real.sqrt τ) = 0 := by |
| 47 | let : MetricSpace M := referenceMetricSpace (K.flow.metric 0) |
| 48 | let : LocallyCompactSpace M := |
| 49 | Manifold.locallyCompact_of_finiteDimensional (M := M) (𝓡 2) |
| 50 | have hc : 0 < Real.sqrt τ := Real.sqrt_pos.mpr hτ |
| 51 | obtain ⟨paths, γ, _, hanti, haction, hγ, hγ0, hlim, _⟩ := |
| 52 | K.exists_spatial_minimizing_uniform_limit p hτ |
| 53 | have hreg := K.minimizing_uniform_limit_contMDiffOn_Icc |
| 54 | p hτ paths hanti haction γ hγ hγ0 hlim |
| 55 | obtain ⟨α, U, hU, hIU, hα, hαγ⟩ := exists_smooth_manifold_extension_Icc hc γ hreg |
| 56 | obtain ⟨m, t, x, Q, _, ht, hta, htb, hQ, _⟩ := |
| 57 | exists_compact_partition_of_uniform_limit |
| 58 | (fun x : M => (chartAt (EuclideanSpace ℝ (Fin 2)) x).source) |
| 59 | (fun x => (chartAt (EuclideanSpace ℝ (Fin 2)) x).open_source) |
| 60 | (fun y => ⟨y, mem_chart_source _ y⟩) hc.le γ hγ |
| 61 | (fun k s => (paths k).curve (s ^ 2)) hlim |
| 62 | obtain ⟨w, hw, hsum⟩ := K.finite_chart_limit_le_spatialInfimum p hτ paths hanti |
| 63 | haction γ hγ hlim t ht hta htb x Q hQ |
| 64 | have hsrc (i : Fin m) : MapsTo γ (Icc (t i.castSucc) (t i.succ)) |
| 65 | (chartAt (EuclideanSpace ℝ (Fin 2)) (x i)).source := |
| 66 | fun s hs => (hQ i).2.2 (interior_subset ((hQ i).2.1 (mem_image_of_mem γ hs))) |
| 67 | obtain ⟨q, hq, hact, hminimal⟩ := K.exists_minimizing_path_of_regular_chart_limit hτ |
| 68 | t ht hta htb γ hγ.continuousOn |
| 69 | ((hreg.mono Ioo_subset_Icc_self).of_le (by simp)) x hsrc w hw |
| 70 | (by simpa only [chartH1Action, hγ0] using hsum) |
| 71 | have hq0 : q.curve 0 = γ 0 := by simpa only [Real.sqrt_zero] using hq 0 |
| 72 | have hagrees (s : ℝ) (hs : s ∈ Icc 0 (Real.sqrt τ)) : α s = q.curve (s ^ 2) := by |
| 73 | rw [hq, Real.sqrt_sq hs.1] |
| 74 | exact hαγ hs |
| 75 | let S : SqrtRegularPath q := { |
| 76 | curve := α |
| 77 | domain := U |
| 78 | open_domain := hU |
| 79 | interval_subset := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hIU |
| 80 | smooth := hα |
| 81 | agrees := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hagrees } |
| 82 | obtain ⟨E⟩ := exists_parametricVelocityExtension hU hIU (uniqueDiffOn_Icc hc) α hα |
| 83 | have hminimal' (r : BackwardTimePath K.flow 0 0 τ) (hr : r.curve 0 = q.curve 0) : |
| 84 | backwardLLength K.flow 0 0 τ q.curve ≤ backwardLLength K.flow 0 0 τ r.curve := |
| 85 | hminimal r (hr.trans hq0) |
| 86 | have hterminal := K.minimizing_uniform_limit_terminal_velocity_eq_zero |
| 87 | p hτ paths hanti haction γ hγ hγ0 hlim q hminimal' α U hU hIU hα hαγ hagrees |
| 88 | refine ⟨q, S, E, hq0.trans hγ0, ?_, ?_, ?_, hterminal⟩ |
| 89 | · simpa only [hγ0] using hact |
| 90 | · intro r hr |
| 91 | exact hminimal r (hr.trans hγ0.symm) |
| 92 | · intro s hs W |
| 93 | have hsC : s ∈ Icc 0 (Real.sqrt τ) := Ioo_subset_Icc_self hs |
| 94 | let Eγ := transferParametricExtension hαγ |
| 95 | (fun r hr ↦ curveVelocityWithin_congr hαγ hr) E |
| 96 | have heuler := K.minimizing_uniform_limit_regularizedLGeodesicEquation |
| 97 | p hτ paths hanti haction γ hγ hγ0 hlim Eγ hs W |
| 98 | have hαs := ((hα s (hIU hsC)).contMDiffAt (hU.mem_nhds (hIU hsC))).mdifferentiableAt |
| 99 | (by simp) |
| 100 | have hcongr := regularizedEulerResidual_congr K.flow 0 hαγ.symm Eγ E hsC |
| 101 | (uniqueDiffOn_Icc hc s hsC) hαs W |
| 102 | rw [hcongr] at heuler |
| 103 | exact heuler |
| 104 | |
| 105 | end PoincareMT.AncientKappaSolution |