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.RotationInvariance.EndLocalDiffeomorph |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Coordinates.CoordinateVolumeBounds |
| 3 | |
| 4 | /-! |
| 5 | # Uniform reference diffeomorphisms on the initial cylindrical end |
| 6 | |
| 7 | The whole fixed region of heights three to five maps diffeomorphically to |
| 8 | the region of heights H-1 to H+1. Its actual pullback metric is unchanged. |
| 9 | Source: Morgan-Tian Proposition 12.13, pp. 304-306. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | namespace PoincareMT.M34 |
| 18 | |
| 19 | variable {g : RiemannianMetric 3 StandardCapSpace} |
| 20 | |
| 21 | /-- The actual reference translation on its entire common open source, |
| 22 | with the opposite axial translation as inverse (Proposition 12.13). -/ |
| 23 | noncomputable def endReferenceDiffeomorph (e : StandardCylindricalEnd g) |
| 24 | {H : ℝ} (hH : 3 ≤ H) : |
| 25 | PartialDiffeomorph (𝓡 3) (𝓡 3) StandardCapSpace StandardCapSpace ∞ where |
| 26 | toFun := endAxialTranslation e (H - 4) |
| 27 | invFun := endAxialTranslation e (-(H - 4)) |
| 28 | source := endReferenceRegion e |
| 29 | target := e.coordinate '' (univ ×ˢ Ioo (H - 1) (H + 1)) |
| 30 | map_source' := by |
| 31 | rintro _ ⟨z, hz, rfl⟩ |
| 32 | rw [endAxialTranslation_coordinate e (H - 4) (show 0 ≤ z.2 by linarith [hz.2.1])] |
| 33 | exact ⟨(z.1, z.2 + (H - 4)), ⟨mem_univ _, by |
| 34 | constructor <;> dsimp <;> linarith [hz.2.1, hz.2.2]⟩, rfl⟩ |
| 35 | map_target' := by |
| 36 | rintro _ ⟨z, hz, rfl⟩ |
| 37 | rw [endAxialTranslation_coordinate e (-(H - 4)) (show 0 ≤ z.2 by linarith [hz.2.1])] |
| 38 | exact ⟨(z.1, z.2 + -(H - 4)), ⟨mem_univ _, by |
| 39 | constructor <;> dsimp <;> linarith [hz.2.1, hz.2.2]⟩, rfl⟩ |
| 40 | left_inv' := by |
| 41 | rintro _ ⟨z, hz, rfl⟩ |
| 42 | rw [endAxialTranslation_coordinate e (H - 4) (show 0 ≤ z.2 by linarith [hz.2.1]), |
| 43 | endAxialTranslation_coordinate e (-(H - 4)) |
| 44 | (show 0 ≤ z.2 + (H - 4) by linarith [hz.2.1])] |
| 45 | congr 1 |
| 46 | apply Prod.ext |
| 47 | · rfl |
| 48 | · dsimp |
| 49 | ring |
| 50 | right_inv' := by |
| 51 | rintro _ ⟨z, hz, rfl⟩ |
| 52 | rw [endAxialTranslation_coordinate e (-(H - 4)) |
| 53 | (show 0 ≤ z.2 by linarith [hz.2.1]), |
| 54 | endAxialTranslation_coordinate e (H - 4) |
| 55 | (show 0 ≤ z.2 + -(H - 4) by linarith [hz.2.1])] |
| 56 | congr 1 |
| 57 | apply Prod.ext |
| 58 | · rfl |
| 59 | · dsimp |
| 60 | ring |
| 61 | open_source := endReferenceRegion_isOpen e |
| 62 | open_target := end_isOpen_coordinate_image e (isOpen_univ.prod isOpen_Ioo) |
| 63 | (fun z hz => by linarith [hz.2.1]) |
| 64 | contMDiffOn_toFun := endTranslation_contMDiffOn e hH |
| 65 | contMDiffOn_invFun := by |
| 66 | rintro _ ⟨z, hz, rfl⟩ |
| 67 | exact (endAxialTranslation_contMDiffAt e (-(H - 4)) |
| 68 | (by linarith [hz.2.1]) (by linarith [hz.2.1])).contMDiffWithinAt |
| 69 | |
| 70 | /-- The reference diffeomorphism has exactly the original initial |
| 71 | coefficient field on its common source (Proposition 12.13). -/ |
| 72 | theorem endReferenceDiffeomorph_pullback (e : StandardCylindricalEnd g) |
| 73 | {H : ℝ} (hH : 3 ≤ H) {x : StandardCapSpace} (hx : x ∈ endReferenceRegion e) : |
| 74 | M10.pullbackMetricForm g (endReferenceDiffeomorph e hH) x = |
| 75 | M10.pullbackMetricForm g id x := by |
| 76 | apply ContinuousLinearMap.ext |
| 77 | intro v |
| 78 | apply ContinuousLinearMap.ext |
| 79 | intro w |
| 80 | change g.inner (endAxialTranslation e (H - 4) x) |
| 81 | (mfderiv (𝓡 3) (𝓡 3) (endAxialTranslation e (H - 4)) x v) |
| 82 | (mfderiv (𝓡 3) (𝓡 3) (endAxialTranslation e (H - 4)) x w) = |
| 83 | g.inner x (mfderiv (𝓡 3) (𝓡 3) id x v) (mfderiv (𝓡 3) (𝓡 3) id x w) |
| 84 | rw [mfderiv_id] |
| 85 | exact (endTranslation_metric e hH hx v w).symm |
| 86 | |
| 87 | end PoincareMT.M34 |