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.Exponential.InitialTime.InitialGram |
| 2 | |
| 3 | /-! |
| 4 | # Initial Gram limits on arbitrary fixed source vectors |
| 5 | |
| 6 | A finite bilinear basis expansion transfers entrywise Gram limits to |
| 7 | arbitrary vectors. The empty sum includes dimension zero. The source |
| 8 | basis and inner product remain the fixed terminal Euclidean coordinates. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set Filter |
| 14 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedVolume |
| 19 | |
| 20 | section Bilinear |
| 21 | |
| 22 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 23 | {ι : Type*} |
| 24 | |
| 25 | /-- A continuous bilinear pairing expands in any finite real basis. -/ |
| 26 | theorem bilinear_apply_eq_basis_sum [Fintype ι] (b : Module.Basis ι ℝ E) |
| 27 | (B : E →L[ℝ] E →L[ℝ] ℝ) (u v : E) : |
| 28 | B u v = ∑ i, ∑ j, (b.repr u i * b.repr v j) * B (b i) (b j) := by |
| 29 | calc |
| 30 | B u v = B (∑ i, b.repr u i • b i) (∑ j, b.repr v j • b j) := by |
| 31 | rw [b.sum_repr, b.sum_repr] |
| 32 | _ = _ := by |
| 33 | simp only [map_sum, map_smul, _root_.sum_apply, _root_.smul_apply, smul_eq_mul, |
| 34 | Finset.mul_sum] |
| 35 | rw [Finset.sum_comm] |
| 36 | apply Finset.sum_congr rfl |
| 37 | intro i _ |
| 38 | apply Finset.sum_congr rfl |
| 39 | intro j _ |
| 40 | ring |
| 41 | |
| 42 | /-- Convergence on basis pairs implies convergence on every fixed pair of vectors. -/ |
| 43 | theorem tendsto_bilinear_apply_of_basis [Finite ι] {α : Type*} {l : Filter α} |
| 44 | (b : Module.Basis ι ℝ E) {B : α → E →L[ℝ] E →L[ℝ] ℝ} {B₀ : E →L[ℝ] E →L[ℝ] ℝ} |
| 45 | (h : ∀ i j, Tendsto (fun a ↦ B a (b i) (b j)) l (𝓝 (B₀ (b i) (b j)))) (u v : E) : |
| 46 | Tendsto (fun a ↦ B a u v) l (𝓝 (B₀ u v)) := by |
| 47 | let := Fintype.ofFinite ι |
| 48 | have hf : (fun a ↦ B a u v) = |
| 49 | (fun a ↦ ∑ i, ∑ j, (b.repr u i * b.repr v j) * B a (b i) (b j)) := by |
| 50 | funext a |
| 51 | exact bilinear_apply_eq_basis_sum b (B a) u v |
| 52 | rw [hf, bilinear_apply_eq_basis_sum b B₀ u v] |
| 53 | exact tendsto_finsetSum _ fun i _ ↦ tendsto_finsetSum _ fun j _ ↦ |
| 54 | (h i j).const_mul (b.repr u i * b.repr v j) |
| 55 | |
| 56 | end Bilinear |
| 57 | |
| 58 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 59 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 60 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 61 | |
| 62 | /-- The normalized actual Gram pairing converges to four times the source inner product. -/ |
| 63 | theorem exponential_scaled_pairing_tendsto (G : LExponentialGeometry F T τmax p) |
| 64 | (hmax : 0 < τmax) (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 65 | (x u v : EuclideanSpace ℝ (Fin n)) : |
| 66 | Tendsto (fun s : ℝ ↦ (s⁻¹) ^ 2 * |
| 67 | pullbackMetricForm (F.metric (T - s ^ 2)) (exponentialSliceChart G (s ^ 2)) x u v) |
| 68 | (𝓝[>] (0 : ℝ)) (𝓝 (4 * inner ℝ u v)) := by |
| 69 | let B := fun s : ℝ ↦ (s⁻¹) ^ 2 • |
| 70 | pullbackMetricForm (F.metric (T - s ^ 2)) (exponentialSliceChart G (s ^ 2)) x |
| 71 | let B₀ : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 72 | (4 : ℝ) • innerSL ℝ |
| 73 | have h := exponential_scaled_gram_tendsto G hmax hT hwindow x |
| 74 | have hentries (i j : Fin n) : |
| 75 | Tendsto (fun s ↦ B s (EuclideanSpace.basisFun (Fin n) ℝ i) |
| 76 | (EuclideanSpace.basisFun (Fin n) ℝ j)) (𝓝[>] (0 : ℝ)) |
| 77 | (𝓝 (B₀ (EuclideanSpace.basisFun (Fin n) ℝ i) |
| 78 | (EuclideanSpace.basisFun (Fin n) ℝ j))) := by |
| 79 | change Tendsto (fun s ↦ (s⁻¹) ^ 2 * |
| 80 | pullbackMetricForm (F.metric (T - s ^ 2)) (exponentialSliceChart G (s ^ 2)) x |
| 81 | (EuclideanSpace.basisFun (Fin n) ℝ i) (EuclideanSpace.basisFun (Fin n) ℝ j)) _ |
| 82 | (𝓝 (4 * inner ℝ (EuclideanSpace.basisFun (Fin n) ℝ i) |
| 83 | (EuclideanSpace.basisFun (Fin n) ℝ j))) |
| 84 | rw [OrthonormalBasis.inner_eq_ite] |
| 85 | exact tendsto_pi_nhds.mp (tendsto_pi_nhds.mp h i) j |
| 86 | exact tendsto_bilinear_apply_of_basis (EuclideanSpace.basisFun (Fin n) ℝ).toBasis hentries u v |
| 87 | |
| 88 | end PoincareMT.ReducedVolume |