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.Asymptotics.CylinderJetLocality |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Asymptotics.EndCylinderPatches |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Asymptotics.EndCylinderIntrinsicJets |
| 4 | |
| 5 | /-! |
| 6 | # Intrinsic errors of the fixed centered end coordinate |
| 7 | |
| 8 | A fixed centered coordinate agrees locally with any suitable translated |
| 9 | reference coordinate followed by an axial shift. Locality and exact |
| 10 | translation invariance transfer its actual frozen error. This is |
| 11 | Proposition 12.7, pp. 298-299 and asymptotic-certificate-patches.md. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | namespace PoincareMT.M34 |
| 21 | |
| 22 | variable {g0 : RiemannianMetric 3 StandardCapSpace} |
| 23 | |
| 24 | /-- The two actual coordinate maps agree on a genuine open positive-height |
| 25 | neighborhood; the integer index is fixed throughout that neighborhood |
| 26 | (Proposition 12.7, pp. 298-299). -/ |
| 27 | theorem endCenteredCylinderMap_eq_translated_germ (e : StandardCylindricalEnd g0) |
| 28 | (j : ℕ) (H : ℝ) {z : RoundCylinderSpace} (hz : 0 < z.2 + (H - j)) : |
| 29 | endCenteredCylinderMap e H =ᶠ[𝓝 z] |
| 30 | (endAxialTranslation e j ∘ e.coordinate) ∘ cylinderAxialTranslation (H - j) := by |
| 31 | filter_upwards [(isOpen_lt continuous_const |
| 32 | (continuous_snd.add continuous_const)).mem_nhds hz] with y hy |
| 33 | change e.coordinate (y.1, y.2 + H) = |
| 34 | endAxialTranslation e j (e.coordinate (y.1, y.2 + (H - j))) |
| 35 | rw [endAxialTranslation_coordinate e j (show 0 ≤ y.2 + (H - j) from hy.le)] |
| 36 | congr 1 |
| 37 | apply Prod.ext |
| 38 | · rfl |
| 39 | · dsimp |
| 40 | ring |
| 41 | |
| 42 | /-- The actual pullback tensor of the fixed coordinate is locally the |
| 43 | axially shifted reference pullback (Proposition 12.7, pp. 298-299). -/ |
| 44 | theorem endCenteredCylinderPullback_eq_shift (e : StandardCylindricalEnd g0) |
| 45 | (j : ℕ) (H : ℝ) (g : RiemannianMetric 3 StandardCapSpace) |
| 46 | {z : RoundCylinderSpace} (hz : 0 < z.2 + (H - j)) : |
| 47 | roundCylinderPullback g (endCenteredCylinderMap e H) z = |
| 48 | roundCylinderShift (H - j) |
| 49 | (roundCylinderPullback g (endAxialTranslation e j ∘ e.coordinate)) z := by |
| 50 | have hs := (endAxialTranslation_comp_coordinate_contMDiffOn e j).contMDiffAt |
| 51 | ((isOpen_univ.prod isOpen_Ioi).mem_nhds |
| 52 | (show cylinderAxialTranslation (H - j) z ∈ univ ×ˢ Ioi (0 : ℝ) from |
| 53 | ⟨mem_univ _, hz⟩)) |
| 54 | exact (roundCylinderPullback_congr_of_eventuallyEq g |
| 55 | (endCenteredCylinderMap_eq_translated_germ e j H hz)).trans |
| 56 | (roundCylinderPullback_comp_axialTranslation g _ _ z (hs.mdifferentiableAt (by simp))) |
| 57 | |
| 58 | /-- The actual scalar coefficients agree as germs in any sphere chart |
| 59 | at a valid positive reference height (Proposition 12.7, pp. 298-299). -/ |
| 60 | theorem endCenteredCylinderCoefficient_eq_shift_germ (e : StandardCylindricalEnd g0) |
| 61 | (j : ℕ) (H : ℝ) (g : RiemannianMetric 3 StandardCapSpace) |
| 62 | (c : OpenPartialHomeomorph UnitTwoSphere (EuclideanSpace ℝ (Fin 2))) |
| 63 | {p : RoundCylinderCoordinates} (hp : 0 < p.2 + (H - j)) (a b : Fin 3) : |
| 64 | (fun y => roundCylinderTensorCoefficient |
| 65 | (roundCylinderPullback g (endCenteredCylinderMap e H)) c y a b) =ᶠ[𝓝 p] |
| 66 | (fun y => roundCylinderTensorCoefficient (roundCylinderShift (H - j) |
| 67 | (roundCylinderPullback g (endAxialTranslation e j ∘ e.coordinate))) c y a b) := by |
| 68 | filter_upwards [(isOpen_lt continuous_const |
| 69 | (continuous_snd.add continuous_const)).mem_nhds hp] with y hy |
| 70 | have h := endCenteredCylinderPullback_eq_shift e j H g |
| 71 | (z := (c.symm y.1, y.2)) hy |
| 72 | exact congrFun (congrFun h _) _ |
| 73 | |
| 74 | /-- The actual fixed-patch error equals the translated reference error |
| 75 | at the shifted point (Proposition 12.7, pp. 298-299). -/ |
| 76 | theorem endCenteredCylinderJetErrorSquared_eq (e : StandardCylindricalEnd g0) |
| 77 | (j : ℕ) (H : ℝ) (g : RiemannianMetric 3 StandardCapSpace) |
| 78 | (t : ℝ) (m : ℕ) {z : RoundCylinderSpace} (hz : 0 < z.2 + (H - j)) : |
| 79 | roundCylinderJetErrorSquared t (roundCylinderPullback g (endCenteredCylinderMap e H)) m z = |
| 80 | roundCylinderJetErrorSquared t |
| 81 | (roundCylinderPullback g (endAxialTranslation e j ∘ e.coordinate)) m |
| 82 | (cylinderAxialTranslation (H - j) z) := |
| 83 | (roundCylinderJetErrorSquared_congr_germ t m z (fun a b => |
| 84 | endCenteredCylinderCoefficient_eq_shift_germ e j H g _ hz a b)).trans |
| 85 | (roundCylinderJetErrorSquared_shift (H - j) t _ m z) |
| 86 | |
| 87 | end PoincareMT.M34 |