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