Home Online Manual
Top
Back: intersectionSet
Forward: isElement
FastBack:
FastForward:
Up: sets_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.14.8.4 complement

Procedure from library sets.lib (see sets_lib).

Usage:
complement(N,M); N,M sets

Return:
Set, the complement of the set N in M

Example:
 
LIB "sets.lib";
list l =1,2;
list j =1,2,3,4;
Set N=l;
Set M=j;
N;
==> {2; 1}
==> Set with 2 elements
==> 
M;
==> {4; 3; 2; 1}
==> Set with 4 elements
==> 
complement(N,M);
==> {3; 4}
==> Set with 2 elements
==>