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.AbelianModuli.HilbertConstruction.MorphismFromAffineTests |
| 2 | import Mathlib.AlgebraicGeometry.Noetherian |
| 3 | |
| 4 | /-! # Affine Test Morphisms -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Noetherian.AffineTestMorphisms |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Natural maps on Noetherian affine tests reconstruct morphisms |
| 11 | from any locally Noetherian scheme. No Noetherian hypothesis is |
| 12 | imposed on the target. -/ |
| 13 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 14 | universe u |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | set_option backward.isDefEq.respectTransparency.types false |
| 17 | |
| 18 | structure NoetherianAffineTestMorphismData (X Y : Scheme.{u}) where |
| 19 | app : ∀ (R : CommRingCat.{u}) [IsNoetherianRing R], (Spec R ⟶ X) → (Spec R ⟶ Y) |
| 20 | naturality : ∀ (R A : CommRingCat.{u}) [IsNoetherianRing R] [IsNoetherianRing A] |
| 21 | (f : Spec A ⟶ Spec R) (x : Spec R ⟶ X), app A (f ≫ x) = f ≫ app R x |
| 22 | |
| 23 | namespace NoetherianAffineTestMorphismData |
| 24 | |
| 25 | instance affineCoverRing_noetherian (Z : Scheme.{u}) [IsLocallyNoetherian Z] |
| 26 | (i : Z.affineOpenCover.I₀) : IsNoetherianRing (Z.affineOpenCover.X i) := |
| 27 | isLocallyNoetherian_Spec.mp (isLocallyNoetherian_of_isOpenImmersion (Z.affineOpenCover.f i)) |
| 28 | |
| 29 | variable {X Y : Scheme.{u}} [IsLocallyNoetherian X] (D : NoetherianAffineTestMorphismData X Y) |
| 30 | |
| 31 | theorem affineCover_compatible (i j : X.affineOpenCover.I₀) : |
| 32 | pullback.fst (X.affineOpenCover.f i) (X.affineOpenCover.f j) ≫ |
| 33 | D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i) = |
| 34 | pullback.snd (X.affineOpenCover.f i) (X.affineOpenCover.f j) ≫ |
| 35 | D.app (X.affineOpenCover.X j) (X.affineOpenCover.f j) := by |
| 36 | let P := pullback (X.affineOpenCover.f i) (X.affineOpenCover.f j) |
| 37 | have : IsLocallyNoetherian P := isLocallyNoetherian_of_isOpenImmersion |
| 38 | (pullback.fst (X.affineOpenCover.f i) (X.affineOpenCover.f j)) |
| 39 | apply P.affineOpenCover.openCover.hom_ext |
| 40 | intro k |
| 41 | erw [← Category.assoc, ← Category.assoc, ← D.naturality, ← D.naturality] |
| 42 | congr 1 |
| 43 | rw [Category.assoc, pullback.condition, ← Category.assoc] |
| 44 | |
| 45 | def toHom : X ⟶ Y := |
| 46 | X.affineOpenCover.openCover.glueMorphisms |
| 47 | (fun i => D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i)) D.affineCover_compatible |
| 48 | |
| 49 | theorem affineCover_toHom (i : X.affineOpenCover.I₀) : |
| 50 | X.affineOpenCover.f i ≫ D.toHom = D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i) := |
| 51 | X.affineOpenCover.openCover.ι_glueMorphisms |
| 52 | (fun j => D.app (X.affineOpenCover.X j) (X.affineOpenCover.f j)) |
| 53 | D.affineCover_compatible i |
| 54 | |
| 55 | theorem toHom_on_affine (R : CommRingCat.{u}) [IsNoetherianRing R] (x : Spec R ⟶ X) : |
| 56 | x ≫ D.toHom = D.app R x := by |
| 57 | let C : (Spec R).OpenCover := X.affineOpenCover.openCover.pullback₁ x |
| 58 | apply C.hom_ext |
| 59 | intro i |
| 60 | change X.affineOpenCover.I₀ at i |
| 61 | let P := pullback x (X.affineOpenCover.f i) |
| 62 | have : IsLocallyNoetherian P := |
| 63 | isLocallyNoetherian_of_isOpenImmersion (pullback.fst x (X.affineOpenCover.f i)) |
| 64 | apply P.affineOpenCover.openCover.hom_ext |
| 65 | intro j |
| 66 | let a := P.affineOpenCover.f j |
| 67 | change a ≫ (pullback.fst x (X.affineOpenCover.f i) ≫ (x ≫ D.toHom)) = |
| 68 | a ≫ (pullback.fst x (X.affineOpenCover.f i) ≫ D.app R x) |
| 69 | calc |
| 70 | _ = (a ≫ pullback.snd x (X.affineOpenCover.f i)) ≫ |
| 71 | D.app (X.affineOpenCover.X i) (X.affineOpenCover.f i) := by |
| 72 | rw [← Category.assoc (pullback.fst _ _) x, pullback.condition, Category.assoc, |
| 73 | D.affineCover_toHom, ← Category.assoc] |
| 74 | _ = D.app (P.affineOpenCover.X j) |
| 75 | ((a ≫ pullback.snd x (X.affineOpenCover.f i)) ≫ X.affineOpenCover.f i) := |
| 76 | (D.naturality _ _ _ _).symm |
| 77 | _ = D.app (P.affineOpenCover.X j) ((a ≫ pullback.fst x (X.affineOpenCover.f i)) ≫ x) := by |
| 78 | rw [Category.assoc, ← pullback.condition, ← Category.assoc] |
| 79 | _ = (a ≫ pullback.fst x (X.affineOpenCover.f i)) ≫ D.app R x := D.naturality _ _ _ _ |
| 80 | _ = _ := Category.assoc _ _ _ |
| 81 | |
| 82 | theorem toHom_unique (h : X ⟶ Y) |
| 83 | (hh : ∀ (R : CommRingCat.{u}) [IsNoetherianRing R] (x : Spec R ⟶ X), |
| 84 | x ≫ h = D.app R x) : h = D.toHom := by |
| 85 | apply X.affineOpenCover.openCover.hom_ext |
| 86 | intro i |
| 87 | exact (hh _ _).trans (D.affineCover_toHom i).symm |
| 88 | |
| 89 | end NoetherianAffineTestMorphismData |
| 90 | |
| 91 | theorem schemeHom_ext_noetherianAffines {X Y : Scheme.{u}} [IsLocallyNoetherian X] |
| 92 | (f g : X ⟶ Y) |
| 93 | (h : ∀ (R : CommRingCat.{u}) [IsNoetherianRing R] (x : Spec R ⟶ X), x ≫ f = x ≫ g) : f = g := by |
| 94 | apply X.affineOpenCover.openCover.hom_ext |
| 95 | intro i |
| 96 | have : IsNoetherianRing (X.affineOpenCover.X i) := NoetherianAffineTestMorphismData.affineCoverRing_noetherian X i |
| 97 | exact h _ _ |
| 98 | |
| 99 | end |
| 100 | |
| 101 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Noetherian.AffineTestMorphisms |