#17624: Coerce factorization of polynomial to symbolic expression
-------------------------------------+-------------------------------------
Reporter: gagern | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.10
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: Ralf Stephan | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/rws/coerce_factorization_of_polynomial_to_symbolic_expression|
d9f2c454bab76af892452cfefbf4b62790feb6c5
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nbruin):
It seems that the following, using SR's "factor", works pretty well for
the problem in the question:
{{{
sage: factor(SR(m))
[ (a + b)*(a - b) (a + b)*(a - b)*a]
[ (a + b)*b -77*a + 77*b]
}}}
The problem with doing it the other way around is that the intermediate
result would have to be a matrix with elements coming from ...
Factorization? While we could have that, it would require a significant
design and refactoring effort. Do we have a good reason to do that?
With factorizations themselves convertible to SR (which is quite
reasonable and easy to do, as rws shows) one can do:
{{{
matrix(SR,m.nrows(),m.ncols(),[SR(factor(c)) for c in m.list()])
}}}
which is not hacky, albeit a bit verbose. It's basically "apply_map"
spelled out.
--
Ticket URL: <http://trac.sagemath.org/ticket/17624#comment:8>
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.