up previous next
intersection    --    intersect lists, ideals, or modules


Syntax
intersection(A: LIST,  B: LIST):  LIST
intersection(A: IDEAL, B: LIST):  LIST
intersection(A: LIST,  B: IDEAL): LIST
intersection(A: IDEAL, B: IDEAL): IDEAL

Description
This function returns the intersection of A and B.

The coefficient ring must be a field.

NOTE: To compute the intersection of ideals corresponding to zero-dimensional schemes, see the commands GBM and HGBM .

Example
/**/  use R ::= QQ[x,y,z];
/**/  intersection(ideal(x,y,z), ideal(x*y));
ideal(x*y)

/**/  intersection(["a","b","c"], ["b","c","d"]);
["b", "c"]

See Also