#18865: Can't make ring homomorphism from ring of integers to a residue field
-------------------------+-------------------------------------------------
   Reporter:  robharron  |            Owner:
       Type:  defect     |           Status:  new
   Priority:  major      |        Milestone:  sage-6.8
  Component:  number     |         Keywords:  Ring of integers, homset,
  fields                 |  residue field
  Merged in:             |          Authors:
  Reviewers:             |  Report Upstream:  N/A
Work issues:             |           Branch:
     Commit:             |     Dependencies:
   Stopgaps:             |
-------------------------+-------------------------------------------------
 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:

 {{{
 sage: K.<a> = NumberField(x^2-2)
 sage: OK = K.ring_of_integers()
 sage: P = K.primes_above(3)[0]
 sage: kappa = P.residue_field()
 sage: abar = kappa.gen()
 sage: im = [g.polynomial().change_ring(ZZ)(abar) for g in OK.gens()]
 sage: iota = OK.hom(im)
 }}}
 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:
 {{{
 sage: iota = OK.hom(im, check=False)
 sage: iota(K.gen())
 }}}
 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.

--
Ticket URL: <http://trac.sagemath.org/ticket/18865>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to