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 Mathlib.Geometry.Manifold.VectorBundle.Pullback |
| 2 | |
| 3 | /-! |
| 4 | # Smooth sections in a pullback vector bundle |
| 5 | |
| 6 | The bundle-coordinate bridge for the parameterized extension argument in |
| 7 | Morgan-Tian Lemma 6.4, p. 107. A pullback trivialization has the same fiber |
| 8 | coordinates as the original one, while its base map is already smooth. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | namespace Bundle |
| 16 | |
| 17 | variable {B C EB EC HB HC F : Type*} |
| 18 | [NormedAddCommGroup EB] [NormedSpace ℝ EB] |
| 19 | [NormedAddCommGroup EC] [NormedSpace ℝ EC] |
| 20 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 21 | [TopologicalSpace HB] [TopologicalSpace HC] |
| 22 | {IB : ModelWithCorners ℝ EB HB} {IC : ModelWithCorners ℝ EC HC} |
| 23 | [TopologicalSpace B] [TopologicalSpace C] |
| 24 | [ChartedSpace HB B] [ChartedSpace HC C] |
| 25 | {E : B → Type*} [∀ b, Nonempty (E b)] |
| 26 | [∀ b, TopologicalSpace (E b)] [TopologicalSpace (TotalSpace F E)] |
| 27 | [FiberBundle F E] {k : ℕ∞ω} |
| 28 | |
| 29 | -- Pullback fibers become the original fibers after unfolding the pullback definition. |
| 30 | set_option backward.isDefEq.respectTransparency false in |
| 31 | /-- A smooth base map identifies the two total-space smoothness tests for |
| 32 | a section of its pullback, as used in Morgan-Tian Lemma 6.4, p. 107. -/ |
| 33 | theorem contMDiffWithinAt_pullback_section_iff |
| 34 | (f : ContMDiffMap IC IB C B k) (v : ∀ z : C, E (f z)) |
| 35 | (S : Set C) (z : C) : |
| 36 | ContMDiffWithinAt IC (IC.prod 𝓘(ℝ, F)) k |
| 37 | (fun w => TotalSpace.mk' F (E := (f : C → B) *ᵖ E) w (v w)) S z ↔ |
| 38 | ContMDiffWithinAt IC (IB.prod 𝓘(ℝ, F)) k |
| 39 | (fun w => TotalSpace.mk' F (f w) (v w)) S z := by |
| 40 | rw [contMDiffWithinAt_section, contMDiffWithinAt_totalSpace] |
| 41 | change ContMDiffWithinAt IC 𝓘(ℝ, F) k |
| 42 | (fun w => (trivializationAt F E (f z) (TotalSpace.mk' F (f w) (v w))).2) S z ↔ |
| 43 | ContMDiffWithinAt IC IB k f S z ∧ _ |
| 44 | exact (and_iff_right (f.contMDiff z).contMDiffWithinAt).symm |
| 45 | |
| 46 | end Bundle |