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.Variation.Extension.BackwardEulerTransport |
| 2 | |
| 3 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/SquareEulerTransport.lean` at |
| 4 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 5 | |
| 6 | |
| 7 | /-! |
| 8 | # Square-time transport of an arbitrary backward Euler path |
| 9 | |
| 10 | The supplied actual extension is reparameterized directly; no minimizing |
| 11 | or endpoint regularity assumption is used. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.LGeometry |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 27 | [IsManifold (𝓡 n) ∞ M] |
| 28 | |
| 29 | def squareExtensionOfBackward {J : Set ℝ} {F : RicciFlow n M J} |
| 30 | {T τ₁ τ₂ : ℝ} (p : BackwardTimePath F T τ₁ τ₂) |
| 31 | (E : ParametricAlongCurveExtensionOn (Set.Ioo τ₁ τ₂) p.curve |
| 32 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂))) : |
| 33 | ParametricAlongCurveExtensionOn (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 34 | (squareReparameterizedCurve p.curve) |
| 35 | (curveVelocityWithin (n := n) (squareReparameterizedCurve p.curve) |
| 36 | (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂))) where |
| 37 | extension s y := (2 * s) • E.extension (s ^ 2) y |
| 38 | domain := {z : ℝ × M | (z.1 ^ 2, z.2) ∈ E.domain} |
| 39 | open_domain := by |
| 40 | apply E.open_domain.preimage |
| 41 | fun_prop |
| 42 | graph_mem s hs := E.graph_mem _ (sq_mem_backward_interior p.nonnegative hs).2 |
| 43 | smooth z hz := by |
| 44 | apply ContMDiffAt.contMDiffWithinAt |
| 45 | exact parametricExtension_contMDiffAt_smul_reparam E |
| 46 | (f := fun s ↦ s ^ 2) (c := fun s ↦ 2 * s) hz |
| 47 | (contDiffAt_id.pow 2) (contDiffAt_const.mul contDiffAt_id) |
| 48 | agrees s hs := by |
| 49 | change (2 * s) • E.extension (s ^ 2) (p.curve (s ^ 2)) = _ |
| 50 | rw [E.agrees _ (sq_mem_backward_interior p.nonnegative hs).2, |
| 51 | squarePath_velocityWithin p hs] |
| 52 | |
| 53 | theorem squareExtensionOfBackward_deriv {J : Set ℝ} {F : RicciFlow n M J} |
| 54 | {T τ₁ τ₂ : ℝ} (p : BackwardTimePath F T τ₁ τ₂) |
| 55 | (E : ParametricAlongCurveExtensionOn (Set.Ioo τ₁ τ₂) p.curve |
| 56 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂))) {s : ℝ} |
| 57 | (hs : s ∈ Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) : |
| 58 | deriv (fun r ↦ (squareExtensionOfBackward p E).extension r (p.curve (s ^ 2))) s = |
| 59 | (4 * s ^ 2) • deriv (fun r ↦ E.extension r (p.curve (s ^ 2))) (s ^ 2) + |
| 60 | (2 : ℝ) • curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂) (s ^ 2) := by |
| 61 | let : NormedAddCommGroup (TangentSpace (𝓡 n) (p.curve (s ^ 2))) := |
| 62 | inferInstanceAs (NormedAddCommGroup (EuclideanSpace ℝ (Fin n))) |
| 63 | let : NormedSpace ℝ (TangentSpace (𝓡 n) (p.curve (s ^ 2))) := |
| 64 | inferInstanceAs (NormedSpace ℝ (EuclideanSpace ℝ (Fin n))) |
| 65 | have hτ := (sq_mem_backward_interior p.nonnegative hs).2 |
| 66 | have htime := (parametricExtension_differentiableAt_time E (E.graph_mem _ hτ)).hasDerivAt |
| 67 | have hsq : HasDerivAt (fun r : ℝ ↦ r ^ 2) (2 * s) s := by |
| 68 | simpa using hasDerivAt_pow 2 s |
| 69 | have hscale : HasDerivAt (fun r : ℝ ↦ 2 * r) 2 s := by |
| 70 | simpa using (hasDerivAt_id s).const_mul 2 |
| 71 | have hd := (hscale.smul (htime.scomp s (h := fun r : ℝ ↦ r ^ 2) hsq)).deriv |
| 72 | change deriv (fun r ↦ (2 * r) • E.extension (r ^ 2) (p.curve (s ^ 2))) s = _ |
| 73 | simpa only [Pi.smul_def', Function.comp_def, E.agrees _ hτ, smul_smul, |
| 74 | show 2 * s * (2 * s) = 4 * s ^ 2 by ring] using hd |
| 75 | |
| 76 | theorem squareExtensionOfBackward_connection {J : Set ℝ} {F : RicciFlow n M J} |
| 77 | {T τ₁ τ₂ : ℝ} (p : BackwardTimePath F T τ₁ τ₂) |
| 78 | (E : ParametricAlongCurveExtensionOn (Set.Ioo τ₁ τ₂) p.curve |
| 79 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂))) {s : ℝ} |
| 80 | (hs : s ∈ Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) : |
| 81 | (F.connection (T - s ^ 2)).connection |
| 82 | ((squareExtensionOfBackward p E).extension s) (p.curve (s ^ 2)) |
| 83 | (curveVelocityWithin (n := n) (squareReparameterizedCurve p.curve) |
| 84 | (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) s) = |
| 85 | (4 * s ^ 2) • (F.connection (T - s ^ 2)).connection (E.extension (s ^ 2)) |
| 86 | (p.curve (s ^ 2)) |
| 87 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂) (s ^ 2)) := by |
| 88 | have hτ := (sq_mem_backward_interior p.nonnegative hs).2 |
| 89 | have hspace := (parametricExtension_contMDiffAt_space E (E.graph_mem _ hτ)).mdifferentiableAt |
| 90 | (by norm_num) |
| 91 | have hcov := (F.connection (T - s ^ 2)).connection.isCovariantDerivativeOn.smul_const |
| 92 | (2 * s) hspace |
| 93 | change (F.connection (T - s ^ 2)).connection ((2 * s) • E.extension (s ^ 2)) |
| 94 | (p.curve (s ^ 2)) _ = _ |
| 95 | rw [hcov, squarePath_velocityWithin p hs] |
| 96 | simp only [smul_apply, map_smul, smul_smul, |
| 97 | show 2 * s * (2 * s) = 4 * s ^ 2 by ring] |
| 98 | |
| 99 | theorem pullbackCovariantDerivative_backward_transport {J : Set ℝ} {F : RicciFlow n M J} |
| 100 | {T τ₁ τ₂ : ℝ} (p : BackwardTimePath F T τ₁ τ₂) |
| 101 | (E : ParametricAlongCurveExtensionOn (Set.Ioo τ₁ τ₂) p.curve |
| 102 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂))) {s : ℝ} |
| 103 | (hs : s ∈ Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) : |
| 104 | pullbackCovariantDerivative F (fun r ↦ T - r ^ 2) |
| 105 | (squareReparameterizedCurve p.curve) |
| 106 | (curveVelocityWithin (n := n) (squareReparameterizedCurve p.curve) |
| 107 | (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂))) |
| 108 | (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) (squareExtensionOfBackward p E) s = |
| 109 | (2 : ℝ) • curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂) (s ^ 2) + |
| 110 | (4 * s ^ 2) • pullbackCovariantDerivative F (fun r ↦ T - r) p.curve |
| 111 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂)) |
| 112 | (Set.Ioo τ₁ τ₂) E (s ^ 2) := by |
| 113 | simp only [pullbackCovariantDerivative, squareReparameterizedCurve, smul_add] |
| 114 | rw [squareExtensionOfBackward_deriv p E hs, squareExtensionOfBackward_connection p E hs] |
| 115 | abel |
| 116 | |
| 117 | theorem regularizedEulerResidual_backward_transport (hM04 : RicciFlowCurvatureTheory.{u}) |
| 118 | {J : Set ℝ} {F : RicciFlow n M J} |
| 119 | {T τ₁ τ₂ : ℝ} (p : BackwardTimePath F T τ₁ τ₂) |
| 120 | (E : ParametricAlongCurveExtensionOn (Set.Ioo τ₁ τ₂) p.curve |
| 121 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂))) {s : ℝ} |
| 122 | (hs : s ∈ Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 123 | (W : TangentSpace (𝓡 n) (p.curve (s ^ 2))) : |
| 124 | regularizedEulerResidual F T (squareReparameterizedCurve p.curve) |
| 125 | (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) (squareExtensionOfBackward p E) s W = |
| 126 | (4 * s ^ 2) * backwardEulerResidual F T p.curve (Set.Ioo τ₁ τ₂) E (s ^ 2) W := by |
| 127 | have hs0 := (sq_mem_backward_interior p.nonnegative hs).1.ne' |
| 128 | let G := (F.metric (T - s ^ 2)).inner (p.curve (s ^ 2)) |
| 129 | let X := curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂) (s ^ 2) |
| 130 | let A := pullbackCovariantDerivative F (fun r ↦ T - r) p.curve |
| 131 | (curveVelocityWithin (n := n) p.curve (Set.Ioo τ₁ τ₂)) (Set.Ioo τ₁ τ₂) E (s ^ 2) |
| 132 | have hmetric : G ((2 : ℝ) • X + (4 * s ^ 2) • A) W = |
| 133 | 2 * G X W + (4 * s ^ 2) * G A W := by |
| 134 | rw [G.map_add, G.map_smul, G.map_smul] |
| 135 | rfl |
| 136 | unfold regularizedEulerResidual backwardEulerResidual |
| 137 | rw [pullbackCovariantDerivative_backward_transport p E hs, squarePath_velocityWithin p hs] |
| 138 | rw [ricci_smul_left_of_curvatureTheory hM04] |
| 139 | unfold scalarCurvatureDifferential squareReparameterizedCurve |
| 140 | rw [hmetric] |
| 141 | field_simp [hs0] |
| 142 | ring |
| 143 | |
| 144 | theorem exists_regularizedEuler_extension_of_backward {J : Set ℝ} |
| 145 | {F : RicciFlow n M J} {T τ₁ τ₂ : ℝ} (hM04 : RicciFlowCurvatureTheory.{u}) |
| 146 | (p : BackwardTimePath F T τ₁ τ₂) (hp : IsBackwardLGeodesic F T τ₁ τ₂ p) : |
| 147 | ∃ E : ParametricAlongCurveExtensionOn (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) |
| 148 | (squareReparameterizedCurve p.curve) |
| 149 | (curveVelocityWithin (n := n) (squareReparameterizedCurve p.curve) |
| 150 | (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂))), |
| 151 | ∀ s ∈ Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂), |
| 152 | regularizedLGeodesicEquation F T (squareReparameterizedCurve p.curve) |
| 153 | (Set.Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) E s := by |
| 154 | obtain ⟨E, hE⟩ := hp |
| 155 | refine ⟨squareExtensionOfBackward p E, ?_⟩ |
| 156 | intro s hs W |
| 157 | rw [regularizedEulerResidual_backward_transport hM04 p E hs W, |
| 158 | hE _ (sq_mem_backward_interior p.nonnegative hs).2 W, mul_zero] |
| 159 | |
| 160 | end PoincareMT.LGeometry |