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.Induction.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.CylinderOpenImage |
| 3 | |
| 4 | /-! |
| 5 | # Actual cylinder image neighborhoods at included time endpoints |
| 6 | |
| 7 | Proposition 16.13 and Lemma 16.15, pp. 377-381. At an included birth |
| 8 | point the tracked image contains a neighborhood relative to its actual |
| 9 | physical clock interval. Local product factorization proves this |
| 10 | without an inverse-function theorem at a manifold boundary. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- The selected interval charts retain their actual subtype topologies. |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter Function |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M12 |
| 23 | end PoincareMT.Proofs.M12 |
| 24 | open PoincareMT.EpochExtension.Spacetime |
| 25 | local notation "GeneralizedFlowCarrierConclusion" => PoincareMT.GeneralizedFlowCarrierConclusionWithInterval |
| 26 | |
| 27 | namespace PoincareMT.Proofs.M46 |
| 28 | |
| 29 | open PoincareMT.Proofs.M12 |
| 30 | |
| 31 | private theorem interval_inclusion_map_nhds |
| 32 | {L B K : Set ℝ} (hLK : L ⊆ K) (hLB : L ⊆ B) |
| 33 | (hopen : IsOpen {t : K | t.val ∈ L}) (p : L) : |
| 34 | map (Set.inclusion hLB) (𝓝 p) = |
| 35 | 𝓝[{t : B | t.val ∈ K}] (Set.inclusion hLB p) := by |
| 36 | obtain ⟨O, hO, hLO⟩ := isOpen_induced_iff.mp hopen |
| 37 | have hrange : range (Set.inclusion hLB) = {t : B | t.val ∈ L} := by |
| 38 | ext t |
| 39 | constructor |
| 40 | · rintro ⟨s, rfl⟩ |
| 41 | exact s.property |
| 42 | · intro ht |
| 43 | exact ⟨⟨t.val, ht⟩, rfl⟩ |
| 44 | have hpO : p.val ∈ O := by |
| 45 | have hp : (⟨p.val, hLK p.property⟩ : K) ∈ {t : K | t.val ∈ L} := p.property |
| 46 | rwa [← hLO] at hp |
| 47 | have hemb : Topology.IsEmbedding (Set.inclusion hLB) := Topology.IsEmbedding.inclusion hLB |
| 48 | have hmap := hemb.map_nhds_eq p |
| 49 | rw [hmap, hrange] |
| 50 | apply nhdsWithin_eq_nhdsWithin (s := (Subtype.val : B → ℝ) ⁻¹' O) hpO |
| 51 | (hO.preimage continuous_subtype_val) |
| 52 | ext t |
| 53 | constructor |
| 54 | · rintro ⟨htL, htO⟩ |
| 55 | exact ⟨hLK htL, htO⟩ |
| 56 | · rintro ⟨htK, htO⟩ |
| 57 | refine ⟨?_, htO⟩ |
| 58 | have ht : (⟨t.val, htK⟩ : K) ∈ (Subtype.val : K → ℝ) ⁻¹' O := htO |
| 59 | rwa [hLO] at ht |
| 60 | |
| 61 | variable {F : GeneralizedRicciFlowData.{u}} |
| 62 | (R : GeneralizedFlowCarrierConclusion (flowBoxAtlas F)) |
| 63 | {C : GeneralizedSliceCarrier.{u}} {a q : ℝ} {J : SpacetimeInterval} |
| 64 | {U : TopologicalSpace.Opens C.carrier} |
| 65 | (e : GeneralizedFlowCylinder F C a q J.domain U) |
| 66 | |
| 67 | /-- The actual raw-cylinder image contains the whole local clock strip |
| 68 | at every included source point, including a regular birth endpoint. |
| 69 | Source: Proposition 16.13 and Lemma 16.15, pp. 377-381. -/ |
| 70 | theorem rawCylinder_map_nhds_eq_nhdsWithin_clock |
| 71 | (hI : (cylinderPhysicalInterval a q e.scale_pos J).domain ⊆ F.interval) |
| 72 | (p : (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)).Point × U) : |
| 73 | map (rawCylinderMap R e) (𝓝 p) = |
| 74 | 𝓝[R.spacetime.timeFunction ⁻¹' |
| 75 | (cylinderPhysicalInterval a q e.scale_pos J).domain] (rawCylinderMap R e p) := by |
| 76 | obtain ⟨D⟩ := rawCylinderLocalFactor_exists R e hI p |
| 77 | let K := cylinderPhysicalInterval a q e.scale_pos J |
| 78 | let pL : (R.timeIntervals.interval D.interval).Point × U := |
| 79 | (⟨p.1.val, D.center_mem⟩, p.2) |
| 80 | let pB : (R.timeIntervals.interval (boxInterval F D.box)).Point × |
| 81 | (F.box D.box).carrier.carrier := |
| 82 | (⟨p.1.val, D.box_subset D.center_mem⟩, D.spatial p.2) |
| 83 | let inc := spacetimeIntervalInclusion (R.timeIntervals.interval D.interval) |
| 84 | (R.timeIntervals.interval K) D.subset |
| 85 | let incB := spacetimeIntervalInclusion (R.timeIntervals.interval D.interval) |
| 86 | (R.timeIntervals.interval (boxInterval F D.box)) D.box_subset |
| 87 | have hinc : IsLocalDiffeomorph (𝓡∂ 1) (𝓡∂ 1) ∞ inc := |
| 88 | R.interval_localDiffeomorph _ _ D.subset D.relatively_open |
| 89 | have hmap : map (Prod.map inc (id : U → U)) (𝓝 pL) = 𝓝 p := |
| 90 | (hinc.isOpenMap.prodMap IsOpenMap.id).map_nhds_eq |
| 91 | (hinc.contMDiff.continuous.prodMap continuous_id).continuousAt |
| 92 | have hspace : map D.spatial (𝓝 p.2) = 𝓝 (D.spatial p.2) := by |
| 93 | apply Poincare.map_nhds_eq_of_contMDiffAt_mfderiv_bijective D.spatial_smooth |
| 94 | let L : EuclideanSpace ℝ (Fin 3) ≃ₗ[ℝ] EuclideanSpace ℝ (Fin 3) := |
| 95 | LinearEquiv.ofInjectiveEndo |
| 96 | (mfderiv (𝓡 3) (𝓡 3) D.spatial p.2).toLinearMap D.spatial_injective |
| 97 | exact L.bijective |
| 98 | have htime : map incB (𝓝 pL.1) = |
| 99 | 𝓝[{t : (R.timeIntervals.interval (boxInterval F D.box)).Point | |
| 100 | t.val ∈ K.domain}] pB.1 := |
| 101 | interval_inclusion_map_nhds D.subset D.box_subset D.relatively_open pL.1 |
| 102 | let V : Set ((R.timeIntervals.interval (boxInterval F D.box)).Point × |
| 103 | (F.box D.box).carrier.carrier) := {z | z.1.val ∈ K.domain} |
| 104 | have hbox : map (Prod.map incB D.spatial) (𝓝 pL) = 𝓝[V] pB := by |
| 105 | rw [nhds_prod_eq, ← Filter.prod_map_map_eq', htime, hspace] |
| 106 | have hV : V = {t | t.val ∈ K.domain} ×ˢ univ := by |
| 107 | ext z |
| 108 | simp only [V, mem_ofPred_eq, mem_prod, mem_univ, and_true] |
| 109 | rw [hV, nhdsWithin_prod_eq, nhdsWithin_univ] |
| 110 | have hbase : rawCylinderMap R e p = originalBoxMap F R D.box pB := |
| 111 | D.local_eq.eq_of_nhds |
| 112 | calc |
| 113 | _ = map (rawCylinderMap R e ∘ Prod.map inc id) (𝓝 pL) := by |
| 114 | rw [← map_map, hmap] |
| 115 | _ = map (originalBoxMap F R D.box ∘ Prod.map incB D.spatial) (𝓝 pL) := |
| 116 | Filter.map_congr D.local_eq |
| 117 | _ = map (originalBoxMap F R D.box) (𝓝[V] pB) := by rw [← map_map, hbox] |
| 118 | _ = 𝓝[R.spacetime.timeFunction ⁻¹' K.domain] |
| 119 | (originalBoxMap F R D.box pB) := |
| 120 | (F.box_openEmbedding D.box).map_nhdsWithin_preimage_eq |
| 121 | (R.spacetime.timeFunction ⁻¹' K.domain) pB |
| 122 | _ = _ := congrArg (nhdsWithin · (R.spacetime.timeFunction ⁻¹' K.domain)) hbase.symm |
| 123 | |
| 124 | /-- Relative capture is an actual neighborhood membership and can be |
| 125 | pulled back by any continuous path whose clock stays in the included |
| 126 | physical interval. Source: Lemma 16.15, pp. 379-381. -/ |
| 127 | theorem rawCylinder_range_mem_nhdsWithin_clock |
| 128 | (hI : (cylinderPhysicalInterval a q e.scale_pos J).domain ⊆ F.interval) |
| 129 | (p : (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)).Point × U) : |
| 130 | range (rawCylinderMap R e) ∈ |
| 131 | 𝓝[R.spacetime.timeFunction ⁻¹' |
| 132 | (cylinderPhysicalInterval a q e.scale_pos J).domain] (rawCylinderMap R e p) := by |
| 133 | rw [← rawCylinder_map_nhds_eq_nhdsWithin_clock R e hI p] |
| 134 | exact range_mem_map |
| 135 | |
| 136 | end PoincareMT.Proofs.M46 |