next node: SetByPredConstr,
prev node: Subsystem Sets By Predicate,
up to node: Subsystem Sets By Predicate


SetByPred

Signature of SetByPred

List of Import References :
See BOOL
See DENOTATION

SIGNATURE SetByPred[data]

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

-- sets represented by predicates
-- this makes infinite sets possible, but many functions from Set are not
-- computable ({}? # arb exist? ...) or need further information (incl
-- excl % ...) and are therefore not available

-- Parameter
SORT data

-- the type itself
TYPE set == asSet(cF: data -> bool)
-- cF is the characteristic function of the set 
-- x in S <=> cF(x) = true

-- constant sets
FUN {}        : set                     -- the empty set

FUN U : set                             -- the universal set
-- x in U = true 

-- combining sets
FUN + - *     : set ** set -> set       -- union/diff./intersection

FUN ~ : set -> set                      -- complement
-- x in S <=> ~ (x in ~(S))

-- information about a set
FUN in        : data ** set -> bool     -- membership


next node: SetByPredConstr,
prev node: Subsystem Sets By Predicate,
up to node: Subsystem Sets By Predicate