A AA is finite if there is a nn and a

{0,1,,n1}A.\{0,1,\ldots,n-1\}\longrightarrow A.

For n=0n=0, the domain is empty. The unique such number nn is the cardinality of AA, written A|A|. A set is infinite if it is not finite.

Counting and enumeration

A finite set can be listed without repetition as a1,,ana_1,\ldots,a_n; the enumeration is a choice of order, not additional data intrinsic to the set. An indexed list can contain repetitions, so the number of its indices need not equal the number of distinct values.

Examples

The empty set has cardinality zero. The set {1,3,5}\{1,3,5\} has cardinality three. A finite family of sets can have an infinite union if even one member is infinite; a finite union of finite sets is finite.

References