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.LGeometry.Jacobi.JacobiRepresentative |
| 2 | |
| 3 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/JacobiAlongPair.lean` at |
| 4 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 5 | |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | open Set Filter Topology |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.LGeometry |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | def jacobiPairResidual {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) |
| 23 | (α : ℝ → M) (S : Set ℝ) (s : ℝ) |
| 24 | (Y P DP W : TangentSpace (𝓡 n) (α s)) : ℝ := |
| 25 | let A := curveVelocityWithin (n := n) α S s |
| 26 | let D := F.connection (T - s ^ 2) |
| 27 | (F.metric (T - s ^ 2)).inner (α s) DP W + |
| 28 | D.curvatureTensor (α s) Y A W A - |
| 29 | 2 * s * backwardConnectionVariationPairing D (α s) A Y W - |
| 30 | 2 * s ^ 2 * D.hessian D.scalarCurvature (α s) Y W + |
| 31 | 4 * s * ricciDerivativePairing D (α s) Y A W + |
| 32 | 4 * s * D.ricci (α s) P W |
| 33 | |
| 34 | structure IsJacobiPairOn {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) |
| 35 | (α : ℝ → M) (S : Set ℝ) (a b : ℝ) |
| 36 | (z : ℝ → EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)) : Prop where |
| 37 | ordered : a < b |
| 38 | interval_subset : Icc a b ⊆ S |
| 39 | first_smooth : ContMDiffOn (𝓘(ℝ, ℝ)) ((𝓡 n).prod (𝓡 n)) ∞ |
| 40 | (fun s ↦ Bundle.TotalSpace.mk' (E := TangentSpace (𝓡 n)) |
| 41 | (EuclideanSpace ℝ (Fin n)) (α s) (z s).1) (Icc a b) |
| 42 | second_smooth : ContMDiffOn (𝓘(ℝ, ℝ)) ((𝓡 n).prod (𝓡 n)) ∞ |
| 43 | (fun s ↦ Bundle.TotalSpace.mk' (E := TangentSpace (𝓡 n)) |
| 44 | (EuclideanSpace ℝ (Fin n)) (α s) (z s).2) (Icc a b) |
| 45 | equations : ∃ EY : ParametricAlongCurveExtensionOn (Icc a b) α (fun s ↦ (z s).1), |
| 46 | ∃ EP : ParametricAlongCurveExtensionOn (Icc a b) α (fun s ↦ (z s).2), |
| 47 | (∀ s ∈ Icc a b, pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) |
| 48 | α (fun r ↦ (z r).1) (Icc a b) EY s = (z s).2) ∧ |
| 49 | ∀ s ∈ Icc a b, ∀ W : TangentSpace (𝓡 n) (α s), |
| 50 | jacobiPairResidual F T α S s (z s).1 (z s).2 |
| 51 | (pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) |
| 52 | α (fun r ↦ (z r).2) (Icc a b) EP s) W = 0 |
| 53 | |
| 54 | variable {J : Set ℝ} {F : RicciFlow n M J} {T : ℝ} {α : ℝ → M} {S : Set ℝ} |
| 55 | {a b : ℝ} {z w : ℝ → EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)} |
| 56 | |
| 57 | theorem IsJacobiPairOn.congr (h : IsJacobiPairOn F T α S a b z) |
| 58 | (hzw : EqOn z w (Icc a b)) : IsJacobiPairOn F T α S a b w := by |
| 59 | obtain ⟨EY, EP, hY, hP⟩ := h.equations |
| 60 | have hcurve : EqOn α α (Icc a b) := fun _ _ ↦ rfl |
| 61 | have hfirst : ∀ s ∈ Icc a b, (z s).1 = (w s).1 := fun s hs ↦ congrArg Prod.fst (hzw hs) |
| 62 | have hsecond : ∀ s ∈ Icc a b, (z s).2 = (w s).2 := fun s hs ↦ congrArg Prod.snd (hzw hs) |
| 63 | let EY' := transferParametricExtension hcurve hfirst EY |
| 64 | let EP' := transferParametricExtension hcurve hsecond EP |
| 65 | refine ⟨h.ordered, h.interval_subset, ?_, ?_, EY', EP', ?_, ?_⟩ |
| 66 | · apply h.first_smooth.congr |
| 67 | intro s hs |
| 68 | rw [← hzw hs] |
| 69 | · apply h.second_smooth.congr |
| 70 | intro s hs |
| 71 | rw [← hzw hs] |
| 72 | · intro s hs |
| 73 | exact (pullbackCovariantDerivative_transfer F (fun r ↦ T - r ^ 2) |
| 74 | hcurve hfirst EY hs).symm.trans ((hY s hs).trans (hsecond s hs)) |
| 75 | · intro s hs W |
| 76 | rw [← pullbackCovariantDerivative_transfer F (fun r ↦ T - r ^ 2) |
| 77 | hcurve hsecond EP hs, ← hfirst s hs, ← hsecond s hs] |
| 78 | exact hP s hs W |
| 79 | |
| 80 | theorem IsJacobiPairOn.equations_for_extensions (h : IsJacobiPairOn F T α S a b z) |
| 81 | (hα : ∀ s ∈ Icc a b, MDifferentiableAt (𝓘(ℝ, ℝ)) (𝓡 n) α s) |
| 82 | (EY : ParametricAlongCurveExtensionOn (Icc a b) α (fun s ↦ (z s).1)) |
| 83 | (EP : ParametricAlongCurveExtensionOn (Icc a b) α (fun s ↦ (z s).2)) : |
| 84 | (∀ s ∈ Icc a b, pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) |
| 85 | α (fun r ↦ (z r).1) (Icc a b) EY s = (z s).2) ∧ |
| 86 | ∀ s ∈ Icc a b, ∀ W : TangentSpace (𝓡 n) (α s), |
| 87 | jacobiPairResidual F T α S s (z s).1 (z s).2 |
| 88 | (pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) |
| 89 | α (fun r ↦ (z r).2) (Icc a b) EP s) W = 0 := by |
| 90 | obtain ⟨EY₀, EP₀, hY, hP⟩ := h.equations |
| 91 | constructor |
| 92 | · intro s hs |
| 93 | rw [← pullbackCovariantDerivative_extension_independent F (fun r ↦ T - r ^ 2) |
| 94 | EY₀ EY hs (uniqueDiffOn_Icc h.ordered s hs) (hα s hs)] |
| 95 | exact hY s hs |
| 96 | · intro s hs W |
| 97 | rw [← pullbackCovariantDerivative_extension_independent F (fun r ↦ T - r ^ 2) |
| 98 | EP₀ EP hs (uniqueDiffOn_Icc h.ordered s hs) (hα s hs)] |
| 99 | exact hP s hs W |
| 100 | |
| 101 | theorem IsJacobiPairOn.restrict (h : IsJacobiPairOn F T α S a b z) |
| 102 | (hα : ∀ s ∈ Icc a b, MDifferentiableAt (𝓘(ℝ, ℝ)) (𝓡 n) α s) |
| 103 | {c d : ℝ} (hac : a ≤ c) (hcd : c < d) (hdb : d ≤ b) : |
| 104 | IsJacobiPairOn F T α S c d z := by |
| 105 | have hsub : Icc c d ⊆ Icc a b := Icc_subset_Icc hac hdb |
| 106 | obtain ⟨EY, EP, hY, hP⟩ := h.equations |
| 107 | let EY' := restrictParametricSectionExtension hsub EY |
| 108 | let EP' := restrictParametricSectionExtension hsub EP |
| 109 | refine ⟨hcd, hsub.trans h.interval_subset, |
| 110 | h.first_smooth.mono hsub, h.second_smooth.mono hsub, EY', EP', ?_, ?_⟩ |
| 111 | · intro s hs |
| 112 | exact (pullbackCovariantDerivative_restrict F (fun r ↦ T - r ^ 2) hsub EY |
| 113 | (uniqueDiffOn_Icc h.ordered s (hsub hs)) (uniqueDiffOn_Icc hcd s hs) |
| 114 | (hα s (hsub hs))).symm.trans (hY s (hsub hs)) |
| 115 | · intro s hs W |
| 116 | rw [← pullbackCovariantDerivative_restrict F (fun r ↦ T - r ^ 2) hsub EP |
| 117 | (uniqueDiffOn_Icc h.ordered s (hsub hs)) (uniqueDiffOn_Icc hcd s hs) |
| 118 | (hα s (hsub hs))] |
| 119 | exact hP s (hsub hs) W |
| 120 | |
| 121 | end PoincareMT.LGeometry |