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.Formulas.LaplacianBound |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Formulas.TimeIdentity |
| 3 | |
| 4 | /-! |
| 5 | # Actual selected paths at stable endpoints |
| 6 | |
| 7 | Only the proof-valued endpoint fields of the selected exponential |
| 8 | path change when its endpoint is written using the stable-set map. |
| 9 | All regular identities therefore retain the same actual K integral. |
| 10 | Morgan-Tian Proposition 6.28 and Theorem 6.50, pp. 117, 131. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T : ℝ} {x : G.Point} (E : M14ExponentialFamily G T x) |
| 25 | {Z : G.Horizontal x} {s : ℝ} (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) |
| 26 | (H : M14StableSet G T (s ^ 2) x E) (hZ : Z ∈ H.carrier) |
| 27 | |
| 28 | include hpos hZ in |
| 29 | /-- The stable map and the actual exponential endpoint agree at the |
| 30 | same square time, Proposition 6.28, p. 117. -/ |
| 31 | theorem stableEndpoint_eq_exponential : H.endpoint_map Z = E.gamma Z s := by |
| 32 | rw [H.endpoint_map_eq Z hZ, Real.sqrt_sq hpos.le] |
| 33 | |
| 34 | /-- The selected exponential path with its endpoint recorded by the |
| 35 | full stable map; its curve and velocity are retained exactly, |
| 36 | Proposition 6.28, p. 117. -/ |
| 37 | noncomputable def regularStablePath : M14BackwardPath G T 0 (s ^ 2) x (H.endpoint_map Z) := |
| 38 | { E.path Z s hs hpos with |
| 39 | endpoint_time := by |
| 40 | rw [stableEndpoint_eq_exponential E hpos H hZ] |
| 41 | exact (E.path Z s hs hpos).endpoint_time |
| 42 | curve_end := (E.path Z s hs hpos).curve_end.trans |
| 43 | (stableEndpoint_eq_exponential E hpos H hZ).symm } |
| 44 | |
| 45 | /-- Changing only the equal endpoint preserves actual minimizing |
| 46 | comparison with every competitor, Proposition 6.28, p. 117. -/ |
| 47 | theorem regularStablePath_minimizing : M14IsMinimizing (regularStablePath E hs hpos H hZ) := by |
| 48 | have hmin := exponentialPath_minimizing_of_uniqueBranch E hpos hs |
| 49 | (stableInitialVector_unique_branch E ((H.carrier_exact Z).mp hZ)) |
| 50 | intro p |
| 51 | let q : M14BackwardPath G T 0 (s ^ 2) x (E.gamma Z s) := |
| 52 | { p with |
| 53 | endpoint_time := (E.path Z s hs hpos).endpoint_time |
| 54 | curve_end := p.curve_end.trans (stableEndpoint_eq_exponential E hpos H hZ) } |
| 55 | exact hmin q |
| 56 | |
| 57 | /-- The actual Harnack integral is unchanged by recording the equal |
| 58 | stable endpoint, Lemma 6.48 and Theorem 6.50, pp. 130-131. -/ |
| 59 | theorem regularStablePath_actualK_eq : |
| 60 | M14GeneralizedKIntegral G (regularStablePath E hs hpos H hZ) |
| 61 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 62 | ((regularStablePath E hs hpos H hZ).curve t)) = |
| 63 | M14GeneralizedKIntegral G (E.path Z s hs hpos) |
| 64 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 65 | ((E.path Z s hs hpos).curve t)) := rfl |
| 66 | |
| 67 | /-- The square-path endpoint is the same stable endpoint, with no |
| 68 | choice of an auxiliary curve, Proposition 6.28, p. 117. -/ |
| 69 | theorem regular_square_endpoint : (E.square_path Z s hs hpos).curve s = E.gamma Z s := by |
| 70 | apply exponential_square_curve_eq E Z hs hpos |
| 71 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hpos.le] using |
| 72 | (show s ∈ Icc 0 s from ⟨hpos.le, le_rfl⟩) |
| 73 | |
| 74 | include hZ in |
| 75 | /-- The actual stable slice point equals the selected square-path |
| 76 | endpoint as a point of that same slice, Proposition 6.28, p. 117. -/ |
| 77 | theorem regularStable_slicePoint_eq |
| 78 | (hq : G.spacetime.timeFunction ((E.square_path Z s hs hpos).curve s) = T - s ^ 2) : |
| 79 | H.endpoint_slice_map Z = ⟨(E.square_path Z s hs hpos).curve s, hq⟩ := by |
| 80 | apply Subtype.ext |
| 81 | exact (H.endpoint_slice_map_val Z hZ).trans |
| 82 | ((stableEndpoint_eq_exponential E hpos H hZ).trans |
| 83 | (regular_square_endpoint E hs hpos).symm) |
| 84 | |
| 85 | /-- The exact time identity at the stable-map endpoint uses the |
| 86 | same selected minimizing path, Theorem 6.50, p. 131. -/ |
| 87 | theorem reducedLengthAt_stable_joint_time_identity |
| 88 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 89 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 90 | (hz : (Z, s) ∈ M14JointDomain G E) : |
| 91 | M14BackwardTimeDerivative G (M14ReducedLengthAt G T 0 x) (H.endpoint_map Z) = |
| 92 | horizontalScalarCurvature G.leafwise (H.endpoint_map Z) - |
| 93 | M14ReducedLengthValue G T 0 (s ^ 2) x (H.endpoint_map Z) / s ^ 2 + |
| 94 | M14GeneralizedKIntegral G (regularStablePath E hs hpos H hZ) |
| 95 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 96 | ((regularStablePath E hs hpos H hZ).curve t)) / |
| 97 | (2 * s ^ 2 * Real.sqrt (s ^ 2)) := by |
| 98 | rw [regularStablePath_actualK_eq] |
| 99 | have h := reducedLengthAt_joint_time_identity hCoordinates hM04 hM12 E hs hpos hz |
| 100 | (regular_square_endpoint E hs hpos) |
| 101 | simpa only [← stableEndpoint_eq_exponential E hpos H hZ] using h |
| 102 | |
| 103 | /-- Any prescribed orthonormal stable-endpoint basis gives the exact |
| 104 | gradient identity for the retained selected path, Theorem 6.50, p. 131. -/ |
| 105 | theorem reducedLengthGradientNormSq_stable_joint_identity |
| 106 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 107 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 108 | (hz : (Z, s) ∈ M14JointDomain G E) |
| 109 | (b : Module.Basis (Fin n) ℝ (G.Horizontal (H.endpoint_map Z))) |
| 110 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner (H.endpoint_map Z) (b i) (b j) = |
| 111 | if i = j then 1 else 0) : |
| 112 | M14ReducedLengthGradientNormSq (T := T) (τ₁ := 0) G x (H.endpoint_map Z) b = |
| 113 | M14ReducedLengthValue G T 0 (s ^ 2) x (H.endpoint_map Z) / s ^ 2 - |
| 114 | M14GeneralizedKIntegral G (regularStablePath E hs hpos H hZ) |
| 115 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 116 | ((regularStablePath E hs hpos H hZ).curve t)) / |
| 117 | (s ^ 2 * Real.sqrt (s ^ 2)) - |
| 118 | horizontalScalarCurvature G.leafwise (H.endpoint_map Z) := by |
| 119 | have h (q : G.Point) (hq : q = E.gamma Z s) |
| 120 | (b : Module.Basis (Fin n) ℝ (G.Horizontal q)) |
| 121 | (hb : ∀ i j, G.spacetime.horizontalMetric.inner q (b i) (b j) = |
| 122 | if i = j then 1 else 0) : |
| 123 | M14ReducedLengthGradientNormSq (T := T) (τ₁ := 0) G x q b = |
| 124 | M14ReducedLengthValue G T 0 (s ^ 2) x q / s ^ 2 - |
| 125 | M14GeneralizedKIntegral G (E.path Z s hs hpos) |
| 126 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 127 | ((E.path Z s hs hpos).curve t)) / (s ^ 2 * Real.sqrt (s ^ 2)) - |
| 128 | horizontalScalarCurvature G.leafwise q := by |
| 129 | subst q |
| 130 | exact reducedLengthGradientNormSq_joint_identity hCoordinates hM04 hM12 E hs hpos hz |
| 131 | (regular_square_endpoint E hs hpos) b hb |
| 132 | exact h (H.endpoint_map Z) (stableEndpoint_eq_exponential E hpos H hZ) b hb |
| 133 | |
| 134 | /-- The frozen stable-slice Laplacian is bounded by the scalar and |
| 135 | actual K integral of its retained path, Theorem 6.50, p. 131. -/ |
| 136 | theorem reducedLengthLaplacian_stable_joint_bound |
| 137 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 138 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 139 | (hz : (Z, s) ∈ M14JointDomain G E) : |
| 140 | M14ReducedLengthLaplacian (τ₁ := 0) G x (H.endpoint_slice_map Z) ≤ |
| 141 | (n : ℝ) / (2 * s ^ 2) - horizontalScalarCurvature G.leafwise (H.endpoint_map Z) - |
| 142 | M14GeneralizedKIntegral G (regularStablePath E hs hpos H hZ) |
| 143 | (fun t => M14BackwardTimeDerivative G (horizontalScalarCurvature G.leafwise) |
| 144 | ((regularStablePath E hs hpos H hZ).curve t)) / |
| 145 | (2 * s ^ 2 * Real.sqrt (s ^ 2)) := by |
| 146 | rw [regularStablePath_actualK_eq] |
| 147 | have hp := regular_square_endpoint E hs hpos |
| 148 | have hq : G.spacetime.timeFunction ((E.square_path Z s hs hpos).curve s) = T - s ^ 2 := by |
| 149 | rw [hp] |
| 150 | exact E.clock Z s hs |
| 151 | have h := reducedLengthLaplacian_joint_bound hCoordinates hM04 hM12 E hs hpos hz hp hq |
| 152 | rw [← regularStable_slicePoint_eq E hs hpos H hZ hq] at h |
| 153 | simpa only [hp, ← stableEndpoint_eq_exponential E hpos H hZ] using h |
| 154 | |
| 155 | end PoincareMT.M14 |