CoCoA:Max, Min
From ApCoCoAWiki
Max, Min
a maximum or minimum element of a sequence or list
Description
In the first form, these functions return a maximum and minimum,
respectively, of <formula>E_1,...,E_n</formula>. In the second form, they return a
maximum and minimum, respectively, of the objects in the list L.
Example
Max([1,2,3]); 3 ------------------------------- Max(1,2,3); 3 ------------------------------- Min(1,2,3); 1 ------------------------------- Use R ::= Q[x,y,z]; Max(x^3z, x^2y^2); -- x^2y^2 > x^3z in the default ordering, DegRevLex x^2y^2 ------------------------------- Min(x^3z, x^2y^2); x^3z ------------------------------- Use R ::= Q[x,y,z], DegLex; Max(x^3z, x^2y^2); -- x^3z > x^2y^2 in DegLex x^3z ------------------------------- -- ordered by inclusion: a maximal element in the list is returned Max(Ideal(x), Ideal(x^2), Ideal(x,y), Ideal(x-2,y-1)); Ideal(x, y) -------------------------------
Syntax
Max(E_1:OBJECT,...,E_n:OBJECT):OBJECT Min(E_1:OBJECT,...,E_n:OBJECT):OBJECT Max(L:LIST):OBJECT Min(L:LIST):OBJECT
<type>integer</type> <type>ideal</type> <type>list</type> <type>module</type> <type>rat</type> <type>string</type> <type>type</type>