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.Retained.RetainedNeckChart |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Charts.SmoothChartInverse |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Collar.Bounds.BufferBalls |
| 4 | import PoincareLib.Geometry.Riemannian.Coordinates.Transitions |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.Flow.Basic |
| 6 | |
| 7 | /-! |
| 8 | # The actual local-result embedding preserves seed volume |
| 9 | |
| 10 | Theorem 13.2, pp. 332-333, in the Uniform Seed argument, pp. 392-393. |
| 11 | The supplied injective metric-preserving map has a smooth inverse on its |
| 12 | image. Its exact local volume identity and global distance inequality |
| 13 | do not require completeness or that its image be a whole component. |
| 14 | See the reviewed event-seed-geometry derivation. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.Proofs.M47 |
| 26 | |
| 27 | variable {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} |
| 28 | {P : SurgeryParameters} {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 29 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 30 | |
| 31 | /-- The literal local-result embedding decreases ambient path distance, |
| 32 | Theorem 13.2, pp. 332-333. No precompact-ball premise is required. -/ |
| 33 | theorem local_result_embedding_edist_le |
| 34 | (E : SurgeryEventData g0 K P slice metric T) (i : Fin E.cap_count) |
| 35 | (x y : (E.local_result i).output.carrier) : |
| 36 | (metric T).edist (E.local_embed i x) (E.local_embed i y) ≤ |
| 37 | (E.local_result i).metric.edist x y := |
| 38 | (E.local_result i).metric.edist_comp_le_of_pullback_bound (metric T) |
| 39 | (E.local_embed_smooth i) (fun z v => (E.local_metric i z v v).le) x y |
| 40 | |
| 41 | /-- The actual injective local-result embedding preserves calibrated |
| 42 | volume of every measurable set, including sets of infinite volume. |
| 43 | Theorem 13.2 and the Uniform Seed construction, pp. 332-333, 392-393. -/ |
| 44 | theorem local_result_embedding_volume_eq |
| 45 | (E : SurgeryEventData g0 K P slice metric T) (i : Fin E.cap_count) |
| 46 | {A : Set (E.local_result i).output.carrier} (hA : MeasurableSet A) : |
| 47 | calibratedMetricVolume (metric T) (E.local_embed i '' A) = |
| 48 | calibratedMetricVolume (E.local_result i).metric A := by |
| 49 | let R := E.local_result i |
| 50 | let : Nonempty R.output.carrier := ⟨R.tip⟩ |
| 51 | let e := Poincare.partialDiffeomorphOfInjOn (E.local_embed i) univ isOpen_univ |
| 52 | (E.local_embed_smooth i).contMDiffOn (E.local_embed_injective i).injOn |
| 53 | (fun x _ => R.metric.mfderiv_bijective_of_pullback_eq (metric T) x (E.local_metric i x)) |
| 54 | have hmap : (e.toOpenPartialHomeomorph : R.output.carrier → (slice T).carrier) = |
| 55 | E.local_embed i := rfl |
| 56 | have hnorm (x : R.output.carrier) (v : TangentSpace (𝓡 3) x) : |
| 57 | (metric T).tangentNorm (E.local_embed i x) |
| 58 | (mfderiv (𝓡 3) (𝓡 3) (E.local_embed i) x v) = R.metric.tangentNorm x v := |
| 59 | congrArg Real.sqrt (E.local_metric i x v v) |
| 60 | have hf := e.contMDiffOn.of_le (show (1 : ℕ∞ω) ≤ (∞ : ℕ∞ω) by simp) |
| 61 | have hi := e.contMDiffOn_invFun.of_le (show (1 : ℕ∞ω) ≤ (∞ : ℕ∞ω) by simp) |
| 62 | have hupper := M34.calibratedMetricVolume_image_le_of_local_tangentNorm_le |
| 63 | R.metric (metric T) e.toOpenPartialHomeomorph hf (C := 1) zero_lt_one |
| 64 | (fun x _ v => by |
| 65 | change (metric T).tangentNorm (E.local_embed i x) |
| 66 | (mfderiv (𝓡 3) (𝓡 3) (E.local_embed i) x v) ≤ 1 * R.metric.tangentNorm x v |
| 67 | simpa only [one_mul] using (hnorm x v).le) hA (subset_univ A) |
| 68 | have hlower := M34.calibratedMetricVolume_le_mul_image_of_local_tangentNorm_lower |
| 69 | R.metric (metric T) e.toOpenPartialHomeomorph hf hi (C := 1) zero_lt_one |
| 70 | (fun x _ v => by |
| 71 | change R.metric.tangentNorm x v ≤ 1 * (metric T).tangentNorm (E.local_embed i x) |
| 72 | (mfderiv (𝓡 3) (𝓡 3) (E.local_embed i) x v) |
| 73 | simpa only [one_mul] using (hnorm x v).ge) hA (subset_univ A) |
| 74 | exact le_antisymm |
| 75 | (by simpa only [hmap, ENNReal.ofReal_one, one_pow, one_mul] using hupper) |
| 76 | (by simpa only [hmap, ENNReal.ofReal_one, one_pow, one_mul] using hlower) |
| 77 | |
| 78 | end PoincareMT.Proofs.M47 |