source: extracted/untrusted/set_adt.ml @ 2755

Last change on this file since 2755 was 2738, checked in by sacerdot, 7 years ago

Porting the graph colouring stuff from the untrusted prototype to the extracted
code.

File size: 979 bytes
Line 
1type 'x set = 'x Pset.set
2
3let matitabool_of_bool b = if b then Bool.True else Bool.False
4
5(** val set_empty : 'a1 set0 **)
6let set_empty = Pset.empty
7
8(** val set_member :
9    ('a1 -> 'a1 -> Bool.bool) -> 'a1 -> 'a1 set0 -> Bool.bool **)
10let set_member _ x s = matitabool_of_bool (Pset.mem x s)
11
12(** val set_equal :
13    ('a1 -> 'a1 -> Bool.bool) -> 'a1 set0 -> 'a1 set0 -> Bool.bool **)
14let set_equal _ s1 s2 = matitabool_of_bool (Pset.equal s1 s2)
15
16(** val set_diff : 'a1 set0 -> 'a1 set0 -> 'a1 set0 **)
17let set_diff = Pset.diff
18
19(** val set_singleton : 'a1 -> 'a1 set0 **)
20let set_singleton = Pset.singleton
21
22(** val set_from_list : 'a1 List.list -> 'a1 set0 **)
23let set_from_list the_list =
24  List.foldr Pset.add set_empty the_list
25
26(** val set_subset :
27    ('a1 -> 'a1 -> Bool.bool) -> 'a1 set0 -> 'a1 set0 -> Bool.bool **)
28let set_subset _ s1 s2 = matitabool_of_bool (Pset.subset s1 s2)
29
30(** val set_union : 'a1 set0 -> 'a1 set0 -> 'a1 set0 **)
31let set_union = Pset.union
Note: See TracBrowser for help on using the repository browser.