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

map_coefficients (of multivariate polynomial ring) cannot change base_ring #11981

Closed
dkrenn opened this issue Nov 2, 2011 · 7 comments
Closed

Comments

@dkrenn
Copy link
Contributor

dkrenn commented Nov 2, 2011

The map_coefficients() function of a multivariate polynomial ring cannot change the base ring. Sometimes this would be nice, e.g.

sage:  R.<r> = GF(9); S.<s> = GF(81)
sage:  h = Hom(R,S)[0]; h
Ring morphism:
  From: Finite Field in r of size 3^2
  To:   Finite Field in s of size 3^4
  Defn: r |--> 2*s^3 + 2*s^2 + 1
sage: T.<X,Y> = R[]   
sage:  f = r*X+Y
sage:  f.map_coefficients(h)  
Traceback (most recent call last)
...
NotImplementedError: 

NotImplementedError comes, because R(2*s^3 + 2*s^2 + 1) is not possible; it should be S(2*s^3 + 2*s^2 + 1).

Component: algebra

Keywords: map coefficients, multivariate polynomial ring, base ring, sd35

Author: Daniel Krenn

Reviewer: Julian Rueth

Merged: sage-5.0.beta3

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

@dkrenn dkrenn added this to the sage-5.0 milestone Nov 2, 2011
@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 2, 2011

comment:1

Attachment: trac_11981_map_coefficients_multi.patch.gz

Now there is an additional parameter. If given, then the base ring of the polynomial ring is changed.
Example from above continued:

sage: f.map_coefficients(h,S)
(-s^3 - s^2 + 1)*X + Y

@dkrenn
Copy link
Contributor Author

dkrenn commented Nov 4, 2011

Author: Daniel Krenn

@saraedum
Copy link
Member

tries to improve the docstring

@saraedum
Copy link
Member

Changed keywords from map coefficients, multivariate polynomial ring, base ring to map coefficients, multivariate polynomial ring, base ring, sd35

@saraedum
Copy link
Member

comment:3

Attachment: trac_11981_review.patch.gz

I found the docstring somewhat confusing. I tried to improve it. If you're happy with my changes, feel free to set it to positive_review.

@saraedum
Copy link
Member

Reviewer: Julian Rueth

@jdemeyer
Copy link

jdemeyer commented Feb 6, 2012

Merged: sage-5.0.beta3

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