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.Surgery.CanonicalInduction.Terminal.Germs.TerminalGermsSpatialJets |
| 2 | import PoincareLib.Geometry.RicciFlow.MetricFamily.PullbackCoefficients |
| 3 | import PoincareLib.Geometry.RicciFlow.Limit.CoordinateRicci |
| 4 | |
| 5 | /-! |
| 6 | # Actual Ricci continuity on an included metric-family domain |
| 7 | |
| 8 | The spatial coefficient jets come from within-time metric smoothness. |
| 9 | Their actual two-jet formula gives Ricci continuity without a Ricci |
| 10 | flow equation or an assumed limiting Ricci tensor. |
| 11 | Source: MT Proposition 5.14, pp. 90-91; |
| 12 | derivations/terminal-germs-closed-jets.md, Stage A5f. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter Bundle |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | namespace PoincareMT.M47 |
| 22 | |
| 23 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | {J : Set ℝ} {g : ℝ → RiemannianMetric n M} |
| 26 | |
| 27 | /-- The fixed spatial pullback retains the actual within-time domain. -/ |
| 28 | theorem terminalGerms_metric_coefficients_within |
| 29 | (hg : RiemannianMetric.IsSmoothFamilyOn g J) |
| 30 | {f : EuclideanSpace ℝ (Fin n) → M} {x : EuclideanSpace ℝ (Fin n)} |
| 31 | (hf : ContMDiffAt (𝓡 n) (𝓡 n) ∞ f x) {t : ℝ} (ht : t ∈ J) : |
| 32 | ContDiffWithinAt ℝ ∞ |
| 33 | (fun p : ℝ × EuclideanSpace ℝ (Fin n) => (g p.1).pullbackCoefficients f p.2) |
| 34 | (J ×ˢ univ) (t, x) := by |
| 35 | have hs := Poincare.Gluing.inducedForm_family_contMDiffWithinAt hg hf ht |
| 36 | have hc := ((contMDiffWithinAt_hom_bundle _).mp hs).2 |
| 37 | simp only [RiemannianMetric.constant_chart_bilinear_coordinates |
| 38 | (n := n) (M := EuclideanSpace ℝ (Fin n)) (fun _ _ => rfl)] at hc |
| 39 | have hid : ContMDiffAt 𝓘(ℝ, ℝ × EuclideanSpace ℝ (Fin n)) |
| 40 | (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 41 | (fun p : ℝ × EuclideanSpace ℝ (Fin n) => (p.1, p.2)) (t, x) := |
| 42 | contDiffAt_fst.contMDiffAt.prodMk contDiffAt_snd.contMDiffAt |
| 43 | convert! (hc.comp (t, x) hid.contMDiffWithinAt (fun p hp => hp)).contDiffWithinAt using 1 |
| 44 | |
| 45 | /-- Spatially local parametrizations give jointly smooth coefficients |
| 46 | within any included time set. -/ |
| 47 | theorem terminalGerms_metric_coefficients_on |
| 48 | (hg : RiemannianMetric.IsSmoothFamilyOn g J) |
| 49 | {U : Set (EuclideanSpace ℝ (Fin n))} {f : EuclideanSpace ℝ (Fin n) → M} |
| 50 | (hf : ∀ x ∈ U, ContMDiffAt (𝓡 n) (𝓡 n) ∞ f x) : |
| 51 | ContDiffOn ℝ ∞ |
| 52 | (fun p : ℝ × EuclideanSpace ℝ (Fin n) => (g p.1).pullbackCoefficients f p.2) |
| 53 | (J ×ˢ U) := by |
| 54 | intro p hp |
| 55 | exact (terminalGerms_metric_coefficients_within hg (hf p.2 hp.2) hp.1).mono |
| 56 | (prod_mono subset_rfl (subset_univ U)) |
| 57 | |
| 58 | /-- The retained connections' actual Ricci pairings are continuous at |
| 59 | every included time, as a consequence of the metric's spatial two-jets. -/ |
| 60 | theorem terminalGerms_continuousOn_ricci |
| 61 | (hg : RiemannianMetric.IsSmoothFamilyOn g J) |
| 62 | (D : ∀ t, LeviCivitaData (g t)) (x : M) (v w : TangentSpace (𝓡 n) x) : |
| 63 | ContinuousOn (fun t => (D t).ricci x v w) J := by |
| 64 | let c := extChartAt (𝓡 n) x |
| 65 | have hc : ContDiffOn ℝ ∞ |
| 66 | (fun p : ℝ × EuclideanSpace ℝ (Fin n) => (g p.1).pullbackCoefficients c.symm p.2) |
| 67 | (J ×ˢ c.target) := by |
| 68 | apply terminalGerms_metric_coefficients_on hg |
| 69 | intro y hy |
| 70 | exact (contMDiffWithinAt_extChartAt_symm_target (n := ∞) x hy).contMDiffAt |
| 71 | (extChartAt_target_mem_nhds' hy) |
| 72 | intro t ht |
| 73 | apply LeviCivitaData.tendsto_ricci_of_coordinate_jets D (D t) x v w |
| 74 | intro r _ a b |
| 75 | have hscalar := (hc.clm_apply |
| 76 | (contDiffOn_const (c := EuclideanSpace.basisFun (Fin n) ℝ a))).clm_apply |
| 77 | (contDiffOn_const (c := EuclideanSpace.basisFun (Fin n) ℝ b)) |
| 78 | have hjet := terminalGerms_contDiffOn_spatial_jets (isOpen_extChartAt_target x) hscalar r |
| 79 | have htime := hjet.continuousOn.comp |
| 80 | (continuous_id.prodMk (continuous_const (y := c x))).continuousOn |
| 81 | (show MapsTo (fun s : ℝ => (s, c x)) J (J ×ˢ c.target) from |
| 82 | fun s hs => ⟨hs, mem_extChartAt_target x⟩) |
| 83 | exact htime t ht |
| 84 | |
| 85 | end PoincareMT.M47 |