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.AlgebraicTopology.HomotopyGroup.LoopSpace.Compatibility.ThreeManifoldTopology |
| 2 | |
| 3 | /-! |
| 4 | # Whole-space extensions of null sphere maps |
| 5 | |
| 6 | The closed unit ball is a retract of its ambient normed space. Composing |
| 7 | this retraction with the cone extension converts a sphere nullhomotopy to |
| 8 | the whole-plane filling used by MT's loop convention, pp. 429-430. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open Metric Set |
| 16 | |
| 17 | namespace PoincareMT.Proofs.M59 |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | |
| 21 | /-- Radial truncation onto the closed unit ball. Source: the cone filling |
| 22 | construction for MT Claim 18.16, p. 430; Hatcher Lemma 4.7, p. 348. -/ |
| 23 | def closedUnitBallRetraction : C(E, closedBall (0 : E) 1) where |
| 24 | toFun z := ⟨(max 1 ‖z‖)⁻¹ • z, by |
| 25 | have hpos : 0 < max 1 ‖z‖ := lt_of_lt_of_le zero_lt_one (le_max_left _ _) |
| 26 | rw [mem_closedBall_zero_iff, norm_smul, Real.norm_eq_abs, abs_inv, |
| 27 | abs_of_pos hpos, ← div_eq_inv_mul] |
| 28 | exact (div_le_one hpos).mpr (le_max_right _ _)⟩ |
| 29 | continuous_toFun := by |
| 30 | apply Continuous.subtype_mk |
| 31 | exact ((continuous_const.max continuous_norm).inv₀ |
| 32 | (fun z => ne_of_gt (lt_of_lt_of_le zero_lt_one (le_max_left 1 ‖z‖)))).smul continuous_id |
| 33 | |
| 34 | /-- Radial truncation fixes the sphere pointwise. Source: the filling |
| 35 | construction for MT Claim 18.16, p. 430. -/ |
| 36 | theorem closedUnitBallRetraction_sphere (z : sphere (0 : E) 1) : |
| 37 | closedUnitBallRetraction z.val = ⟨z.val, sphere_subset_closedBall z.property⟩ := by |
| 38 | apply Subtype.ext |
| 39 | simp [closedUnitBallRetraction, mem_sphere_zero_iff_norm.mp z.property] |
| 40 | |
| 41 | /-- A nullhomotopic sphere map has a continuous extension to the whole ambient |
| 42 | space. Source: Hatcher Lemma 4.7, p. 348; MT Claim 18.16, p. 430. -/ |
| 43 | theorem exists_extension_of_sphere_nullhomotopic [FiniteDimensional ℝ E] [Nontrivial E] |
| 44 | {Y : Type*} [TopologicalSpace Y] (f : C(sphere (0 : E) 1, Y)) |
| 45 | (hf : f.Nullhomotopic) : |
| 46 | ∃ F : C(E, Y), ∀ z : sphere (0 : E) 1, F z.val = f z := by |
| 47 | obtain ⟨F, hF⟩ := M02.Topology.exists_disk_extension_of_nullhomotopic f hf |
| 48 | refine ⟨F.comp closedUnitBallRetraction, ?_⟩ |
| 49 | intro z |
| 50 | change F (closedUnitBallRetraction z.val) = f z |
| 51 | rw [closedUnitBallRetraction_sphere] |
| 52 | exact hF z |
| 53 | |
| 54 | end PoincareMT.Proofs.M59 |