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.StandardCap.Existence.Geometry.CanonicalGeometry.CapBallVolumeImage |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Collar.Bounds.BufferBalls |
| 3 | |
| 4 | /-! |
| 5 | # Actual terminal ball transfer through the open source map |
| 6 | |
| 7 | MT Theorem 1.36, p. 20, and Lemma 16.8, pp. 372-373. The given |
| 8 | partial diffeomorphism has its entire actual source as domain. A retained |
| 9 | ambient ball supplies both ball equality and calibrated volume equality. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set MeasureTheory |
| 16 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 17 | |
| 18 | universe u v |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | variable {M : Type u} {N : Type v} [TopologicalSpace M] [TopologicalSpace N] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) N] |
| 25 | [IsManifold (𝓡 3) ∞ M] [IsManifold (𝓡 3) ∞ N] |
| 26 | |
| 27 | /-- The actual source map decreases intrinsic distance, without a |
| 28 | connectedness or completeness premise; MT Lemma 16.8. -/ |
| 29 | theorem terminalSourceNormal_edist_le |
| 30 | (g : RiemannianMetric 3 M) (h : RiemannianMetric 3 N) |
| 31 | (e : PartialDiffeomorph (𝓡 3) (𝓡 3) M N ∞) (hsource : e.source = univ) |
| 32 | (hmetric : ∀ x (v w : TangentSpace (𝓡 3) x), |
| 33 | g.inner x v w = h.inner (e x) |
| 34 | (mfderiv (𝓡 3) (𝓡 3) e x v) (mfderiv (𝓡 3) (𝓡 3) e x w)) |
| 35 | (x y : M) : h.edist (e x) (e y) ≤ g.edist x y := by |
| 36 | have he : ContMDiff (𝓡 3) (𝓡 3) ∞ e := |
| 37 | contMDiffOn_univ.mp (hsource ▸ e.contMDiffOn) |
| 38 | exact g.edist_comp_le_of_pullback_bound h he |
| 39 | (fun z v => (hmetric z v v).symm.le) x y |
| 40 | |
| 41 | variable [T3Space M] |
| 42 | |
| 43 | /-- A retained ambient ball is exactly the image of the intrinsic source |
| 44 | ball through the actual map; MT Theorem 1.36 and Lemma 16.8. -/ |
| 45 | theorem terminalSourceNormal_ball_image |
| 46 | (g : RiemannianMetric 3 M) (h : RiemannianMetric 3 N) |
| 47 | (e : PartialDiffeomorph (𝓡 3) (𝓡 3) M N ∞) (hsource : e.source = univ) |
| 48 | (hmetric : ∀ x (v w : TangentSpace (𝓡 3) x), |
| 49 | g.inner x v w = h.inner (e x) |
| 50 | (mfderiv (𝓡 3) (𝓡 3) e x v) (mfderiv (𝓡 3) (𝓡 3) e x w)) |
| 51 | (p : M) (r : ℝ) (hcover : h.ball (e p) r ⊆ e.target) : |
| 52 | e '' g.ball p r = h.ball (e p) r := by |
| 53 | have hf : ContMDiffOn (𝓡 3) (𝓡 3) 1 e e.source := e.contMDiffOn.of_le (by simp) |
| 54 | have hi : ContMDiffOn (𝓡 3) (𝓡 3) 1 e.symm e.target := |
| 55 | e.symm.contMDiffOn.of_le (by simp) |
| 56 | have hn (x : M) (v : TangentSpace (𝓡 3) x) : |
| 57 | g.tangentNorm x v = h.tangentNorm (e x) (mfderiv (𝓡 3) (𝓡 3) e x v) := |
| 58 | congrArg Real.sqrt (hmetric x v v) |
| 59 | apply Subset.antisymm |
| 60 | · rintro _ ⟨x, hx, rfl⟩ |
| 61 | exact (terminalSourceNormal_edist_le g h e hsource hmetric p x).trans_lt hx |
| 62 | · have hb := g.ball_subset_image_ball_of_forward_tangentNorm_le h |
| 63 | e.toOpenPartialHomeomorph hf hi (hsource.symm ▸ mem_univ p) zero_lt_one hcover |
| 64 | (fun x _hx _hd v => by |
| 65 | change g.tangentNorm x v ≤ |
| 66 | 1 * h.tangentNorm (e x) (mfderiv (𝓡 3) (𝓡 3) e x v) |
| 67 | rw [hn, one_mul]) |
| 68 | change h.ball (e p) r ⊆ e '' (g.ball p (1 * r) ∩ e.source) at hb |
| 69 | simpa only [one_mul, hsource, inter_univ] using hb |
| 70 | |
| 71 | variable [T3Space N] [MeasurableSpace M] [BorelSpace M] |
| 72 | [MeasurableSpace N] [BorelSpace N] |
| 73 | [SecondCountableTopology M] [SecondCountableTopology N] |
| 74 | |
| 75 | /-- Opposite local image-volume inequalities identify the actual source |
| 76 | and retained ambient ball volumes; MT Theorem 1.36. -/ |
| 77 | theorem terminalSourceNormal_ball_volume |
| 78 | (g : RiemannianMetric 3 M) (h : RiemannianMetric 3 N) |
| 79 | (e : PartialDiffeomorph (𝓡 3) (𝓡 3) M N ∞) (hsource : e.source = univ) |
| 80 | (hmetric : ∀ x (v w : TangentSpace (𝓡 3) x), |
| 81 | g.inner x v w = h.inner (e x) |
| 82 | (mfderiv (𝓡 3) (𝓡 3) e x v) (mfderiv (𝓡 3) (𝓡 3) e x w)) |
| 83 | (p : M) (r : ℝ) (hcover : h.ball (e p) r ⊆ e.target) : |
| 84 | calibratedMetricVolume g (g.ball p r) = calibratedMetricVolume h (h.ball (e p) r) := by |
| 85 | let : EMetricSpace M := g.comparisonEMetric |
| 86 | have hopen : IsOpen (g.ball p r) := |
| 87 | isOpen_lt (continuous_const.edist continuous_id) continuous_const |
| 88 | have hf : ContMDiffOn (𝓡 3) (𝓡 3) 1 e e.source := e.contMDiffOn.of_le (by simp) |
| 89 | have hi : ContMDiffOn (𝓡 3) (𝓡 3) 1 e.symm e.target := |
| 90 | e.symm.contMDiffOn.of_le (by simp) |
| 91 | have hn (x : M) (v : TangentSpace (𝓡 3) x) : |
| 92 | g.tangentNorm x v = h.tangentNorm (e x) (mfderiv (𝓡 3) (𝓡 3) e x v) := |
| 93 | congrArg Real.sqrt (hmetric x v v) |
| 94 | have hsub : g.ball p r ⊆ e.source := hsource.symm ▸ subset_univ _ |
| 95 | have hupper := M34.calibratedMetricVolume_image_le_of_local_tangentNorm_le g h |
| 96 | e.toOpenPartialHomeomorph hf zero_lt_one |
| 97 | (fun x _hx v => by |
| 98 | change h.tangentNorm (e x) (mfderiv (𝓡 3) (𝓡 3) e x v) ≤ 1 * g.tangentNorm x v |
| 99 | rw [← hn, one_mul]) hopen.measurableSet hsub |
| 100 | have hlower := M34.calibratedMetricVolume_le_mul_image_of_local_tangentNorm_lower g h |
| 101 | e.toOpenPartialHomeomorph hf hi zero_lt_one |
| 102 | (fun x _hx v => by |
| 103 | change g.tangentNorm x v ≤ 1 * h.tangentNorm (e x) (mfderiv (𝓡 3) (𝓡 3) e x v) |
| 104 | rw [hn, one_mul]) hopen.measurableSet hsub |
| 105 | have himage := terminalSourceNormal_ball_image g h e hsource hmetric p r hcover |
| 106 | change calibratedMetricVolume h (e '' g.ball p r) ≤ _ at hupper |
| 107 | change _ ≤ ENNReal.ofReal 1 ^ 3 * calibratedMetricVolume h (e '' g.ball p r) at hlower |
| 108 | rw [himage] at hupper hlower |
| 109 | simp only [ENNReal.ofReal_one, one_pow, one_mul] at hlower hupper |
| 110 | exact le_antisymm hlower hupper |
| 111 | |
| 112 | omit [T3Space M] [T3Space N] [MeasurableSpace M] [BorelSpace M] |
| 113 | [MeasurableSpace N] [BorelSpace N] |
| 114 | [SecondCountableTopology M] [SecondCountableTopology N] in |
| 115 | /-- A compact ambient ball closure contained in the actual image supplies |
| 116 | compact source closure, even for a noncompact source; MT Lemma 16.8. -/ |
| 117 | theorem terminalSourceNormal_compact_ball |
| 118 | (g : RiemannianMetric 3 M) (h : RiemannianMetric 3 N) |
| 119 | (e : PartialDiffeomorph (𝓡 3) (𝓡 3) M N ∞) (hsource : e.source = univ) |
| 120 | (hmetric : ∀ x (v w : TangentSpace (𝓡 3) x), |
| 121 | g.inner x v w = h.inner (e x) |
| 122 | (mfderiv (𝓡 3) (𝓡 3) e x v) (mfderiv (𝓡 3) (𝓡 3) e x w)) |
| 123 | (p : M) (r : ℝ) (hcompact : IsCompact (closure (h.ball (e p) r))) |
| 124 | (hinside : closure (h.ball (e p) r) ⊆ e.target) : |
| 125 | IsCompact (closure (g.ball p r)) := by |
| 126 | have he := e.toOpenPartialHomeomorph.isOpenEmbedding hsource |
| 127 | have hc : IsCompact (e ⁻¹' closure (h.ball (e p) r)) := |
| 128 | he.isEmbedding.isInducing.isCompact_preimage' hcompact (by |
| 129 | intro y hy |
| 130 | exact ⟨e.symm y, e.right_inv (hinside hy)⟩) |
| 131 | apply hc.of_isClosed_subset isClosed_closure |
| 132 | apply closure_minimal _ (isClosed_closure.preimage he.continuous) |
| 133 | intro x hx |
| 134 | exact subset_closure ((terminalSourceNormal_edist_le g h e hsource hmetric p x).trans_lt hx) |
| 135 | |
| 136 | end PoincareMT.M47 |