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.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceCountableSourceOverlap |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceCountableSliceConvergence |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Germs.TerminalGermsMetricOverlap |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Germs.TerminalGermsFiberCompatibility |
| 5 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.JetBounds |
| 6 | |
| 7 | /-! |
| 8 | # Included fibre compatibility on the original terminal quotient |
| 9 | |
| 10 | Actual terminal coefficient bounds control the retained transitions. |
| 11 | The included slice limits pass their source metric identities to those |
| 12 | same transitions and then to both tangent slots in each quotient fibre. |
| 13 | MT Proposition 5.14; terminal-source-countable-finite-germs.md, C. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Metric TopologicalSpace Poincare.Gluing Poincare.Analysis.Calculus |
| 20 | open scoped Manifold ContDiff Topology NNReal |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M47 |
| 25 | |
| 26 | open ChartDistance |
| 27 | |
| 28 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 29 | local notation "V" => E →L[ℝ] E →L[ℝ] ℝ |
| 30 | |
| 31 | section Charts |
| 32 | |
| 33 | variable (U : ℕ → Opens E) [∀ n, Nonempty (U n)] |
| 34 | |
| 35 | local notation "Uset" => (fun n => (U n : Set E)) |
| 36 | local notation "hU" => (fun n => TopologicalSpace.Opens.isOpen (U n)) |
| 37 | |
| 38 | noncomputable local instance chartSpace (n : ℕ) : ChartedSpace E (U n) := |
| 39 | (U n).isOpen.isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 40 | |
| 41 | noncomputable local instance chartManifold (n : ℕ) : IsManifold (𝓡 3) ∞ (U n) := |
| 42 | (U n).isOpen.isOpenEmbedding_subtypeVal.isManifold_singleton |
| 43 | |
| 44 | local instance chartsLocallyCompact : ∀ n, LocallyCompactSpace (Piece Uset n) := |
| 45 | fun n => (U n).isOpen.locallyCompactSpace |
| 46 | |
| 47 | local instance opensLocallyCompact : ∀ n, LocallyCompactSpace (U n) := |
| 48 | fun n => (U n).isOpen.locallyCompactSpace |
| 49 | |
| 50 | /-- Source coefficient identities and their actual included limits |
| 51 | give full metric compatibility on the unchanged quotient fibres. -/ |
| 52 | theorem terminalSourceCountable_limit_fibre_compatibility |
| 53 | {M : ℕ → Type u} [∀ k, MetricSpace (M k)] [∀ k, ChartedSpace E (M k)] |
| 54 | [∀ k, IsManifold (𝓡 3) ∞ (M k)] |
| 55 | (maps : ∀ k n, U n → M k) |
| 56 | (D : ∀ n n', C(U n × U n', ℝ)) |
| 57 | (hD : ∀ n n' x y, Tendsto (fun k => dist (maps k n x) (maps k n' y)) atTop |
| 58 | (𝓝 (D n n' (x, y)))) |
| 59 | (L : ℕ → ℝ≥0) (he : ∀ k n, LipschitzWith (L n) (maps k n)) |
| 60 | (c : ℕ → ℝ) (hc : ∀ n, 0 < c n) |
| 61 | (hlower : ∀ k n x y, c n * dist x y ≤ dist (maps k n x) (maps k n y)) |
| 62 | (hopen : ∀ k n, Topology.IsOpenEmbedding (maps k n)) |
| 63 | (hconn : ∀ k (x : M k) r, IsPreconnected (ball x r)) |
| 64 | (hsmooth : ∀ k n, IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ (maps k n)) |
| 65 | (g : ∀ k, RiemannianMetric 3 (M k)) |
| 66 | (hjets : ∀ n, LocallyEventuallyBoundedDerivatives (U n) |
| 67 | (fun k => (g k).pullbackCoefficients (chartParametrization Uset hU (maps k n)))) |
| 68 | (helliptic : ∀ n K, IsCompact K → K ⊆ U n → |
| 69 | ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, ∀ x ∈ K, ∀ v, |
| 70 | a * ‖v‖ ^ 2 ≤ (g k).pullbackCoefficients |
| 71 | (chartParametrization Uset hU (maps k n)) x v v) |
| 72 | (hO : SmoothOverlap Uset hU (overlapSystem hD L he c hc hlower hopen hconn)) |
| 73 | (tau : ℕ → ℝ) (G : ∀ n, RicciFlow 3 (U n) (Icc (-tau n) 0)) |
| 74 | (f : ℕ → ℕ → ℝ × E → V) (coeff : ℕ → ℝ × E → V) |
| 75 | (hcoeff : ∀ n t, t ∈ Icc (-tau n) 0 → ∀ (x : U n) v w, |
| 76 | ((G n).metric t).inner x v w = coeff n (t, x) v w) |
| 77 | (hconv : ∀ n t, t ∈ Icc (-tau n) 0 → |
| 78 | TendstoLocallyUniformlyOn (fun k x => f n k (t, x)) |
| 79 | (fun x => coeff n (t, x)) atTop (U n)) |
| 80 | (hcontinuous : ∀ n t, t ∈ Icc (-tau n) 0 → |
| 81 | ContinuousOn (fun x => coeff n (t, x)) (U n)) |
| 82 | (hsource : ∀ i j t, t ∈ Icc (-tau i) 0 → t ∈ Icc (-tau j) 0 → |
| 83 | ∀ x ∈ Subtype.val '' overlap (fun n n' => D n n') i j, |
| 84 | ∀ᶠ k in atTop, ∀ v w, |
| 85 | let T := coordinateRepresentative Uset hU |
| 86 | (fun y => Function.invFun (maps k j) (maps k i y)) |
| 87 | f j k (t, T x) (fderiv ℝ T x v) (fderiv ℝ T x w) = f i k (t, x) v w) : |
| 88 | let O := overlapSystem hD L he c hc hlower hopen hconn |
| 89 | letI := quotientChartedSpace Uset hU O |
| 90 | letI := quotient_isManifold Uset hU O hO |
| 91 | ∀ i j t, t ∈ Icc (-tau i) 0 → t ∈ Icc (-tau j) 0 → |
| 92 | ∀ (x : U i) (y : U j), O.include i x = O.include j y → |
| 93 | ∀ (a b : TangentSpace (𝓡 3) x) (c d : TangentSpace (𝓡 3) y), |
| 94 | mfderiv (𝓡 3) (𝓡 3) (O.include i) x a = |
| 95 | mfderiv (𝓡 3) (𝓡 3) (O.include j) y c → |
| 96 | mfderiv (𝓡 3) (𝓡 3) (O.include i) x b = |
| 97 | mfderiv (𝓡 3) (𝓡 3) (O.include j) y d → |
| 98 | ((G i).metric t).inner x a b = ((G j).metric t).inner y c d := by |
| 99 | let O := overlapSystem hD L he c hc hlower hopen hconn |
| 100 | let := quotientChartedSpace Uset hU O |
| 101 | let := quotient_isManifold Uset hU O hO |
| 102 | have hbound := fun i j => locallyEventuallyBoundedDerivatives_source_transition |
| 103 | Uset hU hD L he c hc hlower hopen hconn hsmooth g hjets helliptic i j |
| 104 | have hq : ∀ i, IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ (O.include i) := |
| 105 | fun i => include_isLocalDiffeomorph Uset hU O hO i |
| 106 | dsimp only |
| 107 | intro i j t hti htj x y hxy a b v w ha hb |
| 108 | apply terminalGerms_metric_fibre_compatibility O hq i j (hO i j) |
| 109 | ((G i).metric t) ((G j).metric t) ?_ x y hxy a b v w ha hb |
| 110 | apply terminalGerms_metric_pair_compatibility Uset hU O hO i j |
| 111 | ((G i).metric t) ((G j).metric t) |
| 112 | (fun z => coeff i (t, z)) (fun z => coeff j (t, z)) |
| 113 | (hcoeff i t hti) (hcoeff j t htj) |
| 114 | apply terminalGerms_local_coefficient_transition Uset hU hD L he c hc hlower |
| 115 | hopen hconn hsmooth i j (hbound i j) |
| 116 | (fun k z => f i k (t, z)) (fun k z => f j k (t, z)) |
| 117 | (fun z => coeff i (t, z)) (fun z => coeff j (t, z)) |
| 118 | ?_ (hconv j t htj) (hcontinuous j t htj) (hsource i j t hti htj) |
| 119 | intro z hz v w |
| 120 | have hev : Continuous (fun A : V => A v w) := |
| 121 | (continuous_id.clm_apply continuous_const).clm_apply continuous_const |
| 122 | exact (hev.tendsto _).comp ((hconv i t hti).tendsto_at hz) |
| 123 | |
| 124 | end Charts |
| 125 | |
| 126 | end PoincareMT.M47 |