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.Pullback.PullbackReparametrization |
| 2 | |
| 3 | /-! |
| 4 | # Scalar multiplication of actual pullback fields at closed endpoints |
| 5 | |
| 6 | The same curve and within tangent occur on both sides of the scalar |
| 7 | product rule, so no open parameter neighborhood is needed. This supplies |
| 8 | the scaled adapted fields of Morgan-Tian Definition 6.35, p. 122. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | -- Actual horizontal fibers retain the norm used by their parameter derivatives. |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {γ : ℝ → G.Point} {J : Set ℝ} {P : ∀ s, G.Horizontal (γ s)} |
| 25 | |
| 26 | /-- A smooth scalar factor preserves the actual extension on the |
| 27 | same closed set, Definition 6.35 and Lemma 6.36, p. 122. -/ |
| 28 | noncomputable def smulPullbackExtension (E : M14PullbackExtension G γ J P) |
| 29 | (c : ℝ → ℝ) (hc : ContDiff ℝ ∞ c) : |
| 30 | M14PullbackExtension G γ J (fun s => c s • P s) := |
| 31 | pullbackExtensionSmulComp E id c contDiff_id hc (fun _ hs => hs) |
| 32 | |
| 33 | /-- The actual covariant scalar product rule holds on arbitrary |
| 34 | parameter sets, including closed endpoints, Definition 6.35, p. 122. -/ |
| 35 | theorem horizontalCovariantDerivative_smul (E : M14PullbackExtension G γ J P) |
| 36 | (c : ℝ → ℝ) (hc : ContDiff ℝ ∞ c) {s : ℝ} (hs : s ∈ J) : |
| 37 | M14HorizontalCovariantDerivative G γ J (fun r => c r • P r) |
| 38 | (smulPullbackExtension E c hc) s = |
| 39 | deriv c s • P s + c s • M14HorizontalCovariantDerivative G γ J P E s := by |
| 40 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 41 | let : NormedAddCommGroup (G.Horizontal (γ s)) := |
| 42 | (metric.toCore (γ s)).toNormedAddCommGroupOfTopology |
| 43 | (metric.continuousAt (γ s)) (metric.isVonNBounded (γ s)) |
| 44 | let : InnerProductSpace ℝ (G.Horizontal (γ s)) := |
| 45 | .ofCoreOfTopology (metric.toCore (γ s)) |
| 46 | (metric.continuousAt (γ s)) (metric.isVonNBounded (γ s)) |
| 47 | obtain ⟨d, hd⟩ := E.parameter_derivative s hs |
| 48 | have hc' := (hc.differentiable (by simp) s).hasDerivAt |
| 49 | have hparam : deriv (fun r => c r • E.extension r (γ s)) s = |
| 50 | c s • deriv (fun r => E.extension r (γ s)) s + deriv c s • P s := by |
| 51 | simpa only [Pi.smul_def', E.agrees s hs] using |
| 52 | (hc'.smul hd.differentiableAt.hasDerivAt).deriv |
| 53 | have hspace := ((E.spatial_smooth s _ (E.graph_mem s hs)).contMDiffAt |
| 54 | (E.domain_open.mem_nhds (E.graph_mem s hs))).mdifferentiableAt (by simp) |
| 55 | have hcov := (rawHorizontalCovariantDerivative_isCovariantDerivative G.leafwise).smul_const |
| 56 | (c s) hspace |
| 57 | change deriv (fun r => c r • E.extension r (γ s)) s + |
| 58 | rawHorizontalCovariantDerivative G.leafwise (c s • E.extension s) (γ s) |
| 59 | (mfderivWithin (𝓘(ℝ, ℝ)) (spacetimeModel n) γ J s (1 : ℝ)) = _ |
| 60 | rw [hparam, hcov] |
| 61 | simp only [M14HorizontalCovariantDerivative, smul_apply, smul_add] |
| 62 | abel |
| 63 | |
| 64 | end PoincareMT.M14 |