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.Jacobian.ExponentialGram |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Exponential.Coordinates.ExponentialNormalization |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Exponential.Jacobian.GramNormalization |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Trace.MetricTrace |
| 5 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Exponential.Jacobian.JacobianEvolution |
| 6 | |
| 7 | /-! |
| 8 | # Evolution of the actual exponential Jacobian |
| 9 | |
| 10 | Morgan-Tian Proposition 6.81. The source normalization is constructed from |
| 11 | the actual noncritical differential and the exact selected endpoint basis. |
| 12 | The normalized Gram evolution and its constant determinant factor give |
| 13 | J' = J (R + Delta l) for the same Jacobian used in calibrated transport. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.ReducedVolume |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | [ConnectedSpace M] {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 28 | |
| 29 | set_option backward.isDefEq.respectTransparency false in |
| 30 | /-- The exponential Jacobian evolves by scalar curvature plus the actual |
| 31 | reduced-length Laplacian. -/ |
| 32 | theorem exponentialJacobian_hasDerivAt |
| 33 | (hwindow : Icc (T - τmax) T ⊆ J) (hL : LGeodesicTheory F T τmax) |
| 34 | (G : LExponentialGeometry F T τmax p) (x : EuclideanSpace ℝ (Fin n)) {τ : ℝ} |
| 35 | (hreg : (metricCoordinates (F.metric T) p x, τ) ∈ G.toLExponentialFamily.regularDomain) : |
| 36 | HasDerivAt (fun s ↦ pullbackJacobian (F.metric (T - s)) (exponentialSliceChart G s) x) |
| 37 | (pullbackJacobian (F.metric (T - τ)) (exponentialSliceChart G τ) x * |
| 38 | ((F.connection (T - τ)).scalarCurvature (exponentialSliceChart G τ x) + |
| 39 | (F.connection (T - τ)).laplacian (fun y ↦ reducedLength F T p y τ) |
| 40 | (exponentialSliceChart G τ x))) τ := by |
| 41 | obtain ⟨C, hC⟩ := exists_exponential_source_normalization G x hreg |
| 42 | let q := G.gamma (metricCoordinates (F.metric T) p x) τ |
| 43 | let A : ℝ → Matrix (Fin n) (Fin n) ℝ := fun s ↦ (fun i j : Fin n ↦ |
| 44 | pullbackMetricForm (F.metric (T - s)) (exponentialSliceChart G s) x |
| 45 | (C (EuclideanSpace.basisFun (Fin n) ℝ i)) |
| 46 | (C (EuclideanSpace.basisFun (Fin n) ℝ j))) |
| 47 | let j := fun s ↦ pullbackJacobian (F.metric (T - s)) (exponentialSliceChart G s) x |
| 48 | obtain ⟨D, hA, hdiag⟩ := exponential_gram_hasDerivAt hwindow hL G x hreg C.toContinuousLinearMap |
| 49 | have hAt : A τ = 1 := by |
| 50 | ext i j |
| 51 | change (F.metric (T - τ)).inner (exponentialSliceChart G τ x) |
| 52 | (mfderiv (𝓡 n) (𝓡 n) (exponentialSliceChart G τ) x |
| 53 | (C (EuclideanSpace.basisFun (Fin n) ℝ i))) |
| 54 | (mfderiv (𝓡 n) (𝓡 n) (exponentialSliceChart G τ) x |
| 55 | (C (EuclideanSpace.basisFun (Fin n) ℝ j))) = (1 : Matrix (Fin n) (Fin n) ℝ) i j |
| 56 | obtain ⟨hτ, hmax, _, _⟩ := hreg.1 |
| 57 | rw [exponentialSliceChart_differential G hτ hmax, |
| 58 | exponentialSliceChart_differential G hτ hmax, exponentialSliceChart_apply, |
| 59 | hC, hC, metricCoordinates_basis_inner, Matrix.one_apply] |
| 60 | have hscale : (fun s ↦ C.toLinearMap.normDet * j s) =ᶠ[𝓝 τ] |
| 61 | (fun s ↦ Real.sqrt ((A s).det)) := by |
| 62 | apply Filter.Eventually.of_forall |
| 63 | intro s |
| 64 | simpa only [A, j, mul_comm] using! |
| 65 | (sqrt_det_pullbackMetric_change_source (F.metric (T - s)) |
| 66 | (exponentialSliceChart G s) x C.toLinearMap).symm |
| 67 | have hdiag' (i : Fin n) : D i i = |
| 68 | 2 * (F.connection (T - τ)).ricci q |
| 69 | (metricCoordinates (F.metric (T - τ)) q (EuclideanSpace.basisFun (Fin n) ℝ i)) |
| 70 | (metricCoordinates (F.metric (T - τ)) q (EuclideanSpace.basisFun (Fin n) ℝ i)) + |
| 71 | 2 * (F.connection (T - τ)).hessian (fun y ↦ reducedLength F T p y τ) q |
| 72 | (metricCoordinates (F.metric (T - τ)) q (EuclideanSpace.basisFun (Fin n) ℝ i)) |
| 73 | (metricCoordinates (F.metric (T - τ)) q (EuclideanSpace.basisFun (Fin n) ℝ i)) := by |
| 74 | have hh := hdiag i |
| 75 | change D i i = |
| 76 | 2 * (F.connection (T - τ)).ricci q |
| 77 | (G.toLExponentialFamily.sliceDifferential (metricCoordinates (F.metric T) p x) τ |
| 78 | (metricCoordinates (F.metric T) p (C (EuclideanSpace.basisFun (Fin n) ℝ i)))) |
| 79 | (G.toLExponentialFamily.sliceDifferential (metricCoordinates (F.metric T) p x) τ |
| 80 | (metricCoordinates (F.metric T) p (C (EuclideanSpace.basisFun (Fin n) ℝ i)))) + |
| 81 | 2 * (F.connection (T - τ)).hessian (fun y ↦ reducedLength F T p y τ) q |
| 82 | (G.toLExponentialFamily.sliceDifferential (metricCoordinates (F.metric T) p x) τ |
| 83 | (metricCoordinates (F.metric T) p (C (EuclideanSpace.basisFun (Fin n) ℝ i)))) |
| 84 | (G.toLExponentialFamily.sliceDifferential (metricCoordinates (F.metric T) p x) τ |
| 85 | (metricCoordinates (F.metric T) p (C (EuclideanSpace.basisFun (Fin n) ℝ i)))) at hh |
| 86 | rw [hC] at hh |
| 87 | exact hh |
| 88 | have htrace : D.trace / 2 = (F.connection (T - τ)).scalarCurvature q + |
| 89 | (F.connection (T - τ)).laplacian (fun y ↦ reducedLength F T p y τ) q := by |
| 90 | change (∑ i : Fin n, D i i) / 2 = _ |
| 91 | simp_rw [hdiag'] |
| 92 | rw [Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.mul_sum, |
| 93 | sum_metricCoordinates_ricci, sum_metricCoordinates_hessian] |
| 94 | ring |
| 95 | have hd := hasDerivAt_jacobian_of_scaled_normalized_gram |
| 96 | (ne_of_gt (source_normalization_normDet_pos C)) hscale hA hAt |
| 97 | rw [htrace] at hd |
| 98 | simpa only [exponentialSliceChart_apply] using hd |
| 99 | |
| 100 | end PoincareMT.ReducedVolume |