Macaulay2 » Documentation
Packages » GroebnerStrata :: linearPart
next | previous | forward | backward | up | index | toc

linearPart -- returns linear part of a polynomial

Synopsis

Description

i1 : R = ZZ/32003[a,b,c];
i2 : f = a^2 + 3*b + 5*a*b*c + 2*a +b^2;
i3 : linearPart f

o3 = 2a + 3b

o3 : R

If we have a polynomial ring over another polynomial ring, the command only looks at the exponents on the new set of variables.

i4 : S = ZZ/32003[a,b,c][x,y,z];
i5 : g = a*b*x + 3*y + a + b^2

                   2
o5 = a*b*x + 3y + b  + a

o5 : S
i6 : linearPart g

o6 = a*b*x + 3y

o6 : S

Note that in the previous example, linearPart g does not include a but does include a*b*x

For the programmer

The object linearPart is a function closure.