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.Soliton.Models.Involution.Formula |
| 2 | import PoincareLib.Geometry.Riemannian.Distance.TangentBound |
| 3 | import PoincareLib.Geometry.Riemannian.Comparison.Injectivity.PullbackGeodesics |
| 4 | import PoincareLib.Geometry.Riemannian.Measure.LocalIsometry |
| 5 | |
| 6 | /-! |
| 7 | # Injectivity regions in the shrinking-cylinder quotient |
| 8 | |
| 9 | At normalized time minus one, the sphere coordinate does not increase |
| 10 | intrinsic distance. A small product ball therefore contains no antipodal |
| 11 | pair and is an injectivity region for either free quotient normal form. |
| 12 | Reference: Morgan--Tian, Proposition 9.58, pp. 220--221. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | namespace SphereLineProductData |
| 26 | |
| 27 | variable {P : Type u} [TopologicalSpace P] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) P] [IsManifold (𝓡 3) ∞ P] |
| 29 | |
| 30 | theorem sphere_edist_le_product_edist (S : SphereLineProductData (P := P)) : |
| 31 | letI := S.surface_topology |
| 32 | letI := S.surface_charted |
| 33 | letI := S.surface_manifold |
| 34 | letI := S.product_charted |
| 35 | letI := S.product_manifold |
| 36 | ∀ x y : S.surface × ℝ, |
| 37 | edist (S.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3)) |
| 38 | (S.surface_sphere y.1 : EuclideanSpace ℝ (Fin 3)) ≤ |
| 39 | (S.product_metric (-1)).edist x y := by |
| 40 | let := S.surface_topology |
| 41 | let := S.surface_charted |
| 42 | let := S.surface_manifold |
| 43 | let := S.product_charted |
| 44 | let := S.product_manifold |
| 45 | let : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 2 + 1) := ⟨by simp⟩ |
| 46 | let f : S.surface → EuclideanSpace ℝ (Fin 3) := fun x => (S.surface_sphere x).1 |
| 47 | have hcoe : ContMDiff (𝓡 2) (𝓡 3) ∞ |
| 48 | ((↑) : UnitTwoSphere → EuclideanSpace ℝ (Fin 3)) := contMDiff_coe_sphere |
| 49 | have hf : ContMDiff (𝓡 2) (𝓡 3) ∞ f := |
| 50 | hcoe.comp S.surface_sphere.contMDiff |
| 51 | have hp : ContMDiff (𝓡 3) (𝓡 2) ∞ (Prod.fst : S.surface × ℝ → S.surface) := |
| 52 | contMDiff_fst.comp S.product_smooth_to_canonical |
| 53 | have hF := hf.comp hp |
| 54 | have hderiv (x : S.surface × ℝ) (v : TangentSpace (𝓡 3) x) : |
| 55 | mfderiv (𝓡 3) (𝓡 3) (f ∘ Prod.fst) x v = |
| 56 | mfderiv (𝓡 2) (𝓡 3) f x.1 (S.tangent_surface_component x v) := by |
| 57 | rw [mfderiv_comp_apply x (hf.mdifferentiable (by simp) x.1) |
| 58 | (hp.mdifferentiable (by simp) x), S.tangent_surface_component_eq] |
| 59 | intro x y |
| 60 | have h := (S.product_metric (-1)).edist_le_mul_of_inner_mfderiv_le |
| 61 | (RiemannianMetric.euclideanMetric 3) (hF.of_le (by simp)) (by norm_num : (0 : ℝ) < 1) |
| 62 | (fun z v => ?_) x y |
| 63 | · simpa only [RiemannianMetric.euclideanMetric_edist, ENNReal.ofReal_one, |
| 64 | one_mul, Function.comp_apply] using h |
| 65 | · rw [RiemannianMetric.euclideanMetric_inner, hderiv, |
| 66 | S.product_inner_formula (-1) (by norm_num), |
| 67 | S.surface_inner_round (-1) (by norm_num)] |
| 68 | dsimp only [f] |
| 69 | nlinarith [real_inner_self_nonneg (x := mfderiv (𝓡 2) (𝓡 3) |
| 70 | (fun x : S.surface => (S.surface_sphere x).1) z.1 |
| 71 | (S.tangent_surface_component z v)), sq_nonneg (S.tangent_line_component z v)] |
| 72 | |
| 73 | end SphereLineProductData |
| 74 | |
| 75 | namespace QuotientSphereLineCertificate |
| 76 | |
| 77 | variable {M : Type u} [TopologicalSpace M] |
| 78 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 79 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 80 | [SecondCountableTopology M] [ConnectedSpace M] |
| 81 | {S : GradientShrinkingSolitonData 3 M} {G : ShrinkingSolitonFlow S} |
| 82 | |
| 83 | theorem quotient_map_injOn_small_ball (q : QuotientSphereLineCertificate G) : |
| 84 | letI := q.cover_topology |
| 85 | letI := q.cover_charted |
| 86 | letI := q.cover_manifold |
| 87 | letI := q.product.surface_topology |
| 88 | letI := q.product.surface_charted |
| 89 | letI := q.product.surface_manifold |
| 90 | letI := q.product.product_charted |
| 91 | letI := q.product.product_manifold |
| 92 | ∀ p : q.product.surface × ℝ, |
| 93 | InjOn q.quotient_map ((q.product.product_metric (-1)).ball p (1 / 4)) := by |
| 94 | let := q.cover_topology |
| 95 | let := q.cover_charted |
| 96 | let := q.cover_manifold |
| 97 | let := q.product.surface_topology |
| 98 | let := q.product.surface_charted |
| 99 | let := q.product.surface_manifold |
| 100 | let := q.product.product_charted |
| 101 | let := q.product.product_manifold |
| 102 | have hanti (z : q.product.surface × ℝ) : |
| 103 | q.product.surface_sphere (q.involution z).1 = -(q.product.surface_sphere z.1) := by |
| 104 | rcases q.involution_eq_antipodal_identity_or_reflection with h | ⟨c, h⟩ |
| 105 | · simp only [h, q.product.surface_sphere.apply_symm_apply] |
| 106 | · simp only [h, q.product.surface_sphere.apply_symm_apply] |
| 107 | intro p x hx y hy hxy |
| 108 | rcases (q.quotient_fiber_eq_orbit x y).mp hxy with heq | heq |
| 109 | · exact heq.symm |
| 110 | have hsmall (z : q.product.surface × ℝ) |
| 111 | (hz : z ∈ (q.product.product_metric (-1)).ball p (1 / 4)) : |
| 112 | dist (q.product.surface_sphere p.1 : EuclideanSpace ℝ (Fin 3)) |
| 113 | (q.product.surface_sphere z.1 : EuclideanSpace ℝ (Fin 3)) < 1 / 4 := by |
| 114 | apply (ENNReal.ofReal_lt_ofReal_iff (by norm_num : (0 : ℝ) < 1 / 4)).mp |
| 115 | rw [← edist_dist] |
| 116 | exact (q.product.sphere_edist_le_product_edist p z).trans_lt hz |
| 117 | have hx' := hsmall x hx |
| 118 | have hy' := hsmall y hy |
| 119 | have hclose : dist (q.product.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3)) |
| 120 | (q.product.surface_sphere y.1 : EuclideanSpace ℝ (Fin 3)) < 1 / 2 := by |
| 121 | have htriangle := dist_triangle |
| 122 | (q.product.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3)) |
| 123 | (q.product.surface_sphere p.1 : EuclideanSpace ℝ (Fin 3)) |
| 124 | (q.product.surface_sphere y.1 : EuclideanSpace ℝ (Fin 3)) |
| 125 | rw [dist_comm (q.product.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3)) |
| 126 | (q.product.surface_sphere p.1 : EuclideanSpace ℝ (Fin 3))] at htriangle |
| 127 | linarith |
| 128 | have hnorm : ‖(q.product.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3))‖ = 1 := by |
| 129 | simpa only [Metric.mem_sphere, dist_zero_right] using |
| 130 | (q.product.surface_sphere x.1).property |
| 131 | have hdist : dist (q.product.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3)) |
| 132 | (q.product.surface_sphere y.1 : EuclideanSpace ℝ (Fin 3)) = 2 := by |
| 133 | rw [heq, hanti] |
| 134 | change ‖(q.product.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3)) - |
| 135 | -(q.product.surface_sphere x.1 : EuclideanSpace ℝ (Fin 3))‖ = 2 |
| 136 | rw [sub_neg_eq_add, ← two_smul ℝ, norm_smul, Real.norm_two, hnorm] |
| 137 | norm_num |
| 138 | linarith |
| 139 | |
| 140 | section Volume |
| 141 | |
| 142 | variable (q : QuotientSphereLineCertificate G) |
| 143 | |
| 144 | local instance : TopologicalSpace q.cover := q.cover_topology |
| 145 | local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) q.cover := q.cover_charted |
| 146 | local instance : IsManifold (𝓡 3) ∞ q.cover := q.cover_manifold |
| 147 | local instance : TopologicalSpace q.product.surface := q.product.surface_topology |
| 148 | local instance : ChartedSpace (EuclideanSpace ℝ (Fin 2)) q.product.surface := |
| 149 | q.product.surface_charted |
| 150 | local instance : IsManifold (𝓡 2) ∞ q.product.surface := q.product.surface_manifold |
| 151 | local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) (q.product.surface × ℝ) := |
| 152 | q.product.product_charted |
| 153 | local instance : IsManifold (𝓡 3) ∞ (q.product.surface × ℝ) := q.product.product_manifold |
| 154 | local instance : TopologicalSpace q.quotient_carrier := q.quotient_topology |
| 155 | local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) q.quotient_carrier := q.quotient_charted |
| 156 | local instance : IsManifold (𝓡 3) ∞ q.quotient_carrier := q.quotient_manifold |
| 157 | local instance : T3Space q.product.surface := |
| 158 | q.product.surface_sphere.toHomeomorph.isEmbedding.t3Space |
| 159 | local instance : SecondCountableTopology q.product.surface := |
| 160 | q.product.surface_sphere.toHomeomorph.isEmbedding.secondCountableTopology |
| 161 | local instance : T3Space q.quotient_carrier := |
| 162 | (Classical.choose q.flow_isometric_to_quotient).toHomeomorph.t3Space |
| 163 | |
| 164 | variable [MeasurableSpace (q.product.surface × ℝ)] [BorelSpace (q.product.surface × ℝ)] |
| 165 | [MeasurableSpace q.quotient_carrier] [BorelSpace q.quotient_carrier] |
| 166 | |
| 167 | theorem product_ball_volume_le_quotient_ball_volume (p : q.product.surface × ℝ) : |
| 168 | (q.product.product_metric (-1)).volumeMeasure |
| 169 | ((q.product.product_metric (-1)).ball p (1 / 4)) ≤ |
| 170 | (q.quotient_metric (-1)).volumeMeasure |
| 171 | ((q.quotient_metric (-1)).ball (q.quotient_map p) (1 / 4)) := by |
| 172 | exact (q.product.product_metric (-1)).volumeMeasure_ball_le_of_injOn_metric_pullback |
| 173 | (q.quotient_metric (-1)) q.quotient_map_smooth |
| 174 | (q.quotient_metric_pullback (-1) (by norm_num)) p (1 / 4) |
| 175 | (q.quotient_map_injOn_small_ball p) |
| 176 | |
| 177 | end Volume |
| 178 | |
| 179 | end QuotientSphereLineCertificate |
| 180 | end PoincareMT |