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.Compactness.GeometricLimit.Overlap.QuotientCoefficients |
| 2 | import PoincareLib.Geometry.RicciFlow.Pullback |
| 3 | import PoincareLib.Geometry.Riemannian.Coordinates.CanonicalDomain |
| 4 | import PoincareLib.Geometry.RicciFlow.Limit.BilinearJets |
| 5 | import PoincareLib.Analysis.Calculus.SmoothCompactness.LocalConvergence |
| 6 | |
| 7 | /-! |
| 8 | # Ricci flows on the extracted coordinate pieces |
| 9 | |
| 10 | Canonical chart pullback flows retain precisely the source parametrization's |
| 11 | coefficients. This identity allows the smooth flow-limit theorem to consume |
| 12 | the extracted bilinear coefficient jets on the fixed coordinate domains. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | open Set Filter Poincare.Gluing Poincare.Analysis.Calculus |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | namespace PoincareMT.ChartDistance |
| 21 | |
| 22 | variable {ι : Type*} {n : ℕ} |
| 23 | (U : ι → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 24 | [∀ i, Nonempty (Piece U i)] |
| 25 | |
| 26 | theorem canonical_extChartAt_target (i : ι) (p : Piece U i) : |
| 27 | letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 28 | (extChartAt (𝓡 n) p).target = U i := by |
| 29 | let := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 30 | rw [extChartAt_target, ModelWithCorners.range_eq_univ, inter_univ] |
| 31 | simp only [modelWithCornersSelf_coe_symm, preimage_id] |
| 32 | change ((hU i).isOpenEmbedding_subtypeVal.toOpenPartialHomeomorph).target = U i |
| 33 | rw [Topology.IsOpenEmbedding.toOpenPartialHomeomorph_target] |
| 34 | exact Subtype.range_val |
| 35 | |
| 36 | theorem canonical_pullbackMetric_coefficients |
| 37 | {N : Type*} [TopologicalSpace N] |
| 38 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) N] [IsManifold (𝓡 n) ∞ N] |
| 39 | (g : RiemannianMetric n N) {i : ι} (e : Piece U i → N) |
| 40 | (he : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 41 | IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ e) (p x : Piece U i) : |
| 42 | letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 43 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 44 | (g.pullbackOfLocalDiffeomorph e he).pullbackCoefficients |
| 45 | (extChartAt (𝓡 n) p).symm (x : EuclideanSpace ℝ (Fin n)) = |
| 46 | g.pullbackCoefficients (chartParametrization U hU e) x := by |
| 47 | let := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 48 | let := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 49 | rw [RiemannianMetric.pullbackCoefficients_canonicalChart (U i) (hU i)] |
| 50 | have hd := mfderiv_chartParametrization U hU x (he.contMDiff x) |
| 51 | ext v w |
| 52 | change g.inner (e x) (mfderiv (𝓡 n) (𝓡 n) e x v) (mfderiv (𝓡 n) (𝓡 n) e x w) = |
| 53 | g.inner (chartParametrization U hU e x) |
| 54 | (mfderiv (𝓡 n) (𝓡 n) (chartParametrization U hU e) x v) |
| 55 | (mfderiv (𝓡 n) (𝓡 n) (chartParametrization U hU e) x w) |
| 56 | rw [chartParametrization_apply, hd] |
| 57 | rfl |
| 58 | |
| 59 | /-- The positive extracted metric family on a coordinate piece is an actual |
| 60 | Ricci flow when the original source flows have the supplied mixed jet limits. -/ |
| 61 | theorem exists_ricciFlow_on_coordinate_limit |
| 62 | {M : ℕ → Type*} [∀ k, TopologicalSpace (M k)] |
| 63 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 64 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 65 | {J : Set ℝ} (hJ : IsOpen J) (Fseq : ∀ k, RicciFlow n (M k) J) |
| 66 | (i : ι) (e : ∀ k, Piece U i → M k) |
| 67 | (he : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 68 | ∀ k, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (e k)) |
| 69 | (g : ℝ → CanonicalMetric U hU i) |
| 70 | (hg : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 71 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 72 | RiemannianMetric.IsSmoothFamilyOn g J) |
| 73 | (B : ℝ × EuclideanSpace ℝ (Fin n) → |
| 74 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 75 | (hcoeff : letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 76 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 77 | ∀ t ∈ J, ∀ (x : Piece U i) v w, (g t).inner x v w = B (t, x) v w) |
| 78 | (hjet : ∀ m K, IsCompact K → K ⊆ J ×ˢ U i → TendstoUniformlyOn |
| 79 | (fun k => iteratedFDeriv ℝ m (fun p : ℝ × EuclideanSpace ℝ (Fin n) => |
| 80 | ((Fseq k).metric p.1).pullbackCoefficients (chartParametrization U hU (e k)) p.2)) |
| 81 | (iteratedFDeriv ℝ m B) atTop K) : |
| 82 | letI := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 83 | letI := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 84 | ∃ F : RicciFlow n (Piece U i) J, F.metric = g := by |
| 85 | let := (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 86 | let := (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton (I := 𝓡 n) (n := ∞) |
| 87 | let Fchart : ℕ → RicciFlow n (Piece U i) J := fun k => |
| 88 | (Fseq k).pullbackToCanonicalDomain (U i) (hU i) (e k) (he k) |
| 89 | apply RicciFlow.exists_of_bilinear_spacetime_jets Fchart g hJ hg |
| 90 | intro x m K hK hKU |
| 91 | rw [canonical_extChartAt_target U hU] at hKU |
| 92 | have hseq (k : ℕ) : EqOn |
| 93 | (fun p : ℝ × EuclideanSpace ℝ (Fin n) => |
| 94 | ((Fseq k).metric p.1).pullbackCoefficients (chartParametrization U hU (e k)) p.2) |
| 95 | (fun p => ((Fchart k).metric p.1).pullbackCoefficients |
| 96 | (extChartAt (𝓡 n) x).symm p.2) (J ×ˢ U i) := by |
| 97 | intro p hp |
| 98 | exact (canonical_pullbackMetric_coefficients U hU ((Fseq k).metric p.1) |
| 99 | (e k) (he k) x ⟨p.2, hp.2⟩).symm |
| 100 | have hlim : EqOn B (fun p : ℝ × EuclideanSpace ℝ (Fin n) => |
| 101 | (g p.1).pullbackCoefficients (extChartAt (𝓡 n) x).symm p.2) (J ×ˢ U i) := by |
| 102 | intro p hp |
| 103 | have hform : B p = (g p.1).inner ⟨p.2, hp.2⟩ := by |
| 104 | ext v w |
| 105 | exact (hcoeff p.1 hp.1 ⟨p.2, hp.2⟩ v w).symm |
| 106 | exact hform.trans (RiemannianMetric.pullbackCoefficients_canonicalChart (U i) (hU i) |
| 107 | (g p.1) x ⟨p.2, hp.2⟩).symm |
| 108 | exact ((hjet m K hK hKU).congr (Eventually.of_forall fun k => |
| 109 | (eqOn_iteratedFDeriv_of_isOpen (hJ.prod (hU i)) (hseq k) m).mono hKU)).congr_right |
| 110 | ((eqOn_iteratedFDeriv_of_isOpen (hJ.prod (hU i)) hlim m).mono hKU) |
| 111 | |
| 112 | end PoincareMT.ChartDistance |