Processing math: 100%
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Example setup:

K = QQ
X = polygen(K)
L.<z> = K.extension(X^2 - 2)
R.<x,y> = PolynomialRing(L)
f = (x+z*y)^3

An element of L can be viewed as a vector over K of length n. Apply this to each coefficient of fL[x,y] and multiply the vector by the respective monomial (considered as an element of K[x,y]) to get a vector over K[x,y]. Then add all those vectors:

sage: f
x^3 + (3*z)*x^2*y + 6*x*y^2 + (2*z)*y^3
sage: sum(c.vector()*m.change_ring(K) for c,m in f)
(x^3 + 6*x*y^2, 3*x^2*y + 2*y^3)