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.Spacetime.Rescaling.Domain.Laws |
| 2 | import PoincareLib.Geometry.Riemannian.Homothety.Length |
| 3 | |
| 4 | /-! Adapted from Mapher06/Poincare-MorganTian, `PoincareMT/Proofs/M13/BallData.lean`, |
| 5 | revision `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See `references/ricci-flow/mapher/rescaling-import.json`. -/ |
| 6 | |
| 7 | /-! |
| 8 | # Actual ball sources and spatial reparameterization |
| 9 | |
| 10 | The ball comparison is a subtype of the actual slice diffeomorphism. |
| 11 | Spatial reparameterization of a compatible embedding uses only a homeomorphism. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u v w |
| 20 | |
| 21 | open PoincareMT.Homothety |
| 22 | |
| 23 | namespace PoincareMT.ParabolicRescaling |
| 24 | |
| 25 | noncomputable def embeddingPrecomposeHomeomorph |
| 26 | {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 27 | {time : X → ℝ} {I K : SpacetimeInterval} |
| 28 | {S : GeneralizedFlowSpacetime n X time I} {T : SmoothSpacetimeInterval K} |
| 29 | {C : Type v} {C' : Type w} [TopologicalSpace C] [TopologicalSpace C'] |
| 30 | (e : CompatibleSpacetimeEmbedding S T C) (f : C' ≃ₜ C) : |
| 31 | CompatibleSpacetimeEmbedding S T C' where |
| 32 | interval_subset := e.interval_subset |
| 33 | toSpacetime p := e.toSpacetime (p.1, f p.2) |
| 34 | embedding := e.embedding.comp ((Homeomorph.refl T.Point).prodCongr f).isEmbedding |
| 35 | time_eq p := e.time_eq (p.1, f p.2) |
| 36 | worldline_smooth x := e.worldline_smooth (f x) |
| 37 | worldline_derivative t x := e.worldline_derivative t (f x) |
| 38 | |
| 39 | theorem basedBallNeighborhood_ext |
| 40 | {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} {I : SpacetimeInterval} |
| 41 | {S : GeneralizedFlowSpacetime n X time I} |
| 42 | {D : ∀ t, SpacetimeSliceGeometry S t} {T : SpacetimeIntervalSystem} |
| 43 | {t : ℝ} {p : (D t).Point} {r : ℝ} {K : SpacetimeInterval} |
| 44 | {e f : BasedBallSpacetimeNeighborhood S D T t p r K} |
| 45 | (h : e.embedding = f.embedding) : e = f := by |
| 46 | cases e |
| 47 | cases f |
| 48 | cases h |
| 49 | rfl |
| 50 | |
| 51 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] |
| 52 | {A : AdaptedMetricAtlas n X} {R : GeneralizedFlowCarrierConclusion A} |
| 53 | {Q : ℝ} {hQ : 0 < Q} {a : ℝ} |
| 54 | |
| 55 | noncomputable def sliceBallHomeomorph (P : ParabolicSpacetimeRescaling R Q hQ a) |
| 56 | (t : ℝ) (p : (R.slices t).Point) (r : ℝ) : |
| 57 | ((R.slices t).metricOnPoints.ball p r) ≃ₜ |
| 58 | ((P.realization.slices (parabolicTime Q a t)).metricOnPoints.ball |
| 59 | (P.sliceIdentification t p) (Real.sqrt Q * r)) := by |
| 60 | apply (P.sliceIdentification t).toHomeomorph.subtype |
| 61 | intro x |
| 62 | have himage := homothety_ball_image (R.slices t).metricOnPoints |
| 63 | (P.realization.slices (parabolicTime Q a t)).metricOnPoints |
| 64 | (P.sliceIdentification t) Q hQ (P.slice_metric t) p r |
| 65 | change x ∈ (R.slices t).metricOnPoints.ball p r ↔ |
| 66 | P.sliceIdentification t x ∈ _ |
| 67 | rw [← himage] |
| 68 | constructor |
| 69 | · intro hx |
| 70 | exact ⟨x, hx, rfl⟩ |
| 71 | · rintro ⟨y, hy, hyx⟩ |
| 72 | exact (P.sliceIdentification t).injective hyx ▸ hy |
| 73 | |
| 74 | theorem sliceBallHomeomorph_val (P : ParabolicSpacetimeRescaling R Q hQ a) |
| 75 | (t : ℝ) (p : (R.slices t).Point) (r : ℝ) |
| 76 | (x : (R.slices t).metricOnPoints.ball p r) : |
| 77 | (sliceBallHomeomorph P t p r x).val = P.sliceIdentification t x.val := rfl |
| 78 | |
| 79 | theorem sliceBallHomeomorph_inverse_val (P : ParabolicSpacetimeRescaling R Q hQ a) |
| 80 | (t : ℝ) (p : (R.slices t).Point) (r : ℝ) |
| 81 | (x : (P.realization.slices (parabolicTime Q a t)).metricOnPoints.ball |
| 82 | (P.sliceIdentification t p) (Real.sqrt Q * r)) : |
| 83 | ((sliceBallHomeomorph P t p r).symm x).val = |
| 84 | (P.sliceIdentification t).symm x.val := rfl |
| 85 | |
| 86 | theorem sliceBallHomeomorph_source (P : ParabolicSpacetimeRescaling R Q hQ a) |
| 87 | (t : ℝ) (p : (R.slices t).Point) (r : ℝ) |
| 88 | (x : (R.slices t).metricOnPoints.ball p r) : |
| 89 | (sliceBallHomeomorph P t p r x).val.val = x.val.val := |
| 90 | P.sliceIdentification_eq t x.val |
| 91 | |
| 92 | theorem sliceBallHomeomorph_inverse_source (P : ParabolicSpacetimeRescaling R Q hQ a) |
| 93 | (t : ℝ) (p : (R.slices t).Point) (r : ℝ) |
| 94 | (x : (P.realization.slices (parabolicTime Q a t)).metricOnPoints.ball |
| 95 | (P.sliceIdentification t p) (Real.sqrt Q * r)) : |
| 96 | ((sliceBallHomeomorph P t p r).symm x).val.val = x.val.val := by |
| 97 | have h := sliceBallHomeomorph_source P t p r ((sliceBallHomeomorph P t p r).symm x) |
| 98 | rw [Homeomorph.apply_symm_apply] at h |
| 99 | exact h.symm |
| 100 | |
| 101 | end PoincareMT.ParabolicRescaling |