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.Riemannian.Measure.Green.Partition |
| 2 | |
| 3 | /-! # Finite spatial-chart decomposition of spacetime tests -/ |
| 4 | |
| 5 | noncomputable section |
| 6 | set_option autoImplicit false |
| 7 | |
| 8 | open Set |
| 9 | open scoped Manifold ContDiff Topology |
| 10 | |
| 11 | namespace PoincareMT |
| 12 | |
| 13 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] [T3Space M] |
| 14 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 15 | [SigmaCompactSpace M] |
| 16 | |
| 17 | /-- A compact spacetime test is a finite sum of tests supported in spatial |
| 18 | charts. The summands preserve nonnegativity and the original spacetime support. -/ |
| 19 | theorem exists_finite_spacetime_chart_decomposition |
| 20 | {φ : M × ℝ → ℝ} |
| 21 | (hφ : ContMDiff ((𝓡 n).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) ∞ φ) |
| 22 | (hφc : HasCompactSupport φ) : |
| 23 | ∃ (s : Finset M) (w : M → M × ℝ → ℝ), |
| 24 | (∀ i, ContMDiff ((𝓡 n).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) ∞ (w i)) ∧ |
| 25 | (∀ i, HasCompactSupport (w i)) ∧ |
| 26 | (∀ i, tsupport (w i) ⊆ tsupport φ) ∧ |
| 27 | (∀ i, tsupport (w i) ⊆ |
| 28 | (chartAt (EuclideanSpace ℝ (Fin n)) i).source ×ˢ univ) ∧ |
| 29 | (∀ i z, 0 ≤ φ z → 0 ≤ w i z) ∧ |
| 30 | ∀ z, ∑ i ∈ s, w i z = φ z := by |
| 31 | classical |
| 32 | obtain ⟨ρ, hρ⟩ := SmoothPartitionOfUnity.exists_isSubordinate_chartAt_source (𝓡 n) M |
| 33 | have hfinite := ρ.locallyFinite.finite_nonempty_inter_compact |
| 34 | (hφc.isCompact.image continuous_fst) |
| 35 | refine ⟨hfinite.toFinset, fun i z => ρ i z.1 * φ z, |
| 36 | (fun i => ((ρ i).contMDiff.comp contMDiff_fst).mul hφ), |
| 37 | (fun _ => hφc.mul_left), (fun _ => tsupport_mul_subset_right), ?_, |
| 38 | (fun i z hz => mul_nonneg (ρ.nonneg i z.1) hz), ?_⟩ |
| 39 | · intro i |
| 40 | have hs : tsupport (fun z : M × ℝ => ρ i z.1 * φ z) ⊆ |
| 41 | Prod.fst ⁻¹' tsupport (ρ i) := by |
| 42 | apply closure_minimal ?_ ((isClosed_tsupport _).preimage continuous_fst) |
| 43 | intro z hz |
| 44 | exact subset_tsupport _ (mul_ne_zero_iff.mp hz).1 |
| 45 | intro z hz |
| 46 | exact ⟨hρ i (hs hz), mem_univ _⟩ |
| 47 | · intro z |
| 48 | have hs : Function.support (fun i => ρ i z.1 * φ z) ⊆ hfinite.toFinset := by |
| 49 | intro i hi |
| 50 | apply hfinite.mem_toFinset.mpr |
| 51 | refine ⟨z.1, (mul_ne_zero_iff.mp hi).1, ?_⟩ |
| 52 | exact mem_image_of_mem Prod.fst (subset_tsupport φ (mul_ne_zero_iff.mp hi).2) |
| 53 | rw [← finsum_eq_sum_of_support_subset _ hs, ← finsum_mul, |
| 54 | ρ.sum_eq_one (mem_univ z.1), one_mul] |
| 55 | |
| 56 | end PoincareMT |