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.Measure.Transport.PullbackJacobian |
| 2 | |
| 3 | /-! |
| 4 | # Constant source normalization of the actual Gram Jacobian |
| 5 | |
| 6 | Freezing the source vectors whose endpoint images are orthonormal changes the |
| 7 | Jacobian by the norm determinant of one fixed linear map. This factor is |
| 8 | retained explicitly when differentiating at the chosen time. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedVolume |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | set_option backward.isDefEq.respectTransparency false in |
| 23 | /-- The actual pullback Gram determinant under a fixed linear source change. -/ |
| 24 | theorem sqrt_det_pullbackMetric_change_source (g : RiemannianMetric n M) |
| 25 | (f : EuclideanSpace ℝ (Fin n) → M) (x : EuclideanSpace ℝ (Fin n)) |
| 26 | (C : EuclideanSpace ℝ (Fin n) →ₗ[ℝ] EuclideanSpace ℝ (Fin n)) : |
| 27 | Real.sqrt (Matrix.det (fun i j : Fin n ↦ pullbackMetricForm g f x |
| 28 | (C (EuclideanSpace.basisFun (Fin n) ℝ i)) |
| 29 | (C (EuclideanSpace.basisFun (Fin n) ℝ j)))) = |
| 30 | pullbackJacobian g f x * C.normDet := by |
| 31 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 32 | ⟨g.toRiemannianMetric⟩ |
| 33 | let D : EuclideanSpace ℝ (Fin n) →ₗ[ℝ] TangentSpace (𝓡 n) (f x) := |
| 34 | (mfderiv (𝓡 n) (𝓡 n) f x).toLinearMap |
| 35 | have hs := (D.comp C).normDet_sq_eq_det_gram (EuclideanSpace.basisFun (Fin n) ℝ) |
| 36 | rw [RCLike.ofReal_real_eq_id, id_eq] at hs |
| 37 | change Real.sqrt (Matrix.gram ℝ (fun i ↦ (D.comp C) |
| 38 | (EuclideanSpace.basisFun (Fin n) ℝ i))).det = _ |
| 39 | rw [← hs, Real.sqrt_sq (D.comp C).normDet_nonneg, |
| 40 | LinearMap.normDet_comp_of_finrank_eq C D rfl, |
| 41 | pullbackJacobian_eq_normDet] |
| 42 | |
| 43 | /-- An invertible constant source change has a strictly positive normalization factor. -/ |
| 44 | theorem source_normalization_normDet_pos |
| 45 | (C : EuclideanSpace ℝ (Fin n) ≃L[ℝ] EuclideanSpace ℝ (Fin n)) : |
| 46 | 0 < C.toLinearMap.normDet := by |
| 47 | refine lt_of_le_of_ne C.toLinearMap.normDet_nonneg ?_ |
| 48 | exact Ne.symm (fun h ↦ LinearMap.normDet_eq_zero_iff_ker_ne_bot.mp h |
| 49 | (LinearMap.ker_eq_bot.mpr C.injective)) |
| 50 | |
| 51 | end PoincareMT.ReducedVolume |