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.Generalized.ReducedGeometry.Variation.Basic |
| 2 | |
| 3 | /-! |
| 4 | # Restricting an actual horizontal extension |
| 5 | |
| 6 | Morgan-Tian Lemmas 6.4 and 6.8, pp. 107-109. Restriction retains |
| 7 | the actual parameter-dependent section and its spatial domain. At an |
| 8 | interior parameter point it also retains the pullback derivative, since |
| 9 | both within base derivatives equal the actual derivative. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter |
| 15 | open scoped Manifold Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M14 |
| 20 | |
| 21 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 22 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 23 | {γ : ℝ → G.Point} {J K : Set ℝ} {Y : ∀ s, G.Horizontal (γ s)} |
| 24 | |
| 25 | /-- Restrict the quantified parameter set of an actual extension |
| 26 | without changing its section, Lemmas 6.4 and 6.8, pp. 107-109. -/ |
| 27 | def pullbackExtensionRestrict (E : M14PullbackExtension G γ J Y) (hK : K ⊆ J) : |
| 28 | M14PullbackExtension G γ K Y where |
| 29 | extension := E.extension |
| 30 | domain := E.domain |
| 31 | domain_open := E.domain_open |
| 32 | graph_mem s hs := E.graph_mem s (hK hs) |
| 33 | spatial_smooth := E.spatial_smooth |
| 34 | joint_smooth := by |
| 35 | obtain ⟨U, hU, hgraph, hE⟩ := E.joint_smooth |
| 36 | exact ⟨U, hU, fun s hs => hgraph s (hK hs), hE⟩ |
| 37 | agrees s hs := E.agrees s (hK hs) |
| 38 | parameter_derivative s hs := E.parameter_derivative s (hK hs) |
| 39 | |
| 40 | /-- Restriction preserves the actual pullback derivative at an |
| 41 | interior point of the smaller parameter set, Lemma 6.8, pp. 108-109. -/ |
| 42 | theorem horizontalCovariantDerivative_restrict (E : M14PullbackExtension G γ J Y) |
| 43 | (hK : K ⊆ J) {s : ℝ} (hs : K ∈ 𝓝 s) : |
| 44 | M14HorizontalCovariantDerivative G γ J Y E s = |
| 45 | M14HorizontalCovariantDerivative G γ K Y (pullbackExtensionRestrict E hK) s := by |
| 46 | unfold M14HorizontalCovariantDerivative |
| 47 | rw [mfderivWithin_of_mem_nhds (mem_of_superset hs hK), mfderivWithin_of_mem_nhds hs] |
| 48 | rfl |
| 49 | |
| 50 | /-- Restriction to a relative neighborhood preserves the actual |
| 51 | pullback derivative, also at a closed endpoint, Lemma 6.8, |
| 52 | pp. 108-109. -/ |
| 53 | theorem horizontalCovariantDerivative_restrict_inter (E : M14PullbackExtension G γ J Y) |
| 54 | {s : ℝ} (hK : K ∈ 𝓝 s) : |
| 55 | M14HorizontalCovariantDerivative G γ J Y E s = |
| 56 | M14HorizontalCovariantDerivative G γ (J ∩ K) Y |
| 57 | (pullbackExtensionRestrict E inter_subset_left) s := by |
| 58 | unfold M14HorizontalCovariantDerivative |
| 59 | rw [mfderivWithin_inter hK] |
| 60 | rfl |
| 61 | |
| 62 | /-- Restriction to any uniquely differentiable subset preserves the |
| 63 | actual derivative of a within differentiable curve, including the |
| 64 | endpoints of smaller closed intervals, Lemmas 6.10 and 6.12, |
| 65 | pp. 109-110. -/ |
| 66 | theorem horizontalCovariantDerivative_restrict_subset (E : M14PullbackExtension G γ J Y) |
| 67 | (hK : K ⊆ J) {s : ℝ} (hKs : UniqueDiffWithinAt ℝ K s) |
| 68 | (hγ : MDifferentiableWithinAt (𝓘(ℝ, ℝ)) (spacetimeModel n) γ J s) : |
| 69 | M14HorizontalCovariantDerivative G γ J Y E s = |
| 70 | M14HorizontalCovariantDerivative G γ K Y (pullbackExtensionRestrict E hK) s := by |
| 71 | unfold M14HorizontalCovariantDerivative |
| 72 | rw [mfderivWithin_subset hK hKs.uniqueMDiffWithinAt hγ] |
| 73 | rfl |
| 74 | |
| 75 | end PoincareMT.M14 |