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 | # The actual cap model on an open ambient subtype |
| 6 | |
| 7 | Restriction to the literal canonical union retains the original model |
| 8 | type, standard smooth witness, and puncture. The inverse model map lifts |
| 9 | because its entire image lies in the cap carrier. This is exact open |
| 10 | restriction for relative A.8, not varying-source cap persistence. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.CapModelEquivalence |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [IsManifold (𝓡 3) ∞ M] |
| 26 | |
| 27 | /-- The original same-universe smooth model gives the model of the |
| 28 | literal preimage carrier in any containing open ambient region. -/ |
| 29 | noncomputable def restrictOpen {kind : CapModelKind} {p : RealProjectiveThree} |
| 30 | {S : Set M} (A : CapModelEquivalence kind p S) |
| 31 | (V : TopologicalSpace.Opens M) (hSV : S ⊆ (V : Set M)) : |
| 32 | CapModelEquivalence kind p ((Subtype.val : V → M) ⁻¹' S) where |
| 33 | model := A.model |
| 34 | model_topology := A.model_topology |
| 35 | model_charted := A.model_charted |
| 36 | model_manifold := A.model_manifold |
| 37 | standard_model := A.standard_model |
| 38 | standard_smooth := A.standard_smooth |
| 39 | forward := A.forward ∘ Subtype.val |
| 40 | inverse y := ⟨A.inverse y, hSV (A.inverse_mem y)⟩ |
| 41 | inverse_mem y := A.inverse_mem y |
| 42 | left_inverse x hx := Subtype.ext (A.left_inverse x hx) |
| 43 | right_inverse y := A.right_inverse y |
| 44 | forward_smooth := by |
| 45 | let := A.model_topology |
| 46 | let := A.model_charted |
| 47 | let := A.model_manifold |
| 48 | exact A.forward_smooth.comp |
| 49 | (contMDiff_subtype_val (I := 𝓡 3) (U := V)).contMDiffOn |
| 50 | (fun _ hx => hx) |
| 51 | inverse_smooth := by |
| 52 | let := A.model_topology |
| 53 | let := A.model_charted |
| 54 | let := A.model_manifold |
| 55 | intro y hy |
| 56 | apply (ContMDiffWithinAt.subtypeVal_comp_iff V _ univ y).mp |
| 57 | exact A.inverse_smooth y hy |
| 58 | |
| 59 | end PoincareMT.CapModelEquivalence |