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.Rescaling.Contraction |
| 2 | import PoincareLib.Geometry.RicciFlow.TimeTranslation |
| 3 | |
| 4 | /-! |
| 5 | # Parabolic rescaling of the actual Ricci flow |
| 6 | |
| 7 | The affine time change and the metric factor cancel in the flow equation. |
| 8 | Smoothness and derivatives are taken within the prescribed time interval, |
| 9 | so the construction also applies at included endpoints. |
| 10 | |
| 11 | See Kleiner--Lott, Corollary 44.1, pp. 2682--2683. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter Topology Bundle |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.RicciFlow |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | {J K : Set ℝ} |
| 27 | |
| 28 | /-- The flow `c g(τ + s/c)` on any nondegenerate interval mapped into the domain. -/ |
| 29 | noncomputable def parabolicRescale |
| 30 | (F : RicciFlow n M J) (c : ℝ) (hc : 0 < c) (τ : ℝ) |
| 31 | (hKJ : MapsTo (fun s : ℝ ↦ τ + s / c) K J) |
| 32 | (hK : K.OrdConnected) (hne : K.Nontrivial) : RicciFlow n M K where |
| 33 | metric s := rescaledMetric (F.metric (τ + s / c)) c hc |
| 34 | connection s := rescaledMetric_connection (F.metric (τ + s / c)) |
| 35 | (F.connection (τ + s / c)) c hc |
| 36 | interval := hK |
| 37 | nontrivial := hne |
| 38 | smooth := by |
| 39 | have hf : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 40 | (fun p : ℝ × M ↦ p.1) (K ×ˢ univ) := contMDiffOn_fst |
| 41 | have hcst : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 42 | (fun _ : ℝ × M ↦ c⁻¹) (K ×ˢ univ) := contMDiffOn_const |
| 43 | have htime : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 44 | (fun p : ℝ × M ↦ (τ + p.1 / c, p.2)) (K ×ˢ univ) := by |
| 45 | simpa only [Pi.add_apply, Pi.smul_apply, smul_eq_mul, Pi.mul_apply, div_eq_mul_inv, |
| 46 | mul_comm c⁻¹] using |
| 47 | ((contMDiffOn_const (c := τ)).add (hcst.smul hf)).prodMk |
| 48 | (contMDiffOn_snd (M := ℝ) (N := M)) |
| 49 | have hs := F.smooth.comp htime (fun p hp ↦ ⟨hKJ hp.1, hp.2⟩) |
| 50 | intro p hp |
| 51 | have hsp := hs p hp |
| 52 | rw [Bundle.contMDiffWithinAt_totalSpace] at hsp ⊢ |
| 53 | refine ⟨hsp.1, ?_⟩ |
| 54 | let E := EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ |
| 55 | let : NormedAddCommGroup E := inferInstanceAs |
| 56 | (NormedAddCommGroup |
| 57 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ)) |
| 58 | let : NormedSpace ℝ E := inferInstanceAs |
| 59 | (NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ)) |
| 60 | let V := fun x : M ↦ TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x →L[ℝ] ℝ |
| 61 | let (x : M) : ContinuousAdd (TangentSpace (𝓡 n) x →L[ℝ] ℝ) := |
| 62 | inferInstanceAs (ContinuousAdd (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ)) |
| 63 | let : VectorBundle ℝ E V := inferInstanceAs |
| 64 | (VectorBundle ℝ |
| 65 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 66 | (fun x : M ↦ TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x →L[ℝ] ℝ)) |
| 67 | let e := trivializationAt E V p.2 |
| 68 | let : e.IsLinear ℝ := trivialization_linear ℝ (F := E) (E := V) e |
| 69 | have he : ∀ᶠ q : ℝ × M in 𝓝[K ×ˢ univ] p, q.2 ∈ e.baseSet := |
| 70 | continuous_snd.continuousWithinAt (e.open_baseSet.mem_nhds |
| 71 | (FiberBundle.mem_baseSet_trivializationAt E V p.2)) |
| 72 | have hconst : ContMDiffWithinAt (𝓘(ℝ, ℝ).prod (𝓡 n)) 𝓘(ℝ, ℝ) ∞ |
| 73 | (fun _ : ℝ × M ↦ c) (K ×ˢ univ) p := contMDiffWithinAt_const |
| 74 | apply (hconst.smul hsp.2).congr_of_eventuallyEq |
| 75 | · filter_upwards [he] with q hq |
| 76 | exact ((e.linear ℝ hq).map_smul c |
| 77 | ((F.metric (τ + q.1 / c)).inner q.2)) |
| 78 | · exact ((e.linear ℝ (FiberBundle.mem_baseSet_trivializationAt E V p.2)).map_smul c |
| 79 | ((F.metric (τ + p.1 / c)).inner p.2)) |
| 80 | equation := by |
| 81 | intro s hs x u v |
| 82 | have hinner : HasDerivWithinAt (fun r : ℝ ↦ τ + r / c) c⁻¹ K s := by |
| 83 | simpa only [one_div, id_eq] using |
| 84 | (((hasDerivAt_id s).div_const c).const_add τ).hasDerivWithinAt |
| 85 | have houter := F.equation (τ + s / c) (hKJ hs) x u v |
| 86 | have hcomp := (houter.comp s hinner hKJ).const_mul c |
| 87 | simpa only [Function.comp_def, rescaledMetric_inner, rescaledMetric_ricci, |
| 88 | show c * (-2 * (F.connection (τ + s / c)).ricci x u v * c⁻¹) = |
| 89 | -2 * (F.connection (τ + s / c)).ricci x u v by field_simp] using hcomp |
| 90 | |
| 91 | theorem parabolicRescale_metric |
| 92 | (F : RicciFlow n M J) (c : ℝ) (hc : 0 < c) (τ : ℝ) |
| 93 | (hKJ : MapsTo (fun s : ℝ ↦ τ + s / c) K J) |
| 94 | (hK : K.OrdConnected) (hne : K.Nontrivial) (s : ℝ) : |
| 95 | (F.parabolicRescale c hc τ hKJ hK hne).metric s = |
| 96 | rescaledMetric (F.metric (τ + s / c)) c hc := rfl |
| 97 | |
| 98 | end PoincareMT.RicciFlow |