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.Frame.Transport.Canonical |
| 2 | |
| 3 | /-! |
| 4 | # The transport equation in a tangent trivialization |
| 5 | |
| 6 | The coordinate change is fixed in time. Conjugation therefore carries the |
| 7 | intrinsic Ricci endomorphism ODE to its usual operator-valued coordinate ODE. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | open Set Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | namespace PoincareMT.RicciFlow.Frame |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | {a b : ℝ} |
| 25 | |
| 26 | theorem canonicalTransport_coordinates_hasDerivWithinAt |
| 27 | (F : RicciFlow n M (Ico a b)) (x₀ x : M) |
| 28 | (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 29 | (TangentSpace (𝓡 n) : M → Type _) x₀).baseSet) |
| 30 | {t : ℝ} (ht : t ∈ Ico a b) : |
| 31 | HasDerivWithinAt |
| 32 | (fun s => ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) |
| 33 | (TangentSpace (𝓡 n) : M → Type _) (EuclideanSpace ℝ (Fin n)) |
| 34 | (TangentSpace (𝓡 n) : M → Type _) x₀ x x₀ x (canonicalTransport F s x)) |
| 35 | ((ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) |
| 36 | (TangentSpace (𝓡 n) : M → Type _) (EuclideanSpace ℝ (Fin n)) |
| 37 | (TangentSpace (𝓡 n) : M → Type _) x₀ x x₀ x (ricciEndomorphism F x t)).comp |
| 38 | (ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) |
| 39 | (TangentSpace (𝓡 n) : M → Type _) (EuclideanSpace ℝ (Fin n)) |
| 40 | (TangentSpace (𝓡 n) : M → Type _) x₀ x x₀ x (canonicalTransport F t x))) |
| 41 | (Ico a b) t := by |
| 42 | let : RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 43 | ⟨(F.metric a).toRiemannianMetric⟩ |
| 44 | let : NormedAddCommGroup (TangentSpace (𝓡 n) x) := inferInstance |
| 45 | let : NormedSpace ℝ (TangentSpace (𝓡 n) x) := inferInstance |
| 46 | let e := (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 47 | (TangentSpace (𝓡 n) : M → Type _) x₀).continuousLinearEquivAt ℝ x hx |
| 48 | simp only [ContinuousLinearMap.inCoordinates_eq hx hx] |
| 49 | have hd := (e.arrowCongr e).hasFDerivAt.comp_hasDerivWithinAt t |
| 50 | (canonicalTransport_hasDerivWithinAt F ht x) |
| 51 | convert hd using 1 <;> try rfl |
| 52 | apply ContinuousLinearMap.ext |
| 53 | intro v |
| 54 | change e (ricciEndomorphism F x t |
| 55 | (e.symm (e (canonicalTransport F t x (e.symm v))))) = |
| 56 | e (ricciEndomorphism F x t (canonicalTransport F t x (e.symm v))) |
| 57 | rw [e.symm_apply_apply] |
| 58 | |
| 59 | theorem canonicalTransport_coordinates_initial |
| 60 | (F : RicciFlow n M (Ico a b)) (hab : a < b) (x₀ x : M) |
| 61 | (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 62 | (TangentSpace (𝓡 n) : M → Type _) x₀).baseSet) : |
| 63 | ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) |
| 64 | (TangentSpace (𝓡 n) : M → Type _) (EuclideanSpace ℝ (Fin n)) |
| 65 | (TangentSpace (𝓡 n) : M → Type _) x₀ x x₀ x (canonicalTransport F a x) = |
| 66 | ContinuousLinearMap.id ℝ (EuclideanSpace ℝ (Fin n)) := by |
| 67 | rw [canonicalTransport_initial F hab, ContinuousLinearMap.inCoordinates_eq hx hx] |
| 68 | ext v |
| 69 | simp |
| 70 | |
| 71 | end PoincareMT.RicciFlow.Frame |