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.Manifold.Small |
| 2 | import PoincareLib.Geometry.RicciFlow.Diffeomorph |
| 3 | |
| 4 | /-! |
| 5 | # Ricci flows on universe-zero carriers |
| 6 | |
| 7 | The shrinking diffeomorphism transports the metric and its actual Levi-Civita |
| 8 | connection. Curvature and metric invariants agree with the original flow. |
| 9 | The finite Harnack expression uses curvature theory only in the original |
| 10 | universe; no universe-zero curvature theory is assumed or constructed here. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.RicciFlow |
| 22 | |
| 23 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T3Space M] |
| 24 | [SecondCountableTopology M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 25 | [IsManifold (𝓡 n) ∞ M] {J : Set ℝ} |
| 26 | |
| 27 | local instance smallCarrier : Small.{0} M := |
| 28 | Poincare.Topology.SecondCountable.small M |
| 29 | |
| 30 | noncomputable local instance smallChartedSpace : |
| 31 | ChartedSpace (EuclideanSpace ℝ (Fin n)) (Shrink.{0} M) := |
| 32 | Poincare.Manifold.shrinkChartedSpace _ M |
| 33 | |
| 34 | local instance smallIsManifold : IsManifold (𝓡 n) ∞ (Shrink.{0} M) := |
| 35 | Poincare.Manifold.shrinkIsManifold (𝓡 n) M |
| 36 | |
| 37 | local instance smallT3Space : T3Space (Shrink.{0} M) := |
| 38 | (Poincare.Topology.SecondCountable.homeomorphShrink M).t3Space |
| 39 | |
| 40 | /-- The actual Ricci flow on the small carrier, with its transported smooth atlas. -/ |
| 41 | noncomputable def shrink (F : RicciFlow n M J) : RicciFlow n (Shrink.{0} M) J := |
| 42 | F.pullbackDiffeomorph (Poincare.Manifold.shrinkDiffeomorph (𝓡 n) M).symm |
| 43 | |
| 44 | @[simp] theorem shrink_scalarCurvature (F : RicciFlow n M J) |
| 45 | (t : ℝ) (x : Shrink.{0} M) : |
| 46 | (F.shrink.connection t).scalarCurvature x = |
| 47 | (F.connection t).scalarCurvature ((equivShrink M).symm x) := |
| 48 | F.pullbackDiffeomorph_scalarCurvature _ t x |
| 49 | |
| 50 | @[simp] theorem shrink_curvatureTensorNorm (F : RicciFlow n M J) |
| 51 | (t : ℝ) (x : Shrink.{0} M) : |
| 52 | (F.shrink.connection t).curvatureTensorNorm x = |
| 53 | (F.connection t).curvatureTensorNorm ((equivShrink M).symm x) := |
| 54 | F.pullbackDiffeomorph_curvatureTensorNorm _ t x |
| 55 | |
| 56 | @[simp] theorem shrink_nonnegativeCurvatureOperator_iff (F : RicciFlow n M J) |
| 57 | (t : ℝ) (x : Shrink.{0} M) : |
| 58 | (F.shrink.connection t).NonnegativeCurvatureOperator x ↔ |
| 59 | (F.connection t).NonnegativeCurvatureOperator ((equivShrink M).symm x) := |
| 60 | F.pullbackDiffeomorph_nonnegativeCurvatureOperator_iff _ t x |
| 61 | |
| 62 | @[simp] theorem shrink_edist (F : RicciFlow n M J) |
| 63 | (t : ℝ) (x y : Shrink.{0} M) : |
| 64 | (F.shrink.metric t).edist x y = |
| 65 | (F.metric t).edist ((equivShrink M).symm x) ((equivShrink M).symm y) := |
| 66 | F.pullbackDiffeomorph_edist _ t x y |
| 67 | |
| 68 | theorem shrink_image_ball (F : RicciFlow n M J) |
| 69 | (t : ℝ) (x : Shrink.{0} M) (r : ℝ) : |
| 70 | (equivShrink M).symm '' (F.shrink.metric t).ball x r = |
| 71 | (F.metric t).ball ((equivShrink M).symm x) r := |
| 72 | F.pullbackDiffeomorph_image_ball _ t x r |
| 73 | |
| 74 | @[simp] theorem shrink_metricComplete_iff (F : RicciFlow n M J) (t : ℝ) : |
| 75 | MetricComplete (F.shrink.metric t) ↔ MetricComplete (F.metric t) := |
| 76 | F.pullbackDiffeomorph_metricComplete_iff _ t |
| 77 | |
| 78 | section Volume |
| 79 | |
| 80 | variable [MeasurableSpace M] [BorelSpace M] |
| 81 | |
| 82 | noncomputable local instance smallMeasurableSpace : MeasurableSpace (Shrink.{0} M) := |
| 83 | borel (Shrink.{0} M) |
| 84 | |
| 85 | local instance smallBorelSpace : BorelSpace (Shrink.{0} M) := ⟨rfl⟩ |
| 86 | |
| 87 | @[simp] theorem shrink_volumeMeasure_ball (F : RicciFlow n M J) |
| 88 | (t : ℝ) (x : Shrink.{0} M) (r : ℝ) : |
| 89 | (F.shrink.metric t).volumeMeasure ((F.shrink.metric t).ball x r) = |
| 90 | (F.metric t).volumeMeasure ((F.metric t).ball ((equivShrink M).symm x) r) := |
| 91 | F.pullbackDiffeomorph_volumeMeasure_ball _ t x r |
| 92 | |
| 93 | end Volume |
| 94 | |
| 95 | theorem shrink_scalarCurvature_mvfderiv (hC : RicciFlowCurvatureTheory.{u}) |
| 96 | (F : RicciFlow n M J) (t : ℝ) (x : Shrink.{0} M) |
| 97 | (w : TangentSpace (𝓡 n) x) : |
| 98 | mvfderiv (𝓡 n) (fun y => (F.shrink.connection t).scalarCurvature y) x w = |
| 99 | mvfderiv (𝓡 n) (fun y => (F.connection t).scalarCurvature y) |
| 100 | ((equivShrink M).symm x) |
| 101 | (mfderiv (𝓡 n) (𝓡 n) |
| 102 | (Poincare.Manifold.shrinkDiffeomorph (𝓡 n) M).symm x w) := |
| 103 | F.pullbackDiffeomorph_scalarCurvature_mvfderiv hC _ t x w |
| 104 | |
| 105 | /-- The finite differential Harnack assertion transports to the original |
| 106 | flow using only curvature theory in the original universe. -/ |
| 107 | theorem finite_harnack_shrink (hC : RicciFlowCurvatureTheory.{u}) |
| 108 | (F : RicciFlow n M J) (t T₀ dR : ℝ) (x : Shrink.{0} M) |
| 109 | (w : TangentSpace (𝓡 n) x) : |
| 110 | (HasDerivWithinAt (fun s => (F.shrink.connection s).scalarCurvature x) dR J t ∧ |
| 111 | 0 ≤ dR + (F.shrink.connection t).scalarCurvature x / (t - T₀) + |
| 112 | 2 * mvfderiv (𝓡 n) (fun y => (F.shrink.connection t).scalarCurvature y) x w + |
| 113 | 2 * (F.shrink.connection t).ricci x w w) ↔ |
| 114 | (HasDerivWithinAt |
| 115 | (fun s => (F.connection s).scalarCurvature ((equivShrink M).symm x)) dR J t ∧ |
| 116 | 0 ≤ dR + (F.connection t).scalarCurvature ((equivShrink M).symm x) / (t - T₀) + |
| 117 | 2 * mvfderiv (𝓡 n) (fun y => (F.connection t).scalarCurvature y) |
| 118 | ((equivShrink M).symm x) |
| 119 | (mfderiv (𝓡 n) (𝓡 n) |
| 120 | (Poincare.Manifold.shrinkDiffeomorph (𝓡 n) M).symm x w) + |
| 121 | 2 * (F.connection t).ricci ((equivShrink M).symm x) |
| 122 | (mfderiv (𝓡 n) (𝓡 n) |
| 123 | (Poincare.Manifold.shrinkDiffeomorph (𝓡 n) M).symm x w) |
| 124 | (mfderiv (𝓡 n) (𝓡 n) |
| 125 | (Poincare.Manifold.shrinkDiffeomorph (𝓡 n) M).symm x w)) := |
| 126 | F.finite_harnack_pullbackDiffeomorph hC _ t T₀ dR x w |
| 127 | |
| 128 | end PoincareMT.RicciFlow |