ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 11 Apr 2012 14:05:12 +0200Using polynomial over matriceshttps://ask.sagemath.org/question/8872/using-polynomial-over-matrices/Things goes wrong when I try to define polynomial ring over a matrix algebra.
When I type
A = MatrixSpace(QQ, 2)
PA.<x> = PolynomialRing(A)
x
I obtain the following error :
AttributeError: 'MatrixSpace_generic' object has no attribute 'is_atomic_repr'
Of course, I could use matrices over polynomial rings, but I would loss generality of the code...
Do you have any idea ?Pierre LWed, 11 Apr 2012 14:05:12 +0200https://ask.sagemath.org/question/8872/Linear transformation from polynomialshttps://ask.sagemath.org/question/8706/linear-transformation-from-polynomials/Suppose I have an unspecified list of degree 1 homogeneous polynomials in several variables, say [X1,X2,X3+3*X4,X0]. This list will define a linear transformation
[X0,X1,X2,X3,X4]|---->[X1,X2,X3+3*X4,X0].
A priori I don't know how many variables or polynomials I will have, since they are found depending on some previous parameters. (The way I have done this, the variables are the generators of a polynomial ring V = PolynomialRing(QQ, dim,'X').)
My question is: How can I transform this list of polynomials into a matrix/linear transformation?
I've tried collecting the coefficients, but the .coefficients() does not work really well for multivariable polynomials since it does not "see the zero terms" (at least I don't know how to do that).RPCFri, 10 Feb 2012 21:43:44 +0100https://ask.sagemath.org/question/8706/