How does cardinality map a finite set to $(\{0\} \cup \mathbb{N})$

elementary-set-theoryintuition

In reading Kevin Houston's "How to Think Like a Mathematician", there's a line stating the following:

Let $X$ be the set of finite sets. Then the cardinality of a set is a function on $X$, that is $|.|: X \to \{0\} \cup \mathbb{N}$. Note that we need $0$ in the co-domain as the set could be the empty set.

What does this mean exactly? From my understanding, this would imply that any finite set is mapped exactly to one natural number. For example, a finite set of $5$ elements would be mapped to the natural number $5$. However, is it possible to map the set itself to a value?

Best Answer

It means what you think it means.

The domain of definition for this function is the "set of all finite sets".

Thus every element here is a "finite set".

Consider for a simpler example: $A=\{\{1,2\}, \{1,2,3\},\{5,7,8,12\}\}$

This is a set whose elements are the sets $\{1,2\}$ and $\{1,2,3\}$ and $\{5,7,8,12\}$.

If you define a function on $A$ then you assign a value to each of $\{1,2\}$ and $\{1,2,3\}$ and $\{5,7,8,12\}$ yet not to $1,2,3, 5,7,8,12$.

Tangential remark: there is a problem with the idea of a set of all finite sets, but this is not relevant in this context.

Related Question