Algosim documentation: ∖

∖ (set minus)

Computes a set difference.

Syntax

Description

If A and B are sets, then A ∖ B is the set difference of A and B.

The operator is implemented by the SetDifference function.

Notes

To insert the set difference symbol ∖, type \setminus. (See Keyboard input.)

Don’t confuse the set minus symbol ∖ (U+2216: SET MINUS) with \ (U+005C: REVERSE SOLIDUS).

Examples

A ≔ { 1, 2, 3, 4, 5 }
{4, 5, 1, 2, 3}
B ≔ { 0, 2, 4, 6, 8, 10 }
{4, 6, 10, 2, 8, 0}
A ∖ B
{1, 5, 3}
B ∖ A
{6, 10, 8, 0}

See also