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.Exponential.FamilyEndpointEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.CompactVelocityExtension |
| 3 | |
| 4 | /-! |
| 5 | # Regularization with the actual square-family representative |
| 6 | |
| 7 | This supplies a second genuine regularization without changing the one |
| 8 | retained by the L-exponential family. Its curve is the square family itself. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] |
| 23 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 24 | |
| 25 | noncomputable def lExponentialFamily_squarePath (A : LExponentialFamily F T τmax p) |
| 26 | (Z : TangentSpace (𝓡 n) p) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) : |
| 27 | SqrtRegularPath (A.path Z b hb hmax) where |
| 28 | curve := A.squareFamily Z |
| 29 | domain := (fun r : ℝ ↦ (Z, r)) ⁻¹' A.squareDomain |
| 30 | open_domain := A.square_open.preimage (continuous_const.prodMk continuous_id) |
| 31 | interval_subset := by |
| 32 | intro s hs |
| 33 | have hs0 : 0 ≤ s := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs.1 |
| 34 | exact A.square_contains ⟨Set.mem_univ _, hs0, |
| 35 | hs.2.trans_lt (Real.sqrt_lt_sqrt hb.le hmax)⟩ |
| 36 | smooth := lExponentialFamily_squareSlice_contMDiffOn A Z |
| 37 | agrees := by |
| 38 | intro s hs |
| 39 | have hs0 : 0 ≤ s := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs.1 |
| 40 | exact (A.square_agrees Z s ⟨hs0, |
| 41 | hs.2.trans_lt (Real.sqrt_lt_sqrt hb.le hmax)⟩).trans |
| 42 | (congrFun (A.path_eq Z b hb hmax) (s ^ 2)).symm |
| 43 | |
| 44 | noncomputable def lExponentialFamily_squareRegularization |
| 45 | (hM04 : RicciFlowCurvatureTheory.{u}) (hτmax : 0 < τmax) |
| 46 | (hwindow : Set.Icc (T - τmax) T ⊆ J) (A : LExponentialFamily F T τmax p) |
| 47 | (Z : TangentSpace (𝓡 n) p) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) : |
| 48 | RegularizedLGeodesicData (A.path Z b hb hmax) := by |
| 49 | let R := lExponentialFamily_squarePath A Z b hb hmax |
| 50 | let K := sqrtParameterInterval 0 b |
| 51 | have hKd : UniqueDiffOn ℝ K := uniqueDiffOn_Icc (Real.sqrt_lt_sqrt (by norm_num) hb) |
| 52 | let E := Classical.choice (nonempty_velocityExtensionOn_compact R.curve R.domain K |
| 53 | R.open_domain R.interval_subset isCompact_Icc hKd R.smooth) |
| 54 | refine { path := R, velocity_extension := E, equation := ?_ } |
| 55 | intro s hs |
| 56 | have hs0 : 0 ≤ s := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs.1 |
| 57 | have htime : s ∈ Set.Ioo (-Real.sqrt τmax) (Real.sqrt τmax) := |
| 58 | ⟨(neg_lt_zero.mpr (Real.sqrt_pos.mpr hτmax)).trans_le hs0, |
| 59 | hs.2.trans_lt (Real.sqrt_lt_sqrt hb.le hmax)⟩ |
| 60 | exact (regularizedEquation_iff_local F hM04 T τmax hτmax hwindow |
| 61 | R.curve R.domain K R.open_domain R.interval_subset hKd R.smooth E s hs htime).mpr |
| 62 | (lExponentialFamily_localRegularizedEquation_closed hM04 hτmax hwindow A Z b hb hmax s hs) |
| 63 | |
| 64 | theorem lExponentialFamily_chartPhase_hasDerivAt |
| 65 | (hM04 : RicciFlowCurvatureTheory.{u}) (hτmax : 0 < τmax) |
| 66 | (hwindow : Set.Icc (T - τmax) T ⊆ J) (A : LExponentialFamily F T τmax p) |
| 67 | (Z : TangentSpace (𝓡 n) p) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) |
| 68 | (x0 : M) (s : ℝ) (hs : s ∈ sqrtParameterInterval 0 b) |
| 69 | (hx : A.squareFamily Z s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x0).source) : |
| 70 | let a : ℝ → EuclideanSpace ℝ (Fin n) := |
| 71 | fun r ↦ (chartAt (EuclideanSpace ℝ (Fin n)) x0) (A.squareFamily Z r) |
| 72 | HasDerivAt (fun r ↦ (a r, deriv a r)) |
| 73 | (regularizedCoordinatePhase (squareChartMetric F T x0) (squareChartScalar F T x0) |
| 74 | (s, (a s, deriv a s))) s := by |
| 75 | let R := lExponentialFamily_squareRegularization hM04 hτmax hwindow A Z b hb hmax |
| 76 | let K := sqrtParameterInterval 0 b |
| 77 | have hKd : UniqueDiffOn ℝ K := uniqueDiffOn_Icc (Real.sqrt_lt_sqrt (by norm_num) hb) |
| 78 | have hs0 : 0 ≤ s := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs.1 |
| 79 | have htime : s ∈ Set.Ioo (-Real.sqrt τmax) (Real.sqrt τmax) := |
| 80 | ⟨(neg_lt_zero.mpr (Real.sqrt_pos.mpr hτmax)).trans_le hs0, |
| 81 | hs.2.trans_lt (Real.sqrt_lt_sqrt hb.le hmax)⟩ |
| 82 | exact (regularizedEquation_iff_chart_hasDerivAt F hM04 T τmax hτmax hwindow x0 |
| 83 | R.path.curve R.path.domain K R.path.open_domain R.path.interval_subset hKd |
| 84 | R.path.smooth R.velocity_extension s hs htime hx).mp (R.equation s hs) |
| 85 | |
| 86 | end PoincareMT.ReducedLength |