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.Generalized.ReducedGeometry.Measure.Jacobian.ExponentialGramHessianChain |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Construction.ExponentialGramVariation |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Differential.ExponentialJacobiField |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialJacobi |
| 5 | |
| 6 | /-! |
| 7 | # The actual exponential Jacobi boundary pair is the raw Hessian |
| 8 | |
| 9 | Stable nearby branches realize equality of action and endpoint value. |
| 10 | Second variation cancels terminal acceleration, and Green's identity |
| 11 | retains precisely the actual Jacobi boundary pair. Morgan-Tian |
| 12 | Proposition 6.33, pp. 120-121, and Lemma 6.40, pp. 126-127. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- The canonical initial-value path retains the supplied square path definitionally. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology intervalIntegral |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M14 |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 28 | {T : ℝ} {x : G.Point} |
| 29 | |
| 30 | private theorem horizontal_momentum_transport {q r : G.Point} (h : q = r) |
| 31 | (f : G.Point → ℝ) (A : G.Horizontal q) (c : ℝ) |
| 32 | (hd : ∀ W : G.Horizontal r, |
| 33 | mvfderiv (spacetimeModel n) f r W.val = |
| 34 | G.spacetime.horizontalMetric.inner r (h ▸ A) W / c) : |
| 35 | ∀ W : G.Horizontal q, mvfderiv (spacetimeModel n) f q W.val = |
| 36 | G.spacetime.horizontalMetric.inner q A W / c := by |
| 37 | cases h |
| 38 | exact hd |
| 39 | |
| 40 | private theorem hessian_pair_parameter_congr (γ : ℝ → G.Point) |
| 41 | (Y : ∀ r, G.Horizontal (γ r)) (f : G.Point → ℝ) {r s T τ : ℝ} (h : r = s) |
| 42 | (hr : G.spacetime.timeFunction (γ r) = T - τ) |
| 43 | (hs : G.spacetime.timeFunction (γ s) = T - τ) : |
| 44 | M14ReducedLengthHessianPairing G ⟨γ r, hr⟩ f (Y r) (Y r) = |
| 45 | M14ReducedLengthHessianPairing G ⟨γ s, hs⟩ f (Y s) (Y s) := by |
| 46 | subst s |
| 47 | rfl |
| 48 | |
| 49 | /-- At a joint endpoint, the actual normalized exponential Jacobi |
| 50 | field attains the raw reduced-length Hessian comparison, |
| 51 | Proposition 6.33 and Lemma 6.40, pp. 120-121, 126-127. -/ |
| 52 | theorem exponentialJacobi_index_eq_hessian |
| 53 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 54 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 55 | (E : M14ExponentialFamily G T x) {Z : G.Horizontal x} {s : ℝ} |
| 56 | (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) (hz : (Z, s) ∈ M14JointDomain G E) |
| 57 | (hpoint : (E.square_path Z s hs hpos).curve s = E.gamma Z s) |
| 58 | (hq : G.spacetime.timeFunction ((E.square_path Z s hs hpos).curve s) = T - s ^ 2) |
| 59 | (W : G.Horizontal x) : |
| 60 | let Q := initialValuePath_differentialData hM04 hM12 |
| 61 | (exponentialInitialValuePath E Z s hs hpos) W |
| 62 | (∫ r in 0..s, pullbackIndexPairDensity (E.square_path Z s hs hpos) |
| 63 | Q.extension Q.extension r) = |
| 64 | (2 * s) * M14ReducedLengthHessianPairing G |
| 65 | ⟨(E.square_path Z s hs hpos).curve s, hq⟩ (M14ReducedLengthAt G T 0 x) |
| 66 | (Q.field s) (Q.field s) := by |
| 67 | let R := E.square_path Z s hs hpos |
| 68 | let P := exponentialInitialValuePath E Z s hs hpos |
| 69 | let Q := initialValuePath_differentialData hM04 hM12 P W |
| 70 | let O := range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2) |
| 71 | obtain ⟨V, hmem, hV⟩ := exists_initialVectorVariation hM04 hM12 E Z W hs hpos |
| 72 | obtain ⟨D⟩ := exists_variationDerivativeData V |
| 73 | have hfield (r : ℝ) (hr : r ∈ M14SqrtParameterInterval 0 (s ^ 2)) : |
| 74 | M14VariationField V r = Q.field r := by |
| 75 | have hr' : r ∈ Icc 0 s := by |
| 76 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hpos.le] using hr |
| 77 | have hsurv := (E.maximal_lifetime Z).out (E.domain_zero Z) hs hr' |
| 78 | exact eq_of_heq ((initialVectorVariation_field_at E Z W hs hpos V hV hr hsurv).trans |
| 79 | (exponentialJacobiField_heq_differential hM04 hM12 E Z W hs hpos hr hsurv).symm) |
| 80 | obtain ⟨H, hZH⟩ := jointDomain_stableSet E hz |
| 81 | have hmin := exponentialPath_minimizing_of_uniqueBranch E hpos hs |
| 82 | (stableInitialVector_unique_branch E ((H.carrier_exact Z).mp hZH)) |
| 83 | have hpoint' : R.curve (Real.sqrt (s ^ 2)) = E.gamma Z s := by |
| 84 | rw [Real.sqrt_sq hpos.le] |
| 85 | exact hpoint |
| 86 | have hp : R.curve (Real.sqrt (s ^ 2)) ∈ O := hpoint'.symm ▸ ⟨⟨(Z, s), hz⟩, rfl⟩ |
| 87 | have hd : ∀ V : G.Horizontal (R.curve s), |
| 88 | mvfderiv (spacetimeModel n) (M14ReducedLengthAt G T 0 x) (R.curve s) V.val = |
| 89 | G.spacetime.horizontalMetric.inner (R.curve s) (R.horizontal_velocity s) V / (2 * s) := |
| 90 | horizontal_momentum_transport hpoint (M14ReducedLengthAt G T 0 x) (R.horizontal_velocity s) |
| 91 | (2 * s) (reducedLengthAt_horizontal_differential hCoordinates hM04 hM12 E hs hpos hz hpoint) |
| 92 | have hclock : G.spacetime.timeFunction (R.curve (Real.sqrt (s ^ 2))) = T - s ^ 2 := by |
| 93 | rw [Real.sqrt_sq hpos.le] |
| 94 | exact hq |
| 95 | have ha := initialVectorVariation_action_germ E Z W hs hpos hz V hmem hV |
| 96 | have hi := variation_index_eq_hessian_of_action_germ hCoordinates hM04 hM12 V D hmin |
| 97 | (initialVectorVariation_initialFixed E Z W hs hpos V hV) |
| 98 | (M14ReducedLengthAt G T 0 x) O (jointMap_range_isOpen E) hp |
| 99 | (reducedLengthAt_contMDiffOn_jointImage hM04 hM12 E) |
| 100 | (by simpa only [Real.sqrt_sq hpos.le] using ha) |
| 101 | (by rw [Real.sqrt_sq hpos.le]; exact hd) hclock |
| 102 | rw [secondVariationIndexForm_eq_of_field V D Q.extension hfield, |
| 103 | hfield _ ⟨Real.sqrt_le_sqrt (sq_nonneg s), le_rfl⟩, |
| 104 | hessian_pair_parameter_congr R.curve Q.field (M14ReducedLengthAt G T 0 x) |
| 105 | (Real.sqrt_sq hpos.le) hclock hq, Real.sqrt_zero, Real.sqrt_sq hpos.le] at hi |
| 106 | exact hi |
| 107 | |
| 108 | /-- The terminal Jacobi boundary pair equals twice square time times |
| 109 | the raw endpoint Hessian. Its initial boundary contribution vanishes, |
| 110 | Lemma 6.19 and Lemma 6.40, pp. 114, 126-127. -/ |
| 111 | theorem exponentialJacobi_boundary_eq_hessian |
| 112 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 113 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 114 | (E : M14ExponentialFamily G T x) {Z : G.Horizontal x} {s : ℝ} |
| 115 | (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) (hz : (Z, s) ∈ M14JointDomain G E) |
| 116 | (hpoint : (E.square_path Z s hs hpos).curve s = E.gamma Z s) |
| 117 | (hq : G.spacetime.timeFunction ((E.square_path Z s hs hpos).curve s) = T - s ^ 2) |
| 118 | (W : G.Horizontal x) : |
| 119 | let Q := initialValuePath_differentialData hM04 hM12 |
| 120 | (exponentialInitialValuePath E Z s hs hpos) W |
| 121 | G.spacetime.horizontalMetric.inner ((E.square_path Z s hs hpos).curve s) |
| 122 | (M14JacobiFirstDerivative Q s) (Q.field s) = |
| 123 | (2 * s) * M14ReducedLengthHessianPairing G |
| 124 | ⟨(E.square_path Z s hs hpos).curve s, hq⟩ (M14ReducedLengthAt G T 0 x) |
| 125 | (Q.field s) (Q.field s) := by |
| 126 | let R := E.square_path Z s hs hpos |
| 127 | let P := exponentialInitialValuePath E Z s hs hpos |
| 128 | let Q : M14JacobiFieldData G R.curve (M14SqrtParameterInterval 0 (s ^ 2)) := |
| 129 | initialValuePath_differentialData hM04 hM12 P W |
| 130 | have hzero : Q.field 0 = 0 := initialValuePath_differentialField_zero hM04 hM12 P W |
| 131 | have hres : (∫ r in Real.sqrt 0..Real.sqrt (s ^ 2), |
| 132 | M14JacobiResidual G R Q r (Q.field r)) = 0 := by |
| 133 | calc |
| 134 | _ = ∫ r in Real.sqrt 0..Real.sqrt (s ^ 2), (0 : ℝ) := |
| 135 | intervalIntegral.integral_congr_Ioo_of_le (Real.sqrt_le_sqrt (sq_nonneg s)) |
| 136 | (fun r hr => initialValuePath_differential_jacobi hM04 hM12 P W |
| 137 | (Ioo_subset_Icc_self hr) (Q.field r)) |
| 138 | _ = 0 := intervalIntegral.integral_zero |
| 139 | have hg := integral_pullbackIndexPairDensity R Q Q.extension hM04 hM12 |
| 140 | rw [hres] at hg |
| 141 | let F : ℝ → ℝ := pullbackIndexPairDensity R Q.extension Q.extension |
| 142 | let B : ℝ → ℝ := pullbackIndexBoundaryPair R Q.extension Q.field |
| 143 | change (∫ r in Real.sqrt 0..Real.sqrt (s ^ 2), F r) = |
| 144 | B (Real.sqrt (s ^ 2)) - B (Real.sqrt 0) - 0 at hg |
| 145 | rw [Real.sqrt_zero, Real.sqrt_sq hpos.le] at hg |
| 146 | simp only [B, pullbackIndexBoundaryPair, hzero, sub_zero] at hg |
| 147 | rw [(G.spacetime.horizontalMetric.inner (R.curve 0) |
| 148 | (M14HorizontalCovariantDerivative G R.curve (M14SqrtParameterInterval 0 (s ^ 2)) |
| 149 | Q.field Q.extension 0)).map_zero, sub_zero] at hg |
| 150 | exact hg.symm.trans (exponentialJacobi_index_eq_hessian hCoordinates hM04 hM12 E |
| 151 | hs hpos hz hpoint hq W) |
| 152 | |
| 153 | end PoincareMT.M14 |