Skip to content

Conversation

@grhkm21
Copy link
Contributor

@grhkm21 grhkm21 commented Apr 8, 2024

Fixes #37730.

There is a change to categories and homsets:

sage: Hom(ZZ, ZZ).category() # inherits from CommAdditiveGroups() now
Join of Category of endsets and Category of commutative additive groups and Category of homsets of Dedekind domains and euclidean domains and metric spaces
sage: # this used to be "Category of homsets of sets"
sage: class X(Parent):
....:     def _repr_(self): return "XXXXXX"
....: Hom(X(category=Sets()), ZZ).category()
Join of Category of commutative additive groups and Category of homsets of sets

More TestSuite passes now:

sage: for R in [Zmod(10), QQ, NumberField(x^3 + 5, "a"), Qp(3), GF(2), GF(3), GF((7, 3))]:
....:     params = [3, 5] if R.characteristic() not in [2, 3] else [1, 0, 1, 3, 5]
....:     TestSuite(EllipticCurve(R, params)).run(skip="_test_not_implemented_methods")

(This used to fail quite spectacularly)

There are also many changes in algebraic geometry, such as:

sage: J = HyperellipticCurve(polygen(QQ)^5 + 1).jacobian()
sage: J.categories() # jacobians are abelian varieties
[Category of abelian varieties over Spectrum of Rational Field,
 Category of schemes over Rational Field,
 Category of schemes,
 Category of sets,
 Category of sets with partial maps,
 Category of objects]
sage: J.point_homset().categories()
[Join of Category of commutative additive groups and Category of homsets of schemes over Rational Field,
 Category of commutative additive groups, ...
 Category of homsets of schemes over Rational Field, ...
 Category of sets with partial maps,
 Category of objects]

sage: from sage.schemes.jacobians.abstract_jacobian import Jacobian_generic
....: P2.<x, y> = ProjectiveSpace(QQ, 1)
....: J = Jacobian_generic(Curve(y^2 - (x^3 + x)))
....: J in AbelianVarieties(QQ) # works for Jacobian_generic
True
sage: J = Jacobian_generic(Curve(y^2 - x^3))
....: J in AbelianVarieties(QQ) # only if the curve is projective smooth
False

sage: AbelianVarieties(QQ) # changed base scheme to be a scheme (lol?)
Category of abelian varieties over Spectrum of Rational Field
sage: AbelianVarieties(QQ) is AbelianVarieties(Spec(QQ)) # input is normalised
True

Question for reviewer:

  • Currently I only check for C.is_smooth() at the category check for Jacobian_generic, but I think we also need C to have a rational point. Is that correct? How should I incorporate that?
  • Is this hack acceptable?

TODO:

  • Put a few more TestSuite(asdf).run(), it seems like a cool feature

grhkm21 added 3 commits April 8, 2024 19:10
`AbelianVarieties`. Also change base scheme of AbelianVarieties to be,
well, a scheme.
@grhkm21
Copy link
Contributor Author

grhkm21 commented Apr 9, 2024

It seems that this change is incorrect... an hyperelliptic curve jacobian J itself is not an abelian group, but rather its point homsets is.

@grhkm21
Copy link
Contributor Author

grhkm21 commented Apr 9, 2024

To address this line: It seems that the problem is that point homsets, inherit from Homsets, which contains Morphism (or something similar) as its element_class. However, scheme morphisms are in a class SchemeMorphism, which is for technical reasons isolated/independent from Morphism - also see 37705 for more discussions. So I have patched out the test temporarily until that is resolved. Well, "temporarily" is until that ~10-year-old problem is fixed.

@grhkm21 grhkm21 requested a review from yyyyx4 April 9, 2024 15:42
@grhkm21
Copy link
Contributor Author

grhkm21 commented Apr 9, 2024

I just opened up a massive can of worms 🥳 TL;DR I shouldn't put the abelian group structure on Hom(X,AbGrp) yet, since that would require adding homs, which is kind of what #37705 does, except that does it for SchemeMorphism which is (as mentioned) totally independent from Morphism.

For now, I will revert that changes from this PR, and extract it to another issue.

@github-actions
Copy link

github-actions bot commented Apr 10, 2024

Documentation preview for this PR (built with commit 9eda621; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@grhkm21
Copy link
Contributor Author

grhkm21 commented Feb 1, 2025

I will close this PR for now, and split the changes into more smaller PRs. Basically I tried working on this PR just now and just made a mess so it's better to make smaller PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Elliptic curve point homsets should be in the AbelianGroup category

1 participant