Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create homomorphism from prime residue field to finite field #11319

Closed
sagetrac-johanbosman mannequin opened this issue May 9, 2011 · 15 comments
Closed

Cannot create homomorphism from prime residue field to finite field #11319

sagetrac-johanbosman mannequin opened this issue May 9, 2011 · 15 comments

Comments

@sagetrac-johanbosman
Copy link
Mannequin

sagetrac-johanbosman mannequin commented May 9, 2011

Consider K = QQ(sqrt(337)). The prime 5 is inert in K and the prime 13 splits. We'll start with 13 to see what goes wrong:

sage: K.<w> = QuadraticField(337)
sage: pp = K.ideal(13).factor()[0][0]
sage: RF13 = K.residue_field(pp)
sage: RF13.gens()
(1,)
sage: RF13.hom([GF(13)(1)])
...
TypeError: images do not define a valid homomorphism

However, for residue fields that aren't prime fields it does work:

sage: RF5 = K.residue_field(5)
sage: F25 = GF(25, names='a', modulus=RF5.polynomial())
sage: RF5.hom([F25.0])
Ring morphism:
  From: Residue field in wbar of Fractional ideal (5)
  To:   Finite Field in a of size 5^2
  Defn: wbar |--> a

Btw, this is in sage 4.6.2. on Mac OS 10.6.7.

Component: coercion

Keywords: residue fields, finite fields, hom, sd35

Author: Johan Bosman

Reviewer: Kiran Kedlaya, Michiel Kosters

Merged: sage-4.8.alpha6

Issue created by migration from https://trac.sagemath.org/ticket/11319

@sagetrac-johanbosman sagetrac-johanbosman mannequin added this to the sage-4.8 milestone May 9, 2011
@sagetrac-johanbosman

This comment has been minimized.

@sagetrac-johanbosman
Copy link
Mannequin Author

sagetrac-johanbosman mannequin commented May 10, 2011

comment:2

Attachment: trac_11319_prime_field_coercion.patch.gz

@sagetrac-johanbosman
Copy link
Mannequin Author

sagetrac-johanbosman mannequin commented May 10, 2011

Author: Johan Bosman

@adeines
Copy link
Mannequin

adeines mannequin commented May 11, 2011

comment:3

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?

@adeines adeines mannequin added s: needs work and removed s: needs review labels May 11, 2011
@sagetrac-johanbosman
Copy link
Mannequin Author

sagetrac-johanbosman mannequin commented May 11, 2011

comment:4

In your example, you're trying to send the generator of k to the element 1 of F, which does indeed not define a field homomorphism. This does work:

sage: root = k.polynomial().roots(F)[0][0]
sage: k.hom([root])
Ring morphism:
  From: Residue field in abar of Fractional ideal (7)
  To:   Finite Field in b of size 7^3
  Defn: abar |--> 4*b^2 + 4*b + 2

@kedlaya
Copy link
Sponsor Contributor

kedlaya commented Jun 18, 2011

Reviewer: Kiran Kedlaya

@kedlaya
Copy link
Sponsor Contributor

kedlaya commented Jun 18, 2011

comment:5

Looks fine, applies against 4.7, no long doctest failures.

@jdemeyer
Copy link

comment:6

I think the new patch is a bit low on examples. For example, the ticket mentions number fields, so why not add a number field example?

@jdemeyer
Copy link

Work Issues: examples

@sagetrac-johanbosman
Copy link
Mannequin Author

sagetrac-johanbosman mannequin commented Aug 2, 2011

Attachment: trac_11319_number_field_example.patch.gz

To be used on top of the first patch

@sagetrac-johanbosman
Copy link
Mannequin Author

sagetrac-johanbosman mannequin commented Aug 2, 2011

comment:7

Example added. ;)

@sagetrac-johanbosman
Copy link
Mannequin Author

sagetrac-johanbosman mannequin commented Aug 2, 2011

Changed work issues from examples to none

@sagetrac-mkosters
Copy link
Mannequin

sagetrac-mkosters mannequin commented Dec 19, 2011

Changed reviewer from Kiran Kedlaya to Kiran Kedlaya, Michiel Kosters

@jdemeyer
Copy link

Merged: sage-4.8.alpha6

@mstreng
Copy link

mstreng commented Jan 5, 2012

Changed keywords from residue fields, finite fields, hom to residue fields, finite fields, hom, sd35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants