By the way, the docstring of divisor() misses an example, it's
def divisor(self, v, base_ring=None, check=True, reduce=True):
r"""
Return the divisor specified by ``v``.
.. WARNING::
The coefficients of the divisor must be in the base ring
and the terms must be reduced. If you set ``check=False``
and/or ``reduce=False`` it is your responsibility to pass
a valid object ``v``.
EXAMPLES::
sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
"""
Is there an issue for this?
On Sat, Oct 28, 2023 at 12:42 AM Nils Bruin <[email protected]> wrote:
>
> A canonical divisor is the divisor of any differential on C so the following
> does the trick:
>
> sage: kC=C.function_field()
> sage: kC(kC.base_field().gen(0)).differential().divisor()
>
> It doesn't look like we quite have computation of Riemann-Roch spaces
> natively in sage yet, so finding effective representatives requires a little
> more work. In the RiemannSurface code this is done using singular's adjoint
> ideal code (or by Baker's theorem in cases where it applies). For this curve
> the canonical class is of degree -2, so there are no effective
> representatives in this case.
>
> On Friday, 27 October 2023 at 15:14:00 UTC-7 John H Palmieri wrote:
>>
>> If anyone here knows anything about canonical divisors and their
>> implementation in Sage, please see
>> https://ask.sagemath.org/question/74034/converting-algebraic-geometry-magmas-code-to-sage/.
>> The setup:
>>
>> sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
>> sage: f = 2*x^5 - 4*x^3*y*z + x^2*y*z^2 + 2*x*y^3*z + 2*x*y^2*z^2+ y^5
>> sage: C = P2.curve(f)
>>
>> How do you get the canonical divisor for C?
>>
>> (I encourage you to post answers directly to ask.sagemath.org, if you're
>> willing.)
>>
>> --
>> John
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/91b14570-b83e-4dbf-8bca-0a2eff538a50n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/CAAWYfq0wr3ZFzM2BFUOqC3fvCkKy5OkArtU1MC0JOUidBAp34Q%40mail.gmail.com.