Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import OAI.AlgebraicGeometry.HilbertScheme.Presentations.Grassmannian.CoordinateCharts |
| 2 | import Mathlib.AlgebraicGeometry.AffineSpace |
| 3 | import Mathlib.LinearAlgebra.Matrix.ToLin |
| 4 | import Mathlib.CategoryTheory.NatIso |
| 5 | |
| 6 | /-! # Chart -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.Grassmannian.Chart |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! |
| 13 | Affine schemes representing the standard Grassmannian charts. Chart objects |
| 14 | are the submodules and quotient-isomorphism condition from Grassmannian; |
| 15 | restriction acts by applying the ring map to their matrix coordinates. |
| 16 | -/ |
| 17 | |
| 18 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 19 | open scoped _root_.AlgebraicGeometry |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | variable (ι κ : Type u) [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] |
| 24 | |
| 25 | def matrixChartEquiv (R : Type u) [CommRing R] : |
| 26 | Matrix ι κ R ≃ CoordinateCharts.Chart R (ι → R) (κ → R) := |
| 27 | Matrix.toLin'.toEquiv.trans CoordinateCharts.chartEquiv |
| 28 | |
| 29 | variable (S : Scheme.{u}) |
| 30 | |
| 31 | def matrixFunctor : (Over S)ᵒᵖ ⥤ Type u where |
| 32 | obj T := Matrix ι κ Γ(T.unop.left, ⊤) |
| 33 | map a := ↾fun M i j => a.unop.left.appTop (M i j) |
| 34 | map_id _T := rfl |
| 35 | map_comp _a _b := rfl |
| 36 | |
| 37 | def chartFunctor : (Over S)ᵒᵖ ⥤ Type u := |
| 38 | (matrixFunctor ι κ S).copyObj |
| 39 | (fun T => CoordinateCharts.Chart Γ(T.unop.left, ⊤) |
| 40 | (ι → Γ(T.unop.left, ⊤)) (κ → Γ(T.unop.left, ⊤))) |
| 41 | (fun T => (matrixChartEquiv ι κ Γ(T.unop.left, ⊤)).toIso) |
| 42 | |
| 43 | def matrixSpace : Over S := |
| 44 | Over.mk (AffineSpace (ι × κ) S ↘ S) |
| 45 | |
| 46 | /-- Affine-space points are precisely the matrices of quotient coordinates. -/ |
| 47 | def matrixPointEquiv (T : Over S) : |
| 48 | (T ⟶ matrixSpace ι κ S) ≃ Matrix ι κ Γ(T.left, ⊤) where |
| 49 | toFun f i j := f.left.appTop (AffineSpace.coord S (i, j)) |
| 50 | invFun M := Over.homMk |
| 51 | (AffineSpace.homOfVector T.hom (fun ij : ι × κ => M ij.1 ij.2)) |
| 52 | (AffineSpace.homOfVector_over _ _) |
| 53 | left_inv f := by |
| 54 | apply (Over.forget S).map_injective |
| 55 | apply AffineSpace.hom_ext |
| 56 | · exact (AffineSpace.homOfVector_over _ _).trans f.w.symm |
| 57 | · intro ij |
| 58 | exact AffineSpace.homOfVector_appTop_coord _ _ ij |
| 59 | right_inv M := by |
| 60 | funext i j |
| 61 | exact AffineSpace.homOfVector_appTop_coord _ _ (i, j) |
| 62 | |
| 63 | /-- The representing equivalence is natural in arbitrary S-schemes. -/ |
| 64 | def matrixRepresentation : |
| 65 | yoneda.obj (matrixSpace ι κ S) ≅ matrixFunctor ι κ S := |
| 66 | NatIso.ofComponents (fun T => (matrixPointEquiv ι κ S T.unop).toIso) (by |
| 67 | intro T U a |
| 68 | apply ConcreteCategory.hom_ext |
| 69 | intro f |
| 70 | funext i j |
| 71 | rfl) |
| 72 | |
| 73 | /-- A standard Grassmannian chart is represented by affine space over S. -/ |
| 74 | def chartRepresentation : |
| 75 | yoneda.obj (matrixSpace ι κ S) ≅ chartFunctor ι κ S := |
| 76 | matrixRepresentation ι κ S ≪≫ |
| 77 | (matrixFunctor ι κ S).isoCopyObj _ _ |
| 78 | |
| 79 | omit [Fintype ι] [DecidableEq ι] in |
| 80 | theorem chartFunctor_map_coordinates {T U : (Over S)ᵒᵖ} (a : T ⟶ U) |
| 81 | (N : (chartFunctor ι κ S).obj T) (i : ι) (j : κ) : |
| 82 | (matrixChartEquiv ι κ Γ(U.unop.left, ⊤)).symm |
| 83 | ((chartFunctor ι κ S).map a N) i j = |
| 84 | a.unop.left.appTop |
| 85 | ((matrixChartEquiv ι κ Γ(T.unop.left, ⊤)).symm N i j) := by |
| 86 | change (matrixChartEquiv ι κ Γ(U.unop.left, ⊤)).symm |
| 87 | ((matrixChartEquiv ι κ Γ(U.unop.left, ⊤)) |
| 88 | (fun i j => a.unop.left.appTop |
| 89 | ((matrixChartEquiv ι κ Γ(T.unop.left, ⊤)).symm N i j))) i j = _ |
| 90 | exact congrArg (fun M : Matrix ι κ Γ(U.unop.left, ⊤) => M i j) |
| 91 | ((matrixChartEquiv ι κ Γ(U.unop.left, ⊤)).symm_apply_apply _) |
| 92 | |
| 93 | end |
| 94 | |
| 95 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.Grassmannian.Chart |