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 Mathlib.Analysis.Normed.Module.FiniteDimension |
| 2 | import Mathlib.Analysis.Normed.Module.RCLike.Basic |
| 3 | import Mathlib.Analysis.LocallyConvex.Bounded |
| 4 | import Mathlib.Analysis.Normed.Operator.Bilinear |
| 5 | import Mathlib.Analysis.Normed.Operator.BoundedLinearMaps |
| 6 | |
| 7 | /-! |
| 8 | # Bounded unit ellipsoids of positive finite-dimensional forms |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set Metric Bornology |
| 14 | |
| 15 | namespace Poincare.Spacetime.Realization |
| 16 | |
| 17 | theorem positiveForm_isVonNBounded {E : Type*} [NormedAddCommGroup E] |
| 18 | [NormedSpace ℝ E] [FiniteDimensional ℝ E] (g : E →L[ℝ] E →L[ℝ] ℝ) |
| 19 | (hpos : ∀ v, v ≠ 0 → 0 < g v v) : |
| 20 | IsVonNBounded ℝ {v : E | g v v < 1} := by |
| 21 | apply NormedSpace.isVonNBounded_of_isBounded |
| 22 | by_cases hsub : Subsingleton E |
| 23 | · let := hsub |
| 24 | exact (isBounded_singleton (x := (0 : E))).subset (fun v _ ↦ Subsingleton.elim v 0) |
| 25 | let : Nontrivial E := not_subsingleton_iff_nontrivial.mp hsub |
| 26 | have hcont : Continuous (fun v ↦ g v v) := g.continuous₂.comp (continuous_id.prodMk continuous_id) |
| 27 | obtain ⟨u, hu, hmin⟩ := (isCompact_sphere (0 : E) 1).exists_isMinOn |
| 28 | (NormedSpace.sphere_nonempty.mpr zero_le_one) hcont.continuousOn |
| 29 | have hu0 : u ≠ 0 := ne_of_mem_sphere hu one_ne_zero |
| 30 | have hδ := hpos u hu0 |
| 31 | rw [isBounded_iff_forall_norm_le] |
| 32 | refine ⟨max 1 (1 / g u u), ?_⟩ |
| 33 | intro v hv |
| 34 | change g v v < 1 at hv |
| 35 | by_cases hv0 : v = 0 |
| 36 | · simp only [hv0, norm_zero] |
| 37 | exact (by positivity : (0 : ℝ) ≤ 1).trans (le_max_left _ _) |
| 38 | have hnorm : ‖v‖ ≠ 0 := norm_ne_zero_iff.mpr hv0 |
| 39 | have hunit : ‖v‖⁻¹ • v ∈ sphere (0 : E) 1 := by |
| 40 | simp [norm_smul, norm_inv, hnorm] |
| 41 | have hbound := mul_le_mul_of_nonneg_left (hmin hunit) (sq_nonneg ‖v‖) |
| 42 | have hscale : ‖v‖ ^ 2 * g (‖v‖⁻¹ • v) (‖v‖⁻¹ • v) = g v v := by |
| 43 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 44 | field_simp |
| 45 | rw [hscale] at hbound |
| 46 | by_contra! hlarge |
| 47 | have hlarge₁ : 1 < ‖v‖ := (le_max_left _ _).trans_lt hlarge |
| 48 | have hlarge₂ : 1 < g u u * ‖v‖ := by |
| 49 | have := (le_max_right 1 (1 / g u u)).trans_lt hlarge |
| 50 | have := (div_lt_iff₀ hδ).mp this |
| 51 | nlinarith |
| 52 | have := mul_lt_mul_of_pos_right hlarge₂ (norm_pos_iff.mpr hv0) |
| 53 | nlinarith |
| 54 | |
| 55 | end Poincare.Spacetime.Realization |