i1 : R = QQ[a..d]; |
i2 : terms(a+d^2-1+a*b*c) 2 o2 = {a*b*c, d , a, -1} o2 : List |
i3 : S = R[x,y]; |
i4 : terms(a*x+b*x+c*x*y+c*x^3+1+a) 3 o4 = {c*x , c*x*y, (a + b)x, a + 1} o4 : List |
Each term is an element of the coefficient ring k, multiplied with a monomial in the variables of R. This is useful in the situation where the polynomial R is built from k by a sequence of extensions.
i5 : R = QQ[a][d]; |
i6 : f = (1+a+d)^3 3 2 2 3 2 o6 = d + (3a + 3)d + (3a + 6a + 3)d + a + 3a + 3a + 1 o6 : R |
i7 : terms f 3 2 2 3 2 o7 = {d , (3a + 3)d , (3a + 6a + 3)d, a + 3a + 3a + 1} o7 : List |
i8 : terms(QQ,f) 3 2 2 2 3 2 o8 = {d , 3a*d , 3d , 3a d, 6a*d, 3d, a , 3a , 3a, 1} o8 : List |
The object terms is a method function.