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 | # Zero horizontal fields along constant curves |
| 5 | |
| 6 | Morgan-Tian Lemma 6.4, pp. 107-108. Actual extension agreement and |
| 7 | within-derivative uniqueness force the pullback derivative to vanish, |
| 8 | independently of the extension chosen and including closed endpoints. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.M14 |
| 18 | |
| 19 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 20 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 21 | {γ : ℝ → G.Point} {J : Set ℝ} {Y : ∀ s, G.Horizontal (γ s)} |
| 22 | |
| 23 | /-- A zero field on a constant curve has zero actual pullback derivative |
| 24 | for every extension, including closed endpoints with unique derivatives, |
| 25 | Lemma 6.4, pp. 107-108. -/ |
| 26 | theorem horizontalCovariantDerivative_eq_zero_of_constant |
| 27 | (E : M14PullbackExtension G γ J Y) {s : ℝ} (hs : s ∈ J) |
| 28 | (hJ : UniqueDiffWithinAt ℝ J s) |
| 29 | (hγ : Set.EqOn γ (fun _ => γ s) J) |
| 30 | (hY : ∀ r ∈ J, Y r = 0) : |
| 31 | M14HorizontalCovariantDerivative G γ J Y E s = 0 := by |
| 32 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 33 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 34 | have hext : ∀ r ∈ J, E.extension r (γ s) = 0 := by |
| 35 | intro r hr |
| 36 | have he : E.extension r (γ r) = 0 := (E.agrees r hr).trans (hY r hr) |
| 37 | have hp : γ r = γ s := hγ hr |
| 38 | exact hp ▸ he |
| 39 | obtain ⟨d, hd⟩ := E.parameter_derivative s hs |
| 40 | have hzero : HasDerivWithinAt (fun r => E.extension r (γ s)) |
| 41 | (0 : G.Horizontal (γ s)) J s := |
| 42 | (hasDerivWithinAt_const s J (0 : G.Horizontal (γ s))).congr_of_mem hext hs |
| 43 | have hpar : deriv (fun r => E.extension r (γ s)) s = 0 := |
| 44 | hd.deriv.trans ((hd.hasDerivWithinAt.derivWithin hJ).symm.trans |
| 45 | (hzero.derivWithin hJ)) |
| 46 | have hder : (mfderivWithin (𝓘(ℝ, ℝ)) (spacetimeModel n) γ J s : |
| 47 | ℝ →L[ℝ] SpacetimeModelVector n) = 0 := |
| 48 | (mfderivWithin_congr_of_mem (I := 𝓘(ℝ, ℝ)) (I' := spacetimeModel n) hγ hs).trans |
| 49 | mfderivWithin_const |
| 50 | have hvel : mfderivWithin (𝓘(ℝ, ℝ)) (spacetimeModel n) γ J s (1 : ℝ) = |
| 51 | (0 : TangentSpace (spacetimeModel n) (γ s)) := |
| 52 | congrArg (fun L : ℝ →L[ℝ] SpacetimeModelVector n => L 1) hder |
| 53 | simp only [M14HorizontalCovariantDerivative, hpar, hvel, map_zero, add_zero] |
| 54 | |
| 55 | end PoincareMT.M14 |