next | previous | forward | backward | up | top | index | toc | home

part -- sum of monomials of a polynomial of a given degree

Synopsis

Description

If the polynomial ring is singly graded (the default case), then d may be an integer denoting this degree.
i1 : R = QQ[a..d]

o1 = R

o1 : PolynomialRing
i2 : f = (a^2-b-1)*(c^3-b*d-2)

      2 3      3    2       3    2      2
o2 = a c  - b*c  - a b*d - c  + b d - 2a  + b*d + 2b + 2

o2 : R
i3 : part(3,f)

        3    2
o3 = - c  + b d

o3 : R
An alternate syntax is as follows
i4 : part_3 f

        3    2
o4 = - c  + b d

o4 : R
In multigraded rings, degrees are lists of integers.
i5 : R = QQ[a..d,Degrees=>{{1,0},{0,1},{1,-1},{0,-1}}]

o5 = R

o5 : PolynomialRing
i6 : F = a^3 + (b*d+1)^2

      2 2    3
o6 = b d  + a  + 2b*d + 1

o6 : R
i7 : part_{0,0} F

      2 2
o7 = b d  + 2b*d + 1

o7 : R
In polynomial rings over other polynomial rings, variables in the coefficient ring have degree 0.
i8 : A = QQ[a,b,c]

o8 = A

o8 : PolynomialRing
i9 : B = A[x,y]

o9 = B

o9 : PolynomialRing
i10 : degree(a*x)

o10 = {1}

o10 : List
i11 : part_1 (a*x+b*y-1)^3

o11 = 3a*x + 3b*y

o11 : B

See also

Ways to use part :