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.Basic |
| 2 | import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace |
| 3 | |
| 4 | /-! |
| 5 | # The actual variation of an L-exponential initial vector |
| 6 | |
| 7 | The complete initial-vector family allows a fixed parameter interval. |
| 8 | Its paths provide the action integrability for every varied vector. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | set_option maxHeartbeats 800000 |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedLength |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 23 | [IsManifold (𝓡 n) ∞ M] |
| 24 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 25 | |
| 26 | set_option backward.isDefEq.respectTransparency false in |
| 27 | noncomputable def initialVectorVariation (A : LExponentialFamily F T τmax p) |
| 28 | (Z W : TangentSpace (𝓡 n) p) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) : |
| 29 | InitialFixedLVariation F T 0 b (A.path Z b hb hmax) := by |
| 30 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 31 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 32 | let E := TangentSpace (𝓡 n) p |
| 33 | let k : ℝ × ℝ → E × ℝ := fun z ↦ (Z + z.2 • W, z.1) |
| 34 | let U := k ⁻¹' A.squareDomain |
| 35 | have hk : ContDiff ℝ ∞ k := |
| 36 | (contDiff_const.add (contDiff_snd.smul contDiff_const)).prodMk contDiff_fst |
| 37 | have hU : IsOpen U := A.square_open.preimage hk.continuous |
| 38 | have hcontains : sqrtParameterInterval 0 b ×ˢ Set.Ioo (-1 : ℝ) 1 ⊆ U := by |
| 39 | intro z hz |
| 40 | have hs0 : 0 ≤ z.1 := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hz.1.1 |
| 41 | have hsmax : z.1 < Real.sqrt τmax := |
| 42 | hz.1.2.trans_lt (Real.sqrt_lt_sqrt hb.le hmax) |
| 43 | exact A.square_contains ⟨Set.mem_univ _, hs0, hsmax⟩ |
| 44 | have hf : ContMDiffOn (𝓘(ℝ, E × ℝ)) (𝓡 n) ∞ |
| 45 | (fun z ↦ A.squareFamily z.1 z.2) A.squareDomain := by |
| 46 | convert! A.square_smooth using 1 <;> |
| 47 | simp only [E, modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 48 | have hcomp := hf.comp hk.contMDiff.contMDiffOn (fun z (hz : z ∈ U) ↦ hz) |
| 49 | have hsquare : ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓘(ℝ, ℝ))) (𝓡 n) ∞ |
| 50 | (fun z : ℝ × ℝ ↦ A.squareFamily (Z + z.2 • W) z.1) U := by |
| 51 | convert! hcomp using 1 <;> |
| 52 | simp only [E, modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 53 | refine { |
| 54 | family := fun t u ↦ A.gamma (Z + u • W) t |
| 55 | at_zero := ?_ |
| 56 | radius := 1 |
| 57 | radius_pos := zero_lt_one |
| 58 | squareFamily := fun s u ↦ A.squareFamily (Z + u • W) s |
| 59 | squareDomain := U |
| 60 | square_open := hU |
| 61 | square_contains := hcontains |
| 62 | square_smooth := hsquare |
| 63 | square_agrees := ?_ |
| 64 | l_integrable := ?_ |
| 65 | fixed_left := ?_ |
| 66 | } |
| 67 | · intro t |
| 68 | simpa only [zero_smul, add_zero] using (congrFun (A.path_eq Z b hb hmax) t).symm |
| 69 | · intro s hs u _ |
| 70 | have hs0 : 0 ≤ s := by simpa only [sqrtParameterInterval, Real.sqrt_zero] using hs.1 |
| 71 | exact A.square_agrees (Z + u • W) s |
| 72 | ⟨hs0, hs.2.trans_lt (Real.sqrt_lt_sqrt hb.le hmax)⟩ |
| 73 | · intro u _ |
| 74 | have h := (A.path (Z + u • W) b hb hmax).l_integrable |
| 75 | rw [A.path_eq] at h |
| 76 | exact h |
| 77 | · intro u _ |
| 78 | exact (A.gamma_at_zero (Z + u • W)).trans |
| 79 | ((congrFun (A.path_eq Z b hb hmax) 0).trans (A.gamma_at_zero Z)).symm |
| 80 | |
| 81 | @[simp] theorem initialVectorVariation_family (A : LExponentialFamily F T τmax p) |
| 82 | (Z W : TangentSpace (𝓡 n) p) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) (t u : ℝ) : |
| 83 | (initialVectorVariation A Z W b hb hmax).family t u = A.gamma (Z + u • W) t := rfl |
| 84 | |
| 85 | @[simp] theorem initialVectorVariation_squareFamily (A : LExponentialFamily F T τmax p) |
| 86 | (Z W : TangentSpace (𝓡 n) p) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) (s u : ℝ) : |
| 87 | (initialVectorVariation A Z W b hb hmax).squareFamily s u = |
| 88 | A.squareFamily (Z + u • W) s := rfl |
| 89 | |
| 90 | @[simp] theorem initialVectorVariation_action (A : LExponentialFamily F T τmax p) |
| 91 | (Z W : TangentSpace (𝓡 n) p) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) (u : ℝ) : |
| 92 | variationLLength (initialVectorVariation A Z W b hb hmax).toLVariation u = |
| 93 | A.action (Z + u • W) b := rfl |
| 94 | |
| 95 | end PoincareMT.ReducedLength |