#18264: make map_coefficients in modules_with_basis safer or more general
-------------------------+-------------------------------------------------
Reporter: mantepse | Owner:
Type: | Status: new
enhancement | Milestone: sage-6.7
Priority: minor | Keywords: map_coefficients,
Component: PLEASE | modules_with_basis, base_ring, check arguments
CHANGE | Authors:
Merged in: | Report Upstream: N/A
Reviewers: | Branch:
Work issues: | Dependencies:
Commit: |
Stopgaps: |
-------------------------+-------------------------------------------------
We would love to be able to, for example, present a symmetric function
with factored coefficients. But:
{{{
sage: f = SymmetricFunctions(ZZ).s()([2,2,1])
sage: f.map_coefficients(factor)
0
}}}
The result is not against the specification, because `map_coefficients`
requires an endofunction.
There are two issues:
1.) we possibly want to be warned when supplying `map_coefficients` with
something that is not an endofunction. This might be achieved by adding
an optional argument `check` with default `True`.
2.) we want some way to factor the coefficients. Nicolas proposed to make
something like
{{{
sage: f.map_coefficients(factor, codomain=SR)
}}}
or
{{{
sage: f.change_base_ring(SR).map_coefficients(factor)
}}}
work.
Note that the `Polynomial` class contains something similar, namely:
{{{
def map_coefficients(self, f, new_base_ring=None)
}}}
However, there might be another tiny problem: it seems that currently it
is not possible to make factored integers into a commutative ring. This
should possibly be a separate ticket.
--
Ticket URL: <http://trac.sagemath.org/ticket/18264>
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.