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.MetricLimit |
| 2 | |
| 3 | /-! |
| 4 | # Local coefficient limits preserve the original terminal transitions |
| 5 | |
| 6 | The source fields are only required on this pair of charts at their |
| 7 | common time. There is no global source metric family or common chart |
| 8 | lifetime in this coefficient compatibility argument. |
| 9 | Source: MT Theorem 5.11 and Proposition 5.14, pp. 90-91; |
| 10 | derivations/terminal-germs-overlap.md, Stage A5h2. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter Metric Poincare.Gluing Poincare.Analysis.Calculus |
| 17 | open scoped Topology NNReal Manifold ContDiff |
| 18 | |
| 19 | namespace PoincareMT.M47 |
| 20 | |
| 21 | open ChartDistance |
| 22 | |
| 23 | variable {ι : Type*} {n : ℕ} |
| 24 | (U : ι → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 25 | [∀ i, Nonempty (Piece U i)] |
| 26 | {M : ℕ → Type*} [∀ k, MetricSpace (M k)] |
| 27 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 28 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 29 | {e : ∀ k i, Piece U i → M k} |
| 30 | {D : ∀ i j, C(Piece U i × Piece U j, ℝ)} |
| 31 | (hD : ∀ i j x y, Tendsto (fun k => dist (e k i x) (e k j y)) atTop |
| 32 | (𝓝 (D i j (x, y)))) |
| 33 | (L : ι → ℝ≥0) (he : ∀ k i, LipschitzWith (L i) (e k i)) |
| 34 | (c : ι → ℝ) (hc : ∀ i, 0 < c i) |
| 35 | (hlower : ∀ k i x y, c i * dist x y ≤ dist (e k i x) (e k i y)) |
| 36 | (hopen : ∀ k i, Topology.IsOpenEmbedding (e k i)) |
| 37 | (hconn : ∀ k (p : M k) r, IsPreconnected (ball p r)) |
| 38 | (hsmooth : letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 39 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 40 | ∀ k i, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (e k i)) |
| 41 | |
| 42 | include hD he hc hlower hopen hconn hsmooth |
| 43 | |
| 44 | /-- The actual source coefficient identity passes to the same |
| 45 | zero-distance transition constructed at terminal time. -/ |
| 46 | theorem terminalGerms_local_coefficient_transition |
| 47 | (i j : ι) |
| 48 | (hbound : LocallyEventuallyBoundedDerivatives |
| 49 | (Subtype.val '' overlap (fun i j => D i j) i j) |
| 50 | (fun k => coordinateRepresentative U hU |
| 51 | (fun x => Function.invFun (e k j) (e k i x)))) |
| 52 | (Aseq Bseq : ℕ → EuclideanSpace ℝ (Fin n) → |
| 53 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 54 | (A B : EuclideanSpace ℝ (Fin n) → |
| 55 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 56 | (hA : ∀ x ∈ U i, ∀ v w, |
| 57 | Tendsto (fun k => Aseq k x v w) atTop (𝓝 (A x v w))) |
| 58 | (hB : TendstoLocallyUniformlyOn Bseq B atTop (U j)) |
| 59 | (hBcont : ContinuousOn B (U j)) |
| 60 | (hsource : ∀ x ∈ Subtype.val '' overlap (fun i j => D i j) i j, |
| 61 | ∀ᶠ k in atTop, ∀ v w, |
| 62 | let f := coordinateRepresentative U hU |
| 63 | (fun y => Function.invFun (e k j) (e k i y)) |
| 64 | Bseq k (f x) (fderiv ℝ f x v) (fderiv ℝ f x w) = Aseq k x v w) : |
| 65 | let f := coordinateRepresentative U hU (transition (fun i j => D i j) i j) |
| 66 | ∀ x ∈ Subtype.val '' overlap (fun i j => D i j) i j, ∀ v w, |
| 67 | B (f x) (fderiv ℝ f x v) (fderiv ℝ f x w) = A x v w := by |
| 68 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 69 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 70 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 71 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 72 | let : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 73 | apply CoordinateTransition.pullback_eq_of_tendsto (hU j) |
| 74 | (Aseq := Aseq) (Bseq := Bseq) |
| 75 | (fseq := fun k => coordinateRepresentative U hU |
| 76 | (fun x => Function.invFun (e k j) (e k i x))) |
| 77 | ?_ hB hBcont ?_ ?_ ?_ hsource |
| 78 | · rintro _ ⟨x, _, rfl⟩ v w |
| 79 | exact hA x x.property v w |
| 80 | · rintro _ ⟨x, _, rfl⟩ |
| 81 | rw [coordinateRepresentative_apply] |
| 82 | exact (transition (fun i j => D i j) i j x).property |
| 83 | · intro x hx |
| 84 | exact coordinate_source_transition_tendsto U hU hD L he c hc hlower hopen hconn i j hx |
| 85 | · intro x hx v |
| 86 | have hjet := tendsto_coordinate_source_transition_jet U hU hD L he c hc hlower |
| 87 | hopen hconn hsmooth i j hbound 1 hx |
| 88 | have hev := ContinuousMultilinearMap.uniformContinuous_eval_const |
| 89 | (𝕜 := ℝ) (F := EuclideanSpace ℝ (Fin n)) (fun _ : Fin 1 => v) |
| 90 | simpa only [Function.comp_def, iteratedFDeriv_one_apply] using |
| 91 | (hev.continuous.tendsto _).comp hjet |
| 92 | |
| 93 | end PoincareMT.M47 |