Boolean operators in set theory
A relation is by definition a subset of the Cartesian Product of the source and target sets. So, if two different relations r and s are defined on the same source A and target B, then the ordinary set operators can be applied to produce a new relation.
intersection : is the set that contains the elements that are contained in relation as well as in , or
union : is the set that contains all elements that are contained either in relation or in , or
difference : is the set that contains the elements of relation that are not contained in , or
The complement (or negation) of a relation is defined by means of the difference operator:
complement : If is defined as , then is the set of all tuples in (the Cartesian product) that are not contained in . So
Note that the complement is defined in terms of and . So, two relations with the identical population yet a different type may have different complements.
How to type boolean operators in your script
This page shows how you can write these things in your Ampersand script.
Other explanation
Would you like a different explanation of the boolean operators? This page explains the boolean operators in logic.
Last updated