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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Topology.Manifold.NeckCap.Theory |
| 3 | |
| 4 | /-! |
| 5 | # Transport of the actual smooth cap model |
| 6 | |
| 7 | Morgan--Tian Definition 9.72, pp. 230-231, and Proposition 9.79, |
| 8 | pp. 232-234. An actual partial diffeomorphism transports every field of |
| 9 | the frozen smooth model witness. This same-universe construction keeps |
| 10 | the model type and its standard smooth witness unchanged. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | open Set Function |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.CapModelEquivalence |
| 21 | |
| 22 | variable {M M' : Type u} [TopologicalSpace M] [TopologicalSpace M'] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M'] |
| 25 | [IsManifold (𝓡 3) ∞ M] [IsManifold (𝓡 3) ∞ M'] |
| 26 | |
| 27 | /-- Transport the complete frozen smooth-model equivalence through an |
| 28 | actual partial diffeomorphism on its carrier, as required by the cap |
| 29 | recut in Proposition 9.79, pp. 232-234. Both ambient manifolds and the |
| 30 | retained model live in the same universe. -/ |
| 31 | noncomputable def transport_m28 {kind : CapModelKind} {p : RealProjectiveThree} {V : Set M} |
| 32 | (C : CapModelEquivalence kind p V) |
| 33 | (e : PartialDiffeomorph (𝓡 3) (𝓡 3) M M' ∞) (hsource : e.source = V) : |
| 34 | CapModelEquivalence kind p e.target where |
| 35 | model := C.model |
| 36 | model_topology := C.model_topology |
| 37 | model_charted := C.model_charted |
| 38 | model_manifold := C.model_manifold |
| 39 | standard_model := C.standard_model |
| 40 | standard_smooth := C.standard_smooth |
| 41 | forward := C.forward ∘ e.symm |
| 42 | inverse := e ∘ C.inverse |
| 43 | inverse_mem y := e.map_source (hsource.symm ▸ C.inverse_mem y) |
| 44 | left_inverse x hx := by |
| 45 | change e (C.inverse (C.forward (e.symm x))) = x |
| 46 | rw [C.left_inverse _ (hsource ▸ e.map_target hx)] |
| 47 | exact e.right_inv hx |
| 48 | right_inverse y := by |
| 49 | change C.forward (e.symm (e (C.inverse y))) = y |
| 50 | exact (congrArg C.forward (e.left_inv (hsource.symm ▸ C.inverse_mem y))).trans |
| 51 | (C.right_inverse y) |
| 52 | forward_smooth := by |
| 53 | let := C.model_topology |
| 54 | let := C.model_charted |
| 55 | let := C.model_manifold |
| 56 | exact C.forward_smooth.comp e.contMDiffOn_invFun |
| 57 | (fun _ hx => hsource ▸ e.map_target hx) |
| 58 | inverse_smooth := by |
| 59 | let := C.model_topology |
| 60 | let := C.model_charted |
| 61 | let := C.model_manifold |
| 62 | exact e.contMDiffOn_toFun.comp C.inverse_smooth |
| 63 | (fun y _ => hsource.symm ▸ C.inverse_mem y) |
| 64 | |
| 65 | end PoincareMT.CapModelEquivalence |