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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.SphereLineChartTime |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.RoundFactorTime |
| 4 | |
| 5 | /-! |
| 6 | # Affine time evolution of the actual M27 sphere-line model |
| 7 | |
| 8 | The supplied flow equation in the fixed product chart gives the native |
| 9 | round factor flow equation. Its affine time law then gives the literal |
| 10 | product metric law, with the fixed line term included exactly. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M35 |
| 20 | |
| 21 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 22 | local notation "E2" => EuclideanSpace ℝ (Fin 2) |
| 23 | |
| 24 | variable {M : Type*} [TopologicalSpace M] [ChartedSpace V M] |
| 25 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 26 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] |
| 27 | {K : AncientKappaSolution 3 M} |
| 28 | |
| 29 | /-- The actual sphere factor satisfies its native Ricci-flow equation, |
| 30 | as a consequence of the three-dimensional flow and product metric identity. -/ |
| 31 | theorem sphereLineFactor_hasDerivWithinAt (N : M27SphereLineFlowCertificate K) |
| 32 | (t : ℝ) (ht : t ≤ 0) (q : UnitTwoSphere) (x u v : E2) : |
| 33 | HasDerivWithinAt (fun s => (m27SphereChartMetric N.sphere s q).inner x u v) |
| 34 | (-2 * (m27SphereChartConnection N.sphere t q).ricci x u v) (Iic 0) t := by |
| 35 | let X := cylinderCoordinateEquiv.symm (x, 0) |
| 36 | let U := cylinderCoordinateEquiv.symm (u, 0) |
| 37 | let W := cylinderCoordinateEquiv.symm (v, 0) |
| 38 | have hd := sphereLineChartMetric_hasDerivWithinAt N t ht q X U W |
| 39 | rw [product_ricci (sphereLineChartConnection N t q) |
| 40 | (m27SphereChartConnection N.sphere t q) (sphereLineChartMetric_product N t ht q)] at hd |
| 41 | let R (a b c : E2) := (m27SphereChartConnection N.sphere t q).ricci a b c |
| 42 | change HasDerivWithinAt (fun s => (sphereLineChartMetric N s q).inner X U W) |
| 43 | (-2 * R (cylinderCoordinateEquiv X).1 (cylinderCoordinateEquiv U).1 |
| 44 | (cylinderCoordinateEquiv W).1) (Iic 0) t at hd |
| 45 | simp only [X, U, W, ContinuousLinearEquiv.apply_symm_apply] at hd |
| 46 | apply hd.congr_of_mem ?_ ht |
| 47 | intro s hs |
| 48 | rw [sphereLineChartMetric_product N s hs q] |
| 49 | simp only [ContinuousLinearEquiv.apply_symm_apply, zero_mul, add_zero] |
| 50 | let G (a b c : E2) := (m27SphereChartMetric N.sphere s q).inner a b c |
| 51 | change G x u v = G (cylinderCoordinateEquiv (cylinderCoordinateEquiv.symm (x, 0))).1 u v |
| 52 | rw [ContinuousLinearEquiv.apply_symm_apply] |
| 53 | |
| 54 | /-- The actual product chart metric is affine in the original ancient |
| 55 | time parameter, with derivative given by its actual terminal Ricci tensor. -/ |
| 56 | theorem sphereLineChartMetric_time_affine (N : M27SphereLineFlowCertificate K) |
| 57 | (t : ℝ) (ht : t ≤ 0) (q : UnitTwoSphere) (x u v : V) : |
| 58 | (sphereLineChartMetric N t q).inner x u v = |
| 59 | (sphereLineChartMetric N 0 q).inner x u v - |
| 60 | 2 * t * (sphereLineChartConnection N 0 q).ricci x u v := by |
| 61 | rw [sphereLineChartMetric_product N t ht q, |
| 62 | sphereLineChartMetric_product N 0 le_rfl q, |
| 63 | product_ricci (sphereLineChartConnection N 0 q) |
| 64 | (m27SphereChartConnection N.sphere 0 q) (sphereLineChartMetric_product N 0 le_rfl q), |
| 65 | round_factor_metric_time_affine (fun s => m27SphereChartMetric N.sphere s q) |
| 66 | (fun s => m27SphereChartConnection N.sphere s q) |
| 67 | (fun s hs => m27SphereChartMetric_round N.sphere s hs q) |
| 68 | (fun s hs => sphereLineFactor_hasDerivWithinAt N s hs q) t ht] |
| 69 | ring |
| 70 | |
| 71 | /-- Two retained times determine the same actual metric at every earlier |
| 72 | time. The second time is strictly negative and may be chosen inside the |
| 73 | M27 comparison window. -/ |
| 74 | theorem sphereLineChartMetric_two_times (N : M27SphereLineFlowCertificate K) |
| 75 | (t : ℝ) (ht : t ≤ 0) (tau : ℝ) (htau : 0 < tau) |
| 76 | (q : UnitTwoSphere) (x u v : V) : |
| 77 | (sphereLineChartMetric N t q).inner x u v = |
| 78 | (1 + t / tau) * (sphereLineChartMetric N 0 q).inner x u v - |
| 79 | (t / tau) * (sphereLineChartMetric N (-tau) q).inner x u v := by |
| 80 | rw [sphereLineChartMetric_time_affine N t ht, |
| 81 | sphereLineChartMetric_time_affine N (-tau) (neg_nonpos.mpr htau.le)] |
| 82 | field_simp [htau.ne'] |
| 83 | ring |
| 84 | |
| 85 | /-- The same two-time law holds on the actual ancient carrier in every |
| 86 | pair of tangent vectors. The fixed product charts cover that carrier. -/ |
| 87 | theorem sphereLine_metric_two_times (N : M27SphereLineFlowCertificate K) |
| 88 | (t : ℝ) (ht : t ≤ 0) (tau : ℝ) (htau : 0 < tau) |
| 89 | (p : M) (u v : TangentSpace (𝓡 3) p) : |
| 90 | (K.flow.metric t).inner p u v = |
| 91 | (1 + t / tau) * (K.flow.metric 0).inner p u v - |
| 92 | (t / tau) * (K.flow.metric (-tau)).inner p u v := by |
| 93 | let c := N.identification.symm p |
| 94 | let q := c.1 |
| 95 | let X := cylinderCoordinateEquiv.symm ((chartAt E2 q) q, c.2) |
| 96 | have hchart : cylinderChart q X = c := by |
| 97 | apply Prod.ext |
| 98 | · change (chartAt E2 q).symm (cylinderCoordinateEquiv X).1 = c.1 |
| 99 | dsimp only [X] |
| 100 | rw [ContinuousLinearEquiv.apply_symm_apply] |
| 101 | exact (chartAt E2 q).left_inv (mem_chart_source E2 q) |
| 102 | · change (cylinderCoordinateEquiv X).2 = c.2 |
| 103 | simp only [X, ContinuousLinearEquiv.apply_symm_apply] |
| 104 | have hp : N.identification (cylinderChart q X) = p := by |
| 105 | rw [hchart] |
| 106 | exact N.identification.apply_symm_apply p |
| 107 | obtain ⟨U, hU⟩ := (sphereLineChart_invertible N q X).surjective u |
| 108 | obtain ⟨W, hW⟩ := (sphereLineChart_invertible N q X).surjective v |
| 109 | have h := sphereLineChartMetric_two_times N t ht tau htau q X U W |
| 110 | change (K.flow.metric t).inner (N.identification (cylinderChart q X)) |
| 111 | (mfderiv (𝓡 3) (𝓡 3) (N.identification ∘ cylinderChart q) X U) |
| 112 | (mfderiv (𝓡 3) (𝓡 3) (N.identification ∘ cylinderChart q) X W) = |
| 113 | (1 + t / tau) * (K.flow.metric 0).inner (N.identification (cylinderChart q X)) |
| 114 | (mfderiv (𝓡 3) (𝓡 3) (N.identification ∘ cylinderChart q) X U) |
| 115 | (mfderiv (𝓡 3) (𝓡 3) (N.identification ∘ cylinderChart q) X W) - |
| 116 | (t / tau) * (K.flow.metric (-tau)).inner (N.identification (cylinderChart q X)) |
| 117 | (mfderiv (𝓡 3) (𝓡 3) (N.identification ∘ cylinderChart q) X U) |
| 118 | (mfderiv (𝓡 3) (𝓡 3) (N.identification ∘ cylinderChart q) X W) at h |
| 119 | rw [hU, hW] at h |
| 120 | let tensor (s : ℝ) (y : M) (a b : V) := (K.flow.metric s).inner y a b |
| 121 | change tensor t (N.identification (cylinderChart q X)) u v = |
| 122 | (1 + t / tau) * tensor 0 (N.identification (cylinderChart q X)) u v - |
| 123 | (t / tau) * tensor (-tau) (N.identification (cylinderChart q X)) u v at h |
| 124 | rw [hp] at h |
| 125 | exact h |
| 126 | |
| 127 | end PoincareMT.M35 |