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 Mathlib.AlgebraicGeometry.Gluing |
| 2 | |
| 3 | /-! # Morphism From Affine Tests -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.MorphismFromAffineTests |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! A natural assignment on all affine test schemes determines an |
| 10 | actual scheme morphism. The construction glues on an affine cover |
| 11 | and proves the formula on every affine test, not only on that cover. -/ |
| 12 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 13 | universe u |
| 14 | |
| 15 | structure AffineTestMorphismData (X Y : Scheme.{u}) where |
| 16 | app : ∀ R : CommRingCat.{u}, (Spec R ⟶ X) → (Spec R ⟶ Y) |
| 17 | naturality : ∀ (R A : CommRingCat.{u}) (f : Spec A ⟶ Spec R) (x : Spec R ⟶ X), |
| 18 | app A (f ≫ x) = f ≫ app R x |
| 19 | |
| 20 | namespace AffineTestMorphismData |
| 21 | variable {X Y : Scheme.{u}} (D : AffineTestMorphismData X Y) |
| 22 | |
| 23 | theorem affineCover_compatible (i j : X.affineOpenCover.I₀) : |
| 24 | pullback.fst (X.affineOpenCover.f i) (X.affineOpenCover.f j) ≫ |
| 25 | D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i) = |
| 26 | pullback.snd (X.affineOpenCover.f i) (X.affineOpenCover.f j) ≫ |
| 27 | D.app (X.affineOpenCover.X j) (X.affineOpenCover.f j) := by |
| 28 | let P := pullback (X.affineOpenCover.f i) (X.affineOpenCover.f j) |
| 29 | apply P.affineOpenCover.openCover.hom_ext |
| 30 | intro k |
| 31 | erw [← Category.assoc, ← Category.assoc, ← D.naturality, ← D.naturality] |
| 32 | congr 1 |
| 33 | exact (Category.assoc _ _ _).trans |
| 34 | ((congrArg (fun q => P.affineOpenCover.openCover.f k ≫ q) pullback.condition).trans |
| 35 | (Category.assoc _ _ _).symm) |
| 36 | |
| 37 | def toHom : X ⟶ Y := |
| 38 | X.affineOpenCover.openCover.glueMorphisms |
| 39 | (fun i => D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i)) D.affineCover_compatible |
| 40 | |
| 41 | theorem affineCover_toHom (i : X.affineOpenCover.I₀) : |
| 42 | X.affineOpenCover.f i ≫ D.toHom = |
| 43 | D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i) := |
| 44 | X.affineOpenCover.openCover.ι_glueMorphisms _ _ i |
| 45 | |
| 46 | theorem toHom_on_affine (R : CommRingCat.{u}) (x : Spec R ⟶ X) : |
| 47 | x ≫ D.toHom = D.app R x := by |
| 48 | let C : (Spec R).OpenCover := X.affineOpenCover.openCover.pullback₁ x |
| 49 | apply C.hom_ext |
| 50 | intro i |
| 51 | change X.affineOpenCover.I₀ at i |
| 52 | let P := pullback x (X.affineOpenCover.f i) |
| 53 | change pullback.fst x (X.affineOpenCover.f i) ≫ (x ≫ D.toHom) = |
| 54 | pullback.fst x (X.affineOpenCover.f i) ≫ D.app R x |
| 55 | apply P.affineOpenCover.openCover.hom_ext |
| 56 | intro j |
| 57 | let a := P.affineOpenCover.f j |
| 58 | change a ≫ (pullback.fst x (X.affineOpenCover.f i) ≫ (x ≫ D.toHom)) = |
| 59 | a ≫ (pullback.fst x (X.affineOpenCover.f i) ≫ D.app R x) |
| 60 | calc |
| 61 | _ = (a ≫ pullback.snd x (X.affineOpenCover.f i)) ≫ |
| 62 | D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i) := by |
| 63 | rw [← Category.assoc (pullback.fst _ _) x, pullback.condition, Category.assoc, |
| 64 | D.affineCover_toHom, ← Category.assoc] |
| 65 | _ = D.app (P.affineOpenCover.X j) |
| 66 | ((a ≫ pullback.snd x (X.affineOpenCover.f i)) ≫ X.affineOpenCover.f i) := |
| 67 | (D.naturality _ _ _ _).symm |
| 68 | _ = D.app (P.affineOpenCover.X j) ((a ≫ pullback.fst x (X.affineOpenCover.f i)) ≫ x) := by |
| 69 | rw [Category.assoc, ← pullback.condition, ← Category.assoc] |
| 70 | _ = (a ≫ pullback.fst x (X.affineOpenCover.f i)) ≫ D.app R x := D.naturality _ _ _ _ |
| 71 | _ = _ := Category.assoc _ _ _ |
| 72 | |
| 73 | theorem toHom_unique (h : X ⟶ Y) |
| 74 | (hh : ∀ (R : CommRingCat.{u}) (x : Spec R ⟶ X), x ≫ h = D.app R x) : h = D.toHom := by |
| 75 | apply X.affineOpenCover.openCover.hom_ext |
| 76 | intro i |
| 77 | exact (hh _ _).trans (D.affineCover_toHom i).symm |
| 78 | |
| 79 | end AffineTestMorphismData |
| 80 | |
| 81 | end |
| 82 | |
| 83 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.MorphismFromAffineTests |