#14264: Fix negation of Jacobian morphisms
-------------------------+--------------------------------------------------
Reporter: SimonKing | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone: sage-5.9
Component: algebra | Keywords: Jacobian morphism
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-------------------------+--------------------------------------------------
The following fails with a coercion error:
{{{
sage: P.<x> = QQ[]
sage: f = x^5 - x + 1; h = x
sage: C = HyperellipticCurve(f,h,'u,v')
sage: J = C.jacobian()
sage: K.<t> = NumberField(x^2-2)
sage: R.<x> = K[]
sage: Q = J(K)([x^2-t,R(1)])
sage: Q
(u^2 - t, v - 1)
sage: -Q
(u^2 - t, v + u + 1)
}}}
The reason is that in the `__neg__` method, the remainder of a polynomial
h over the rationals is computed modulo a non-constant polynomial over a
number field. The involved `__mod__` method of FLINT polynomials would try
to coerce the modulus into the parent of h, which fails here for obvious
reasons.
I see two possible solutions:
1. Make sure in `JacobianMorphism_divisor_class_field.__neg__` that h and
the modulus live in the same ring, e.g., by adding the modulus to h before
computing the remainder (which won't change the result).
2. In the `__mod__` method of FLINT polynomials, invoke
coercion_model.canonical_coercion on h and the modulus, rather than trying
to coerce the modulus into the parent of h.
I prefer the first approach, since then the output of `__mod__` would
potentially live in a different ring (which should not be the case!) and
since it would imply a general slowdown of the `__mod__` method.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14264>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.