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.Morphisms.ClosedImmersion |
| 2 | import Mathlib.RingTheory.Ideal.Quotient.Operations |
| 3 | |
| 4 | /-! # Affine Closed Immersion -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.Foundations.Scheme.AffineClosedImmersion |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! |
| 11 | # Affine equations of a closed immersion |
| 12 | |
| 13 | A closed immersion into an affine scheme has affine source. Its coordinate ring |
| 14 | is the quotient of the target coordinate ring by the actual kernel ideal. |
| 15 | The resulting spectrum isomorphism is compatible with the original immersion. |
| 16 | -/ |
| 17 | |
| 18 | open _root_.CategoryTheory _root_.AlgebraicGeometry Opposite |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | variable {X Y : Scheme.{u}} [IsAffine Y] (i : X ⟶ Y) [IsClosedImmersion i] |
| 23 | |
| 24 | include i in |
| 25 | /-- A closed subscheme of an affine scheme is affine. -/ |
| 26 | theorem affineClosedImmersion_source_isAffine : IsAffine X := |
| 27 | (IsClosedImmersion.isAffine_surjective_of_isAffine i).1 |
| 28 | |
| 29 | /-- The coordinate map of a closed immersion into an affine scheme is surjective. -/ |
| 30 | theorem affineClosedImmersion_appTop_surjective : Function.Surjective i.appTop := |
| 31 | (IsClosedImmersion.isAffine_surjective_of_isAffine i).2 |
| 32 | |
| 33 | /-- The actual ideal of equations in the target's coordinate ring. -/ |
| 34 | abbrev affineClosedImmersionIdeal : Ideal Γ(Y, ⊤) := RingHom.ker i.appTop.hom |
| 35 | |
| 36 | /-- The source coordinate ring is the quotient by the actual ideal of equations. -/ |
| 37 | def affineClosedImmersionCoordinateEquiv : |
| 38 | (Γ(Y, ⊤) ⧸ affineClosedImmersionIdeal i) ≃+* Γ(X, ⊤) := |
| 39 | RingHom.quotientKerEquivOfSurjective (affineClosedImmersion_appTop_surjective i) |
| 40 | |
| 41 | @[simp] |
| 42 | theorem affineClosedImmersionCoordinateEquiv_mk (a : Γ(Y, ⊤)) : |
| 43 | affineClosedImmersionCoordinateEquiv i |
| 44 | (Ideal.Quotient.mk (affineClosedImmersionIdeal i) a) = i.appTop a := |
| 45 | RingHom.quotientKerEquivOfSurjective_apply_mk _ a |
| 46 | |
| 47 | /-- The affine closed subscheme is the actual spectrum of its quotient ring. -/ |
| 48 | def affineClosedImmersionIsoQuotient : |
| 49 | X ≅ Spec (.of (Γ(Y, ⊤) ⧸ affineClosedImmersionIdeal i)) := by |
| 50 | letI : IsAffine X := affineClosedImmersion_source_isAffine i |
| 51 | exact X.isoSpec ≪≫ Scheme.Spec.mapIso |
| 52 | (affineClosedImmersionCoordinateEquiv i).toCommRingCatIso.op |
| 53 | |
| 54 | /-- The quotient ring map agrees with the original map on global sections. -/ |
| 55 | theorem affineClosedImmersion_quotient_comp : |
| 56 | CommRingCat.ofHom (Ideal.Quotient.mk (affineClosedImmersionIdeal i)) ≫ |
| 57 | (affineClosedImmersionCoordinateEquiv i).toCommRingCatIso.hom = i.appTop := by |
| 58 | ext a |
| 59 | exact affineClosedImmersionCoordinateEquiv_mk i a |
| 60 | |
| 61 | /-- The spectrum isomorphism carries the original immersion to the quotient map. -/ |
| 62 | theorem affineClosedImmersionIsoQuotient_over : |
| 63 | (affineClosedImmersionIsoQuotient i).hom ≫ |
| 64 | Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk (affineClosedImmersionIdeal i))) ≫ |
| 65 | Y.isoSpec.inv = i := by |
| 66 | let _ : IsAffine X := affineClosedImmersion_source_isAffine i |
| 67 | simp only [affineClosedImmersionIsoQuotient, Iso.trans_hom, Functor.mapIso_hom, |
| 68 | Iso.op_hom, Scheme.Spec_map, Quiver.Hom.unop_op, Category.assoc] |
| 69 | rw [← Category.assoc (Spec.map _) (Spec.map _) Y.isoSpec.inv, |
| 70 | ← Spec.map_comp, affineClosedImmersion_quotient_comp] |
| 71 | rw [Scheme.isoSpec_inv_naturality] |
| 72 | simp |
| 73 | |
| 74 | /-- A ring map whose spectrum morphism is a closed immersion is surjective. -/ |
| 75 | theorem ringMap_surjective_of_spec_closedImmersion {R S : CommRingCat.{u}} |
| 76 | (f : R ⟶ S) [IsClosedImmersion (Spec.map f)] : Function.Surjective f := by |
| 77 | have hs := (IsClosedImmersion.isAffine_surjective_of_isAffine (Spec.map f)).2 |
| 78 | have hcomp : (Scheme.ΓSpecIso R).inv ≫ (Spec.map f).appTop ≫ |
| 79 | (Scheme.ΓSpecIso S).hom = f := by simp |
| 80 | rw [← hcomp] |
| 81 | exact ((ConcreteCategory.bijective_of_isIso (Scheme.ΓSpecIso S).hom).2.comp hs).comp |
| 82 | (ConcreteCategory.bijective_of_isIso (Scheme.ΓSpecIso R).inv).2 |
| 83 | |
| 84 | /-- For algebra maps, the coordinate quotient identification respects the base |
| 85 | algebra structure, in particular for complex algebras. -/ |
| 86 | def algebraQuotientEquivOfSpecClosedImmersion {K : Type v} [CommRing K] |
| 87 | {A B : Type u} [CommRing A] [CommRing B] [Algebra K A] [Algebra K B] |
| 88 | (f : A →ₐ[K] B) |
| 89 | [IsClosedImmersion (Spec.map (CommRingCat.ofHom f.toRingHom))] : |
| 90 | (A ⧸ RingHom.ker f) ≃ₐ[K] B := |
| 91 | Ideal.quotientKerAlgEquivOfSurjective |
| 92 | (ringMap_surjective_of_spec_closedImmersion (CommRingCat.ofHom f.toRingHom)) |
| 93 | |
| 94 | @[simp] |
| 95 | theorem algebraQuotientEquivOfSpecClosedImmersion_mk {K : Type v} [CommRing K] |
| 96 | {A B : Type u} [CommRing A] [CommRing B] [Algebra K A] [Algebra K B] |
| 97 | (f : A →ₐ[K] B) |
| 98 | [IsClosedImmersion (Spec.map (CommRingCat.ofHom f.toRingHom))] (a : A) : |
| 99 | algebraQuotientEquivOfSpecClosedImmersion f (Ideal.Quotient.mk (RingHom.ker f) a) = |
| 100 | f a := rfl |
| 101 | |
| 102 | end |
| 103 | |
| 104 | end OAI.AlgebraicGeometry.Foundations.Scheme.AffineClosedImmersion |