### The Maxima on-line user's manual

Algebra Calculator

#### Disjoin

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}```

There are also some inexact matches for `disjoin`. Try `?? disjoin` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

a : set(a,b,c);

b: powerset(a);

b:disjoin(b,{});

Calculate

a : set(a,b,c);

b: powerset(a);

b:disjoin(b,{});

Calculate

##### disjoin-first-if-lambda-listify-makelist-map-mod-setify-subset

expr:n;

makelist(''expr, n, 1...

set(a,b);

Calculate

##### disjoin-first-if-lambda-listify-makelist-map-mod-setify-subset

expr:n;

makelist(''expr, n, 1...

set(a,b);

Calculate

##### disjoin-first-if-lambda-listify-makelist-map-mod-setify-subset

expr:n;

makelist(''expr, n, 1...

set(a,b);

Calculate

? disjoin;

Calculate

a : set(a,b,c);

b: powerset(a);

c:disjoin({},b);

Calculate

##### disjoin-first-if-lambda-makelist-map-mod-setify-subset

expr:n;

makelist(''expr, n, 1...

set(a,b);

Calculate

##### disjoin-first-if-lambda-listify-makelist-map-mod-setify-subset

expr:n;

makelist(''expr, n, 1...

set(a,b);

Calculate

##### disjoin-first-if-lambda-listify-makelist-map-mod-setify-subset

expr:n;

makelist(''expr, n, 1...

set(a,b);

Calculate