- Usage:
`leadTerm f`

- Function: leadTerm
- Inputs:
`f`, a ring element, in a polynomial ring

- Outputs:
- a ring element, the lead term of
`f`

- a ring element, the lead term of

Each polynomial ring comes equipped with a monomial ordering and this routine returns the lead (greatest) monomial and its coefficient. Recall that the default monomial order is the graded reverse lexicographic order.

Coefficients are included in the result:

i1 : R = QQ[a..d]; |

i2 : leadTerm (3*b*c^2-d^3-1) 2 o2 = 3b*c o2 : R |

i3 : S = QQ[a..d, MonomialOrder => Lex] o3 = S o3 : PolynomialRing |

i4 : leadTerm (3*b*c^2-d^3-1) 2 o4 = 3b*c o4 : S |

i5 : R = ZZ[a..d][x,y,z]; |

i6 : leadTerm((a+b)*y^2 + (b+c)*x*z) 2 o6 = (a + b)y o6 : R |

- leadCoefficient -- the coefficient of the leading term
- leadMonomial -- the leading monomial of a ring element
- leadComponent -- the leading component(s) of a vector or matrix