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.Harnack.Regularity |
| 2 | |
| 3 | /-! |
| 4 | # Affine time translation of Ricci flows |
| 5 | |
| 6 | The local Shi estimate in the M04 interface is stated for a flow on |
| 7 | `Set.Icc 0 T`. This file supplies the elementary adapter which moves an |
| 8 | arbitrary interval subset back to that normal form while retaining the same |
| 9 | spatial metric and connection representatives. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.RicciFlow |
| 19 | |
| 20 | open Set |
| 21 | |
| 22 | /-- Translate a Ricci flow by the affine time map `t ↦ t + s`. |
| 23 | |
| 24 | The hypotheses only ask that the translated interval lies in the original |
| 25 | domain; no endpoint regularity or extension of the flow is introduced. |
| 26 | -/ |
| 27 | def translate |
| 28 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 30 | [IsManifold (𝓡 n) ∞ M] {J K : Set ℝ} |
| 31 | (F : RicciFlow n M J) (s : ℝ) (hKJ : (fun t : ℝ ↦ t + s) '' K ⊆ J) |
| 32 | (hK : K.OrdConnected) (hne : K.Nontrivial) : RicciFlow n M K where |
| 33 | metric := fun t ↦ F.metric (t + s) |
| 34 | connection := fun t ↦ F.connection (t + s) |
| 35 | interval := hK |
| 36 | nontrivial := hne |
| 37 | smooth := by |
| 38 | apply F.smooth.comp ((contMDiffOn_fst.add contMDiffOn_const).prodMk |
| 39 | contMDiffOn_snd) |
| 40 | intro p hp |
| 41 | exact ⟨hKJ ⟨p.1, hp.1, rfl⟩, hp.2⟩ |
| 42 | equation := by |
| 43 | intro t ht x u v |
| 44 | have hmap : Set.MapsTo (fun z : ℝ ↦ z + s) K J := by |
| 45 | intro z hz |
| 46 | exact hKJ ⟨z, hz, rfl⟩ |
| 47 | have houter := F.equation (t + s) (hmap ht) x u v |
| 48 | have hinner : HasDerivWithinAt (fun z : ℝ ↦ z + s) 1 K t := by |
| 49 | simpa only [id_eq] using (hasDerivAt_id t).add_const s |>.hasDerivWithinAt |
| 50 | have hcomp := houter.comp t hinner hmap |
| 51 | simpa only [Function.comp_def, mul_one] using hcomp |
| 52 | |
| 53 | theorem translate_metric |
| 54 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 55 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 56 | [IsManifold (𝓡 n) ∞ M] {J K : Set ℝ} |
| 57 | (F : RicciFlow n M J) (s : ℝ) (hKJ : (fun t : ℝ ↦ t + s) '' K ⊆ J) |
| 58 | (hK : K.OrdConnected) (hne : K.Nontrivial) (t : ℝ) : |
| 59 | (F.translate s hKJ hK hne).metric t = F.metric (t + s) := rfl |
| 60 | |
| 61 | theorem translate_connection |
| 62 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 63 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 64 | [IsManifold (𝓡 n) ∞ M] {J K : Set ℝ} |
| 65 | (F : RicciFlow n M J) (s : ℝ) (hKJ : (fun t : ℝ ↦ t + s) '' K ⊆ J) |
| 66 | (hK : K.OrdConnected) (hne : K.Nontrivial) (t : ℝ) : |
| 67 | (F.translate s hKJ hK hne).connection t = F.connection (t + s) := rfl |
| 68 | |
| 69 | end PoincareMT.RicciFlow |