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.Metric.LocalExtension |
| 2 | import PoincareLib.Geometry.Riemannian.Coordinates.Coefficients |
| 3 | |
| 4 | /-! |
| 5 | # Euclidean realization of the actual model metric germ |
| 6 | |
| 7 | Realize the unnormalized physical pullback before applying the model scale. |
| 8 | Morgan--Tian Definition 2.16, equation (2.1), p. 30, and Definition 9.76, |
| 9 | p. 231; M45 `derivations/ModelAnalyticsLocal.md`. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | namespace PoincareMT.M45 |
| 19 | |
| 20 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 21 | |
| 22 | /-- A smooth chart with invertible differential has a positive smooth |
| 23 | Euclidean metric realizing its physical pullback near the origin. |
| 24 | Source: the coordinate interpretation of equation (2.1), p. 30. -/ |
| 25 | theorem model_metric_realization |
| 26 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 27 | (g : RiemannianMetric 3 M) {f : E → M} {U : Set E} |
| 28 | (hU : IsOpen U) (hzero : (0 : E) ∈ U) |
| 29 | (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) |
| 30 | (hinv : ∀ y ∈ U, (mfderiv (𝓡 3) (𝓡 3) f y).IsInvertible) : |
| 31 | ∃ (gE : RiemannianMetric 3 E) (_DE : LeviCivitaData gE) (W : Set E), |
| 32 | IsOpen W ∧ (0 : E) ∈ W ∧ W ⊆ U ∧ |
| 33 | ∀ y ∈ W, gE.euclideanCoefficients y = g.pullbackCoefficients f y := by |
| 34 | apply RiemannianMetric.exists_local_realization hU hzero (g.pullbackCoefficients f) |
| 35 | · exact fun y hy => (g.contDiffAt_pullbackCoefficients |
| 36 | (hf.contMDiffAt (hU.mem_nhds hy))).contDiffWithinAt |
| 37 | · exact fun y _ v w => g.symm (f y) _ _ |
| 38 | · intro y hy v hv |
| 39 | apply g.pos (f y) |
| 40 | intro hz |
| 41 | apply hv |
| 42 | apply (hinv y hy).injective |
| 43 | rw [map_zero] |
| 44 | exact hz |
| 45 | |
| 46 | end PoincareMT.M45 |