up previous next
max

a maximum element of a sequence or list

Syntax
max(E_1: OBJECT,...,E_n: OBJECT): OBJECT
max(L: LIST): OBJECT

Description
In the first form, this function returns a maximum of E_1,...,E_n. In the second form, it returns a maximum of the objects in the list L .

Example
/**/  max([1,2,3]);
3
/**/  max(1,2,3);
3

/**/  use R ::= QQ[x,y,z];
/**/  max(x^3*z, x^2*y^2); -- x^2y^2 > x^3z in the default ordering, DegRevLex
x^2*y^2
/**/  min(x^3*z, x^2*y^2);
x^3*z

/**/  use R ::= QQ[x,y,z], DegLex;
/**/  max(x^3*z, x^2*y^2); -- x^3z < x^2y^2 in DegLex
x^3*z

See Also