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.Limit.Noncollapse.LimitNoncollapseClock |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.R.LimitRP2Charts |
| 3 | |
| 4 | /-! |
| 5 | # Actual source changes of generalized noncollapse cylinders |
| 6 | |
| 7 | Precomposition with an actual partial diffeomorphism preserves the full |
| 8 | cylinder, including its spacetime embedding and flow-box compatibility. |
| 9 | Source: Morgan--Tian, Proposition 17.1, pp. 407-408; reviewed |
| 10 | `derivations/limit-noncollapse-transfer.md`, section 6. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | variable {F : GeneralizedRicciFlowData.{u}} {C B : GeneralizedSliceCarrier.{u}} |
| 23 | {origin scale : ℝ} {I : Set ℝ} {U : Set C.carrier} |
| 24 | (e : GeneralizedFlowCylinder F C origin scale I U) |
| 25 | (D : PartialDiffeomorph (𝓡 3) (𝓡 3) B.carrier C.carrier ∞) |
| 26 | (V : Set B.carrier) (hV : V ⊆ D.source) (hmaps : MapsTo D V U) |
| 27 | |
| 28 | /-- The cylinder on an actual chart preimage, with its literal inverse |
| 29 | and inherited vertical worldlines; reviewed section 6. -/ |
| 30 | noncomputable def limitNoncollapseCylinderSource : |
| 31 | GeneralizedFlowCylinder F B origin scale I V := by |
| 32 | have himage (s : ℝ) (hs : s ∈ I) : |
| 33 | (e.forward s hs ∘ D) '' V ⊆ e.forward s hs '' U := by |
| 34 | rintro _ ⟨x, hx, rfl⟩ |
| 35 | exact ⟨D x, hmaps hx, rfl⟩ |
| 36 | refine { |
| 37 | scale_pos := e.scale_pos |
| 38 | forward := fun s hs => e.forward s hs ∘ D |
| 39 | inverse := fun s hs => D.symm ∘ e.inverse s hs |
| 40 | forward_smooth := fun s hs => (e.forward_smooth s hs).comp |
| 41 | (D.contMDiffOn.mono hV) hmaps |
| 42 | inverse_smooth := ?_ |
| 43 | left_inverse := ?_ |
| 44 | right_inverse := ?_ |
| 45 | embedding := ?_ |
| 46 | vertical_compatibility := fun s hs x hx => e.vertical_compatibility s hs _ (hmaps hx) |
| 47 | } |
| 48 | · intro s hs |
| 49 | apply D.symm.contMDiffOn.comp ((e.inverse_smooth s hs).mono (himage s hs)) |
| 50 | rintro _ ⟨x, hx, rfl⟩ |
| 51 | change e.inverse s hs (e.forward s hs (D x)) ∈ D.target |
| 52 | rw [e.left_inverse s hs (hmaps hx)] |
| 53 | exact D.map_source (hV hx) |
| 54 | · intro s hs x hx |
| 55 | dsimp only [Function.comp_apply] |
| 56 | rw [e.left_inverse s hs (hmaps hx)] |
| 57 | exact D.left_inv (hV hx) |
| 58 | · rintro s hs _ ⟨x, hx, rfl⟩ |
| 59 | dsimp only [Function.comp_apply] |
| 60 | rw [e.left_inverse s hs (hmaps hx)] |
| 61 | exact congrArg (fun z => e.forward s hs (D z)) (D.left_inv (hV hx)) |
| 62 | · have hd : Topology.IsEmbedding (fun x : V => D x.val) := |
| 63 | D.toOpenPartialHomeomorph.isEmbedding_restrict.comp |
| 64 | (Topology.IsEmbedding.inclusion hV) |
| 65 | exact e.embedding.comp (Topology.IsEmbedding.id.prodMap |
| 66 | (hd.codRestrict U (fun x => hmaps x.property))) |
| 67 | |
| 68 | /-- The new sigma-valued map is exactly the old worldline of the chart |
| 69 | image, including its physical clock; reviewed section 6. -/ |
| 70 | theorem limitNoncollapseCylinderSource_pointMap (s : ℝ) (hs : s ∈ I) |
| 71 | (x : B.carrier) : |
| 72 | (limitNoncollapseCylinderSource e D V hV hmaps).pointMap s hs x = |
| 73 | e.pointMap s hs (D x) := rfl |
| 74 | |
| 75 | /-- The metric readout uses the actual chart differential in both slots; |
| 76 | no metric comparison or isometry is assumed, reviewed section 6. -/ |
| 77 | theorem limitNoncollapseCylinderSource_pullbackInner (hU : IsOpen U) |
| 78 | (s : ℝ) (hs : s ∈ I) (x : B.carrier) (hx : x ∈ V) |
| 79 | (v w : TangentSpace (𝓡 3) x) : |
| 80 | (limitNoncollapseCylinderSource e D V hV hmaps).pullbackInner s hs x v w = |
| 81 | e.pullbackInner s hs (D x) |
| 82 | (mfderiv (𝓡 3) (𝓡 3) D x v) (mfderiv (𝓡 3) (𝓡 3) D x w) := by |
| 83 | have he := ((e.forward_smooth s hs).mdifferentiableOn (by simp) _ |
| 84 | (hmaps hx)).mdifferentiableAt (hU.mem_nhds (hmaps hx)) |
| 85 | have hd := (D.contMDiffOn.mdifferentiableOn (by simp) _ |
| 86 | (hV hx)).mdifferentiableAt (D.open_source.mem_nhds (hV hx)) |
| 87 | change scale * (F.metric _).inner ((e.forward s hs ∘ D) x) |
| 88 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs ∘ D) x v) |
| 89 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs ∘ D) x w) = _ |
| 90 | rw [mfderiv_comp x he hd] |
| 91 | rfl |
| 92 | |
| 93 | end PoincareMT.M47 |