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.ReducedGeometry.ReducedLength.Calculus.ManifoldLocalInverse |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.TriangularBijective |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Exponential.FamilySlices |
| 4 | |
| 5 | /-! |
| 6 | # Local spacetime inverses of the actual exponential family |
| 7 | |
| 8 | The identity time coordinate makes the full derivative triangular. Its |
| 9 | invertibility is exactly that of the frozen initial-vector differential. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option maxSynthPendingDepth 3 |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedLength |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 23 | [IsManifold (𝓡 n) ∞ M] |
| 24 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 25 | |
| 26 | set_option backward.isDefEq.respectTransparency false in |
| 27 | theorem lExponentialFamily_spacetime_bijective_iff (A : LExponentialFamily F T τmax p) |
| 28 | (Z : TangentSpace (𝓡 n) p) (τ : ℝ) (ht : 0 < τ) (hm : τ < τmax) : |
| 29 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 30 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 31 | Function.Bijective (mfderiv ((𝓘(ℝ, TangentSpace (𝓡 n) p)).prod (𝓘(ℝ, ℝ))) |
| 32 | ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 33 | (fun z : TangentSpace (𝓡 n) p × ℝ ↦ (A.gamma z.1 z.2, z.2)) (Z, τ)) ↔ |
| 34 | Function.Bijective (A.sliceDifferential Z τ) := by |
| 35 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 36 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 37 | have hgs := A.gamma_smooth.contMDiffAt ((isOpen_univ.prod isOpen_Ioo).mem_nhds |
| 38 | (show (Z, τ) ∈ Set.univ ×ˢ Set.Ioo 0 τmax from ⟨Set.mem_univ _, ht, hm⟩)) |
| 39 | have hg := hgs.mdifferentiableAt (by simp) |
| 40 | rw [mfderiv_prodMk hg mdifferentiableAt_snd, mfderiv_snd] |
| 41 | apply triangular_bijective_iff _ (A.sliceDifferential Z τ) |
| 42 | · intro z |
| 43 | rfl |
| 44 | · intro W |
| 45 | change mfderiv ((𝓘(ℝ, TangentSpace (𝓡 n) p)).prod (𝓘(ℝ, ℝ))) (𝓡 n) |
| 46 | (fun z ↦ A.gamma z.1 z.2) (Z, τ) (W, 0) = A.sliceDifferential Z τ W |
| 47 | rw [mfderiv_prod_eq_add_apply hg] |
| 48 | simp only [map_zero, add_zero, LExponentialFamily.sliceDifferential] |
| 49 | rfl |
| 50 | |
| 51 | set_option backward.isDefEq.respectTransparency false in |
| 52 | theorem lExponentialFamily_exists_local_inverse (A : LExponentialFamily F T τmax p) |
| 53 | (z : TangentSpace (𝓡 n) p × ℝ) (ht : 0 < z.2) (hm : z.2 < τmax) |
| 54 | (hbij : Function.Bijective (A.sliceDifferential z.1 z.2)) : |
| 55 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 56 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 57 | ∃ e : OpenPartialHomeomorph (TangentSpace (𝓡 n) p × ℝ) (M × ℝ), |
| 58 | z ∈ e.source ∧ e.source ⊆ Set.univ ×ˢ Set.Ioo 0 τmax ∧ |
| 59 | Set.EqOn e (fun w ↦ (A.gamma w.1 w.2, w.2)) e.source ∧ |
| 60 | ContMDiffOn ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 61 | ((𝓘(ℝ, TangentSpace (𝓡 n) p)).prod (𝓘(ℝ, ℝ))) ∞ e.symm e.target ∧ |
| 62 | ∀ w ∈ e.source, Function.Bijective (A.sliceDifferential w.1 w.2) := by |
| 63 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 64 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 65 | letI : FiniteDimensional ℝ (TangentSpace (𝓡 n) p) := |
| 66 | VectorBundle.finiteDimensional ℝ (EuclideanSpace ℝ (Fin n)) |
| 67 | (TangentSpace (𝓡 n) : M → Type _) p |
| 68 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n) × ℝ) (M × ℝ) := |
| 69 | prodChartedSpace (EuclideanSpace ℝ (Fin n)) M ℝ ℝ |
| 70 | letI : IsManifold (𝓘(ℝ, EuclideanSpace ℝ (Fin n) × ℝ)) ∞ (M × ℝ) := by |
| 71 | rw [modelWithCornersSelf_prod] |
| 72 | exact IsManifold.prod (I := 𝓡 n) (I' := 𝓘(ℝ, ℝ)) M ℝ |
| 73 | let Φ : TangentSpace (𝓡 n) p × ℝ → M × ℝ := fun w ↦ (A.gamma w.1 w.2, w.2) |
| 74 | have hf : ContMDiffOn (𝓘(ℝ, TangentSpace (𝓡 n) p × ℝ)) |
| 75 | (𝓘(ℝ, EuclideanSpace ℝ (Fin n) × ℝ)) ∞ Φ (Set.univ ×ˢ Set.Ioo 0 τmax) := by |
| 76 | convert! A.gamma_smooth.prodMk contMDiffOn_snd using 1 <;> |
| 77 | simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 78 | have hfull : Function.Bijective (mfderiv (𝓘(ℝ, TangentSpace (𝓡 n) p × ℝ)) |
| 79 | (𝓘(ℝ, EuclideanSpace ℝ (Fin n) × ℝ)) Φ z) := by |
| 80 | convert! (lExponentialFamily_spacetime_bijective_iff A z.1 z.2 ht hm).mpr hbij using 1 <;> |
| 81 | simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 82 | congr 2 <;> simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 83 | obtain ⟨e, hze, hsub, he, hinv, hderiv⟩ := exists_manifold_local_inverse Φ |
| 84 | (Set.univ ×ˢ Set.Ioo 0 τmax) (isOpen_univ.prod isOpen_Ioo) hf z |
| 85 | ⟨Set.mem_univ _, ht, hm⟩ hfull |
| 86 | refine ⟨e, hze, hsub, he, ?_, ?_⟩ |
| 87 | · convert! hinv using 1 <;> simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 88 | · intro w hw |
| 89 | apply (lExponentialFamily_spacetime_bijective_iff A w.1 w.2 (hsub hw).2.1 (hsub hw).2.2).mp |
| 90 | convert! hderiv w hw using 1 <;> |
| 91 | simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 92 | congr 2 <;> simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 93 | |
| 94 | end PoincareMT.ReducedLength |