10SN/A\DOC set_eq
22362SN/A
30SN/A\TYPE {set_eq : ''a list -> ''a list -> bool}
40SN/A
50SN/A\SYNOPSIS
60SN/ATells whether two lists have the same elements.
72362SN/A
80SN/A\KEYWORDS
92362SN/Aset, list, eqtype.
100SN/A
110SN/A\DESCRIBE
120SN/AAn application {set_eq l1 l2} returns {true} just in case {l1} and {l2}
130SN/Aare permutations of each other when duplicate elements within each list
140SN/Aare ignored.
150SN/A
160SN/A\FAILURE
170SN/ANever fails.
180SN/A
190SN/A\EXAMPLE
200SN/A{
212362SN/A- set_eq [1,2,1] [1,2,2,1];
222362SN/A> val it = true : bool
232362SN/A
240SN/A- set_eq [1,2,1] [2,1];
250SN/A> val it = true : bool
260SN/A}
270SN/A
280SN/A
290SN/A\COMMENTS
300SN/AA high-performance implementation of finite sets may be found in
310SN/Astructure {HOLset}.
320SN/A
330SN/AML equality types are used in the implementation of {set_eq}
340SN/Aand its kin. This limits its applicability to types that
350SN/Aallow equality. For other types, typically abstract ones,
360SN/Ause the `op_' variants.
370SN/A
380SN/A\SEEALSO
390SN/ALib.intersect, Lib.union, Lib.U, Lib.mk_set, Lib.mem, Lib.insert, Lib.set_diff.
400SN/A
410SN/A\ENDDOC
420SN/A