Maxima Function
disjoin (x, a)
Returns the set a without the member x. If x is not a member of a, return a unchanged.
disjoin
complains if a is not a literal set.
disjoin(x, a)
, delete(x, a)
, and
setdifference(a, set(x))
are all equivalent.
Of these, disjoin
is generally faster than the others.
Examples:
(%i1) disjoin (a, {a, b, c, d}); (%o1) {b, c, d} (%i2) disjoin (a + b, {5, z, a + b, %pi}); (%o2) {5, %pi, z} (%i3) disjoin (a - b, {5, z, a + b, %pi}); (%o3) {5, %pi, b + a, z}