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.Generalized.ReducedGeometry.SourceNames.ReducedLength |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Construction.ExponentialSliceMap |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.ManifoldLocalInverse |
| 4 | |
| 5 | /-! |
| 6 | # Local inverses of the actual exponential slice map |
| 7 | |
| 8 | Morgan-Tian Definition 6.25 and Proposition 6.28, pp. 116-117. |
| 9 | The actual slice differential is invertible exactly when the frozen |
| 10 | horizontal differential is. M09's generic manifold inverse theorem |
| 11 | then gives a smooth inverse and a whole open neighborhood where |
| 12 | invertibility persists. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {T : ℝ} {x : G.Point} |
| 27 | |
| 28 | private theorem horizontal_t2Space : T2Space (G.Horizontal x) := |
| 29 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 30 | |
| 31 | attribute [local instance] horizontal_t2Space |
| 32 | |
| 33 | private theorem bijective_iff_of_horizontal_val_eq {a b : G.Point} (h : a = b) |
| 34 | (A : G.Horizontal x →L[ℝ] G.Horizontal a) (B : G.Horizontal x →L[ℝ] G.Horizontal b) |
| 35 | (hval : ∀ W, (A W).val = (B W).val) : Function.Bijective A ↔ Function.Bijective B := by |
| 36 | cases h |
| 37 | have heq : A = B := ContinuousLinearMap.ext (fun W => Subtype.ext (hval W)) |
| 38 | rw [heq] |
| 39 | |
| 40 | /-- The actual slice differential is bijective exactly when the |
| 41 | frozen horizontal exponential differential is bijective, |
| 42 | Definition 6.25 and Proposition 6.28, pp. 116-117. -/ |
| 43 | theorem exponentialSliceMap_differential_bijective_iff (E : M14ExponentialFamily G T x) |
| 44 | {τ : ℝ} (hτ : 0 ≤ τ) (q₀ : (G.slices (T - τ)).Point) |
| 45 | {Z : G.Horizontal x} (hZ : (Z, Real.sqrt τ) ∈ E.domain) : |
| 46 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 47 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 48 | Function.Bijective |
| 49 | (mfderiv (𝓘(ℝ, G.Horizontal x)) (𝓡 n) (exponentialSliceMap E τ hτ q₀) Z) ↔ |
| 50 | Function.Bijective (E.differential Z (Real.sqrt τ) hZ) := by |
| 51 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 52 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 53 | let f := exponentialSliceMap E τ hτ q₀ |
| 54 | let A : G.Horizontal x →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 55 | mfderiv (𝓘(ℝ, G.Horizontal x)) (𝓡 n) f Z |
| 56 | let L := (G.slices (T - τ)).tangentEquiv (f Z) |
| 57 | have hcomp := bijective_iff_of_horizontal_val_eq (exponentialSliceMap_val E hτ q₀ hZ) |
| 58 | (L.toContinuousLinearMap.comp A) (E.differential Z (Real.sqrt τ) hZ) |
| 59 | (fun W => exponentialSliceMap_differential_val E hτ q₀ hZ W) |
| 60 | exact (Function.Bijective.of_comp_iff' L.bijective A).symm.trans hcomp |
| 61 | |
| 62 | /-- An invertible actual exponential slice differential gives a |
| 63 | smooth inverse on an open source inside any prescribed open survival |
| 64 | neighborhood, with invertibility throughout that source. This calls |
| 65 | M09's proved manifold inverse theorem directly, Proposition 6.28, p. 117. -/ |
| 66 | theorem exists_exponentialSlice_local_inverse (E : M14ExponentialFamily G T x) |
| 67 | {τ : ℝ} (hτ : 0 ≤ τ) (q₀ : (G.slices (T - τ)).Point) |
| 68 | {S : Set (G.Horizontal x)} (hS : IsOpen S) |
| 69 | (hSD : ∀ Z ∈ S, (Z, Real.sqrt τ) ∈ E.domain) |
| 70 | {Z : G.Horizontal x} (hZS : Z ∈ S) |
| 71 | (hbij : Function.Bijective (E.differential Z (Real.sqrt τ) (hSD Z hZS))) : |
| 72 | ∃ e : OpenPartialHomeomorph (G.Horizontal x) (G.slices (T - τ)).Point, |
| 73 | Z ∈ e.source ∧ e.source ⊆ S ∧ |
| 74 | EqOn (e : G.Horizontal x → (G.slices (T - τ)).Point) |
| 75 | (exponentialSliceMap E τ hτ q₀) e.source ∧ |
| 76 | M14InverseSliceSmooth G e.symm e.target ∧ |
| 77 | ∀ W ∈ e.source, ∃ hW : (W, Real.sqrt τ) ∈ E.domain, |
| 78 | Function.Bijective (E.differential W (Real.sqrt τ) hW) := by |
| 79 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 80 | let : NormedAddCommGroup (G.Horizontal x) := |
| 81 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 82 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 83 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 84 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 85 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 86 | let : FiniteDimensional ℝ (G.Horizontal x) := |
| 87 | VectorBundle.finiteDimensional ℝ (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 88 | have hsm : ContMDiffOn (𝓘(ℝ, G.Horizontal x)) (𝓡 n) ∞ |
| 89 | (exponentialSliceMap E τ hτ q₀) S := |
| 90 | fun W hW => (exponentialSliceMap_contMDiffAt E hτ q₀ (hSD W hW)).contMDiffWithinAt |
| 91 | obtain ⟨e, hZe, heS, hef, hinv, heBij⟩ := Proofs.M09.exists_manifold_local_inverse |
| 92 | (exponentialSliceMap E τ hτ q₀) S hS hsm Z hZS |
| 93 | ((exponentialSliceMap_differential_bijective_iff E hτ q₀ (hSD Z hZS)).mpr hbij) |
| 94 | refine ⟨e, hZe, heS, hef, hinv, ?_⟩ |
| 95 | intro W hW |
| 96 | exact ⟨hSD W (heS hW), |
| 97 | (exponentialSliceMap_differential_bijective_iff E hτ q₀ (hSD W (heS hW))).mp (heBij W hW)⟩ |
| 98 | |
| 99 | end PoincareMT.M14 |