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.JacobiGlobalPair |
| 2 | |
| 3 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/JacobiInitialValue.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 | theorem parametricExtension_along_contMDiffOn {C : Set ℝ} {α : ℝ → M} |
| 23 | {Y : ∀ s, TangentSpace (𝓡 n) (α s)} |
| 24 | (E : ParametricAlongCurveExtensionOn C α Y) |
| 25 | (hα : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ α C) : |
| 26 | ContMDiffOn (𝓘(ℝ, ℝ)) ((𝓡 n).prod (𝓡 n)) ∞ |
| 27 | (fun s ↦ Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (α s) (Y s)) C := by |
| 28 | have h := E.smooth.comp (contMDiffOn_id.prodMk hα) (fun s hs ↦ E.graph_mem s hs) |
| 29 | apply h.congr |
| 30 | intro s hs |
| 31 | change Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (α s) (Y s) = |
| 32 | Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (α s) (E.extension s (α s)) |
| 33 | rw [E.agrees s hs] |
| 34 | |
| 35 | theorem sqrtRegularField_isJacobiPair {J : Set ℝ} {F : RicciFlow n M J} |
| 36 | {T τ₁ τ₂ : ℝ} {p : BackwardTimePath F T τ₁ τ₂} (R : RegularizedLGeodesicData p) |
| 37 | {Y : ∀ τ, TangentSpace (𝓡 n) (p.curve τ)} (Q : SqrtRegularField R.path Y) |
| 38 | (hres : ∀ s ∈ sqrtParameterInterval τ₁ τ₂, |
| 39 | ∀ W : TangentSpace (𝓡 n) (R.path.curve s), regularizedJacobiResidual R Q s W = 0) : |
| 40 | IsJacobiPairOn F T R.path.curve (sqrtParameterInterval τ₁ τ₂) |
| 41 | (Real.sqrt τ₁) (Real.sqrt τ₂) (fun s ↦ (Q.field s, Q.firstDerivative s)) := by |
| 42 | refine ⟨Real.sqrt_lt_sqrt p.nonnegative p.ordered, Subset.rfl, |
| 43 | parametricExtension_along_contMDiffOn Q.extension (R.path.smooth.mono R.path.interval_subset), |
| 44 | parametricExtension_along_contMDiffOn Q.derivative_extension |
| 45 | (R.path.smooth.mono R.path.interval_subset), Q.extension, Q.derivative_extension, |
| 46 | fun _ _ ↦ rfl, ?_⟩ |
| 47 | intro s hs W |
| 48 | exact hres s hs W |
| 49 | |
| 50 | set_option maxHeartbeats 1500000 in |
| 51 | theorem exists_lJacobi_initialValue {J : Set ℝ} (F : RicciFlow n M J) |
| 52 | (hM04 : RicciFlowCurvatureTheory.{u}) {T τ₁ τ₂ : ℝ} |
| 53 | (p : BackwardTimePath F T τ₁ τ₂) (R : RegularizedLGeodesicData p) |
| 54 | (Z : TangentSpace (𝓡 n) (p.curve τ₁)) : |
| 55 | ∃ Y : ∀ τ, TangentSpace (𝓡 n) (p.curve τ), |
| 56 | IsLJacobiField F T τ₁ τ₂ p Y ∧ HasLJacobiInitialDerivative R Y Z ∧ |
| 57 | ∀ Y' : ∀ τ, TangentSpace (𝓡 n) (p.curve τ), |
| 58 | IsLJacobiField F T τ₁ τ₂ p Y' → HasLJacobiInitialDerivative R Y' Z → |
| 59 | ∀ τ ∈ Icc τ₁ τ₂, Y' τ = Y τ := by |
| 60 | have hab : Real.sqrt τ₁ < Real.sqrt τ₂ := Real.sqrt_lt_sqrt p.nonnegative p.ordered |
| 61 | have ha : Real.sqrt τ₁ ∈ sqrtParameterInterval τ₁ τ₂ := ⟨le_rfl, hab.le⟩ |
| 62 | have htime (s : ℝ) (hs : s ∈ sqrtParameterInterval τ₁ τ₂) : T - s ^ 2 ∈ J := |
| 63 | p.time_mem (s ^ 2) (square_mem_backward_interval p hs) |
| 64 | let hbase : R.path.curve (Real.sqrt τ₁) = p.curve τ₁ := |
| 65 | sqrtRegularPath_point_eq R.path ⟨le_rfl, p.ordered.le⟩ |
| 66 | let Z₀ : TangentSpace (𝓡 n) (R.path.curve (Real.sqrt τ₁)) := hbase.symm ▸ Z |
| 67 | obtain ⟨z, hz, hz₀⟩ := exists_jacobiPairOn F hM04 T hab htime R.path.curve |
| 68 | R.path.open_domain R.path.interval_subset R.path.smooth (0, Z₀) |
| 69 | obtain ⟨EY, EP, hY, hP⟩ := hz.equations |
| 70 | let Y := backwardFieldOfSqrt R.path (fun s ↦ (z s).1) |
| 71 | let Q : SqrtRegularField R.path Y := |
| 72 | sqrtRegularFieldOfPullback R.path (fun s ↦ (z s).1) (fun s ↦ (z s).2) EY EP hY |
| 73 | have hfirst (s : ℝ) (hs : s ∈ sqrtParameterInterval τ₁ τ₂) : |
| 74 | Q.firstDerivative s = (z s).2 := hY s hs |
| 75 | have hsecond (s : ℝ) : Q.secondDerivative s = |
| 76 | pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) R.path.curve |
| 77 | (fun r ↦ (z r).2) (sqrtParameterInterval τ₁ τ₂) EP s := rfl |
| 78 | have hzero : Y τ₁ = 0 := backwardFieldOfSqrt_initial_zero R.path (fun s ↦ (z s).1) |
| 79 | (congrArg Prod.fst hz₀) |
| 80 | have hres : ∀ s ∈ sqrtParameterInterval τ₁ τ₂, |
| 81 | ∀ W : TangentSpace (𝓡 n) (R.path.curve s), regularizedJacobiResidual R Q s W = 0 := by |
| 82 | intro s hs W |
| 83 | change jacobiPairResidual F T R.path.curve (sqrtParameterInterval τ₁ τ₂) s |
| 84 | (z s).1 (Q.firstDerivative s) (Q.secondDerivative s) W = 0 |
| 85 | rw [hfirst s hs, hsecond] |
| 86 | exact hP s hs W |
| 87 | refine ⟨Y, ⟨R, Q, hzero, hres⟩, ⟨Q, ?_⟩, ?_⟩ |
| 88 | · exact (hfirst _ ha).trans (congrArg Prod.snd hz₀) |
| 89 | · intro Y' hY' hZ' |
| 90 | obtain ⟨Q', hzero', hres'⟩ := isLJacobiField_residual_for_representative hY' R |
| 91 | obtain ⟨Q₀, hQ₀⟩ := hZ' |
| 92 | have hfirst' : Q'.firstDerivative (Real.sqrt τ₁) = Z₀ := |
| 93 | (sqrtRegularField_firstDerivative_eq Q' Q₀ ha).trans hQ₀ |
| 94 | have hzeroQ' : Q'.field (Real.sqrt τ₁) = 0 := by |
| 95 | rw [Q'.agrees _ ha, tangent_cast_eq (n := n), Real.sq_sqrt p.nonnegative, hzero'] |
| 96 | have hinit : (Q'.field (Real.sqrt τ₁), Q'.firstDerivative (Real.sqrt τ₁)) = |
| 97 | z (Real.sqrt τ₁) := by |
| 98 | rw [hz₀, hzeroQ', hfirst'] |
| 99 | have heq := jacobiPairOn_unique hM04 htime R.path.open_domain R.path.interval_subset |
| 100 | R.path.smooth (sqrtRegularField_isJacobiPair R Q' hres') hz hinit |
| 101 | apply sqrtRegularField_eq_of_totalSpace_eq Q' Q |
| 102 | intro s hs |
| 103 | exact congrArg (fun v : TangentSpace (𝓡 n) (R.path.curve s) ↦ |
| 104 | Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (R.path.curve s) v) |
| 105 | (show Q'.field s = Q.field s from congrArg Prod.fst (heq hs)) |
| 106 | |
| 107 | end PoincareMT.LGeometry |