Algebra of sets

In mathematics, the algebra of sets, not to be confused with the mathematical structure of an algebra of sets, defines the properties and laws of sets, the set-theoretic operations of union, intersection, and complementation and the relations of set equality and set inclusion. It also provides systematic procedures for evaluating expressions, and performing calculations, involving these operations and relations.

Any set of sets closed under the set-theoretic operations forms a Boolean algebra with the join operator being union, the meet operator being intersection, the complement operator being set complement, the bottom being $\varnothing$ and the top being the universe set under consideration.

Fundamentals
The algebra of sets is the set-theoretic analogue of the algebra of numbers. Just as arithmetic addition and multiplication are associative and commutative, so are set union and intersection; just as the arithmetic relation "less than or equal" is reflexive, antisymmetric and transitive, so is the set relation of "subset".

It is the algebra of the set-theoretic operations of union, intersection and complementation, and the relations of equality and inclusion. For a basic introduction to sets see the article on sets, for a fuller account see naive set theory, and for a full rigorous axiomatic treatment see axiomatic set theory.

Fundamental properties of set algebra
The binary operations of set union ($\cup$) and intersection ($\cap$) satisfy many identities. Several of these identities or "laws" have well established names.
 * Commutative property:
 * Associative property:
 * Distributive property:
 * Associative property:
 * Distributive property:
 * Distributive property:
 * Distributive property:

The union and intersection of sets may be seen as analogous to the addition and multiplication of numbers. Like addition and multiplication, the operations of union and intersection are commutative and associative, and intersection distributes over union. However, unlike addition and multiplication, union also distributes over intersection.

Two additional pairs of properties involve the special sets called the empty set $A \cup B = B \cup A$ and the universe set $A \cap B = B \cap A$; together with the complement operator ($(A \cup B) \cup C = A \cup (B \cup C)$ denotes the complement of $(A \cap B) \cap C = A \cap (B \cap C)$. This can also be written as $A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$, read as "A prime"). The empty set has no members, and the universe set has all possible members (in a particular context).
 * Identity:
 * Complement:
 * Complement:
 * Complement:

The identity expressions (together with the commutative expressions) say that, just like 0 and 1 for addition and multiplication, $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ and $\varnothing$ are the identity elements for union and intersection, respectively.

Unlike addition and multiplication, union and intersection do not have inverse elements. However the complement laws give the fundamental properties of the somewhat inverse-like unary operation of set complementation.

The preceding five pairs of formulae&mdash;the commutative, associative, distributive, identity and complement formulae&mdash;encompass all of set algebra, in the sense that every valid proposition in the algebra of sets can be derived from them.

Note that if the complement formulae are weakened to the rule $\boldsymbol{U}$, then this is exactly the algebra of propositional linear logic.

Principle of duality
Each of the identities stated above is one of a pair of identities such that each can be transformed into the other by interchanging $A^\complement$ and $A$, while also interchanging $A'$ and $A \cup \varnothing = A$.

These are examples of an extremely important and powerful property of set algebra, namely, the principle of duality for sets, which asserts that for any true statement about sets, the dual statement obtained by interchanging unions and intersections, interchanging $A \cap \boldsymbol{U} = A$ and $A \cup A^\complement = \boldsymbol{U}$ and reversing inclusions is also true. A statement is said to be self-dual if it is equal to its own dual.

Some additional laws for unions and intersections
The following proposition states six more important laws of set algebra, involving unions and intersections.

PROPOSITION 3: For any subsets $A \cap A^\complement = \varnothing$ and $\varnothing$ of a universe set $\boldsymbol{U}$, the following identities hold:
 * idempotent laws:
 * domination laws:
 * absorption laws:
 * domination laws:
 * absorption laws:
 * absorption laws:
 * absorption laws:

As noted above, each of the laws stated in proposition 3 can be derived from the five fundamental pairs of laws stated above. As an illustration, a proof is given below for the idempotent law for union.

Proof:

The following proof illustrates that the dual of the above proof is the proof of the dual of the idempotent law for union, namely the idempotent law for intersection.

Proof:

Intersection can be expressed in terms of set difference:

Some additional laws for complements
The following proposition states five more important laws of set algebra, involving complements.

PROPOSITION 4: Let $(A^\complement)^\complement = A$ and $\cup$ be subsets of a universe $\cap$, then:
 * De Morgan's laws:
 * double complement or involution law:
 * complement laws for the universe set and the empty set:
 * double complement or involution law:
 * complement laws for the universe set and the empty set:
 * complement laws for the universe set and the empty set:

Notice that the double complement law is self-dual.

The next proposition, which is also self-dual, says that the complement of a set is the only set that satisfies the complement laws. In other words, complementation is characterized by the complement laws.

PROPOSITION 5: Let $\varnothing$ and $\boldsymbol{U}$ be subsets of a universe $\boldsymbol{U}$, then:
 * uniqueness of complements:
 * If $\varnothing$, and $A$, then $B$

Algebra of inclusion
The following proposition says that inclusion, that is the binary relation of one set being a subset of another, is a partial order.

PROPOSITION 6: If $\boldsymbol{U}$, $A \cup A = A$ and $A \cap A = A$ are sets then the following hold:
 * reflexivity:
 * antisymmetry:
 * $A \cup \boldsymbol{U} = \boldsymbol{U}$ and $A \cap \varnothing = \varnothing$ if and only if $A \cup (A \cap B) = A$
 * transitivity:
 * If $A \cap (A \cup B) = A$ and $A \cup A$, then $=(A \cup A) \cap \boldsymbol{U}$
 * If $=(A \cup A) \cap (A \cup A^\complement)$ and $=A \cup (A \cap A^\complement)$, then $=A \cup \varnothing$

The following proposition says that for any set S, the power set of S, ordered by inclusion, is a bounded lattice, and hence together with the distributive and complement laws above, show that it is a Boolean algebra.

PROPOSITION 7: If $=A$, $A \cap A$ and $=(A \cap A) \cup \varnothing$ are subsets of a set $=(A \cap A) \cup (A \cap A^\complement)$ then the following hold:
 * existence of a least element and a greatest element:
 * existence of joins:
 * If $=A \cap (A \cup A^\complement)$ and $=A \cap \boldsymbol{U}$, then $=A$
 * existence of meets:
 * If $A \cap B = A \setminus (A \setminus B)$ and $A$, then $B$
 * existence of meets:
 * If $\boldsymbol{U}$ and $(A \cup B)^\complement = A^\complement \cap B^\complement$, then $(A \cap B)^\complement = A^\complement \cup B^\complement$
 * If $(A^\complement)^\complement = A$ and $\varnothing^\complement = \boldsymbol{U}$, then $\boldsymbol{U}^\complement = \varnothing$

The following proposition says that the statement $A$ is equivalent to various other statements involving unions, intersections and complements.

PROPOSITION 8: For any two sets $B$ and $\boldsymbol{U}$, the following are equivalent:

The above proposition shows that the relation of set inclusion can be characterized by either of the operations of set union or set intersection, which means that the notion of set inclusion is axiomatically superfluous.

Algebra of relative complements
The following proposition lists several identities concerning relative complements and set-theoretic differences.

PROPOSITION 9: For any universe $A \cup B = \boldsymbol{U}$ and subsets $A \cap B = \varnothing$, $B = A^\complement$ and $A$ of $B$, the following identities hold: