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.Existence.InitialMetric.SmoothInnerProduct |
| 2 | import Mathlib.Analysis.LocallyConvex.Bounded |
| 3 | import Mathlib.Geometry.Manifold.VectorBundle.Hom |
| 4 | |
| 5 | /-! |
| 6 | # A smooth Riemannian metric from the cap profile |
| 7 | |
| 8 | The positive smooth bilinear field of Morgan-Tian Lemma 12.2, |
| 9 | printed pp. 294-295, is packaged in the frozen `RiemannianMetric` type. |
| 10 | This construction does not yet assert completeness, the curvature |
| 11 | conditions or the cylindrical-end certificate of `StandardInitialMetric`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Bundle Bornology |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | namespace PoincareMT.M34 |
| 20 | |
| 21 | /-- The Cartesian bilinear form viewed on the actual tangent fibers of |
| 22 | the standard cap (Lemma 12.2, pp. 294-295). -/ |
| 23 | noncomputable def capMetricInnerTangent (a : ℝ) (x : StandardCapSpace) : |
| 24 | TangentSpace (𝓡 3) x →L[ℝ] TangentSpace (𝓡 3) x →L[ℝ] ℝ := capMetricInner a x |
| 25 | |
| 26 | /-- The unit ball of the cap's positive form is bounded in the given |
| 27 | tangent topology (Lemma 12.2, pp. 294-295). -/ |
| 28 | theorem capMetricInner_isVonNBounded {a : ℝ} (ha : 0 ≤ a) |
| 29 | (hapi : a ≤ Real.pi / 2) (x : StandardCapSpace) : |
| 30 | IsVonNBounded ℝ {v : StandardCapSpace | capMetricInner a x v v < 1} := by |
| 31 | let c := capAngularCoefficient a ‖x‖ |
| 32 | have hc : 0 < c := capAngularCoefficient_pos ha hapi (norm_nonneg x) |
| 33 | apply (NormedSpace.isVonNBounded_ball ℝ StandardCapSpace (Real.sqrt (1 / c) + 1)).subset |
| 34 | intro v hv |
| 35 | have hnonneg := mul_nonneg (capRadialCoefficient_nonneg ha hapi (norm_nonneg x)) |
| 36 | (mul_self_nonneg (inner ℝ x v)) |
| 37 | have hbound : c * ‖v‖ ^ 2 < 1 := by |
| 38 | change capMetricInner a x v v < 1 at hv |
| 39 | rw [capMetricInner_apply, real_inner_self_eq_norm_sq] at hv |
| 40 | linarith |
| 41 | have hsq : ‖v‖ ^ 2 < 1 / c := (lt_div_iff₀ hc).mpr (by linarith) |
| 42 | have hroot := Real.sq_sqrt (show 0 ≤ 1 / c by positivity) |
| 43 | have hrootnonneg := Real.sqrt_nonneg (1 / c) |
| 44 | rw [Metric.mem_ball, dist_zero_right] |
| 45 | nlinarith [norm_nonneg v] |
| 46 | |
| 47 | /-- Smoothness as a section of the actual tangent bilinear-form bundle, |
| 48 | using the identity model-space trivializations (Lemma 12.2, pp. 294-295). -/ |
| 49 | theorem capMetricInner_contMDiff {a : ℝ} (ha : 0 < a) : |
| 50 | ContMDiff (𝓡 3) ((𝓡 3).prod 𝓘(ℝ, |
| 51 | StandardCapSpace →L[ℝ] StandardCapSpace →L[ℝ] ℝ)) ∞ |
| 52 | (fun x => TotalSpace.mk' (StandardCapSpace →L[ℝ] StandardCapSpace →L[ℝ] ℝ) |
| 53 | x (E := fun x => TangentSpace (𝓡 3) x →L[ℝ] TangentSpace (𝓡 3) x →L[ℝ] ℝ) |
| 54 | (capMetricInnerTangent a x)) := by |
| 55 | intro x |
| 56 | refine Bundle.contMDiffAt_totalSpace.mpr ⟨contMDiffAt_id, ?_⟩ |
| 57 | have h := (contMDiff_iff_contDiff.mpr (capMetricInner_contDiff ha)).contMDiffAt (x := x) |
| 58 | convert! h using 1 |
| 59 | ext y u v |
| 60 | simp only [hom_trivializationAt_apply, ContinuousLinearMap.inCoordinates, |
| 61 | TangentBundle.symmL_model_space, ContinuousLinearMap.comp_apply] |
| 62 | have hy : y ∈ (trivializationAt (StandardCapSpace →L[ℝ] ℝ) |
| 63 | (fun z => TangentSpace (𝓡 3) z →L[ℝ] ℝ) x).baseSet := by |
| 64 | rw [hom_trivializationAt_baseSet, TangentBundle.trivializationAt_baseSet] |
| 65 | exact ⟨Set.mem_univ y, Set.mem_univ y⟩ |
| 66 | rw [Trivialization.continuousLinearMapAt_apply_of_mem ℝ _ hy] |
| 67 | have ht : trivializationAt ℝ (Bundle.Trivial StandardCapSpace ℝ) x = |
| 68 | Bundle.Trivial.trivialization StandardCapSpace ℝ := |
| 69 | Bundle.Trivial.eq_trivialization _ _ _ |
| 70 | simp only [hom_trivializationAt_apply, ContinuousLinearMap.inCoordinates, ht, |
| 71 | Bundle.Trivial.continuousLinearMapAt_trivialization, TangentBundle.symmL_model_space, |
| 72 | ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply, capMetricInnerTangent] |
| 73 | rfl |
| 74 | |
| 75 | /-- The smooth positive cap metric built from a positive cutoff parameter |
| 76 | before `pi/2` (Lemma 12.2, pp. 294-295). Its geometric certificates are |
| 77 | proved separately against the frozen contract. -/ |
| 78 | noncomputable def capRiemannianMetric (a : ℝ) (ha : 0 < a) (hapi : a ≤ Real.pi / 2) : |
| 79 | RiemannianMetric 3 StandardCapSpace where |
| 80 | inner := capMetricInnerTangent a |
| 81 | symm := capMetricInner_symm a |
| 82 | pos := capMetricInner_pos ha.le hapi |
| 83 | isVonNBounded := capMetricInner_isVonNBounded ha.le hapi |
| 84 | contMDiff := capMetricInner_contMDiff ha |
| 85 | |
| 86 | end PoincareMT.M34 |