Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: partition_set (<a>, <f>) Partitions the set <a> according to the predicate <f>.
partition_set returns a list of two sets. The first set comprises the elements of <a> for which <f> evaluates to false, and the second comprises any other elements of <a>. partition_set does not apply is to the return value of <f>.
partition_set complains if <a> is not a literal set.
See also subset.
Examples:
(%i1) partition_set ({2, 7, 1, 8, 2, 8}, evenp);
(%o1) [{1, 7}, {2, 8}]
(%i2) partition_set ({x, rat(y), rat(y) + z, 1},
lambda ([x], ratp(x)));
(%o2)/R/ [{1, x}, {y, y + z}](%o1) true (%i2)