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.Extinction.Width.Class.SphereArea |
| 2 | |
| 3 | /-! |
| 4 | # M60 primitive branched-minimal sphere properties |
| 5 | |
| 6 | The specified sphere map is smooth, nonconstant, weakly conformal and |
| 7 | stationary for its actual Dirichlet energy. Its branch set is the actual |
| 8 | zero set of its differential, with immersion away from that finite set. |
| 9 | No Gauss-Bonnet inequality or positive pullback metric at branch points is |
| 10 | included as a premise. |
| 11 | |
| 12 | Source: Morgan--Tian Lemma 18.10 and Claim 18.12, printed pp. 424-427; |
| 13 | Sacks--Uhlenbeck, Theorem 1.6, printed p. 5, with its branch convention on |
| 14 | printed p. 1. See `reviews/contracts/M60-round1.md` and |
| 15 | `reviews/errata/2026-09-14-sphere-area.md` for normalization and source checks. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | /-- The standard round inner product, pulled back by the actual sphere |
| 27 | inclusion into Euclidean three-space. -/ |
| 28 | noncomputable def m60RoundSphereInner (p : UnitTwoSphere) |
| 29 | (v w : TangentSpace (𝓡 2) p) : ℝ := |
| 30 | inner ℝ |
| 31 | (mfderiv (𝓡 2) (𝓡 3) (fun x : UnitTwoSphere => x.1) p v) |
| 32 | (mfderiv (𝓡 2) (𝓡 3) (fun x : UnitTwoSphere => x.1) p w) |
| 33 | |
| 34 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 35 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 36 | |
| 37 | /-- The actual pullback metric is a nonnegative multiple of the round metric; |
| 38 | the multiple is allowed to vanish at a branch point. -/ |
| 39 | def M60WeaklyConformal (g : RiemannianMetric n M) |
| 40 | (f : UnitTwoSphere → M) : Prop := |
| 41 | ∀ p : UnitTwoSphere, ∃ scale : ℝ, 0 ≤ scale ∧ |
| 42 | ∀ v w : TangentSpace (𝓡 2) p, |
| 43 | g.inner (f p) (mfderiv (𝓡 2) (𝓡 n) f p v) |
| 44 | (mfderiv (𝓡 2) (𝓡 n) f p w) = scale * m60RoundSphereInner p v w |
| 45 | |
| 46 | /-- Harmonicity as stationarity under every smooth local sphere variation. |
| 47 | The derivative assertion includes existence and fixes the target metric. -/ |
| 48 | def M60EnergyStationary (g : RiemannianMetric n M) |
| 49 | (f : UnitTwoSphere → M) : Prop := |
| 50 | ∀ epsilon : ℝ, 0 < epsilon → |
| 51 | ∀ variation : ℝ × UnitTwoSphere → M, |
| 52 | ContMDiffOn ((𝓘(ℝ, ℝ)).prod (𝓡 2)) (𝓡 n) ∞ variation |
| 53 | (Set.Ioo (-epsilon) epsilon ×ˢ (Set.univ : Set UnitTwoSphere)) → |
| 54 | (∀ p : UnitTwoSphere, variation (0, p) = f p) → |
| 55 | HasDerivAt |
| 56 | (fun s : ℝ => m60SphereEnergy g (fun p => variation (s, p))) 0 0 |
| 57 | |
| 58 | /-- The actual differential-zero set, independent of any proposed branch |
| 59 | certificate or any chosen finite superset. -/ |
| 60 | def m60SphereBranchSet (f : UnitTwoSphere → M) : Set UnitTwoSphere := |
| 61 | {p | mfderiv (𝓡 2) (𝓡 n) f p = 0} |
| 62 | |
| 63 | /-- A nonconstant branched minimal sphere stated entirely as primitive |
| 64 | properties of its displayed smooth map and the fixed metric. -/ |
| 65 | structure M60BranchedMinimalSphere (g : RiemannianMetric n M) |
| 66 | (f : UnitTwoSphere → M) : Prop where |
| 67 | smooth : ContMDiff (𝓡 2) (𝓡 n) ∞ f |
| 68 | nonconstant : ∃ p q : UnitTwoSphere, f p ≠ f q |
| 69 | weakly_conformal : M60WeaklyConformal g f |
| 70 | energy_stationary : M60EnergyStationary g f |
| 71 | finite_branch_set : (m60SphereBranchSet (n := n) f).Finite |
| 72 | injective_off_branch_set : ∀ p : UnitTwoSphere, |
| 73 | p ∉ m60SphereBranchSet (n := n) f → |
| 74 | Function.Injective (mfderiv (𝓡 2) (𝓡 n) f p) |
| 75 | |
| 76 | end PoincareMT |