# Set Theory/Examples/A cup (X cap B) = C, (A cup X) cap B = D

## Example in Set Theory

Let $A, B, C, D$ be subsets of a set $S$.

Let there exist $X \subseteq S$ such that:

$A \cup \paren {X \cap B} = C$
$\paren {A \cup X} \cap B = D$

Then:

$A \cap B \subseteq D \subseteq B$

and:

$A \cup D = C$

### Converse

Let the following conditions hold:

$A \cap B \subseteq D \subseteq B$

and:

$A \cup D = C$

Then these equations hold:

$A \cup \paren {X \cap B} = C$
$\paren {A \cup X} \cap B = D$

if:

$X = D \setminus A$

## Proof

 $\ds D$ $=$ $\ds \paren {A \cup X} \cap B$ $\text {(1)}: \quad$ $\ds \leadsto \ \$ $\ds D$ $\subseteq$ $\ds B$ Intersection is Subset $\ds D$ $=$ $\ds \paren {A \cup X} \cap B$ $\text {(2)}: \quad$ $\ds \leadsto \ \$ $\ds D$ $=$ $\ds \paren {A \cap B} \cup \paren {X \cap B}$ Distributive Laws (Set Theory) $\text {(3)}: \quad$ $\ds \leadsto \ \$ $\ds A \cap B$ $\subseteq$ $\ds D$ Intersection is Subset $\ds \leadsto \ \$ $\ds A \cap B$ $\subseteq$ $\ds D$ from $(1)$ and $(3)$ $\ds$ $\subseteq$ $\ds B$

Then:

 $\ds A \cup D$ $=$ $\ds A \cup \paren {A \cap B} \cup \paren {X \cap B}$ from $(2)$ $\ds$ $=$ $\ds A \cup \paren {X \cap B}$ Union Absorbs Intersection $\ds$ $=$ $\ds C$ by hypothesis

$\blacksquare$