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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/Existence/ConjugatingFlowFamilyNative.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import Mathlib.Geometry.Manifold.Diffeomorph |
| 6 | import PoincareLib.Geometry.Riemannian.Connection |
| 7 | |
| 8 | /-! |
| 9 | # Native smooth inverse packaging for a time-dependent flow |
| 10 | |
| 11 | The manifold ODE producer supplies a forward map and its reverse flow. This |
| 12 | file turns those two smooth maps and their two composition identities into |
| 13 | the retained `Diffeomorph` family. The construction is deliberately |
| 14 | independent of the Ricci-flow producer and of any pullback derivative proof. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open scoped Manifold ContDiff |
| 20 | |
| 21 | noncomputable section |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.ConjugatingFlowNative |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} |
| 28 | [TopologicalSpace M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 30 | [IsManifold (𝓡 n) ∞ M] |
| 31 | |
| 32 | local notation "I" => 𝓡 n |
| 33 | |
| 34 | /-- A smooth map with a smooth two-sided inverse is a retained diffeomorph. -/ |
| 35 | def diffeomorphOfSmoothInverse |
| 36 | {f g : M → M} |
| 37 | (hf : ContMDiff I I ∞ f) (hg : ContMDiff I I ∞ g) |
| 38 | (hgf : ∀ x, g (f x) = x) (hfg : ∀ x, f (g x) = x) : |
| 39 | Diffeomorph I I M M ∞ where |
| 40 | toEquiv := |
| 41 | { toFun := f |
| 42 | invFun := g |
| 43 | left_inv := hgf |
| 44 | right_inv := hfg } |
| 45 | contMDiff_toFun := hf |
| 46 | contMDiff_invFun := hg |
| 47 | |
| 48 | @[simp] theorem diffeomorphOfSmoothInverse_apply |
| 49 | {f g : M → M} |
| 50 | (hf : ContMDiff I I ∞ f) (hg : ContMDiff I I ∞ g) |
| 51 | (hgf : ∀ x, g (f x) = x) (hfg : ∀ x, f (g x) = x) (x : M) : |
| 52 | diffeomorphOfSmoothInverse hf hg hgf hfg x = f x := rfl |
| 53 | |
| 54 | @[simp] theorem diffeomorphOfSmoothInverse_symm_apply |
| 55 | {f g : M → M} |
| 56 | (hf : ContMDiff I I ∞ f) (hg : ContMDiff I I ∞ g) |
| 57 | (hgf : ∀ x, g (f x) = x) (hfg : ∀ x, f (g x) = x) (x : M) : |
| 58 | (diffeomorphOfSmoothInverse hf hg hgf hfg).symm x = g x := rfl |
| 59 | |
| 60 | private theorem smooth_slice |
| 61 | {F : ℝ → M → M} |
| 62 | (hF : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 63 | (fun p : ℝ × M => F p.1 p.2)) (t : ℝ) : |
| 64 | ContMDiff I I ∞ (F t) := by |
| 65 | intro x |
| 66 | have hpair : ContMDiffAt I (𝓘(ℝ, ℝ).prod I) ∞ |
| 67 | (fun y : M => ((t, y) : ℝ × M)) x := |
| 68 | contMDiffAt_const.prodMk contMDiffAt_id |
| 69 | have hcomp := (hF (t, x)).comp x hpair |
| 70 | simpa only [Function.comp_def] using hcomp |
| 71 | |
| 72 | /-- Package forward and reverse jointly smooth flow maps into a diffeomorph family. -/ |
| 73 | def diffeomorphFamily |
| 74 | {Φ Ψ : ℝ → M → M} |
| 75 | (hΦ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 76 | (fun p : ℝ × M => Φ p.1 p.2)) |
| 77 | (hΨ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 78 | (fun p : ℝ × M => Ψ p.1 p.2)) |
| 79 | (hΨΦ : ∀ (t : ℝ) (x : M), Ψ t (Φ t x) = x) |
| 80 | (hΦΨ : ∀ (t : ℝ) (x : M), Φ t (Ψ t x) = x) : |
| 81 | ℝ → Diffeomorph I I M M ∞ := fun t => |
| 82 | diffeomorphOfSmoothInverse (smooth_slice hΦ t) (smooth_slice hΨ t) |
| 83 | (hΨΦ t) (hΦΨ t) |
| 84 | |
| 85 | @[simp] theorem diffeomorphFamily_apply |
| 86 | {Φ Ψ : ℝ → M → M} |
| 87 | (hΦ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 88 | (fun p : ℝ × M => Φ p.1 p.2)) |
| 89 | (hΨ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 90 | (fun p : ℝ × M => Ψ p.1 p.2)) |
| 91 | (hΨΦ : ∀ (t : ℝ) (x : M), Ψ t (Φ t x) = x) |
| 92 | (hΦΨ : ∀ (t : ℝ) (x : M), Φ t (Ψ t x) = x) |
| 93 | (t : ℝ) (x : M) : |
| 94 | diffeomorphFamily hΦ hΨ hΨΦ hΦΨ t x = Φ t x := rfl |
| 95 | |
| 96 | @[simp] theorem diffeomorphFamily_symm_apply |
| 97 | {Φ Ψ : ℝ → M → M} |
| 98 | (hΦ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 99 | (fun p : ℝ × M => Φ p.1 p.2)) |
| 100 | (hΨ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 101 | (fun p : ℝ × M => Ψ p.1 p.2)) |
| 102 | (hΨΦ : ∀ (t : ℝ) (x : M), Ψ t (Φ t x) = x) |
| 103 | (hΦΨ : ∀ (t : ℝ) (x : M), Φ t (Ψ t x) = x) |
| 104 | (t : ℝ) (x : M) : |
| 105 | (diffeomorphFamily hΦ hΨ hΨΦ hΦΨ t).symm x = Ψ t x := rfl |
| 106 | |
| 107 | theorem diffeomorphFamily_zero |
| 108 | {Φ Ψ : ℝ → M → M} |
| 109 | (hΦ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 110 | (fun p : ℝ × M => Φ p.1 p.2)) |
| 111 | (hΨ : ContMDiff (𝓘(ℝ, ℝ).prod I) I ∞ |
| 112 | (fun p : ℝ × M => Ψ p.1 p.2)) |
| 113 | (hΨΦ : ∀ (t : ℝ) (x : M), Ψ t (Φ t x) = x) |
| 114 | (hΦΨ : ∀ (t : ℝ) (x : M), Φ t (Ψ t x) = x) |
| 115 | (h0 : ∀ x, Φ 0 x = x) : |
| 116 | diffeomorphFamily hΦ hΨ hΨΦ hΦΨ 0 = Diffeomorph.refl I M ∞ := by |
| 117 | apply Diffeomorph.ext |
| 118 | intro x |
| 119 | simp [h0 x] |
| 120 | |
| 121 | end PoincareMT.ConjugatingFlowNative |
| 122 | |
| 123 | end |