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.Variation.AdaptedFields.AdaptedMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.IndexForm.PullbackScalar |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.SquareRoot.Action.SquarePullback |
| 4 | |
| 5 | /-! |
| 6 | # The normalized adapted test field |
| 7 | |
| 8 | Scaling the nonsingular transport by (s-a)/(b-a) gives the adapted |
| 9 | field, with its genuine closed-endpoint derivative and normalized |
| 10 | pairings. Morgan-Tian Definition 6.35 and Lemma 6.36, p. 122. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T τ₁ τ₂ : ℝ} {x y : G.Point} {p : M14BackwardPath G T τ₁ τ₂ x y} |
| 25 | {R : M14SquareRootPath G p} |
| 26 | |
| 27 | /-- The normalized adapted field associated to a nonsingular factor, |
| 28 | Definition 6.35, p. 122. -/ |
| 29 | noncomputable def horizontalAdaptedField (a b : ℝ) (P : ∀ s, G.Horizontal (R.curve s)) : |
| 30 | ∀ s, G.Horizontal (R.curve s) := fun s => ((s - a) / (b - a)) • P s |
| 31 | |
| 32 | variable {a b : ℝ} {P Q : ∀ s, G.Horizontal (R.curve s)} |
| 33 | |
| 34 | /-- The normalized field retains an actual closed pullback extension, |
| 35 | Definition 6.35 and Lemma 6.36, p. 122. -/ |
| 36 | noncomputable def horizontalAdaptedExtension |
| 37 | (E : M14PullbackExtension G R.curve (Icc a b) P) : |
| 38 | M14PullbackExtension G R.curve (Icc a b) (horizontalAdaptedField a b P) := |
| 39 | smulPullbackExtension E (fun s => (s - a) / (b - a)) |
| 40 | ((contDiff_id.sub contDiff_const).div_const (b - a)) |
| 41 | |
| 42 | /-- The normalized adapted field is smooth on the full closed interval, |
| 43 | Definition 6.35, p. 122. -/ |
| 44 | theorem horizontalAdaptedField_contMDiffOn (hP : IsHorizontalUnitAdaptedFieldOn R a b P) : |
| 45 | ContMDiffOn (𝓘(ℝ, ℝ)) |
| 46 | ((spacetimeModel n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 47 | (fun s => Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) (R.curve s) |
| 48 | (horizontalAdaptedField a b P s)) (Icc a b) := by |
| 49 | obtain ⟨E, _⟩ := hP.equation |
| 50 | exact pullbackExtension_field_contMDiffOn (horizontalAdaptedExtension E) |
| 51 | (R.smooth.mono (hP.interval_subset.trans R.interval_subset)) |
| 52 | |
| 53 | /-- The normalized field vanishes initially and has the unit factor's |
| 54 | terminal value, Definition 6.35, p. 122. -/ |
| 55 | theorem horizontalAdaptedField_endpoints (hab : a < b) : |
| 56 | horizontalAdaptedField a b P a = 0 ∧ horizontalAdaptedField a b P b = P b := by |
| 57 | simp only [horizontalAdaptedField, sub_self, zero_div, zero_smul, |
| 58 | div_self (sub_ne_zero.mpr hab.ne'), one_smul, and_self] |
| 59 | |
| 60 | /-- The actual normalized covariant derivative is regular at the |
| 61 | initial endpoint, before writing the singular adapted equation, |
| 62 | Definition 6.35, p. 122. -/ |
| 63 | theorem horizontalAdaptedField_covariant_pair (hP : IsHorizontalUnitAdaptedFieldOn R a b P) |
| 64 | (E : M14PullbackExtension G R.curve (Icc a b) P) |
| 65 | {s : ℝ} (hs : s ∈ Icc a b) (W : G.Horizontal (R.curve s)) : |
| 66 | G.spacetime.horizontalMetric.inner (R.curve s) |
| 67 | (M14HorizontalCovariantDerivative G R.curve (Icc a b) |
| 68 | (horizontalAdaptedField a b P) (horizontalAdaptedExtension E) s) W = |
| 69 | G.spacetime.horizontalMetric.inner (R.curve s) (P s) W / (b - a) - |
| 70 | 2 * s * ((s - a) / (b - a)) * horizontalRicci G.leafwise (R.curve s) (P s) W := by |
| 71 | have hd : deriv (fun r : ℝ => (r - a) / (b - a)) s = 1 / (b - a) := by |
| 72 | simpa only [id_eq] using ((hasDerivAt_id s).sub_const a).div_const (b - a) |>.deriv |
| 73 | unfold horizontalAdaptedExtension horizontalAdaptedField |
| 74 | rw [horizontalCovariantDerivative_smul E _ _ hs, hd] |
| 75 | simp only [map_add, map_smul, add_apply, smul_apply, smul_eq_mul, |
| 76 | hP.equation_for_extension E s hs] |
| 77 | ring |
| 78 | |
| 79 | /-- On the strict interval the normalized field satisfies the |
| 80 | Ricci-corrected adapted equation, Definition 6.35, p. 122. -/ |
| 81 | theorem horizontalAdaptedField_equation (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 82 | (hP : IsHorizontalUnitAdaptedFieldOn R a b P) |
| 83 | (E : M14PullbackExtension G R.curve (Icc a b) P) |
| 84 | {s : ℝ} (hs : s ∈ Icc a b) (has : a < s) (W : G.Horizontal (R.curve s)) : |
| 85 | G.spacetime.horizontalMetric.inner (R.curve s) |
| 86 | (M14HorizontalCovariantDerivative G R.curve (Icc a b) |
| 87 | (horizontalAdaptedField a b P) (horizontalAdaptedExtension E) s) W = |
| 88 | G.spacetime.horizontalMetric.inner (R.curve s) (horizontalAdaptedField a b P s) W / |
| 89 | (s - a) - 2 * s * |
| 90 | horizontalRicci G.leafwise (R.curve s) (horizontalAdaptedField a b P s) W := by |
| 91 | rw [horizontalAdaptedField_covariant_pair hP E hs] |
| 92 | simp only [horizontalAdaptedField, map_smul, smul_apply, smul_eq_mul, |
| 93 | horizontalRicci_smul_left hM12] |
| 94 | field_simp [sub_ne_zero.mpr has.ne', sub_ne_zero.mpr hP.ordered.ne'] |
| 95 | |
| 96 | /-- Normalized adapted pairings scale by the squared square-time |
| 97 | distance from the initial endpoint, Lemma 6.36, p. 122. -/ |
| 98 | theorem horizontalAdaptedField_pair (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 99 | (hP : IsHorizontalUnitAdaptedFieldOn R a b P) |
| 100 | (hQ : IsHorizontalUnitAdaptedFieldOn R a b Q) {s : ℝ} (hs : s ∈ Icc a b) : |
| 101 | G.spacetime.horizontalMetric.inner (R.curve s) |
| 102 | (horizontalAdaptedField a b P s) (horizontalAdaptedField a b Q s) = |
| 103 | ((s - a) / (b - a)) ^ 2 * G.spacetime.horizontalMetric.inner (R.curve b) (P b) (Q b) := by |
| 104 | have hpair := horizontalUnitAdapted_pair_eq hM12 hP hQ hs (right_mem_Icc.mpr hP.ordered.le) |
| 105 | simp only [horizontalAdaptedField, map_smul, smul_apply, smul_eq_mul] |
| 106 | rw [← hpair] |
| 107 | ring |
| 108 | |
| 109 | end PoincareMT.M14 |