You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This raises "TypeError: unsupported operand parent(s) for '*': 'Rational Field' and 'Residue field in abar of Fractional ideal (3)'". I tried being clever and doing:
sage: iota(OK(K.gen()))
but got the same error. Tracing it back, when sage tries to evaluate iota at an element a, it calls a.im_gens(kappa, im) and this is totally wrong for this homset. Rather it is meant for homomorphisms between number fields. Basically, it looks like we need a function _im_gens_ for OrderElement types. It should take the element a written out in the basis given by OK.gens() and replace the basis elements with the element in im.
It doesn't seem possible to create a ring homomorphism from an order in a number field to a residue field of the number field. For instance:
raises "TypeError: images do not define a valid homomorphism".
Now, if instead you pass "check=False" to OK.hom, you of course get an iota, but you are unable to evaluate it:
This raises "TypeError: unsupported operand parent(s) for '*': 'Rational Field' and 'Residue field in abar of Fractional ideal (3)'". I tried being clever and doing:
but got the same error. Tracing it back, when sage tries to evaluate iota at an element a, it calls a.im_gens(kappa, im) and this is totally wrong for this homset. Rather it is meant for homomorphisms between number fields. Basically, it looks like we need a function
_im_gens_
for OrderElement types. It should take the element a written out in the basis given by OK.gens() and replace the basis elements with the element in im.Component: number fields
Keywords: Ring of integers, homset, residue field
Issue created by migration from https://trac.sagemath.org/ticket/18865
The text was updated successfully, but these errors were encountered: