#11319: Cannot create homomorphism from prime residue field to finite field
---------------------------+------------------------------------------------
   Reporter:  johanbosman  |          Owner:  robertwb                          
       Type:  defect       |         Status:  needs_work                        
   Priority:  major        |      Milestone:  sage-4.7.1                        
  Component:  coercion     |       Keywords:  residue fields, finite fields, hom
Work_issues:               |       Upstream:  N/A                               
   Reviewer:               |         Author:  Johan Bosman                      
     Merged:               |   Dependencies:                                    
---------------------------+------------------------------------------------
Changes (by aly.deines):

  * status:  needs_review => needs_work


Comment:

 I was trying out the patch, and the following example didn't work out like
 I expected:
 {{{
 sage: K
 Number Field in a with defining polynomial x^3 - 2
 sage: K.<a> = NumberField(x^3-2)
 sage: P = K.ideal(7)
 sage: P.factor()
 Fractional ideal (7)
 sage: k = P.residue_field()
 sage: k.order()
 343
 sage: F.<b> = GF(343)
 sage: F.order()
 343
 sage: k
 Residue field in abar of Fractional ideal (7)
 sage: F
 Finite Field in b of size 7^3
 sage: k.hom([F(1)])
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /Users/aly/Desktop/sage-4.7.rc2/<ipython console> in <module>()

 /Users/aly/Desktop/sage-4.7.rc2/local/lib/python2.6/site-
 packages/sage/structure/parent_gens.so in
 sage.structure.parent_gens.ParentWithGens.hom
 (sage/structure/parent_gens.c:3792)()

 /Users/aly/Desktop/sage-4.7.rc2/local/lib/python2.6/site-
 packages/sage/structure/parent.so in sage.structure.parent.Parent.hom
 (sage/structure/parent.c:9067)()

 /Users/aly/Desktop/sage-4.7.rc2/local/lib/python2.6/site-
 packages/sage/rings/finite_rings/homset.pyc in __call__(self, im_gens,
 check)
      49                 return self._coerce_impl(im_gens)
      50             except TypeError:
 ---> 51                 raise TypeError, "images do not define a valid
 homomorphism"
      52
      53     def _coerce_impl(self, x):

 TypeError: images do not define a valid homomorphism
 sage: k.has_coerce_map_from(F)
 False

 }}}

 Should this patch fix this as well?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11319#comment:3>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to