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.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Jacobi.ClosedJacobiODE |
| 3 | |
| 4 | /-! |
| 5 | # The nonsingular adapted equation on a closed coordinate interval |
| 6 | |
| 7 | The connection compensates for spatial motion and minus one half of |
| 8 | the metric time derivative compensates for Ricci evolution. Closed |
| 9 | coefficient smoothness and the proved linear IVP retain both endpoints. |
| 10 | 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 |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) (x : M) |
| 25 | |
| 26 | /-- The actual closed coordinate operator for the metric-preserving |
| 27 | factor of an adapted field, Definition 6.35, p. 122. -/ |
| 28 | noncomputable def closedCoordinateAdaptedOperator (C : Set ℝ) |
| 29 | (q : ℝ → EuclideanSpace ℝ (Fin n)) (s : ℝ) : |
| 30 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 31 | -M08.closedChartConnection F T x C (s, q s) (derivWithin q C s) - |
| 32 | (1 / 2 : ℝ) • ((M08.chartMetricDualInverse F T x (s, q s)).comp |
| 33 | (M08.timeWithinFDeriv C (extChartAt (𝓡 n) x).target |
| 34 | (M08.chartActionMetric F T x) (s, q s))) |
| 35 | |
| 36 | /-- The unit-adapted operator is smooth within the actual closed |
| 37 | coordinate interval, Definition 6.35, p. 122. -/ |
| 38 | theorem closedCoordinateAdaptedOperator_contDiffOn |
| 39 | {C : Set ℝ} (hC : UniqueDiffOn ℝ C) (htime : ∀ s ∈ C, T - s ^ 2 ∈ J) |
| 40 | {q : ℝ → EuclideanSpace ℝ (Fin n)} (hq : ContDiffOn ℝ ∞ q C) |
| 41 | (hmem : MapsTo q C (extChartAt (𝓡 n) x).target) : |
| 42 | ContDiffOn ℝ ∞ (closedCoordinateAdaptedOperator F T x C q) C := by |
| 43 | have hpoint := contDiffOn_id.prodMk hq |
| 44 | have hmap : MapsTo (fun s => (s, q s)) C (C ×ˢ (extChartAt (𝓡 n) x).target) := |
| 45 | fun _ hs => ⟨hs, hmem hs⟩ |
| 46 | have hA := hq.derivWithin hC (m := ∞) (by simp) |
| 47 | have hB := (M08.chartMetricDualInverse_contDiffOn F T x htime).comp hpoint hmap |
| 48 | have hΓ := ((M08.closedChartConnection_contDiffOn F T x hC htime).comp hpoint hmap).clm_apply hA |
| 49 | have hH := (M08.timeWithinFDeriv_contDiffOn hC (isOpen_extChartAt_target (I := 𝓡 n) x) |
| 50 | (M08.chartActionMetric F T x) (M08.chartActionMetric_closed_contDiffOn F T x htime)).comp |
| 51 | hpoint hmap |
| 52 | exact hΓ.neg.sub ((contDiffOn_const (c := (1 / 2 : ℝ))).smul (hB.clm_comp hH)) |
| 53 | |
| 54 | /-- The actual unit-adapted coordinate equation has a smooth solution |
| 55 | for data prescribed at any point of a closed interval, Definition 6.35 |
| 56 | and Proposition 6.43, pp. 122, 127-128. -/ |
| 57 | theorem exists_closedCoordinateAdapted_solution |
| 58 | {a b t₀ : ℝ} (hab : a < b) (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ J) |
| 59 | {q : ℝ → EuclideanSpace ℝ (Fin n)} (hq : ContDiffOn ℝ ∞ q (Icc a b)) |
| 60 | (hmem : MapsTo q (Icc a b) (extChartAt (𝓡 n) x).target) |
| 61 | (ht₀ : t₀ ∈ Icc a b) (v₀ : EuclideanSpace ℝ (Fin n)) : |
| 62 | ∃ v : ℝ → EuclideanSpace ℝ (Fin n), v t₀ = v₀ ∧ ContDiffOn ℝ ∞ v (Icc a b) ∧ |
| 63 | ∀ s ∈ Icc a b, HasDerivWithinAt v |
| 64 | (closedCoordinateAdaptedOperator F T x (Icc a b) q s (v s)) (Icc a b) s := by |
| 65 | have hL := closedCoordinateAdaptedOperator_contDiffOn F T x (uniqueDiffOn_Icc hab) |
| 66 | htime hq hmem |
| 67 | obtain ⟨v, hv₀, hvd⟩ := M08.exists_linear_interval_solution _ hL.continuousOn ht₀ v₀ |
| 68 | exact ⟨v, hv₀, M08.linear_interval_solution_contDiffOn _ hL hvd, hvd⟩ |
| 69 | |
| 70 | /-- Actual coordinate unit-adapted solutions with the same data at |
| 71 | any interval point agree throughout the closed interval, |
| 72 | Definition 6.35, p. 122. -/ |
| 73 | theorem closedCoordinateAdapted_solution_unique |
| 74 | {a b t₀ : ℝ} (hab : a < b) (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ J) |
| 75 | {q : ℝ → EuclideanSpace ℝ (Fin n)} (hq : ContDiffOn ℝ ∞ q (Icc a b)) |
| 76 | (hmem : MapsTo q (Icc a b) (extChartAt (𝓡 n) x).target) (ht₀ : t₀ ∈ Icc a b) |
| 77 | {f g : ℝ → EuclideanSpace ℝ (Fin n)} |
| 78 | (hf : ∀ s ∈ Icc a b, HasDerivWithinAt f |
| 79 | (closedCoordinateAdaptedOperator F T x (Icc a b) q s (f s)) (Icc a b) s) |
| 80 | (hg : ∀ s ∈ Icc a b, HasDerivWithinAt g |
| 81 | (closedCoordinateAdaptedOperator F T x (Icc a b) q s (g s)) (Icc a b) s) |
| 82 | (heq : f t₀ = g t₀) : EqOn f g (Icc a b) := |
| 83 | M08.linear_interval_solution_unique _ |
| 84 | (closedCoordinateAdaptedOperator_contDiffOn F T x (uniqueDiffOn_Icc hab) |
| 85 | htime hq hmem).continuousOn ht₀ hf hg heq |
| 86 | |
| 87 | end PoincareMT.M14 |