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.Blowup.Controlled.Geometry |
| 2 | |
| 3 | /-! |
| 4 | # Exact clocks for generalized noncollapse cylinders |
| 5 | |
| 6 | An affine clock change retains the actual points, smooth maps, embedding, |
| 7 | and vertical flow-box compatibility. The metric readout retains both |
| 8 | differential slots. Source: Morgan--Tian, Proposition 17.1, pp. 407-408; |
| 9 | reviewed `derivations/limit-noncollapse-transfer.md`, section 6. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M47 |
| 20 | |
| 21 | variable {F : GeneralizedRicciFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 22 | {origin scale : ℝ} {I : Set ℝ} {U : Set C.carrier} |
| 23 | (e : GeneralizedFlowCylinder F C origin scale I U) |
| 24 | |
| 25 | private noncomputable def clockForward (s : ℝ) (hs : s ∈ I) |
| 26 | (t : ℝ) (h : t = origin + s / scale) : C.carrier → (F.slice t).carrier := by |
| 27 | subst t |
| 28 | exact e.forward s hs |
| 29 | |
| 30 | private noncomputable def clockInverse (s : ℝ) (hs : s ∈ I) |
| 31 | (t : ℝ) (h : t = origin + s / scale) : (F.slice t).carrier → C.carrier := by |
| 32 | subst t |
| 33 | exact e.inverse s hs |
| 34 | |
| 35 | private theorem clockForward_smooth (s : ℝ) (hs : s ∈ I) |
| 36 | (t : ℝ) (h : t = origin + s / scale) : |
| 37 | ContMDiffOn (𝓡 3) (𝓡 3) ∞ (clockForward e s hs t h) U := by |
| 38 | subst t |
| 39 | exact e.forward_smooth s hs |
| 40 | |
| 41 | private theorem clockInverse_smooth (s : ℝ) (hs : s ∈ I) |
| 42 | (t : ℝ) (h : t = origin + s / scale) : |
| 43 | ContMDiffOn (𝓡 3) (𝓡 3) ∞ (clockInverse e s hs t h) |
| 44 | (clockForward e s hs t h '' U) := by |
| 45 | subst t |
| 46 | exact e.inverse_smooth s hs |
| 47 | |
| 48 | private theorem clock_left_inverse (s : ℝ) (hs : s ∈ I) |
| 49 | (t : ℝ) (h : t = origin + s / scale) : |
| 50 | LeftInvOn (clockInverse e s hs t h) (clockForward e s hs t h) U := by |
| 51 | subst t |
| 52 | exact e.left_inverse s hs |
| 53 | |
| 54 | private theorem clock_right_inverse (s : ℝ) (hs : s ∈ I) |
| 55 | (t : ℝ) (h : t = origin + s / scale) : |
| 56 | LeftInvOn (clockForward e s hs t h) (clockInverse e s hs t h) |
| 57 | (clockForward e s hs t h '' U) := by |
| 58 | subst t |
| 59 | exact e.right_inverse s hs |
| 60 | |
| 61 | private theorem clockForward_point (s : ℝ) (hs : s ∈ I) |
| 62 | (t : ℝ) (h : t = origin + s / scale) (x : C.carrier) : |
| 63 | (⟨t, clockForward e s hs t h x⟩ : F.point) = e.pointMap s hs x := by |
| 64 | subst t |
| 65 | rfl |
| 66 | |
| 67 | private theorem clockForward_inner (s : ℝ) (hs : s ∈ I) |
| 68 | (t : ℝ) (h : t = origin + s / scale) (x : C.carrier) |
| 69 | (v w : TangentSpace (𝓡 3) x) : |
| 70 | (F.metric t).inner (clockForward e s hs t h x) |
| 71 | (mfderiv (𝓡 3) (𝓡 3) (clockForward e s hs t h) x v) |
| 72 | (mfderiv (𝓡 3) (𝓡 3) (clockForward e s hs t h) x w) = |
| 73 | (F.metric (origin + s / scale)).inner (e.forward s hs x) |
| 74 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) x v) |
| 75 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) x w) := by |
| 76 | subst t |
| 77 | rfl |
| 78 | |
| 79 | private theorem clockForward_vertical (s : ℝ) (hs : s ∈ I) |
| 80 | (t : ℝ) (h : t = origin + s / scale) (x : C.carrier) |
| 81 | (b : F.box_index) (y : (F.box b).carrier.carrier) |
| 82 | (hb : origin + s / scale ∈ (F.box b).interval) |
| 83 | (he : e.forward s hs x = (F.box b).forward (origin + s / scale) hb y) : |
| 84 | ∃ ht : t ∈ (F.box b).interval, |
| 85 | clockForward e s hs t h x = (F.box b).forward t ht y := by |
| 86 | subst t |
| 87 | exact ⟨hb, he⟩ |
| 88 | |
| 89 | variable (a : ℝ) {J : Set ℝ} (hrange : MapsTo (fun s => a + scale * s) J I) |
| 90 | |
| 91 | include e in |
| 92 | private theorem physicalClock (s : ℝ) : |
| 93 | (origin + a / scale) + s / 1 = origin + (a + scale * s) / scale := by |
| 94 | rw [div_one, add_div, mul_div_cancel_left₀ _ e.scale_pos.ne'] |
| 95 | ring |
| 96 | |
| 97 | /-- The physical unit-speed clock based at parameter `a`, with the original |
| 98 | maps transported along the exact clock identity; reviewed section 6. -/ |
| 99 | noncomputable def limitNoncollapseCylinderReclock : |
| 100 | GeneralizedFlowCylinder F C (origin + a / scale) 1 J U := by |
| 101 | refine { |
| 102 | scale_pos := by norm_num |
| 103 | forward := fun s hs => clockForward e (a + scale * s) (hrange hs) _ |
| 104 | (physicalClock e a s) |
| 105 | inverse := fun s hs => clockInverse e (a + scale * s) (hrange hs) _ |
| 106 | (physicalClock e a s) |
| 107 | forward_smooth := fun s hs => clockForward_smooth e _ (hrange hs) _ |
| 108 | (physicalClock e a s) |
| 109 | inverse_smooth := fun s hs => clockInverse_smooth e _ (hrange hs) _ |
| 110 | (physicalClock e a s) |
| 111 | left_inverse := fun s hs => clock_left_inverse e _ (hrange hs) _ |
| 112 | (physicalClock e a s) |
| 113 | right_inverse := fun s hs => clock_right_inverse e _ (hrange hs) _ |
| 114 | (physicalClock e a s) |
| 115 | embedding := ?_ |
| 116 | vertical_compatibility := ?_ |
| 117 | } |
| 118 | · have hphi : Topology.IsEmbedding (fun s : ℝ => a + scale * s) := |
| 119 | (Homeomorph.addLeft a).isEmbedding.comp |
| 120 | (Homeomorph.mulLeft₀ scale e.scale_pos.ne').isEmbedding |
| 121 | have h := e.embedding.comp ((hphi.restrict hrange).prodMap Topology.IsEmbedding.id) |
| 122 | have heq : |
| 123 | (fun p : J × U => |
| 124 | (⟨(origin + a / scale) + p.1.1 / 1, |
| 125 | clockForward e (a + scale * p.1.1) (hrange p.1.2) _ |
| 126 | (physicalClock e a p.1.1) p.2.1⟩ : F.point)) = |
| 127 | (fun p : J × U => e.pointMap (a + scale * p.1.1) (hrange p.1.2) p.2.1) := by |
| 128 | funext p |
| 129 | exact clockForward_point e _ _ _ _ _ |
| 130 | rw [heq] |
| 131 | exact h |
| 132 | · intro s hs x hx |
| 133 | obtain ⟨b, y, δ, hδ, h⟩ := e.vertical_compatibility _ (hrange hs) x hx |
| 134 | refine ⟨b, y, δ / scale, div_pos hδ e.scale_pos, ?_⟩ |
| 135 | intro s' hs' hnear |
| 136 | have hnear' : |(a + scale * s') - (a + scale * s)| < δ := by |
| 137 | rw [show (a + scale * s') - (a + scale * s) = scale * (s' - s) by ring, |
| 138 | abs_mul, abs_of_pos e.scale_pos] |
| 139 | have hbound := (lt_div_iff₀ e.scale_pos).mp hnear |
| 140 | nlinarith |
| 141 | obtain ⟨hb, he⟩ := h _ (hrange hs') hnear' |
| 142 | exact clockForward_vertical e _ _ _ (physicalClock e a s') x b y hb he |
| 143 | |
| 144 | /-- The reclocked sigma point is the original point at the affine parameter, |
| 145 | including the literal physical time; reviewed section 6. -/ |
| 146 | theorem limitNoncollapseCylinderReclock_pointMap (s : ℝ) (hs : s ∈ J) |
| 147 | (x : C.carrier) : |
| 148 | (limitNoncollapseCylinderReclock e a hrange).pointMap s hs x = |
| 149 | e.pointMap (a + scale * s) (hrange hs) x := |
| 150 | clockForward_point e _ _ _ (physicalClock e a s) _ |
| 151 | |
| 152 | /-- The actual rescaled metric changes only by its displayed normalization; |
| 153 | both differential slots are transported with the whole map, section 6. -/ |
| 154 | theorem limitNoncollapseCylinderReclock_pullbackInner (s : ℝ) (hs : s ∈ J) |
| 155 | (x : C.carrier) (v w : TangentSpace (𝓡 3) x) : |
| 156 | (limitNoncollapseCylinderReclock e a hrange).pullbackInner s hs x v w = |
| 157 | e.pullbackInner (a + scale * s) (hrange hs) x v w / scale := by |
| 158 | change 1 * (F.metric _).inner |
| 159 | (clockForward e _ _ _ (physicalClock e a s) x) |
| 160 | (mfderiv (𝓡 3) (𝓡 3) (clockForward e _ _ _ (physicalClock e a s)) x v) |
| 161 | (mfderiv (𝓡 3) (𝓡 3) (clockForward e _ _ _ (physicalClock e a s)) x w) = _ |
| 162 | rw [one_mul, clockForward_inner] |
| 163 | simp only [GeneralizedFlowCylinder.pullbackInner, |
| 164 | mul_div_cancel_left₀ _ e.scale_pos.ne'] |
| 165 | |
| 166 | end PoincareMT.M47 |