Union of Boundaries

Theorem
Let $T = \struct {S, \tau}$ be a topological space.

Let $A, B$ be subsets of $S$.

Then:
 * $\partial A \cup \partial B = \map \partial {A \cup B} \cup \map \partial {A \cap B} \cup \paren {\partial A \cap \partial B}$

where $\partial A$ denotes the boundary of $A$.

Proof
First we will prove that
 * $\partial A \subseteq \map \partial {A \cup B} \cup \map \partial {A \cap B} \cup \paren {\partial A \cap \partial B}$

Let $x \in \partial A$.

that
 * $x \notin \map \partial {A \cup B} \cup \map \partial {A \cap B} \cup \paren {\partial A \cap \partial B}$

Then by definition of union:
 * $x \notin \map \partial {A \cup B} \land x \notin \map \partial {A \cap B} \land x \notin \paren {\partial A \cap \partial B}$

By Characterization of Boundary by Open Sets:
 * $\exists Q \in \tau: x \in Q \land \paren {\paren {A \cup B} \cap Q = \O \lor \relcomp S {A \cup B} \cap Q = \O}$

By Intersection Distributes over Union. Complement of Union:
 * $\paren {A \cap Q} \cup \paren {B \cap Q} = \O \lor \relcomp S A \cap \relcomp S B \cap Q = \O$

Because $x \notin \paren {\partial A \cap \partial B}$ therefore by definition of intersection:
 * $x \notin \partial B$

By Characterization of Boundary by Open Sets:
 * $\exists U \in \tau: x \in U \land \paren {B \cap U = \O \lor \relcomp S B \cap U = \O}$

As $x \in \partial A$ by Characterization of Boundary by Open Sets:
 * $A \cap Q \ne \O$

Then by Union is Empty iff Sets are Empty:
 * $\paren {A \cap Q} \cup \paren {B \cap Q} \ne \O$

Hence:
 * $\relcomp S A \cap \relcomp S B \cap Q = \O$

We will show that:
 * $B \cap U = \O \implies \relcomp S A \cap Q \cap U = \O$

Assume:
 * $B \cap U = \O$

Then:
 * $U \subseteq \relcomp S B$

By Intersection with Empty Set:
 * $\relcomp S A \cap Q \cap \relcomp S B \cap U = \O \cap U = \O$

Thus by Intersection with Subset is Subset:
 * $\relcomp S A \cap Q \cap U = \O$

By definition of intersection:
 * $x \in Q \cap U$

By definition of topological space:
 * $Q \cap U$ is open.

Then by Characterization of Boundary by Open Sets:
 * $\relcomp S A \cap Q \cap U \ne \O$

Hence:
 * $B \cap U \ne \O$

Then:
 * $\relcomp S B \cap U = \O$

Therefore:
 * $U \subseteq B$

Because $x \notin \map \partial {A \cap B}$ by Characterization of Boundary by Open Sets:
 * $\exists V \in \tau: x \in V \land \paren {A \cap B \cap V = \O \lor \relcomp S {A \cap B} \cap V = \O}$

By Complement of Intersection:
 * $A \cap B \cap V = \O \lor \paren {\relcomp S A \cup \relcomp S B} \cap V = \O$

By Intersection Distributes over Union:
 * $A \cap V \cap B = \O \lor \paren {\relcomp S A \cap V} \cup \paren {\relcomp S B \cap V} = \O$

Because $x \in \partial A$ therefore by Characterization of Boundary by Open Sets:
 * $\relcomp S A \cap V \ne \O$

Then by Union is Empty iff Sets are Empty:
 * $\paren {\relcomp S A \cap V} \cup \paren {\relcomp S B \cap V} \ne \O$

Hence:
 * $A \cap V \cap B = \O$

By Intersection with Empty Set:
 * $A \cap V \cap B \cap U = \O \cap U = \O$

By Intersection with Subset is Subset:
 * $A \cap V \cap U = \O$

By definition of intersection:
 * $x \in V \cap U$

By definition of topological space:
 * $V \cap U$ is open.

Then by Characterization of Boundary by Open Sets:
 * $A \cap Q \cap V \ne \O$

This contradicts with $A \cap V \cap U = \O$

Thus the inclusion is proved.

Analogically:
 * $\partial B \subseteq \map \partial {A \cup B} \cup \map \partial {A \cap B} \cup \paren {\partial A \cap \partial B}$

By Union of Subsets is Subset:
 * $\partial A \cup \partial B \subseteq \map \partial {A \cup B} \cup \map \partial {A \cap B} \cup \paren {\partial A \cap \partial B}$

By Boundary of Union is Subset of Union of Boundaries:
 * $\map \partial {A \cup B} \subseteq \partial A \cup \partial B$

By Boundary of Intersection is Subset of Union of Boundaries:
 * $\map \partial {A \cap B} \subseteq \partial A \cup \partial B$

By Intersection is Subset of Union:
 * $\partial A \cap \partial B \subseteq \partial A \cup \partial B$

Hence by Union of Subsets is Subset:
 * $\map \partial {A \cup B} \cup \map \partial {A \cap B} \cup \paren {\partial A \cap \partial B} \subseteq \partial A \cup \partial B$

Thus by definition of set equality the result follows:
 * $\partial A \cup \partial B = \map \partial {A \cup B} \cup \map \partial {A \cap B} \cup \paren {\partial A \cap \partial B}$