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.Geometry.Coordinates.TranslatedEndCharts |
| 2 | import PoincareLib.Geometry.Manifold.LocalDiffeomorph |
| 3 | |
| 4 | /-! |
| 5 | # Actual local diffeomorphisms on the cylindrical end |
| 6 | |
| 7 | The inverse axial translation supplies a partial diffeomorphism between |
| 8 | the positive-height regions where both maps are meaningful. Restricting |
| 9 | to the fixed reference region gives the maps used to pull back the actual |
| 10 | flows in Morgan-Tian Section 12.5, pp. 309-319. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | variable {g : RiemannianMetric 3 StandardCapSpace} |
| 21 | |
| 22 | /-- Actual axial translation is a local diffeomorphism wherever its source |
| 23 | and translated heights are positive (Section 12.5, pp. 309-319). -/ |
| 24 | theorem endAxialTranslation_isLocalDiffeomorphAt (e : StandardCylindricalEnd g) |
| 25 | (s : ℝ) {z : StandardCylinderSpace} (hz : 0 < z.2) (hsz : 0 < z.2 + s) : |
| 26 | IsLocalDiffeomorphAt (𝓡 3) (𝓡 3) ∞ (endAxialTranslation e s) |
| 27 | (e.coordinate z) := by |
| 28 | let V : ℝ → Set StandardCylinderSpace := fun r => univ ×ˢ Ioi (max 0 r) |
| 29 | have hpos : ∀ r, ∀ w ∈ V r, 0 < w.2 := |
| 30 | fun _ _ hw => (le_max_left _ _).trans_lt hw.2 |
| 31 | have hshift : ∀ r, ∀ w ∈ V (-r), 0 < w.2 + r := by |
| 32 | intro r w hw |
| 33 | have hh := (le_max_right 0 (-r)).trans_lt hw.2 |
| 34 | linarith |
| 35 | let D : PartialDiffeomorph (𝓡 3) (𝓡 3) StandardCapSpace StandardCapSpace ∞ := |
| 36 | { toFun := endAxialTranslation e s |
| 37 | invFun := endAxialTranslation e (-s) |
| 38 | source := e.coordinate '' V (-s) |
| 39 | target := e.coordinate '' V s |
| 40 | map_source' := by |
| 41 | rintro _ ⟨w, hw, rfl⟩ |
| 42 | rw [endAxialTranslation_coordinate e s (hpos _ _ hw).le] |
| 43 | refine ⟨(w.1, w.2 + s), ⟨mem_univ _, ?_⟩, rfl⟩ |
| 44 | change max 0 s < w.2 + s |
| 45 | exact max_lt_iff.mpr ⟨hshift s w hw, by have hh := hpos _ _ hw; linarith⟩ |
| 46 | map_target' := by |
| 47 | rintro _ ⟨w, hw, rfl⟩ |
| 48 | rw [endAxialTranslation_coordinate e (-s) (hpos _ _ hw).le] |
| 49 | refine ⟨(w.1, w.2 + -s), ⟨mem_univ _, ?_⟩, rfl⟩ |
| 50 | change max 0 (-s) < w.2 + -s |
| 51 | have hh := (le_max_right 0 s).trans_lt hw.2 |
| 52 | exact max_lt_iff.mpr ⟨by linarith, by have hp := hpos _ _ hw; linarith⟩ |
| 53 | left_inv' := by |
| 54 | rintro _ ⟨w, hw, rfl⟩ |
| 55 | rw [endAxialTranslation_coordinate e s (hpos _ _ hw).le, |
| 56 | endAxialTranslation_coordinate e (-s) (hshift s w hw).le] |
| 57 | simp |
| 58 | right_inv' := by |
| 59 | rintro _ ⟨w, hw, rfl⟩ |
| 60 | have hh := (le_max_right 0 s).trans_lt hw.2 |
| 61 | rw [endAxialTranslation_coordinate e (-s) (hpos _ _ hw).le, |
| 62 | endAxialTranslation_coordinate e s (show 0 ≤ w.2 + -s by linarith)] |
| 63 | simp |
| 64 | open_source := end_isOpen_coordinate_image e |
| 65 | (isOpen_univ.prod isOpen_Ioi) (hpos (-s)) |
| 66 | open_target := end_isOpen_coordinate_image e |
| 67 | (isOpen_univ.prod isOpen_Ioi) (hpos s) |
| 68 | contMDiffOn_toFun := by |
| 69 | rintro _ ⟨w, hw, rfl⟩ |
| 70 | exact (endAxialTranslation_contMDiffAt e s |
| 71 | (hpos _ _ hw) (hshift s w hw)).contMDiffWithinAt |
| 72 | contMDiffOn_invFun := by |
| 73 | rintro _ ⟨w, hw, rfl⟩ |
| 74 | have hh := (le_max_right 0 s).trans_lt hw.2 |
| 75 | exact (endAxialTranslation_contMDiffAt e (-s) |
| 76 | (hpos _ _ hw) (by linarith)).contMDiffWithinAt } |
| 77 | refine ⟨D, ⟨z, ⟨mem_univ _, max_lt_iff.mpr ⟨hz, by linarith⟩⟩, rfl⟩, ?_⟩ |
| 78 | exact fun _ _ => rfl |
| 79 | |
| 80 | /-- The fixed reference region contains an actual end point |
| 81 | (Section 12.5, pp. 309-319). -/ |
| 82 | instance endReferenceRegion_nonempty (e : StandardCylindricalEnd g) : |
| 83 | Nonempty (endReferenceRegion e) := by |
| 84 | let u : UnitTwoSphere := ⟨EuclideanSpace.single 0 1, by simp⟩ |
| 85 | exact ⟨⟨e.coordinate (u, 4), ⟨(u, 4), ⟨mem_univ _, by norm_num⟩, rfl⟩⟩⟩ |
| 86 | |
| 87 | /-- Restricting an actual translation to the canonical reference domain is |
| 88 | a local diffeomorphism (Section 12.5, pp. 309-319). -/ |
| 89 | theorem endReferenceTranslation_isLocalDiffeomorph (e : StandardCylindricalEnd g) |
| 90 | {s : ℝ} (hs : -3 < s) : |
| 91 | letI := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 92 | IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ |
| 93 | (fun x : endReferenceRegion e => endAxialTranslation e s x) := by |
| 94 | let := (endReferenceRegion_isOpen e).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 95 | intro x |
| 96 | have hi := Poincare.isLocalDiffeomorph_subtypeVal (𝓡 3) |
| 97 | (endReferenceRegion e) (endReferenceRegion_isOpen e) ∞ x |
| 98 | have ht : IsLocalDiffeomorphAt (𝓡 3) (𝓡 3) ∞ (endAxialTranslation e s) |
| 99 | (x : StandardCapSpace) := by |
| 100 | obtain ⟨z, hz, hx⟩ := x.property |
| 101 | rw [← hx] |
| 102 | have hh : 3 < z.2 := hz.2.1 |
| 103 | exact endAxialTranslation_isLocalDiffeomorphAt e s (by linarith) (by linarith) |
| 104 | exact hi.comp (𝓡 3) StandardCapSpace ht |
| 105 | |
| 106 | end PoincareMT.M34 |