The Maxima on-line user's manual

Algebra Calculator

Cardinality

Function: cardinality (<a>) Returns the number of distinct elements of the set <a>.

`cardinality` ignores redundant elements even when simplification is disabled.

Examples:

```          (%i1) cardinality ({});
(%o1)                           0
(%i2) cardinality ({a, a, b, c});
(%o2)                           3
(%i3) simp : false;
(%o3)                         false
(%i4) cardinality ({a, a, b, c});
(%o4)                           3```

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

Related Examples

cardinality-false-simp

cardinality ({});

cardinality ({a, a,a...

simp : false;

Calculate

cardinality-false-simp

cardinality ({});

cardinality ({a, a,a...

simp : false;

Calculate

cardinality-false-simp

cardinality ({});

cardinality ({a, a,a...

simp : false;

Calculate

cardinality

cardinality ({{},{}});

Calculate

cardinality-intersect-union

cardinality ({});

cardinality ({a, a, ...

union({{},{{}}},{{},...

Calculate

cardinality-intersect-union

cardinality ({});

cardinality ({a, a, ...

union({a,b},{a,c});

Calculate

cardinality-intersect-union

cardinality ({});

cardinality ({a, a, ...

union({a,b},{a,c});

Calculate

cardinality

cardinality ({b - a});

Calculate

cardinality-intersect-union

cardinality ({});

cardinality ({a, a, ...

union({{},{{}}},{{},...

Calculate

cardinality

cardinality ({a,e,i,o...

cardinality ({a,l,l,a...

Calculate