setcheckbreak SciMax Toolbox setelmx

SciMax Toolbox >> setdifference

setdifference

Maxima Function

Calling Sequence

setdifference (a, b)

Description

Returns a set containing the elements in the set a that are not in the set b.

setdifference complains if either a or b is not a literal set.

Examples:

(%i1) S_1 : {a, b, c, x, y, z};
(%o1)                  {a, b, c, x, y, z}
(%i2) S_2 : {aa, bb, c, x, y, zz};
(%o2)                 {aa, bb, c, x, y, zz}
(%i3) setdifference (S_1, S_2);
(%o3)                       {a, b, z}
(%i4) setdifference (S_2, S_1);
(%o4)                     {aa, bb, zz}
(%i5) setdifference (S_1, S_1);
(%o5)                          {}
(%i6) setdifference (S_1, {});
(%o6)                  {a, b, c, x, y, z}
(%i7) setdifference ({}, S_1);
(%o7)                          {}
setcheckbreak SciMax Toolbox setelmx