∁ (complement)
Gives the complement of a set.
Syntax
-
∁A
-
A
is a set
-
Description
If A
is a set, then ∁A
is the complement of A
. To compute ∁A
, Algosim needs to know the universe; this is given by the universe
variable. If this variable exists and is a set, then ∁A
returns universe ∖ A
. Otherwise, an error is raised.
The set complement operator ∁
is implemented by the complement
function.
Examples
universe ≔ ToSet(SequenceList(0, 10))
{8, 6, 10, 2, 9, 3, 4, 5, 1, 7, 0}
A ≔ { 1, 2, 3, 4, 5 }
{4, 5, 1, 2, 3}
∁A
{7, 6, 10, 9, 8, 0}
See also
-
Set operators (list)