# Finite set

In mathematics, particularly set theory, a finite set is a set that has a finite number of elements. Informally, a finite set is a set which one could in principle count and finish counting. For example,
$\displaystyle \{2,4,6,8,10\}$
is a finite set with five elements. The number of elements of a finite set is a natural number (possibly zero) and is called the cardinality (or the cardinal number) of the set. A set that is not a finite set is called an infinite set. For example, the set of all positive integers is infinite:
$\displaystyle \{1,2,3,\ldots \}$
Finite sets are particularly important in combinatorics, the mathematical study of counting. Many arguments involving finite sets rely on the pigeonhole principle, which states that there cannot exist an injective function from a larger finite set to a smaller finite set.

## Definition and terminology

Formally, a set $S$ is called finite if there exists a bijection
$\displaystyle f\colon S\to n$
for some natural number $n$ (natural numbers are defined as sets in Zermelo-Fraenkel set theory). The number $n$ is the set's cardinality, denoted as $|S|$.
If a set is finite, its elements may be written — in many ways — in a sequence:
$\displaystyle x_{1},x_{2},\ldots ,x_{n}\quad (x_{i}\in S,\ 1\leq i\leq n).$
In combinatorics, a finite set with $n$ elements is sometimes called an $n$-set and a subset with $k$ elements is called a $k$-subset. For example, the set $\{5,6,7\}$ is a 3-set – a finite set with three elements – and $\{6,7\}$ is a 2-subset of it.

## Basic properties

Any proper subset of a finite set $S$ is finite and has fewer elements than S itself. As a consequence, there cannot exist a bijection between a finite set S and a proper subset of S. Any set with this property is called Dedekind-finite. Using the standard ZFC axioms for set theory, every Dedekind-finite set is also finite, but this implication cannot be proved in ZF (Zermelo–Fraenkel axioms without the axiom of choice) alone. The axiom of countable choice, a weak version of the axiom of choice, is sufficient to prove this equivalence.
Any injective function between two finite sets of the same cardinality is also a surjective function (a surjection). Similarly, any surjection between two finite sets of the same cardinality is also an injection.
The union of two finite sets is finite, with
$\displaystyle |S\cup T|\leq |S|+|T|.$
In fact, by the inclusion–exclusion principle:
$\displaystyle |S\cup T|=|S|+|T|-|S\cap T|.$
More generally, the union of any finite number of finite sets is finite. The Cartesian product of finite sets is also finite, with:
$\displaystyle |S\times T|=|S|\times |T|.$
Similarly, the Cartesian product of finitely many finite sets is finite. A finite set with $n$ elements has $2^{n}$ distinct subsets. That is, the power set $\wp (S)$ of a finite set S is finite, with cardinality $2^{|S|}$.
Any subset of a finite set is finite. The set of values of a function when applied to elements of a finite set is finite.
All finite sets are countable, but not all countable sets are finite. (Some authors, however, use "countable" to mean "countably infinite", so do not consider finite sets to be countable.)
The free semilattice over a finite set is the set of its non-empty subsets, with the join operation being given by set union.

## Necessary and sufficient conditions for finiteness

In Zermelo–Fraenkel set theory without the axiom of choice (ZF), the following conditions are all equivalent:
* $S$ is a finite set. That is, $S$ can be placed into a one-to-one correspondence with the set of those natural numbers less than some specific natural number.
* (Kazimierz Kuratowski) $S$ has all properties which can be proved by mathematical induction beginning with the empty set and adding one new element at a time.
* (Paul Stäckel) $S$ can be given a total ordering which is well-ordered both forwards and backwards. That is, every non-empty subset of $S$ has both a least and a greatest element in the subset.
* Every one-to-one function from $\wp {\bigl\wp (S){\bigr )}$ into itself is onto. That is, the powerset of the powerset of $S$ is Dedekind-finite (see below).
* Every surjective function from $\wp {\bigl\wp (S){\bigr )}$ onto itself is one-to-one.
* (Alfred Tarski) Every non-empty family of subsets of $S$ has a minimal element with respect to inclusion. (Equivalently, every non-empty family of subsets of $S$ has a maximal element with respect to inclusion.)
* $S$ can be well-ordered and any two well-orderings on it are order isomorphic. In other words, the well-orderings on $S$ have exactly one order type.
If the axiom of choice is also assumed (the axiom of countable choice is sufficient), then the following conditions are all equivalent:
* $S$ is a finite set.
* (Richard Dedekind) Every one-to-one function from $S$ into itself is onto. A set with this property is called Dedekind-finite.
* Every surjective function from $S$ onto itself is one-to-one.
* $S$ is empty or every partial ordering of $S$ contains a maximal element.

### Other concepts of finiteness

In ZF set theory without the axiom of choice, the following concepts of finiteness for a set $S$ are distinct. They are arranged in strictly decreasing order of strength, i.e. if a set $S$ meets a criterion in the list then it meets all of the following criteria. In the absence of the axiom of choice the reverse implications are all unprovable, but if the axiom of choice is assumed then all of these concepts are equivalent. (Note that none of these definitions need the set of finite ordinal numbers to be defined first; they are all pure "set-theoretic" definitions in terms of the equality and membership relations, not involving ω.)
* I-finite. Every non-empty set of subsets of $S$ has a $\subseteq$-maximal element. (This is equivalent to requiring the existence of a $\subseteq$-minimal element. It is also equivalent to the standard numerical concept of finiteness.)
* Ia-finite. For every partition of $S$ into two sets, at least one of the two sets is I-finite. (A set with this property which is not I-finite is called an amorphous set.)
* II-finite. Every non-empty $\subseteq$-monotone set of subsets of $S$ has a $\subseteq$-maximal element.
* III-finite. The power set $\wp (S)$ is Dedekind finite.
* IV-finite. $S$ is Dedekind finite.
* V-finite. $|S|=0$ or $2\cdot |S|>|S|$.
* VI-finite. $|S|=0$ or $|S|=1$ or $|S|^{2}>|S|$.
* VII-finite. $S$ is I-finite or not well-orderable.
The forward implications (from strong to weak) are theorems within ZF. Counter-examples to the reverse implications (from weak to strong) in ZF with urelements are found using model theory.
Most of these finiteness definitions and their names are attributed to Tarski 1954 by Howard & Rubin 1998, p. 278. However, definitions I, II, III, IV and V were presented in Tarski 1924, pp. 49, 93, together with proofs (or references to proofs) for the forward implications. At that time, model theory was not sufficiently advanced to find the counter-examples.
Each of the properties I-finite thru IV-finite is a notion of smallness in the sense that any subset of a set with such a property will also have the property. This is not true for V-finite thru VII-finite because they may have countably infinite subsets.