Rodin HandbookThis work is sponsored by the Deploy Project This work is sponsored by the ADVANCE Project This work is licensed under a Creative Commons Attribution 3.0 Unported License |
2.5.3 Operations on SetsLet’s assume that we have two sets and of the same type, e.g. sets of integers. Then we can check if an element is in it with the expression (ASCII: e:A) or on if it is not in with (ASCII: e/:A). Expressing that all elements of are also elements of (i.e. is a subset of ) can be done with the expression (ASCII: A<:B). The negated form is (ASCII: A/<:B). We can build the union , the intersection and the set subtraction (ASCII: A\/B, A/\B and A\B). The set subtraction contains all elements that are in but not in . The power set (ASCII: POW(A)) is the set of all subsets of . Thus is equivalent to . (ASCII: POW1(A)) is the set of all non-empty subsets of . |