next up previous contents index
suivant: Union of two sets monter: Sets précédent: Sets   Table des matières   Index


Definition : set[]

To define a set of elements, put the elements separated by a comma, with %{ ... %} or set[ ... ] as delimiters.
Input :
%{1,2,3,4%}
set[1,2,3,4]
In the Xcas answers, the set delimiters are displayed as $ \llbracket$ and $ \rrbracket$ in order not to confuse sets with lists. For example, $ \llbracket$1,2,3 $ \rrbracket$ is the set %{1,2,3%}, unlike [1,2,3] (normal brackets) which is the list [1,2,3].
Input :
A:=%{1,2,3,4%} or A:=set[1,2,3,4]
Output :
$ \llbracket$1,2,3,4 $ \rrbracket$
Input :
B:=%{5,5,6,3,4%} or B:=set[5,5,6,3,4]
Output :
$ \llbracket$5,6,3,4 $ \rrbracket$
Remark
The order in a set is not significant and the elements in a set are all distincts. If you input B:=%{5,5,6,3,4%} and C:=%{3,4,5,3,6%}, then B==C will return 1.



giac documentation written by Renée De Graeve and Bernard Parisse