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

part -- sum of monomials of a polynomial of a given degree(s)

Description

Synopsis

  • Usage:
    part(d,F)
    part_d F
  • Inputs:
    • d, an integer, or a List of integers denoting a (multi-) degree
    • F, a ring element, an element in a polynomial ring
  • Outputs:
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
Here is an alternate syntax.
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

Synopsis

  • Usage:
    part(s,F)
  • Inputs:
    • s, a sequence, a sequence of degrees or multi-degrees
    • F, a ring element, an element in a polynomial ring
  • Outputs:
    • a sequence, a sequence of the degree d parts of the polynomial F where d ranges over the elements of s
i12 : f = (1+x+y)^3

       3     2        2    3     2            2
o12 = x  + 3x y + 3x*y  + y  + 3x  + 6x*y + 3y  + 3x + 3y + 1

o12 : B
i13 : part(1..3, f)

                  2            2   3     2        2    3
o13 = (3x + 3y, 3x  + 6x*y + 3y , x  + 3x y + 3x*y  + y )

o13 : Sequence

See also

Ways to use part :