# Union of Countable Sets of Sets/Proof 3

This page has been identified as a candidate for refactoring of medium complexity.In particular: Shares a common core with Image of Countable Set under Mapping is Countable.Until this has been finished, please leave
`{{Refactor}}` in the code.
Because of the underlying complexity of the work needed, it is recommended that you do not embark on a refactoring task until you have become familiar with the structural nature of pages of $\mathsf{Pr} \infty \mathsf{fWiki}$.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{Refactor}}` from the code. |

## Theorem

Let $\AA$ and $\BB$ be countable sets of sets.

Then:

- $\set {A \cup B: A \in \AA, B \in \BB}$

is also countable.

## Proof

Since $\AA$ and $\BB$ are countable, $\AA \times \BB$ is countable by Cartesian Product of Countable Sets is Countable.

Thus by Surjection from Natural Numbers iff Countable there is a surjection $f: \N \to \AA \times \BB$.

Let $\CC = \set {A \cup B: A \in \AA, B \in \BB}$.

Let $g: \AA \times \BB \to \CC$ be defined by letting $\map g {A, B} = A \cup B$.

$g$ is a surjection:

Let $C \in \CC$.

Then there exist $A \in \AA$ and $B \in \BB$ such that $C = A \cup B$.

By the definition of Cartesian product:

- $\tuple {A, B} \in \AA \times \BB$

Then:

- $\map g {A, B} = A \cup B = C$

It follows that $g$ is a surjection.

By Composite of Surjections is Surjection, $g \circ f: \N \to \CC$ is surjective.

Hence $\CC$ is countable.

$\blacksquare$

#### Law of the Excluded Middle

This proof depends on the Law of the Excluded Middle, by way of Surjection from Natural Numbers iff Countable.

This is one of the axioms of logic that was determined by Aristotle, and forms part of the backbone of classical (Aristotelian) logic.

However, the intuitionist school rejects the Law of the Excluded Middle as a valid logical axiom.

This in turn invalidates this proof from an intuitionistic perspective.