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.ArithmeticGeometry.Models.Algebra |
| 2 | import Mathlib.AlgebraicGeometry.Morphisms.FinitePresentation |
| 3 | import Mathlib.AlgebraicGeometry.Morphisms.Separated |
| 4 | import Mathlib.AlgebraicGeometry.Pullbacks |
| 5 | import Mathlib.CategoryTheory.Comma.Over.Pullback |
| 6 | |
| 7 | /-! # Scheme -/ |
| 8 | |
| 9 | namespace OAI.ArithmeticGeometry.Models.Scheme.Constructions.Foundations |
| 10 | |
| 11 | /-! Scheme-theoretic foundations for Foundations, independent of graph statement stubs. -/ |
| 12 | |
| 13 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 14 | open scoped _root_.NumberField TensorProduct |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | abbrev FinitePresentationMorphism {X Y : Scheme.{u}} (f : X ⟶ Y) : Prop := |
| 19 | LocallyOfFinitePresentation f ∧ QuasiCompact f ∧ QuasiSeparated f |
| 20 | |
| 21 | /-- Equal base maps give canonically isomorphic base changes, independently |
| 22 | of the chosen pullbacks. -/ |
| 23 | noncomputable def baseChangeCongr {S T : Scheme.{u}} {f g : T ⟶ S} |
| 24 | [HasPullbacksAlong f] [HasPullbacksAlong g] (h : f = g) (X : Over S) : |
| 25 | (Over.pullback f).obj X ≅ (Over.pullback g).obj X := by |
| 26 | subst g |
| 27 | exact Iso.refl _ |
| 28 | |
| 29 | /-- The affine scheme over its coefficient ring. -/ |
| 30 | noncomputable abbrev affineOver (R A : Type u) [CommRing R] [CommRing A] [Algebra R A] : |
| 31 | Over (Spec (CommRingCat.of R)) := |
| 32 | Over.mk (Spec.map (CommRingCat.ofHom (algebraMap R A))) |
| 33 | |
| 34 | theorem affineOver_finitePresentation |
| 35 | (R A : Type u) [CommRing R] [CommRing A] [Algebra R A] |
| 36 | [Algebra.FinitePresentation R A] : |
| 37 | FinitePresentationMorphism (affineOver R A).hom := by |
| 38 | change FinitePresentationMorphism (Spec.map (CommRingCat.ofHom (algebraMap R A))) |
| 39 | refine ⟨?_, inferInstance, inferInstance⟩ |
| 40 | apply (LocallyOfFinitePresentation.SpecMap_iff _).mpr |
| 41 | exact RingHom.finitePresentation_algebraMap.mpr inferInstance |
| 42 | |
| 43 | /-- The affine tensor-product description respects the map to the new base. -/ |
| 44 | noncomputable def baseChangeAffineIso |
| 45 | (R K A : Type u) [CommRing R] [CommRing K] [CommRing A] |
| 46 | [Algebra R K] [Algebra R A] : |
| 47 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj |
| 48 | (affineOver R A) ≅ affineOver K (K ⊗[R] A) := |
| 49 | Over.isoMk |
| 50 | (pullbackSymmetry _ _ ≪≫ pullbackSpecIso R K A) |
| 51 | (by |
| 52 | change (pullbackSymmetry _ _).hom ≫ (pullbackSpecIso R K A).hom ≫ |
| 53 | Spec.map (CommRingCat.ofHom (algebraMap K (K ⊗[R] A))) = _ |
| 54 | rw [pullbackSpecIso_hom_fst, pullbackSymmetry_hom_comp_fst] |
| 55 | rfl) |
| 56 | |
| 57 | /-- An algebra isomorphism gives an isomorphism over the coefficient scheme. -/ |
| 58 | noncomputable def affineOverIso |
| 59 | {K A B : Type u} [CommRing K] [CommRing A] [CommRing B] |
| 60 | [Algebra K A] [Algebra K B] (e : A ≃ₐ[K] B) : |
| 61 | affineOver K A ≅ affineOver K B := |
| 62 | Over.isoMk (Scheme.Spec.mapIso e.toRingEquiv.toCommRingCatIso.symm.op) |
| 63 | (by |
| 64 | change Spec.map (CommRingCat.ofHom e.symm.toRingHom) ≫ |
| 65 | Spec.map (CommRingCat.ofHom (algebraMap K B)) = |
| 66 | Spec.map (CommRingCat.ofHom (algebraMap K A)) |
| 67 | rw [← Spec.map_comp] |
| 68 | congr 1 |
| 69 | ext x |
| 70 | exact e.symm.commutes x) |
| 71 | |
| 72 | /-- The integral affine model recovers the original affine scheme over `K`. -/ |
| 73 | theorem affine_scheme_has_integral_model |
| 74 | (K A : Type u) [Field K] [NumberField K] [CommRing A] [Algebra K A] |
| 75 | [Algebra.FinitePresentation K A] (N₀ : ℕ) (hN₀ : N₀ ≠ 0) : |
| 76 | ∃ (N : ℕ) (hN : N ≠ 0), N₀ ∣ N ∧ |
| 77 | ∃ X₀ : Over (Spec (CommRingCat.of (Localization.Away (N : 𝓞 K)))), |
| 78 | FinitePresentationMorphism X₀.hom ∧ |
| 79 | Nonempty ((Over.pullback |
| 80 | (Spec.map (CommRingCat.ofHom (Models.Algebra.Constructions.Foundations.integersAwayToField K N hN)))).obj X₀ ≅ |
| 81 | affineOver K A) := by |
| 82 | obtain ⟨N, hN, hd, A₀, hR, hA, hFP, ⟨e⟩⟩ := |
| 83 | Models.Algebra.Constructions.Foundations.finitely_presented_algebra_has_integral_model K A N₀ hN₀ |
| 84 | let L := Localization.Away (N : 𝓞 K) |
| 85 | let : Algebra L K := (Models.Algebra.Constructions.Foundations.integersAwayToField K N hN).toAlgebra |
| 86 | let : CommRing A₀ := hR |
| 87 | let : Algebra L A₀ := hA |
| 88 | let : Algebra.FinitePresentation L A₀ := hFP |
| 89 | exact ⟨N, hN, hd, affineOver L A₀, affineOver_finitePresentation L A₀, |
| 90 | ⟨baseChangeAffineIso L K A₀ ≪≫ affineOverIso e⟩⟩ |
| 91 | |
| 92 | end OAI.ArithmeticGeometry.Models.Scheme.Constructions.Foundations |