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.Algebra.Category.Ring.FilteredColimits |
| 3 | import Mathlib.AlgebraicGeometry.Limits |
| 4 | import Mathlib.CategoryTheory.Limits.Types.Filtered |
| 5 | import Mathlib.CategoryTheory.Limits.Preserves.Filtered |
| 6 | |
| 7 | /-! # Coefficient System -/ |
| 8 | |
| 9 | namespace OAI.ArithmeticGeometry.Models.CoefficientSystem.Constructions.Foundations |
| 10 | |
| 11 | /-! The filtered system of finite coefficient rings used in Foundations. -/ |
| 12 | |
| 13 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | variable (R K : Type u) [CommRing R] [CommRing K] [Algebra R K] |
| 18 | |
| 19 | /-- The subalgebra generated by a finite set of coefficients. -/ |
| 20 | noncomputable abbrev coefficientRing (s : Finset K) : Subalgebra R K := |
| 21 | Algebra.adjoin R (s : Set K) |
| 22 | |
| 23 | /-- Inclusions of finite coefficient sets give inclusions of coefficient rings. -/ |
| 24 | noncomputable def coefficientDiagram : Finset K ⥤ CommRingCat.{u} where |
| 25 | obj s := CommRingCat.of (coefficientRing R K s) |
| 26 | map h := CommRingCat.ofHom |
| 27 | (Subalgebra.inclusion (Algebra.adjoin_mono (Finset.coe_subset.mpr (leOfHom h)))).toRingHom |
| 28 | map_id _ := by ext x; rfl |
| 29 | map_comp _ _ := by ext x; rfl |
| 30 | |
| 31 | /-- All finite coefficient rings map into the ambient ring. -/ |
| 32 | noncomputable def coefficientCocone : Cocone (coefficientDiagram R K) where |
| 33 | pt := CommRingCat.of K |
| 34 | ι := |
| 35 | { app := fun s ↦ CommRingCat.ofHom (coefficientRing R K s).val.toRingHom |
| 36 | naturality := by intros; ext x; rfl } |
| 37 | |
| 38 | /-- Every coefficient occurs at a finite stage, and equality is witnessed at a common stage. -/ |
| 39 | noncomputable def coefficientCoconeIsColimit : IsColimit (coefficientCocone R K) := by |
| 40 | classical |
| 41 | let : ReflectsColimitsOfShape (Finset K) (forget CommRingCat.{u}) := |
| 42 | reflectsColimitsOfShape_of_reflectsIsomorphisms |
| 43 | apply isColimitOfReflects (forget CommRingCat.{u}) |
| 44 | apply Types.FilteredColimit.isColimitOf |
| 45 | · intro x |
| 46 | exact ⟨{x}, ⟨x, Algebra.subset_adjoin (Finset.mem_singleton_self x)⟩, rfl⟩ |
| 47 | · intro s t x y h |
| 48 | refine ⟨s ∪ t, homOfLE Finset.subset_union_left, homOfLE Finset.subset_union_right, ?_⟩ |
| 49 | exact Subtype.ext h |
| 50 | |
| 51 | theorem coefficientRing_finiteType (s : Finset K) : |
| 52 | Algebra.FiniteType R (coefficientRing R K s) := |
| 53 | Algebra.FiniteType.adjoin_of_finite s.finite_toSet |
| 54 | |
| 55 | /-- Spectra form the corresponding cofiltered system. -/ |
| 56 | noncomputable def coefficientSchemeDiagram : (Finset K)ᵒᵖ ⥤ Scheme.{u} := |
| 57 | (coefficientDiagram R K).op ⋙ Scheme.Spec |
| 58 | |
| 59 | noncomputable def coefficientSchemeCone : Cone (coefficientSchemeDiagram R K) := |
| 60 | Scheme.Spec.mapCone (coefficientCocone R K).op |
| 61 | |
| 62 | /-- The ambient affine scheme is the limit of its finite coefficient models. -/ |
| 63 | noncomputable def coefficientSchemeConeIsLimit : IsLimit (coefficientSchemeCone R K) := |
| 64 | isLimitOfPreserves Scheme.Spec (coefficientCoconeIsColimit R K).op |
| 65 | |
| 66 | /-- The affine base associated with a finite coefficient set. -/ |
| 67 | noncomputable abbrev coefficientBase (s : Finset K) : Scheme.{u} := |
| 68 | Spec (CommRingCat.of (coefficientRing R K s)) |
| 69 | |
| 70 | noncomputable abbrev genericBaseMap (s : Finset K) : |
| 71 | Spec (CommRingCat.of K) ⟶ coefficientBase R K s := |
| 72 | Spec.map ((coefficientCocone R K).ι.app s) |
| 73 | |
| 74 | noncomputable abbrev coefficientBaseMap {s t : Finset K} (h : s ⊆ t) : |
| 75 | coefficientBase R K t ⟶ coefficientBase R K s := |
| 76 | Spec.map ((coefficientDiagram R K).map (homOfLE h)) |
| 77 | |
| 78 | @[reassoc (attr := simp)] |
| 79 | theorem genericBaseMap_comp {s t : Finset K} (h : s ⊆ t) : |
| 80 | genericBaseMap R K t ≫ coefficientBaseMap R K h = genericBaseMap R K s := by |
| 81 | dsimp [genericBaseMap, coefficientBaseMap, coefficientDiagram, coefficientCocone] |
| 82 | rw [← Spec.map_comp] |
| 83 | congr 1 |
| 84 | |
| 85 | @[reassoc (attr := simp)] |
| 86 | theorem coefficientBaseMap_comp {s t v : Finset K} (hst : s ⊆ t) (htv : t ⊆ v) : |
| 87 | coefficientBaseMap R K htv ≫ coefficientBaseMap R K hst = |
| 88 | coefficientBaseMap R K (hst.trans htv) := by |
| 89 | dsimp [coefficientBaseMap] |
| 90 | erw [← Spec.map_comp, ← Functor.map_comp] |
| 91 | rfl |
| 92 | |
| 93 | end OAI.ArithmeticGeometry.Models.CoefficientSystem.Constructions.Foundations |