User:Mgkrupa/List of set identities and relations

This article lists mathematical 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.

The binary operations of set union ($$\cup$$) and intersection ($$\cap$$) satisfy many identities. Several of these identities or "laws" have well established names.

List of set identities and relations

Notation
Throughout this article, capital letters such as $$A, B, C,$$ and $$X$$ will denote sets and $$\wp(X)$$ will denote the power set of $$X.$$ If it is needed then unless indicated otherwise, it should be assumed that $$X$$ denotes the universe set, which means that all sets that used in the formula are subset of $$X.$$ In particular, the complement of a set $$A$$ will be denoted by $$A^{C}$$ where unless indicated otherwise, it should be assumed that $$A^{C}$$ denotes the complement of $$A$$ in (the universe) $$X.$$

For sets $$A$$ and $$B,$$ define:
 * $$\begin{alignat}{4}

A \cup B     &&~=~ \{~ x ~:~ x \in A \;&&\text{ or }\;\, &&\; x \in B ~\} \\ A \cap B     &&~=~ \{~ x ~:~ x \in A \;&&\text{ and }    &&\; x \in B ~\} \\ A \setminus B &&~=~ \{~ x ~:~ x \in A \;&&\text{ and }   &&\; x \notin B ~\}. \\ \end{alignat}$$

The symmetric difference of $$A$$ and $$B$$ is:


 * $$A \;\triangle\; B ~=~ \left( A \setminus B \right) ~\cup~ \left( B \setminus A \right)$$

and the complement of a set $$B$$ is:


 * $$B^{C} = X \setminus B$$ where $$X$$ is the universe set.

Algebra of sets
A family $$\Phi$$ of subsets of a set $$X$$ is said to be an  algebra of sets  if $$\varnothing \in \Phi$$ and for all $$A, B \in \Phi,$$ all three of the sets $$X \setminus A,$$ $$A \cap B,$$ and $$A \cup B$$ are elements of $$\Phi.$$ The article on this topic lists set identities and other relationships these three operations.

Every algebra of sets is also a ring of sets and a π-system.


 * Algebra generated by a family of sets

Given any family $$\mathcal{S}$$ of subsets of $$X,$$ there is a unique smallest algebra of sets in $$X$$ containing $$\mathcal{S}.$$ It is called  the algebra generated by $$\mathcal{S}$$  and we'll denote it by $$\Phi_{\mathcal{S}}.$$ This algebra can be constructed as follows:

 If $$\mathcal{S} = \varnothing$$ then $$\Phi_{\mathcal{S}} = \left\{ \varnothing, X \right\}$$ and we're done. Alternatively, if $$\mathcal{S}$$ is empty then $$\mathcal{S}$$ may be replaced with $$\left\{ \varnothing \right\},$$ $$\left\{ X \right\},$$ or $$\left\{ \varnothing, X \right\}$$ and continue with the construction.

Let $$\mathcal{S}_{0}$$ be the family of all sets in $$\mathcal{S}$$ together with their complements (taken in $$X$$).

Let $$\mathcal{S}_{1}$$ be the family of all possible finite intersections of sets in $$\mathcal{S}_{0}.$$ 

Then the algebra generated by $$\mathcal{S}$$ is the set $$\Phi_{\mathcal{S}}$$ consisting of all possible finite unions of sets in $$\mathcal{S}_{1}.$$ 

Basic set relationships
Assume that $$A, B, C \subseteq X.$$


 * Commutativity:
 * $$A \cup B = B \cup A$$
 * $$A \cap B = B \cap A$$


 * Associativity:
 * $$(A \cup B) \cup C = A \cup (B \cup C)$$
 * $$(A \cap B) \cap C = A \cap (B \cap C)$$


 * Distributivity:
 * $$A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$$
 * $$A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$$


 * Identity:
 * $$A \cup \varnothing= A$$
 * $$A \cap X = A$$


 * Complement:
 * $$A \cup A^C = X$$
 * $$A \cap A^C = \varnothing$$


 * Idempotent:
 * $$A \cup A = A$$
 * $$A \cap A = A$$


 * Domination:
 * $$A \cup X = X$$
 * $$A \cap \varnothing = \varnothing$$


 * Absorption laws:
 * $$A \cup (A \cap B) = A$$
 * $$A \cap (A \cup B) = A$$

Intersection can be expressed in terms of set difference :


 * $$A \cap B = A \setminus (A \setminus B)$$

Algebra of inclusion
The following proposition says that the binary relation of inclusion is a partial order.


 * Reflexivity:
 * $$A \subseteq A$$


 * Antisymmetry:
 * $$A \subseteq B$$ and $$B \subseteq A$$ if and only if $$A = B$$


 * Transitivity:
 * If $$A \subseteq B$$ and $$B \subseteq C,$$ then $$A \subseteq C$$

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.


 * Existence of a least element and a greatest element:
 * $$\varnothing \subseteq A \subseteq X$$


 * Existence of joins:
 * $$A \subseteq A \cup B$$
 * If $$A \subseteq C$$ and $$B \subseteq C,$$ then $$A \cup B \subseteq C$$


 * Existence of meets:
 * $$A \cap B \subseteq A$$
 * If $$C \subseteq A$$ and $$C \subseteq B,$$ then $$C \subseteq A \cap B$$

The following are equivalent:  $$A \subseteq B$$ $$A \cap B = A$$ $$A \cup B = B$$</li> <li>$$A \setminus B = \varnothing$$</li> <li>$$B^C \subseteq A^C$$</li> </ol>

Some relationships involving complements
Assume that $$A, B, C \subseteq X.$$


 * De Morgan's laws:
 * $$(A \cup B)^C = A^C \cap B^C$$
 * $$(A \cap B)^C = A^C \cup B^C$$


 * Double complement or involution law:
 * $${(A^{C})}^{C} = A$$


 * Complement laws for the universe set and the empty set:
 * $$\varnothing^C = X$$
 * $$X^C = \varnothing$$


 * Uniqueness of complements:
 * If $$A \cup B = X$$ and $$A \cap B = \varnothing$$ then $$B = A^C$$


 * Algebra of relative complements



\begin{alignat}{2} \left( C \setminus B \right) \cup A &= \left( C \cup A \right) \setminus \left( B \setminus A \right) \\ &= \left( C \setminus \left( B \cup A \right) \right) \cup A \;\;\;\;\;\; \text{ (the outermost union is disjoint) } \\ \end{alignat} $$



\begin{alignat}{2} (C \setminus B) \cap A &= (C \cap A) \setminus B \\ &= C \cap (A \setminus B) \\ \end{alignat} $$



\begin{alignat}{2} (C \setminus B) \setminus A &= (C \setminus B) \cap (C \setminus A) \\ &= C \setminus (B \cup A) \\ \end{alignat} $$


 * $$C \setminus (B \cap A) = (C \setminus B) \cup (C \setminus A)$$


 * $$C \setminus (B \setminus A) = \left( C \setminus B \right) \cup \left( C \cap A \right)$$
 * So if $$C \subseteq B$$ then $$C \setminus (B \setminus A) = C \cap A$$


 * $$A^C = X \setminus A$$ (by definition of this notation)


 * $$B \setminus A = A^C \cap B$$


 * $$(B \setminus A)^C = A \cup B^C$$


 * $$A \setminus \varnothing = A$$


 * $$\begin{alignat}{2}

\varnothing &= A \setminus A \\ &= \varnothing \setminus A \\ &= A \setminus X \\ \end{alignat} $$

Intersection and unions of arbitrary families of sets
Let $$\left( S_{i,j} \right)_{(i, j) \in I \times J}$$ be a families of sets.


 * $$\bigcup_{i \in I} \left( \bigcap_{j \in J} S_{i,j} \right) \subseteq \bigcap_{j \in J} \left( \bigcup_{i \in I} S_{i,j} \right)$$


 * $$\bigcup_{i \in I} \left( \bigcup_{j \in J} S_{i,j} \right) = \bigcup_{j \in J} \left( \bigcup_{i \in I} S_{i,j} \right)$$


 * $$\bigcap_{i \in I} \left( \bigcap_{j \in J} S_{i,j} \right) = \bigcap_{j \in J} \left( \bigcap_{i \in I} S_{i,j} \right)$$


 * $$\prod_{j \in J} \left( \bigcap_{i \in I} S_{i,j} \right) = \bigcap_{i \in I} \left( \prod_{j \in J} S_{i,j} \right)$$
 * In particular, $$\left( \prod_{i \in I} A_{i} \right) \cap \left( \prod_{i \in I} B_{i} \right) = \prod_{i \in I} \left( A_{i} \cap B_{i} \right)$$


 * $$\left( \bigcup_{i \in I} A_i \right) \cap B = \bigcup_{i \in I} \left( A_{i} \cap B \right)$$


 * $$\left( \bigcup_{i \in I} A_i \right) \cap \left( \bigcup_{j \in J} B_j \right) = \bigcup_{i \in I, j \in J} \left( A_{i} \cap B_{j} \right)$$
 * More generally, suppose that for each $$i \in I,$$ $$J_{i}$$ is some non-empty index set and for each $$j \in J_{i},$$ $$S_{i, j}$$ is a set. Let $$\mathcal{F}$$ be the set of all functions $$f$$ on $$I$$ such that for each $$i \in I,$$ $$f(i) \in J_{i},$$ (note that if all $$J_{i}$$ are equal to some set, call it $$J,$$ then $$\mathcal{F} = J^{I}$$). Then
 * $$\bigcap_{i \in I} \left[ \bigcup_{j \in J_{i}} S_{i, j} \right] = \bigcup_{f \in \mathcal{F}} \left[ \bigcap_{i \in I} S_{i, f(i)} \right]$$

Definitions
Let $$f : X \to Y$$ be any function, where we denote its domain $$X$$ by $$\operatorname{domain}(f)$$ and denote its codomain $$Y$$ by $$\operatorname{codomain}(f).$$

Many of the identities below do not actually require that the sets be somehow related to $$f$$'s domain or codomain (i.e. to $$X$$ or $$Y$$) so when some kind of relationship is necessary then it will be clearly indicated. Because of this, in this article, if $S$ is declared to be " any set ," and it is not indicated that $$S$$ must be somehow related to $$X$$ or $$Y$$ (say for instance, that it be a subset $$X$$ or $$Y$$) then it is meant that $$S$$ is truly arbitrary. So, for instance, it's even possible that $$S \cap (X \cup Y) = \varnothing,$$ or that $$S \cap X \neq \varnothing$$ and $$S \cap Y \neq \varnothing$$ (which happens, for instance, if $$X = Y$$), etc.

If $S$ is any set then by definition,



and



Denote the image  (or range ) of $$f : X \to Y,$$ which is the set $$f(\operatorname{domain}(f)) = f(X),$$ by $$\operatorname{Im}(f)$$ or $$\operatorname{image}(f):$$


 * $$\operatorname{Im}(f) ~:=~ f(\operatorname{domain}(f)) ~=~ f(X) ~=~ \{ f(x) ~:~ x \in \operatorname{domain}(f) = X \}.$$

The restriction of a $$f : X \to Y$$ to $$S,$$ denoted by $$f\big\vert_{S},$$ is defined to be the map
 * $$f\big\vert_{S} ~:~ S \cap \operatorname{domain}(f) ~\to~ Y$$

with domain $$S \cap \operatorname{domain}(f)$$ that is defined by sending $$x \in S \cap \operatorname{domain}(f)$$ to $$f(x);$$ that is, $$f\big\vert_{S}\left( x \right) = f (x).$$

A set $$S$$ is said to be $$f$$-saturated or simply  saturated  if $$S = f^{-1}( f ( S ) ),$$ which is only possible if $$S \subseteq \operatorname{domain}(f).$$

Throughout, $$f : X \to Y$$ will be a map, $$R, S \subseteq X,$$ and $$T, U \subseteq Y.$$

Finitely many sets
Let $$f : X \to Y$$ be any function.

Let $$R, S,$$ and $$T$$ be completely arbitrary sets. Assume $$A \subseteq X$$ and $$C \subseteq Y.$$

Also:


 * $$f(S) \cap T = \varnothing$$ if and only if $$S \cap f^{-1}\left( T \right) = \varnothing.$$
 * When preimages preserve $$\subseteq$$: If $$C ~\subseteq~ \operatorname{Im} f$$ then $$f^{-1}( C ) ~\subseteq~ f^{-1}( T )$$ if and only if $$C ~\subseteq~ T.$$


 * Images of preimages and preimages of images

Let $$S$$ and $$T$$ be arbitrary sets, $$f : X \rightarrow Y$$ be any map, and let $$A \subseteq X$$ and $$C \subseteq Y$$.

Infinitely many sets

 * Images and preimages of unions and intersections

Images and preimages of unions are always preserved. Inverse images preserve both unions and intersections. It is only  images of intersections  that are not always preserved.

If $$\left( S_{i} \right)_{i \in I}$$ is a family of arbitrary sets indexed by $$I \neq \varnothing$$ then:



\begin{alignat}{2} f^{-1}\left( \bigcap_{i \in I} S_{i} \right) &~=~         \bigcap_{i \in I} f^{-1}\left( S_{i} \right) \\ f^{-1}\left( \bigcup_{i \in I} S_{i} \right) &~=~         \bigcup_{i \in I} f^{-1}\left( S_{i} \right) \\ f\left( \bigcup_{i \in I} S_{i} \right)      &~=~         \bigcup_{i \in I} f\left( S_{i} \right) \\ f\left( \bigcap_{i \in I} S_{i} \right)      &~\subseteq~ \bigcap_{i \in I} f\left( S_{i} \right) \\ \end{alignat} $$

If all $$S_{i}$$ are $$f$$-saturated then $$\bigcap_{i \in I} S_{i}$$ be will be $$f$$-saturated and equality will hold in the last relation below. Explicitly, this means:


 * $$f\left( \bigcap_{i \in I} S_{i} \right) ~=~         \bigcap_{i \in I} f\left( S_{i} \right)$$   IF   $$X \cap S_{i} = f^{-1}( f ( S_{i} ) )$$  for all  $$i \in I.$$

If $$\left( A_{i} \right)_{i \in I}$$ is a family of arbitrary subsets of $$X = \operatorname{domain} f,$$ which means that $$A_{i} \subseteq X$$ for all $$i,$$ then this becomes:


 * $$f\left( \bigcap_{i \in I} A_{i} \right) ~=~         \bigcap_{i \in I} f\left( A_{i} \right)$$   IF   $$A_{i} = f^{-1}( f ( A_{i} ) )$$  for all  $$i \in I.$$


 * Preimage from a Cartesian product

This subsection will describe the preimage of a subset $$B \subseteq \prod_{j \in J} Y_{j}$$ under a map of the form $$F ~:~ X ~\to~ \prod_{j \in J} Y_{j}.$$ For every $$k \in J,$$
 * let $$\pi_{k} ~:~ \prod_{j \in J} Y_{j} ~\to~ Y_{k}$$ denote the canonical projection onto $$Y_{k},$$ and
 * let $$F_{k} ~:=~ \pi_{k} \circ F ~:~ X ~\to~ Y_{k}$$

so that $$F ~=~ \left( F_{j} \right)_{j \in J},$$ which is also the unique map satisfying: $$\pi_{j} \circ F = F_{j}$$ for all $$j \in J.$$ The map $$\left( F_{j} \right)_{j \in J} ~:~ X ~\to~ \prod_{j \in J} Y_{j}$$ should not be confused with the Cartesian product $$\prod_{j \in J} F_{j}$$ of these maps, which is the map


 * $$\prod_{j \in J} F_{j} ~:~ \prod_{j \in J} X ~\to~ \prod_{j \in J} Y_{j}$$ defined by sending  $$\left( x_{j} \right)_{j \in J} \in \prod_{j \in J} X$$  to  $$\left( F_{j}\left( x_{j} \right) \right)_{j \in J}.$$

$$