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.CanonicalInduction.Generalized.GeneralizedBridgeGeometry |
| 2 | |
| 3 | /-! |
| 4 | # Exact coordinate changes in the regular history |
| 5 | |
| 6 | The supplied M33 forward and inverse maps identify each entire regular |
| 7 | physical region with its actual preimage. Coordinate pullbacks retain |
| 8 | the original metric wherever the coordinate lands in that region. |
| 9 | Source: Morgan--Tian Proposition 14.12 and Definition 9.78. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | variable {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 23 | (H : M33RegularHistoryData W) {t : ℝ} (ht : t ∈ H.generalized.interval) |
| 24 | |
| 25 | /-- An entire physical region in the actual regular image retains its |
| 26 | topology under the supplied history maps. -/ |
| 27 | noncomputable def regular_history_preimage_homeomorph |
| 28 | (U : Set (F.slice t).carrier) (hU : U ⊆ range (H.history.forward t ht)) : |
| 29 | (H.history.forward t ht ⁻¹' U) ≃ₜ U := by |
| 30 | classical |
| 31 | exact { |
| 32 | toFun x := ⟨H.history.forward t ht x.val, x.property⟩ |
| 33 | invFun y := ⟨H.history.inverse t ht y.val, by |
| 34 | change H.history.forward t ht (H.history.inverse t ht y.val) ∈ U |
| 35 | rw [H.history.right_inverse t ht (hU y.property)] |
| 36 | exact y.property⟩ |
| 37 | left_inv x := Subtype.ext (H.history.left_inverse t ht x.val) |
| 38 | right_inv y := Subtype.ext (H.history.right_inverse t ht (hU y.property)) |
| 39 | continuous_toFun := by |
| 40 | apply Continuous.subtype_mk |
| 41 | exact (H.history.forward_smooth t ht).continuous.comp continuous_subtype_val |
| 42 | continuous_invFun := by |
| 43 | apply Continuous.subtype_mk |
| 44 | exact (H.history.inverse_smooth t ht).continuousOn.comp_continuous |
| 45 | continuous_subtype_val (fun y : U => hU y.property) |
| 46 | } |
| 47 | |
| 48 | /-- The actual inverse history coordinate retains the literal unscaled |
| 49 | metric pullback on its open spatial domain. -/ |
| 50 | theorem regular_history_coordinate_pullback |
| 51 | {V : Set RoundCylinderSpace} (hV : IsOpen V) |
| 52 | (c : RoundCylinderSpace → (F.slice t).carrier) |
| 53 | (hc : ContMDiffOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ c V) |
| 54 | (himage : MapsTo c V (range (H.history.forward t ht))) |
| 55 | (z : RoundCylinderSpace) (hz : z ∈ V) |
| 56 | (v w : TangentSpace ((𝓡 2).prod 𝓘(ℝ, ℝ)) z) : |
| 57 | roundCylinderPullback (H.generalized.metric t) (H.history.inverse t ht ∘ c) z v w = |
| 58 | roundCylinderPullback (F.metric t) c z v w := by |
| 59 | let k := H.history.inverse t ht ∘ c |
| 60 | have hk : ContMDiffOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ k V := |
| 61 | (H.history.inverse_smooth t ht).comp hc himage |
| 62 | have hfk : (H.history.forward t ht ∘ k) =ᶠ[𝓝 z] c := by |
| 63 | filter_upwards [hV.mem_nhds hz] with q hq |
| 64 | exact H.history.right_inverse t ht (himage hq) |
| 65 | have hf := (H.history.forward_smooth t ht).mdifferentiable (by simp) (k z) |
| 66 | have hkd := ((hk.mdifferentiableOn (by simp)) z hz).mdifferentiableAt (hV.mem_nhds hz) |
| 67 | have hderiv : (mfderiv (𝓡 3) (𝓡 3) (H.history.forward t ht) (k z)).comp |
| 68 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) k z) = |
| 69 | mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) c z := by |
| 70 | rw [← mfderiv_comp z hf hkd] |
| 71 | exact hfk.mfderiv_eq |
| 72 | unfold roundCylinderPullback |
| 73 | change (H.generalized.metric t).inner (k z) _ _ = _ |
| 74 | rw [← H.history.metric_pullback t ht (k z)] |
| 75 | change (F.metric t).inner (H.history.forward t ht (k z)) |
| 76 | (((mfderiv (𝓡 3) (𝓡 3) (H.history.forward t ht) (k z)).comp |
| 77 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) k z)) v) |
| 78 | (((mfderiv (𝓡 3) (𝓡 3) (H.history.forward t ht) (k z)).comp |
| 79 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) k z)) w) = _ |
| 80 | rw [hderiv] |
| 81 | have hpoint : H.history.forward t ht (k z) = c z := hfk.eq_of_nhds |
| 82 | rw [hpoint] |
| 83 | |
| 84 | end PoincareMT.M47 |