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 | /- |
| 2 | Copyright (c) 2026 Chris Birkbeck. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | Authors: Chris Birkbeck |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import OAI.AlgebraicGeometry.SheafCohomology.Projective.AffineRankOne |
| 8 | import Mathlib.Algebra.Category.ModuleCat.Kernels |
| 9 | import Mathlib.AlgebraicGeometry.IdealSheaf.Basic |
| 10 | |
| 11 | /-! # Ideal Module -/ |
| 12 | |
| 13 | namespace OAI.AlgebraicGeometry.SheafCohomology.Projective.IdealModule |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | /-! The genuine kernel ideal module and its affine sections. -/ |
| 18 | |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | set_option backward.defeqAttrib.useBackward true |
| 21 | open _root_.CategoryTheory Limits _root_.AlgebraicGeometry Opposite |
| 22 | universe u |
| 23 | |
| 24 | local instance idealEvaluationAdditive (Y : Scheme.{u}) (U : Y.Opens) : |
| 25 | (SheafOfModules.evaluation Y.ringCatSheaf (op U)).Additive := by |
| 26 | dsimp only [SheafOfModules.evaluation] |
| 27 | infer_instance |
| 28 | |
| 29 | /-- Multiplication by a nonzerodivisor identifies a ring with the principal ideal it |
| 30 | generates. Unlike `LinearEquiv.toSpanNonzeroSingleton`, this does not require the |
| 31 | ambient ring to be a domain. -/ |
| 32 | noncomputable def principalIdealEquiv {R : Type*} [CommRing R] |
| 33 | (r : R) (hr : r ∈ nonZeroDivisors R) : |
| 34 | R ≃ₗ[R] (Ideal.span {r} : Ideal R) := |
| 35 | (LinearEquiv.ofInjective (LinearMap.toSpanSingleton R R r) |
| 36 | (by |
| 37 | rw [← LinearMap.ker_eq_bot] |
| 38 | exact LinearMap.ker_toSpanSingleton_eq_bot_iff.mpr |
| 39 | (mem_nonZeroDivisors_iff_right.mp hr))).trans |
| 40 | (LinearEquiv.ofEq _ _ (LinearMap.range_toSpanSingleton r)) |
| 41 | |
| 42 | @[simp] |
| 43 | theorem principalIdealEquiv_apply {R : Type*} [CommRing R] |
| 44 | (r : R) (hr : r ∈ nonZeroDivisors R) (a : R) : |
| 45 | principalIdealEquiv r hr a = |
| 46 | (⟨a * r, Ideal.mul_mem_left _ a (Ideal.mem_span_singleton_self r)⟩ : |
| 47 | Ideal.span {r}) := |
| 48 | rfl |
| 49 | |
| 50 | private theorem ofEq_coe {R M : Type*} [Ring R] [AddCommGroup M] |
| 51 | [Module R M] (P Q : Submodule R M) (h : P = Q) (x : P) : |
| 52 | (((LinearEquiv.ofEq P Q h) x : Q) : M) = x := by |
| 53 | subst Q |
| 54 | rfl |
| 55 | |
| 56 | /-- The raw sheaf-of-modules kernel defining the ideal of a morphism. -/ |
| 57 | noncomputable def idealModuleRaw {X Y : Scheme.{u}} (f : X ⟶ Y) : |
| 58 | SheafOfModules Y.ringCatSheaf := |
| 59 | kernel (SheafOfModules.unitToPushforwardObjUnit f.toRingCatSheafHom) |
| 60 | |
| 61 | /-- The ideal module of a morphism: the kernel of |
| 62 | `O_Y -> f_* O_X` in the abelian category of sheaves of `O_Y`-modules. -/ |
| 63 | noncomputable def idealModule {X Y : Scheme.{u}} (f : X ⟶ Y) : Y.Modules := |
| 64 | idealModuleRaw f |
| 65 | |
| 66 | /-- The ideal module is canonically a submodule of the structure sheaf. -/ |
| 67 | noncomputable def idealModuleToUnit {X Y : Scheme.{u}} (f : X ⟶ Y) : |
| 68 | idealModule f ⟶ Invertible.Scheme.Modules.unitObj Y := |
| 69 | kernel.ι (SheafOfModules.unitToPushforwardObjUnit f.toRingCatSheafHom) |
| 70 | |
| 71 | /-- On an affine open, `idealModule f` is the module attached to the affine ideal |
| 72 | recorded by `f.ker`. -/ |
| 73 | noncomputable def idealModuleAppIdealIso {X Y : Scheme.{u}} (f : X ⟶ Y) |
| 74 | [QuasiCompact f] (U : Y.affineOpens) : |
| 75 | (SheafOfModules.evaluation Y.ringCatSheaf (.op U.1)).obj (idealModule f) ≅ |
| 76 | ModuleCat.of Γ(Y, U.1) (f.ker.ideal U) := by |
| 77 | refine (PreservesKernel.iso (SheafOfModules.evaluation Y.ringCatSheaf (.op U.1)) |
| 78 | (SheafOfModules.unitToPushforwardObjUnit f.toRingCatSheafHom)).trans |
| 79 | ((ModuleCat.kernelIsoKer _).trans ?_) |
| 80 | exact (LinearEquiv.ofEq _ _ (by rw [Scheme.Hom.ker_apply]; rfl)).toModuleIso |
| 81 | |
| 82 | /-- The affine ideal comparison respects its inclusion in the structure sheaf. -/ |
| 83 | theorem idealModuleAppIdealIso_comp_subtype {X Y : Scheme.{u}} (f : X ⟶ Y) |
| 84 | [QuasiCompact f] (U : Y.affineOpens) : |
| 85 | (idealModuleAppIdealIso f U).hom ≫ ModuleCat.ofHom (f.ker.ideal U).subtype = |
| 86 | (SheafOfModules.evaluation Y.ringCatSheaf (op U.1)).map (idealModuleToUnit f) := by |
| 87 | let F : Y.Modules ⥤ ModuleCat Γ(Y, U.1) := |
| 88 | SheafOfModules.evaluation Y.ringCatSheaf (op U.1) |
| 89 | have : F.PreservesZeroMorphisms := |
| 90 | inferInstanceAs (SheafOfModules.evaluation Y.ringCatSheaf (op U.1)).PreservesZeroMorphisms |
| 91 | have : PreservesLimits F := |
| 92 | inferInstanceAs (PreservesLimits (SheafOfModules.evaluation Y.ringCatSheaf (op U.1))) |
| 93 | let g := SheafOfModules.unitToPushforwardObjUnit f.toRingCatSheafHom |
| 94 | have hker : (F.map g).hom.ker = f.ker.ideal U := by |
| 95 | rw [Scheme.Hom.ker_apply] |
| 96 | rfl |
| 97 | have heq : (LinearEquiv.ofEq (R := Γ(Y, U.1)) _ _ hker).toModuleIso.hom ≫ |
| 98 | ModuleCat.ofHom (f.ker.ideal U).subtype = |
| 99 | ModuleCat.ofHom (F.map g).hom.ker.subtype := by |
| 100 | apply ModuleCat.hom_ext |
| 101 | apply LinearMap.ext |
| 102 | intro x |
| 103 | exact ofEq_coe _ _ hker x |
| 104 | change ((PreservesKernel.iso F g).hom ≫ |
| 105 | (ModuleCat.kernelIsoKer (F.map g)).hom ≫ |
| 106 | (LinearEquiv.ofEq _ _ hker).toModuleIso.hom) ≫ _ = F.map (kernel.ι g) |
| 107 | rw [Category.assoc, Category.assoc, heq] |
| 108 | rw [ModuleCat.kernelIsoKer_hom_ker_subtype] |
| 109 | rw [PreservesKernel.iso_hom, kernelComparison_comp_ι] |
| 110 | |
| 111 | @[simp] |
| 112 | theorem idealModuleAppIdealIso_coe {X Y : Scheme.{u}} (f : X ⟶ Y) |
| 113 | [QuasiCompact f] (U : Y.affineOpens) (x : Γ(idealModule f, U.1)) : |
| 114 | ((idealModuleAppIdealIso f U).hom x : Γ(Y, U.1)) = |
| 115 | (idealModuleToUnit f).val.app (op U.1) x := by |
| 116 | have h := ConcreteCategory.congr_hom (idealModuleAppIdealIso_comp_subtype f U) x |
| 117 | exact h |
| 118 | |
| 119 | /-- The kernel ideal of an affine morphism is quasicoherent. -/ |
| 120 | theorem idealModule_quasicoherent {X Y : Scheme.{u}} (f : X ⟶ Y) |
| 121 | [IsAffineHom f] : (idealModule f).IsQuasicoherent := by |
| 122 | have : (Invertible.Scheme.Modules.unitObj X).IsQuasicoherent := |
| 123 | InvertibleFinitePresentation.invertible_quasicoherent Invertible.Scheme.Modules.isInvertible_unit |
| 124 | have : (Invertible.Scheme.Modules.unitObj Y).IsQuasicoherent := |
| 125 | InvertibleFinitePresentation.invertible_quasicoherent Invertible.Scheme.Modules.isInvertible_unit |
| 126 | have : ((Scheme.Modules.pushforward f).obj |
| 127 | (Invertible.Scheme.Modules.unitObj X)).IsQuasicoherent := |
| 128 | Quasicoherent.Scheme.Modules.isQuasicoherent_pushforward_of_isAffineHom f |
| 129 | exact Quasicoherent.Scheme.Modules.isQuasicoherent_kernel |
| 130 | (M := Invertible.Scheme.Modules.unitObj Y) |
| 131 | (N := (Scheme.Modules.pushforward f).obj (Invertible.Scheme.Modules.unitObj X)) |
| 132 | (SheafOfModules.unitToPushforwardObjUnit f.toRingCatSheafHom) |
| 133 | |
| 134 | end |
| 135 | |
| 136 | end OAI.AlgebraicGeometry.SheafCohomology.Projective.IdealModule |