object SetDB components: Elem*; (* Note the minimal representation *) operations: Insert (SetDB, Elem) -> (SetDB), (* Constructor operation *) Delete (SetDB, Elem) -> (SetDB), (* Destructor operation *) Find (SetDB, Elem) -> (boolean), (* Selector operation *) EmptyDB () -> (SetDB); (* Initializer operation *) equations: var s: SetDB; var e, e': Elem; Find(EmptyDB(), e) == false; Find(Insert(s, e), e') == if e=e' then true else Find(s, e'); Delete(EmptyDB(), e) == EmptyDB(); Delete(Insert(s, e), e') == if e=e' then Delete(s, e') else Insert(Delete(s, e'), e); end SetDB;