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.Pinching.GeometricPreservation.Continuity |
| 2 | |
| 3 | /-! |
| 4 | # Continuous local isometric coordinates for transported curvature |
| 5 | |
| 6 | Radial parallel fields for the initial metric give local isometric tensor |
| 7 | coordinates. Joint smoothness of Ricci transport and curvature gives continuous |
| 8 | components on the original half-open interval, including its initial slice. |
| 9 | |
| 10 | Reference: Morgan--Tian, Claim 3.16, p. 42; Theorem 4.8, p. 66. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Bundle Filter |
| 18 | open scoped Manifold ContDiff Topology InnerProductSpace Classical |
| 19 | open Poincare.HamiltonIvey |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.TensorFiber |
| 24 | |
| 25 | private theorem continuousOn_of_components |
| 26 | {X E : Type*} [TopologicalSpace X] [NormedAddCommGroup E] |
| 27 | [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] |
| 28 | {ι : Type*} [Fintype ι] (e : Module.Basis ι ℝ E) {k : ℕ} |
| 29 | {T : X → TensorFiber E k} {S : Set X} |
| 30 | (h : ∀ v : Fin k → ι, ContinuousOn (fun x => T x (fun i => e (v i))) S) : |
| 31 | ContinuousOn T S := by |
| 32 | let C : TensorFiber E k →ₗ[ℝ] ((Fin k → ι) → ℝ) := |
| 33 | { toFun := fun R v => R (fun i => e (v i)) |
| 34 | map_add' := fun _ _ => rfl |
| 35 | map_smul' := fun _ _ => rfl } |
| 36 | have hC : Function.Injective C := by |
| 37 | intro A B heq |
| 38 | apply toMultilinear.injective |
| 39 | apply Module.Basis.ext_multilinear (fun _ => e) |
| 40 | intro v |
| 41 | exact congrFun heq v |
| 42 | obtain ⟨L, hL⟩ := C.exists_leftInverse_of_injective (LinearMap.ker_eq_bot.mpr hC) |
| 43 | have hLC (R : TensorFiber E k) : L (C R) = R := |
| 44 | congrArg (fun f : TensorFiber E k →ₗ[ℝ] TensorFiber E k => f R) hL |
| 45 | have hc : ContinuousOn (fun x => C (T x)) S := continuousOn_pi.mpr h |
| 46 | have hd := L.toContinuousLinearMap.continuous.comp_continuousOn hc |
| 47 | change ContinuousOn (fun x => L (C (T x))) S at hd |
| 48 | simpa only [hLC] using hd |
| 49 | |
| 50 | end PoincareMT.TensorFiber |
| 51 | |
| 52 | namespace PoincareMT.RicciFlow.Frame |
| 53 | |
| 54 | variable {M : Type u} [TopologicalSpace M] |
| 55 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 56 | {a b : ℝ} |
| 57 | |
| 58 | local instance (x : M) : FiniteDimensional ℝ (TangentSpace (𝓡 3) x) := by |
| 59 | unfold TangentSpace |
| 60 | infer_instance |
| 61 | |
| 62 | private theorem contMDiffWithinAt_ricciComplement_fields |
| 63 | (F : RicciFlow 3 M (Ico a b)) (hC : RicciFlowCurvatureTheory.{u}) |
| 64 | {O : Set M} {t : ℝ} {x : M} (ht : t ∈ Ico a b) (hx : x ∈ O) |
| 65 | (X Y : (p : ℝ × M) → TangentSpace (𝓡 3) p.2) |
| 66 | (hX : ContMDiffWithinAt (𝓘(ℝ, ℝ).prod (𝓡 3)) |
| 67 | ((𝓡 3).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 3))) ∞ |
| 68 | (fun p => TotalSpace.mk' (EuclideanSpace ℝ (Fin 3)) p.2 (X p)) |
| 69 | (Ico a b ×ˢ O) (t, x)) |
| 70 | (hY : ContMDiffWithinAt (𝓘(ℝ, ℝ).prod (𝓡 3)) |
| 71 | ((𝓡 3).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin 3))) ∞ |
| 72 | (fun p => TotalSpace.mk' (EuclideanSpace ℝ (Fin 3)) p.2 (Y p)) |
| 73 | (Ico a b ×ˢ O) (t, x)) : |
| 74 | ContMDiffWithinAt (𝓘(ℝ, ℝ).prod (𝓡 3)) 𝓘(ℝ, ℝ) ∞ |
| 75 | (fun p => (F.connection p.1).ricciComplementEvaluation p.2 ![X p, Y p]) |
| 76 | (Ico a b ×ˢ O) (t, x) := by |
| 77 | have hsub : Ico a b ×ˢ O ⊆ Ico a b ×ˢ (univ : Set M) := |
| 78 | prod_mono Subset.rfl (subset_univ O) |
| 79 | have hR := ((hC.scalar_regular 3 M (Ico a b) F) (t, x) ⟨ht, trivial⟩).mono hsub |
| 80 | have hG := (F.smooth (t, x) ⟨ht, trivial⟩).mono hsub |
| 81 | have hpair := (contMDiffWithinAt_totalSpace.mp |
| 82 | (hG.clm_bundle_apply₂ (F₃ := ℝ) (E₃ := fun _ : M => ℝ) hX hY)).2 |
| 83 | exact ((hR.div_const 2).mul hpair).sub |
| 84 | (contMDiffWithinAt_ricci_spacetime_fields F ht hx X Y hX hY) |
| 85 | |
| 86 | /-- The scaled transported tensor has continuous local isometric coordinates |
| 87 | on every closed interval contained in the original flow interval. -/ |
| 88 | theorem exists_scaled_transportedRicciComplementTensor_local_coordinates |
| 89 | (F : RicciFlow 3 M (Ico a b)) (hC : RicciFlowCurvatureTheory.{u}) |
| 90 | (hn : ∀ x : M, Module.finrank ℝ (TangentSpace (𝓡 3) x) = 3) |
| 91 | {c : ℝ} (hc : c < b) : |
| 92 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 93 | ⟨(F.metric a).toRiemannianMetric⟩ |
| 94 | ∃ (O : M → Set M), (∀ p, IsOpen (O p)) ∧ (∀ p, p ∈ O p) ∧ |
| 95 | ∃ e : ∀ p x, x ∈ O p → |
| 96 | TensorFiber (TangentSpace (𝓡 3) p) 2 ≃ₗᵢ[ℝ] |
| 97 | TensorFiber (TangentSpace (𝓡 3) x) 2, |
| 98 | (∀ p x hx, e p x hx '' tensorRegion (hn p) 0 = tensorRegion (hn x) 0) ∧ |
| 99 | ∀ p, ContinuousOn (fun z : M × ℝ => |
| 100 | if hx : z.1 ∈ O p then |
| 101 | (e p z.1 hx).symm ((1 + z.2) • transportedRicciComplementTensor F hC z.2 z.1) |
| 102 | else 0) (O p ×ˢ Icc a c) := by |
| 103 | classical |
| 104 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 105 | ⟨(F.metric a).toRiemannianMetric⟩ |
| 106 | choose r Y hr hrU hY hinit hpar P hP using |
| 107 | fun p : M => (F.connection a).exists_radialParallelIsometries_with_fields p |
| 108 | let O (p : M) := LeviCivitaData.radialNeighborhood (n := 3) p (r p) |
| 109 | let e (p x : M) (hx : x ∈ O p) := TensorFiber.transport (P p ⟨x, hx⟩) 2 |
| 110 | refine ⟨O, fun p => LeviCivitaData.isOpen_radialNeighborhood p (r p), |
| 111 | fun p => LeviCivitaData.mem_radialNeighborhood p (hr p), e, ?_, ?_⟩ |
| 112 | · intro p x hx |
| 113 | exact tensorRegion_transport_image (hn p) (hn x) (P p ⟨x, hx⟩) (by norm_num) |
| 114 | · intro p |
| 115 | apply TensorFiber.continuousOn_of_components (stdOrthonormalBasis ℝ |
| 116 | (TangentSpace (𝓡 3) p)).toBasis |
| 117 | intro v |
| 118 | let W (i : Fin 2) (x : M) := LeviCivitaData.fieldFromCenteredCoordinates p |
| 119 | (Y p (stdOrthonormalBasis ℝ (TangentSpace (𝓡 3) p) (v i))) x |
| 120 | have hW (i : Fin 2) (x : M) (hx : x ∈ O p) : |
| 121 | ContMDiffAt (𝓡 3) ((𝓡 3).prod (𝓡 3)) ∞ (T% (W i)) x := |
| 122 | LeviCivitaData.contMDiffAt_fieldFromCenteredCoordinates p |
| 123 | (hY p _).contDiffAt hx.1 |
| 124 | let Z (i : Fin 2) (z : ℝ × M) := canonicalTransport F z.1 z.2 (W i z.2) |
| 125 | have hZ (i : Fin 2) (z : ℝ × M) (hz : z ∈ Ico a b ×ˢ O p) : |
| 126 | ContMDiffWithinAt (𝓘(ℝ, ℝ).prod (𝓡 3)) ((𝓡 3).prod (𝓡 3)) ∞ |
| 127 | (fun z => TotalSpace.mk' (EuclideanSpace ℝ (Fin 3)) z.2 (Z i z)) |
| 128 | (Ico a b ×ˢ O p) z := by |
| 129 | have htr := ((canonicalTransport_contMDiffOn F) z ⟨hz.1, trivial⟩).mono |
| 130 | (prod_mono Subset.rfl (subset_univ (O p))) |
| 131 | exact htr.clm_bundle_apply |
| 132 | (((hW i z.2 hz.2).comp z contMDiffAt_snd).contMDiffWithinAt) |
| 133 | have hcoeff : ContinuousOn (fun z : ℝ × M => |
| 134 | (F.connection z.1).ricciComplementEvaluation z.2 ![Z 0 z, Z 1 z]) |
| 135 | (Ico a b ×ˢ O p) := by |
| 136 | intro z hz |
| 137 | exact (contMDiffWithinAt_ricciComplement_fields F hC hz.1 hz.2 |
| 138 | (Z 0) (Z 1) (hZ 0 z hz) (hZ 1 z hz)).continuousWithinAt |
| 139 | have hswap := hcoeff.comp continuous_swap.continuousOn |
| 140 | (show MapsTo Prod.swap (O p ×ˢ Icc a c) (Ico a b ×ˢ O p) from |
| 141 | fun z hz => ⟨⟨hz.2.1, hz.2.2.trans_lt hc⟩, hz.1⟩) |
| 142 | have hscaled := ((continuousOn_const (c := (1 : ℝ))).add |
| 143 | continuous_snd.continuousOn).mul hswap |
| 144 | apply hscaled.congr |
| 145 | intro z hz |
| 146 | dsimp only |
| 147 | rw [dif_pos hz.1] |
| 148 | change (1 + z.2) * transportedRicciComplementTensor F hC z.2 z.1 |
| 149 | (fun i => P p ⟨z.1, hz.1⟩ (stdOrthonormalBasis ℝ |
| 150 | (TangentSpace (𝓡 3) p) (v i))) = _ |
| 151 | simp only [transportedRicciComplementTensor_apply, hP] |
| 152 | congr 2 |
| 153 | ext i |
| 154 | fin_cases i <;> rfl |
| 155 | |
| 156 | end PoincareMT.RicciFlow.Frame |