minus - Maple Help

MultiSet/minus

MultiSet difference operator

 Calling Sequence M minus N

Parameters

 M - MultiSet; a MultiSet, set, or list N - MultiSet; a MultiSet, set, or list

Description

 • M minus N returns the set difference (counting multiplicity) between M and N.
 • At least one argument must be a MultiSet for this routine to be invoked.  Any other argument which is expected to be a MultiSet can be a MultiSet, a set or a list; in the latter two cases the argument is converted to a MultiSet before proceeding to evaluate this command.  IsGeneralized(M) must return the same value for all MultiSet arguments M, and all non-MultiSet arguments will be promoted to MultiSets with this same property.

Examples

 > $M≔\mathrm{MultiSet}\left(a=2,b=5\right)$
 ${M}{≔}\left\{\left[{a}{,}{2}\right]{,}\left[{b}{,}{5}\right]\right\}$ (1)
 > $N≔\mathrm{MultiSet}\left(a,b=3\right)$
 ${N}{≔}\left\{\left[{a}{,}{1}\right]{,}\left[{b}{,}{3}\right]\right\}$ (2)
 > $M\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{minus}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}N$
 $\left\{\left[{a}{,}{1}\right]{,}\left[{b}{,}{2}\right]\right\}$ (3)
 > $M\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{minus}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left[b,a,a\right]$
 $\left\{\left[{b}{,}{4}\right]\right\}$ (4)

Compatibility

 • The MultiSet/minus operator was introduced in Maple 2016.