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.ReducedGeometry.ReducedVolume.Regularity.AlmostEverywhere.TerminalGradient |
| 2 | |
| 3 | /-! |
| 4 | # Equality of terminal velocities at differentiable contact |
| 5 | |
| 6 | The terminal pairing identities identify both metric duals at the common |
| 7 | endpoint. Positive definiteness identifies the actual tangent vectors, |
| 8 | with explicit transport between their endpoint fibers. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle Topology |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedVolume |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | /-- Equality of metric duals at an identified point gives equality of the transported vectors. -/ |
| 23 | theorem tangent_eq_of_metric_duals (g : RiemannianMetric n M) {x y : M} |
| 24 | (hxy : x = y) (X : TangentSpace (𝓡 n) x) (Y : TangentSpace (𝓡 n) y) |
| 25 | (D : (q : M) → TangentSpace (𝓡 n) q → ℝ) |
| 26 | (hX : ∀ v, D x v = g.inner x X v) (hY : ∀ v, D y v = g.inner y Y v) : |
| 27 | hxy ▸ X = Y := by |
| 28 | subst y |
| 29 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 30 | ⟨g.toRiemannianMetric⟩ |
| 31 | apply ext_inner_right ℝ |
| 32 | intro v |
| 33 | exact (hX v).symm.trans (hY v) |
| 34 | |
| 35 | variable [ConnectedSpace M] |
| 36 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 37 | |
| 38 | /-- Noncritical minimizing lifts at a differentiability point have one terminal velocity. -/ |
| 39 | theorem minimizing_terminal_velocity_eq |
| 40 | (hL : LGeodesicTheory F T τmax) (G : LExponentialGeometry F T τmax p) |
| 41 | (Z W : TangentSpace (𝓡 n) p) {τ : ℝ} (hτ : 0 < τ) (hmax : τ < τmax) |
| 42 | (hZ : IsMinimizingBackwardLPath F T 0 τ (G.path Z τ hτ hmax)) |
| 43 | (hW : IsMinimizingBackwardLPath F T 0 τ (G.path W τ hτ hmax)) |
| 44 | (hend : G.gamma Z τ = G.gamma W τ) |
| 45 | (hl : MDifferentiableAt (𝓡 n) (𝓘(ℝ, ℝ)) (fun q ↦ reducedLength F T p q τ) |
| 46 | (G.gamma Z τ)) |
| 47 | (hsZ : Function.Surjective (G.toLExponentialFamily.sliceDifferential Z τ)) |
| 48 | (hsW : Function.Surjective (G.toLExponentialFamily.sliceDifferential W τ)) : |
| 49 | hend ▸ curveVelocity (n := n) (G.gamma Z) τ = |
| 50 | curveVelocity (n := n) (G.gamma W) τ := by |
| 51 | apply tangent_eq_of_metric_duals (F.metric (T - τ)) hend _ _ |
| 52 | (fun q v ↦ mvfderiv (𝓡 n) (fun x ↦ reducedLength F T p x τ) q v) |
| 53 | · exact reducedLength_differential_eq_terminal_pairing hL G Z hτ hmax hZ hl hsZ |
| 54 | · exact reducedLength_differential_eq_terminal_pairing hL G W hτ hmax hW |
| 55 | (hend ▸ hl) hsW |
| 56 | |
| 57 | end PoincareMT.ReducedVolume |