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.Regularity.Hessian.HessianIndexComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Formulas.RegularSpatialDerivative |
| 3 | |
| 4 | /-! |
| 5 | # Regular reduced-length Hessians and actual test fields |
| 6 | |
| 7 | The actual joint image supplies finite minimizing endpoints. The |
| 8 | proved horizontal momentum differential and smoothness instantiate |
| 9 | the geometric Hessian/index comparison for the raw reduced length. |
| 10 | Morgan-Tian Lemma 6.40, Proposition 6.43 and Lemma 6.49, |
| 11 | pp. 126-128, 131. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology intervalIntegral |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T : ℝ} {x : G.Point} |
| 26 | |
| 27 | /-- Every actual joint-image point lies in its clock-determined |
| 28 | finite-value domain, Proposition 6.28, p. 117. -/ |
| 29 | theorem jointImage_finiteValueDomain (E : M14ExponentialFamily G T x) {q : G.Point} |
| 30 | (hq : q ∈ range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2)) : |
| 31 | M14FiniteValueDomain G T 0 (T - G.spacetime.timeFunction q) x q := by |
| 32 | obtain ⟨⟨⟨Z, s⟩, hz⟩, rfl⟩ := hq |
| 33 | obtain ⟨_, _, p, hp, _, _⟩ := jointDomain_action_branch E hz |
| 34 | rw [E.clock Z s (jointDomain_subset_domain E hz), sub_sub_cancel] |
| 35 | exact finiteValueDomain_of_minimizing p hp |
| 36 | |
| 37 | private theorem horizontal_momentum_transport {q r : G.Point} (h : q = r) |
| 38 | (f : G.Point → ℝ) (A : G.Horizontal q) (c : ℝ) |
| 39 | (hd : ∀ W : G.Horizontal r, |
| 40 | mvfderiv (spacetimeModel n) f r W.val = |
| 41 | G.spacetime.horizontalMetric.inner r (h ▸ A) W / c) : |
| 42 | ∀ W : G.Horizontal q, mvfderiv (spacetimeModel n) f q W.val = |
| 43 | G.spacetime.horizontalMetric.inner q A W / c := by |
| 44 | cases h |
| 45 | exact hd |
| 46 | |
| 47 | private theorem hessian_pair_parameter_congr (γ : ℝ → G.Point) |
| 48 | (Y : ∀ r, G.Horizontal (γ r)) (f : G.Point → ℝ) {r s T τ : ℝ} (h : r = s) |
| 49 | (hr : G.spacetime.timeFunction (γ r) = T - τ) |
| 50 | (hs : G.spacetime.timeFunction (γ s) = T - τ) : |
| 51 | M14ReducedLengthHessianPairing G ⟨γ r, hr⟩ f (Y r) (Y r) = |
| 52 | M14ReducedLengthHessianPairing G ⟨γ s, hs⟩ f (Y s) (Y s) := by |
| 53 | subst s |
| 54 | rfl |
| 55 | |
| 56 | /-- The actual regular reduced-length Hessian is bounded by the |
| 57 | geometric index of every smooth initial-zero horizontal field, |
| 58 | Lemma 6.40 and Proposition 6.43, pp. 126-128. -/ |
| 59 | theorem reducedLengthHessian_joint_le_index |
| 60 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 61 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 62 | (E : M14ExponentialFamily G T x) {Z : G.Horizontal x} {s : ℝ} |
| 63 | (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) (hz : (Z, s) ∈ M14JointDomain G E) |
| 64 | (hpoint : (E.square_path Z s hs hpos).curve s = E.gamma Z s) |
| 65 | (hq : G.spacetime.timeFunction ((E.square_path Z s hs hpos).curve s) = T - s ^ 2) |
| 66 | {Y : ∀ r, G.Horizontal ((E.square_path Z s hs hpos).curve r)} |
| 67 | (EY : M14PullbackExtension G (E.square_path Z s hs hpos).curve |
| 68 | (M14SqrtParameterInterval 0 (s ^ 2)) Y) (hleft : Y 0 = 0) : |
| 69 | M14ReducedLengthHessianPairing G ⟨(E.square_path Z s hs hpos).curve s, hq⟩ |
| 70 | (M14ReducedLengthAt G T 0 x) (Y s) (Y s) ≤ |
| 71 | (∫ r in 0..s, pullbackIndexPairDensity (E.square_path Z s hs hpos) EY EY r) / (2 * s) := by |
| 72 | let R := E.square_path Z s hs hpos |
| 73 | let p := E.path Z s hs hpos |
| 74 | let O := range (fun z : M14JointDomain G E => E.gamma z.1.1 z.1.2) |
| 75 | have hO : IsOpen O := jointMap_range_isOpen E |
| 76 | have hpoint' : R.curve (Real.sqrt (s ^ 2)) = E.gamma Z s := by |
| 77 | rw [Real.sqrt_sq hpos.le] |
| 78 | exact hpoint |
| 79 | have hp : R.curve (Real.sqrt (s ^ 2)) ∈ O := hpoint'.symm ▸ ⟨⟨(Z, s), hz⟩, rfl⟩ |
| 80 | obtain ⟨H, hZH⟩ := jointDomain_stableSet E hz |
| 81 | have hmin : M14IsMinimizing p := exponentialPath_minimizing_of_uniqueBranch E hpos hs |
| 82 | (stableInitialVector_unique_branch E ((H.carrier_exact Z).mp hZH)) |
| 83 | have hvalue : M14ReducedLengthAt G T 0 x (R.curve (Real.sqrt (s ^ 2))) = |
| 84 | M14BackwardLAction G p / (2 * Real.sqrt (s ^ 2)) := by |
| 85 | rw [hpoint', reducedLengthAt_jointEndpoint E hz, Real.sqrt_sq hpos.le, |
| 86 | E.action_eq Z s hs hpos] |
| 87 | have hfinite : ∀ᶠ q in 𝓝 (R.curve (Real.sqrt (s ^ 2))), |
| 88 | M14FiniteValueDomain G T 0 (T - G.spacetime.timeFunction q) x q := |
| 89 | Filter.eventually_of_mem (hO.mem_nhds hp) (fun _ hq => jointImage_finiteValueDomain E hq) |
| 90 | have hd : ∀ W : G.Horizontal (R.curve s), |
| 91 | mvfderiv (spacetimeModel n) (M14ReducedLengthAt G T 0 x) (R.curve s) W.val = |
| 92 | G.spacetime.horizontalMetric.inner (R.curve s) (R.horizontal_velocity s) W / (2 * s) := |
| 93 | horizontal_momentum_transport hpoint (M14ReducedLengthAt G T 0 x) (R.horizontal_velocity s) |
| 94 | (2 * s) (reducedLengthAt_horizontal_differential hCoordinates hM04 hM12 E hs hpos hz hpoint) |
| 95 | have hclock : G.spacetime.timeFunction (R.curve (Real.sqrt (s ^ 2))) = T - s ^ 2 := by |
| 96 | rw [Real.sqrt_sq hpos.le] |
| 97 | exact hq |
| 98 | have h := hessian_le_pullback_index hCoordinates hM04 hM12 hmin |
| 99 | (M14ReducedLengthAt G T 0 x) O hO hp (reducedLengthAt_contMDiffOn_jointImage hM04 hM12 E) |
| 100 | hvalue (Eventually.of_forall (fun _ => le_rfl)) hfinite |
| 101 | (by rw [Real.sqrt_sq hpos.le]; exact hd) hclock EY |
| 102 | (by rw [Real.sqrt_zero]; exact hleft) |
| 103 | rw [hessian_pair_parameter_congr R.curve Y (M14ReducedLengthAt G T 0 x) |
| 104 | (Real.sqrt_sq hpos.le) hclock hq, Real.sqrt_zero, Real.sqrt_sq hpos.le] at h |
| 105 | exact h |
| 106 | |
| 107 | end PoincareMT.M14 |