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.ReducedGeometry.ReducedVolume.Exponential.InitialTime.SquareComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Trace.MetricTrace |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Exponential.InitialTime.InitialJacobianCalculus |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Measure.Transport.ExponentialTransport |
| 5 | |
| 6 | /-! |
| 7 | # The initial Gram and Jacobian limits of the actual exponential map |
| 8 | |
| 9 | The normalized source differential tends to twice the terminal isometry. |
| 10 | One-sided continuity of the actual metric gives the Gram limit 4 I and |
| 11 | therefore the exact initial Jacobian normalization in every dimension. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.ReducedVolume |
| 22 | |
| 23 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 26 | |
| 27 | set_option backward.isDefEq.respectTransparency false in |
| 28 | /-- The scaled actual exponential Gram matrix tends to four times the identity. -/ |
| 29 | theorem exponential_scaled_gram_tendsto (G : LExponentialGeometry F T τmax p) |
| 30 | (hmax : 0 < τmax) (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 31 | (x : EuclideanSpace ℝ (Fin n)) : |
| 32 | Tendsto (fun s : ℝ ↦ (s⁻¹) ^ 2 • (fun i j : Fin n ↦ |
| 33 | pullbackMetricForm (F.metric (T - s ^ 2)) (exponentialSliceChart G (s ^ 2)) x |
| 34 | (EuclideanSpace.basisFun (Fin n) ℝ i) (EuclideanSpace.basisFun (Fin n) ℝ j))) |
| 35 | (𝓝[>] (0 : ℝ)) (𝓝 ((4 : ℝ) • (1 : Matrix (Fin n) (Fin n) ℝ))) := by |
| 36 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 37 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 38 | let β := metricCoordinates (F.metric T) p |
| 39 | let Z := β x |
| 40 | let W := fun i : Fin n ↦ β (EuclideanSpace.basisFun (Fin n) ℝ i) |
| 41 | let L := (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 42 | (TangentSpace (𝓡 n)) p).continuousLinearMapAt ℝ p |
| 43 | let B := fun s : ℝ ↦ backwardMetricCoordinates F T p (G.squareFamily Z s, s ^ 2) |
| 44 | let B₀ := backwardMetricCoordinates F T p (p, 0) |
| 45 | let V := fun (i : Fin n) (s : ℝ) ↦ |
| 46 | s⁻¹ • fderiv ℝ (squareCoordinates G) (Z, s) (W i, 0) |
| 47 | have hB : Tendsto B (𝓝[>] (0 : ℝ)) (𝓝 B₀) := |
| 48 | squareMetric_tendsto_zero G hmax hT hwindow Z |
| 49 | have hV (i : Fin n) : Tendsto (V i) (𝓝[>] (0 : ℝ)) (𝓝 ((2 : ℝ) • L (W i))) := |
| 50 | squareCoordinates_scaled_differential_tendsto G hmax Z (W i) |
| 51 | have hchart : ∀ᶠ s in 𝓝[>] (0 : ℝ), G.squareFamily Z s ∈ |
| 52 | (chartAt (EuclideanSpace ℝ (Fin n)) p).source := |
| 53 | ((squareFamily_tendsto_zero G hmax Z).mono_left nhdsWithin_le_nhds) |
| 54 | ((chartAt (EuclideanSpace ℝ (Fin n)) p).open_source.mem_nhds (mem_chart_source _ _)) |
| 55 | apply tendsto_pi_nhds.mpr |
| 56 | intro i |
| 57 | apply tendsto_pi_nhds.mpr |
| 58 | intro j |
| 59 | have heval₁ : Continuous (fun z : |
| 60 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) × |
| 61 | EuclideanSpace ℝ (Fin n) ↦ z.1 z.2) := continuous_fst.clm_apply continuous_snd |
| 62 | have heval₂ : Continuous (fun z : |
| 63 | (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) × EuclideanSpace ℝ (Fin n) ↦ z.1 z.2) := |
| 64 | continuous_fst.clm_apply continuous_snd |
| 65 | have hpair := heval₂.continuousAt.tendsto.comp |
| 66 | ((heval₁.continuousAt.tendsto.comp (hB.prodMk_nhds (hV i))).prodMk_nhds (hV j)) |
| 67 | have hvalue : B₀ ((2 : ℝ) • L (W i)) ((2 : ℝ) • L (W j)) = |
| 68 | (4 : ℝ) * (if i = j then 1 else 0) := by |
| 69 | have heq := backwardMetricCoordinates_apply (F := F) (T := T) p (p, 0) |
| 70 | (mem_chart_source _ _) ((2 : ℝ) • W i) ((2 : ℝ) • W j) |
| 71 | simp only [map_smul, smul_apply, smul_eq_mul, sub_zero] at heq |
| 72 | have hinner := metricCoordinates_basis_inner (F.metric T) p i j |
| 73 | change (F.metric T).inner p (W i) (W j) = _ at hinner |
| 74 | change B₀ (2 • L (W i)) (2 • L (W j)) = _ |
| 75 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 76 | change 2 * (2 * B₀ (L (W i)) (L (W j))) = |
| 77 | 2 * (2 * (F.metric T).inner p (W i) (W j)) at heq |
| 78 | rw [heq, hinner] |
| 79 | ring |
| 80 | simp only [Function.comp_def, hvalue] at hpair |
| 81 | apply hpair.congr' |
| 82 | filter_upwards [Ioo_mem_nhdsGT (Real.sqrt_pos.2 hmax), hchart] with s hs hqs |
| 83 | have hq : G.gamma Z (s ^ 2) ∈ (chartAt (EuclideanSpace ℝ (Fin n)) p).source := by |
| 84 | rwa [G.square_agrees Z s ⟨hs.1.le, hs.2⟩] at hqs |
| 85 | change B s (s⁻¹ • _) (s⁻¹ • _) = _ |
| 86 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 87 | change s⁻¹ * (s⁻¹ * _) = s⁻¹ ^ 2 * |
| 88 | pullbackMetricForm (F.metric (T - s ^ 2)) (exponentialSliceChart G (s ^ 2)) x |
| 89 | (EuclideanSpace.basisFun (Fin n) ℝ i) (EuclideanSpace.basisFun (Fin n) ℝ j) |
| 90 | rw [squareCoordinates_pullbackMetric_eq G hmax x |
| 91 | (EuclideanSpace.basisFun (Fin n) ℝ i) (EuclideanSpace.basisFun (Fin n) ℝ j) hs hq] |
| 92 | ring |
| 93 | |
| 94 | /-- The actual exponential Jacobian has the normalized initial square-time limit. -/ |
| 95 | theorem exponential_scaled_jacobian_tendsto (G : LExponentialGeometry F T τmax p) |
| 96 | (hmax : 0 < τmax) (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 97 | (x : EuclideanSpace ℝ (Fin n)) : |
| 98 | Tendsto (fun s : ℝ ↦ (s ^ n)⁻¹ * exponentialSliceJacobian G (s ^ 2) x) |
| 99 | (𝓝[>] (0 : ℝ)) (𝓝 ((2 : ℝ) ^ n)) := |
| 100 | tendsto_scaled_sqrt_det (exponential_scaled_gram_tendsto G hmax hT hwindow x) |
| 101 | |
| 102 | end PoincareMT.ReducedVolume |