4.8 Sets

A set is a comma separated sequence of ground expressions surrounded with { and } braces. If there are any duplicate ground terms when all the expressions have been evaluated all but one of the duplicates will be removed. If returned as the value of an expression entry to the interpreter, or as a binding of a variable in a relation query, it will be displayed with its elements in term order as determined by the @ primitive.

Example set expression entry:

| ?? X = {4,3,1,5-2,1}.

X = {1, 3, 4} : set(nat)

set(nat) is the type expression for a set of natural numbers. list(nat) is the type expression for a list of natural numbers.

On This Site