24

We define $A$ to be a finite set if there is a bijection between $A$ and a set of the form $\{0,\ldots,n-1\}$ for some $n\in\mathbb N$.

How can we prove that a subset of a finite set is finite? It is of course sufficient to show that for a subset of $\{0,\ldots,n-1\}$. But how do I do that?

Asaf Karagila
  • 393,674
  • 6
    I wrote this answer to a now-deleted question. I realized that I don't recall many proofs of the pigeonhole principle (anywhere) which are longer than "obviously true.", so I decided to post the question with an answer. – Asaf Karagila Nov 18 '12 at 01:40
  • 6
    I welcome other people to write answers as well. – Asaf Karagila Nov 18 '12 at 01:58

7 Answers7

20

The proof is essentially the pigeonhole principle, and it is proved by induction.

Let us denote $[n]=\{0,\ldots,n-1\}$. What we want to prove is in two parts:

  1. If $A\subseteq[n]$ then either $A=[n]$ or there is a bijection between $A$ and $[m]$ for some $m<n$.

  2. If $m<n$ then there is no bijection from $[n]$ into $[m]$. Equivalently we want to prove that if $f\colon[n]\to[n]$ is injective then it is a surjective. Also we may want to prove that if $f\colon[n]\to[m]$ then $f$ is not injective, or $f\colon[m]\to[n]$ then $f$ is not surjective.

The first part is not very difficult, we define by induction $f(0)=\min A$; and $f(k+1)=\min A\setminus\{f(0),\ldots,f(k)\}$. Either $f$ is a bijection between $A$ and $[n]$ or the induction had to stop before and $f$ is a bijection between $[m]$ and $A$ for some $m<n$. Note that this is not begging the question because $A$ is a set of natural numbers, and it is a subset of $[n]$ so it cannot contain more elements than $[n]$ (more in the actual sense, not in the sense of cardinality).

The second part is tricky because it seems so obvious. This is where the pigeonhole principle is actually proved.

We prove this part by induction. For $n=0$ this is obvious because $[0]=\varnothing$.

Assume that for $[n]$ it is true that if $f\colon[n]\to[n]$ is injective then it is surjective. We want to show this is also true for $[n+1]$.

Let $f\colon[n+1]\to[n+1]$ be an injective function. There are two cases:

  1. If $f(k)\neq n$ for all $k<n$ then restricting $f$ to $[n]$ is an injective function from $[n]$ into $[n]$. By the induction hypothesis we have to have that the restriction of $f$ to $[n]$ is surjective, therefore $f(n)\notin[n]$ (otherwise $f$ is not injective) and therefore $f(n)=n$ and so $f$ is surjective as well.

  2. If $f(k)=n$ for some $k<n$, by injectivity this $k$ is unique. We define $g$ as follows: $$g(x)\begin{cases} f(n) & x=k\\ n & x=n\\ f(x) & x\neq k,n\end{cases}$$ It follows that $g$ is also injective, and for all $k< n$ we have to have $g(k)\neq n$ (because $g(n)=n$ and $g$ is injective). Therefore by the previous case we know that $g$ is surjective. It follows that $f$ is also surjective, as wanted.


A word on the axiom of choice and finiteness. The above proof shows that finite sets are Dedekind-finite. There are other ways of defining finiteness, all which are true for finite sets, but may also be true for infinite sets. For example "every surjection is a bijection" might fail for infinite Dedekind-finite sets; or "every linearly ordered partition is finite"; etc.

Assuming the axiom of choice, or actually the axiom of countable choice, is enough to conclude, however, that all Dedekind-finite sets are finite. Therefore the above forms of finiteness are equivalent once more. (The reverse implication is false, by the way, it is consistent that the axiom of countable choice fails, but every Dedekind-finite set is finite.)

Asaf Karagila
  • 393,674
  • 1
    There is another proof in my mind. Am I allowed to write it here Sir? – Mikasa Nov 18 '12 at 02:07
  • @Babak: See my second comment on the question. :-) – Asaf Karagila Nov 18 '12 at 02:09
  • Techically, the question seems to ask only for 1. – Michael Greinecker Nov 18 '12 at 02:17
  • @Michael: True, but it simpler to prove this using th second point. At least if you want a full proof. :-) – Asaf Karagila Nov 18 '12 at 02:19
  • Please have a look at it, I don't want it to be duplicate. I use this fact that if $A$ is finite and $B\subset A$, a proper subset, then $B$ is finite as well. We can do this by induction on $|A|$. If $|A|=0$ then clearly we havee $A=\emptyset$ and since the empty set has no proper subset so our claim is trure. Now, assume that the claim is true for all finite sets with $|A|=n$ and want to show for $|A|=n+1, ; B\subset A$. We know there is an element $\alpha\in A$ such that $\beta\notin B$. – Mikasa Nov 18 '12 at 02:48
  • So, $$A-{\alpha}\cong \mathbb N_{n+1}-{n+1}$$ or $$A-{\alpha}\cong \mathbb N_n$$ If $B=A-{\alpha}$ then we can say $B\cong\mathbb N_n$ or $|B|=n$ and so $B$ is finite. If $B\subset A-{\alpha}$ then according to our assumption in induction $B$ is again finite and $|B|<n<|A|$. I think the rest is routine. Thanks for you time. – Mikasa Nov 18 '12 at 02:48
  • @Babak: You are suppose to prove that if $B\subseteq A$ and $A$ is finite then $B$ is finite. Writing a proof which is based on that fact is assuming what you need to prove is true. – Asaf Karagila Nov 18 '12 at 07:57
  • So dear @AsafKaragila, my so-called proof is true here( so I can post it), however; I used induction in it? Sorry if I have misunderstanding in English and what you said. :-) – Mikasa Nov 18 '12 at 08:03
  • @Babak: No, I said that your proof is not true. At least not for this context. The question asks for a proof of the fact "If $A$ is finite and $B\subseteq A$, then $B$ is finite". You said that you are using this fact. You cannot use the fact which you are trying to prove. – Asaf Karagila Nov 18 '12 at 08:04
  • @AsafKaragila: Thanks for the time. Wish me luck to be like you in Maths. :) – Mikasa Nov 18 '12 at 08:09
  • @Asaf I want to make it clear now. What is your definition of 'Finiteness' in ZF? And please tell me if my definition is not generally used. (i) My definition of Dedekind-Infinite; "$A$ is dedekind-Infinite iff $\exists$ a bijective map from $A$ to a proper subset of $A$" and (ii)Tasrki-Finite; "$A$ is Tarski Finite iff $A\prec \aleph_0$". – Katlus Nov 29 '12 at 21:50
  • And, I have seen two different definitions of Tarski-Infinite and i don't know which one is generally used. (a) "$A$ is Tarski-Finite iff Every nonempty collection of subsets of $A$ has a least element. (b) $A$ is Tarski-Finite iff $A\prec \aleph_0$. Thank you in advance :-) – Katlus Nov 29 '12 at 21:55
  • @Katlus: Finite means only one thing, which is to be equipotent with a finite ordinal. Tarski proved that a set $A$ is finite if and only if every non-empty family of subsets of $A$ has a maximal element. In some places this is the definition of T-finite, but in others the definitions says "Every $\subseteq$-chain of subsets has a maximal element". I chose the latter as my definition of T-finite, as did Jech in his AC book (but not his Set Theory book from 2003), because we already have a name for finite sets, so if anything we may wish to add a new name for new kind of sets. – Asaf Karagila Nov 29 '12 at 22:25
  • Also as a bonus round you may want to prove that one can interchange maximal and minimal elements in the T-finite definitions. It's gives you some insight about the definition. – Asaf Karagila Nov 29 '12 at 22:26
  • Babak's proof in the comment looks fine to me. Where is he/she begging the question? Maybe there was a misunderstanding because he/she started his/her proof with "I use this fact that..."; they didn't communicate properly and apparently you stopped reading there. Can you please check the rest of the proof? I had this proof in mind as well as, so I want to know if I'm missing something. – Banach Manifold Sep 21 '16 at 05:19
  • @BanachManifold: (1) If you're supposed to prove that a subset of a finite set is finite, and you already assume that proper subsets of a finite set are finite, you're really left without anything to prove, because there is only one improper subset and it is finite by assumption. (2) Other than that the proof itself is generally fine, but if you've proved that proper subsets are finite, then the proof is overly long and overly convoluted, the right proof would be "Let $B\subseteq A$, if $B=A$ then by assumption that $A$ is finite, so is $B$, and otherwise by the fact $B$ is finite". – Asaf Karagila Sep 21 '16 at 05:26
  • @AsafKaragila I see. What I meant originally was rather "the gist of the proof". I agree; the proof can be made much shorter and many details were unnecessary. – Banach Manifold Sep 21 '16 at 05:45
  • @AsafKaragila Could you please elaborate more on "The first part is not very difficult"? How did you do induction on $n$? Can you expand the answer a little bit. – FreeMind Sep 22 '18 at 02:37
  • 1
    @FreeMind: It's a recursive definition. $f(0)=\min A$, etc. This is what is written exactly after that line you quote. The recursion is over ${0,\ldots,n-1}$, since $A$ is a subset of that. Either at some point we are finished, or $A$ equals ${0,\ldots,n-1}$. – Asaf Karagila Sep 22 '18 at 07:14
  • @AsafKaragila, the original question was "How do we prove that a subset of a finite set is finite?". Bu why do you prove in your answer the second point "2.) If $m<n$ ..." . Isn't the first point of your answer alone sufficient to prove that a subset of a finite set is finite? Why did you include the second point? – Philipp Sep 11 '19 at 20:39
  • @AsafKaragila, I don't understand why one can simply argue just because $A$ contains less elements than $[n]$ in the actual sense the recursion that defines the bijection $f$ has to stop after a finite number of steps. For me this is not a precise mathematical reason. Can you show this step rigorously? – Philipp Nov 14 '19 at 21:31
  • @Philipp: The precise version of this reason is an induction argument. – Asaf Karagila Nov 14 '19 at 22:31
  • @AsafKaragila, still not clear to me. Where do you show the induction step and why would it hold? – Philipp Nov 14 '19 at 23:18
  • @Philipp: I hope you agree with me that a subset of the empty set is empty. Now if $A$ is a subset of a set with $n+1$ elements, either $A$ has $n+1$ elements and it is the whole set (and thus finite), or there is an element missing, so $A$ is a subset of a set with $n$ elements; so by the induction hypothesis, $A$ is finite. Arguably, I've implicitly assumed that there is no subset of ${0,\dots,n-1}$ which has more than $n$ elements, which is why my post includes also a proof of the pigeonhole principle. – Asaf Karagila Nov 14 '19 at 23:22
  • @AsafKaragila, then I don't understand why you define $f$ as taking a minimum of a set? One could have simply taken an arbitrary bijection $f$ without defining it explicitly. This would also do the trick and is much shorter. – Philipp Nov 16 '19 at 16:11
  • @Philipp: How do you know there are any bijections if you don't prove there is at least one? – Asaf Karagila Nov 16 '19 at 17:21
  • @AsafKaragila, ok this is true. But could you explain where exactly you need the pigeonwhole priciple/the assumption "[...] I've implicitly assumed that there is no subset of ${0,…,n−1}$ which has more than $n$ elements [...]" when proving that every subset of a finite set is finite? – Philipp Nov 17 '19 at 00:02
  • @Philipp: If no subset of ${0,...,n-1}$ has more than $n$ elements, then no subset is infinite. – Asaf Karagila Nov 17 '19 at 00:31
  • @AsafKaragila, Ah ok I think I got it. So regarding the recursion we have used to define the bijection $f$ one can argue that it stops after a finite number of steps because $A \subseteq [n]$ and no subset of $[n]$ can be infinite (due to the pigeonwhole principle). Is this summarized correctly? – Philipp Nov 17 '19 at 00:53
  • @Philipp: Yes, that is the idea. – Asaf Karagila Nov 18 '19 at 21:49
  • The proof of part 2, the pigeonhole principle, is fine. But I don't find the first part convincing. If we imagine the theorem to be false, then there is an infinite subset of $[n]$, and the induction defining $f$ could continue indefinitely and define $f$ for infinitely many numbers, all of them less than $n$. – Tony Häger Oct 27 '21 at 15:56
  • @Tony: No, because you are going through the elements of $A$, one by one, it is still a well-ordered set. Either you finished "early" and only reached a certain $m<n$, or you covered $[n]$ itself. But you cannot have needed more, since you are mapping a subset of $[n]$ into $[n]$ by increasing order. – Asaf Karagila Oct 27 '21 at 17:04
  • Isnt using recursion complicating things (for 1)? why not just argue as in this answer https://math.stackexchange.com/a/4289074/789929. Maybe you used it becuase you want to construct the bijection? and not just show it exists? – Vivaan Daga Jan 12 '22 at 09:39
  • Also assuming both 1 and 2 have been proven then we can show that a proper subset of a finite set must have cardianlity less then it, since if not then 2 will be contradicted!,right? so no induction needed – Vivaan Daga Jan 12 '22 at 09:59
  • Also your proof of 1 does not really use 2 ,its in Jech and Hrbacek (Thm 2.4) and theres no mention of it using 2. – Vivaan Daga Jan 13 '22 at 05:19
  • Why does part 1. of the proof start from the assumption that $A \subseteq [n]$? – user65526 Oct 17 '22 at 17:39
  • @user65526: Because it's enough to show this for subsets of $[n]$. – Asaf Karagila Oct 17 '22 at 17:54
  • Maybe I need to be clearer about what is confusing me. The question uses $A$ to refer to an arbitrary finite set. But you fix that set to be a subset of [n]. So how can $A$ be an arbitrary finite set? – user65526 Oct 17 '22 at 18:34
  • @user65526: The same way that $x$ can refer to an arbitrary real number, and then later to an arbitrary positive real number. – Asaf Karagila Oct 17 '22 at 21:02
  • But why is it later being fixed to an arbitrary subset of $[n]$? – user65526 Oct 17 '22 at 21:49
  • @user65526: Because we needed a letter? And since it is enough to consider, instead of an arbitrary finite set, a subset of $[n]$ then there is no harm in using the same letter. – Asaf Karagila Oct 17 '22 at 22:04
  • But why is it enough to consider a subset of $[n]$? – user65526 Oct 18 '22 at 06:17
  • @user65526: Because we can apply a bijection between any finite set and some $[n]$. So if we had a finite subset of a finite set, might as well assume it is a subset of the corresponding $[n]$. – Asaf Karagila Oct 18 '22 at 06:50
7

Here is a slightly different proof of the pigeonhole principle:

Suppose $f:[n]\to[n]$ is an injection that is not surjective for $n>0$. We can assume without loss of generality that $n$ is not in the range of $f$. For if it is, we map the element that is mapped to $n$ to some element not in the range instead and get a new injection that is not surjective with $n$ not in the range. We now show that $f|[n-1]$ is injective, but not surjective. Trivially, the restriction of an injection is an injection. But $f(n)\in[n-1]$ is not in the range of $f|[n-1]$.

Michael Greinecker
  • 32,841
  • 6
  • 80
  • 137
2

Let $I_n = \{0, 1, ... n-1\}$, and $B\subset A$. Then there exists an injection from $B\to I_n$ since there's an bijection from $A\to I_n$. Since there is such a $n$ there exists(*) a minimal $j$ such that there is an injection from $B\to I_j$ and if that were not an surjection there we could construct a injection from $B\to I_{j-1}$ (unless $j=0$, but then $I_j=\emptyset$ and the function is trivially a surjection).


If you instead use Dedekind-finite as a definition for finite. That is that every injective function on $A$ is surjective, then it becomes rather obvious.

If $B\subseteq A$ were not finite there would be a injective mapping from $B$ to $C\subsetneq B$ and we could expand this to $A$ by taking the identity map outside $B$ then we would have an injective mapping from $A$ to a proper subset of $A$ which means that $A$ is infinite which contradicts the assumption.


(*) This relies on that every non-empty set $X$ (of $j$ such that there is an injection $B\to I_j$) of natural numbers has a minimal element which can be proven by induction.

skyking
  • 16,654
  • It appears that the cut-to-the-chase approach is to just get the words injection, surjection, bijiection out as quickly as possible. – CopyPasteIt Aug 21 '17 at 12:39
  • Why is there a minimal $j$ like that? This assumes that $B$ is already finite. – Asaf Karagila Aug 21 '17 at 12:45
  • @AsafKaragila That can be proven by induction... – skyking Aug 21 '17 at 12:47
  • Obviously. I proved that by induction in my answer. And I agree it's fine to leave this gap. But one should point out this essential gap. What you have done is write "assume a subset of a finite set is finite, then a subset of a finite set is finite." – Asaf Karagila Aug 21 '17 at 12:49
  • @as I wonder now if I need to point out any gaps in my answer. I guess no response means I am OK. – CopyPasteIt Aug 21 '17 at 12:51
  • @s Maybe constructing the set $X$ is problematic in a formal argument, and it would be best to explicitly descend one step at a time in a constructive way. – CopyPasteIt Aug 21 '17 at 13:03
  • The edit does not explain why there is such minimal $j$, namely why is the set of $j$ satisfying this property is not empty to begin with. // @Mike: I haven't had the time to look at your answer closely, I will do it later today I hope. – Asaf Karagila Aug 21 '17 at 13:21
  • @MikeMathMan I don't understand your first comment. And for the last I don't think there's a problem there - $X$ is constructed using the axiom of separation (the predicate "There exists a bijection $B\to I_j$" should be no problem). – skyking Aug 21 '17 at 13:24
  • My first comment was just for fun. I upvoted your answer. – CopyPasteIt Aug 21 '17 at 13:25
  • You meant to say (the predicate "There exists an injection $B \to I_j$"...). – CopyPasteIt Aug 21 '17 at 13:41
  • @sky I showed how to construct a bijection from any starting injection in my updated answer. – CopyPasteIt Aug 21 '17 at 17:57
2

For any $n\in N$ let $[n]$ represent the set $\{0,\ldots,n-1\}$.

Proposition: For all natural numbers $n$, all subsets of $[n]$ are finite.

We prove it by induction on $n$. For $n=0$ the only subset of $[0]$ is $\emptyset$ which is finite.
Now assume that all subsets of $[n]$ are finite. Let $A$ be a subset of $[n+1]$.
If $n \notin A$ then $A \subseteq [n]$ and $A$ is finite by the induction hypothesis.
If $n \in A$ then $A-\{n\}\subseteq [n]$ and is finite by the induction hypothesis, which means there is a bijection $f$ from $[k]$ to $A-\{n\}$ for some natural number $k$. Define a bijection $g \colon [k+1] \to A$ as follows:

$$ g(x)= \begin{cases} f(x), & \text{if $x<k$} \\ n, & \text{ if $x=k$} \end{cases} $$

Since there is a bijection from $[k+1]$ to $A$, $A$ is finite. Thus all subsets of $[n+1]$ are finite.

0

For any $k \in \Bbb N$ let $[k]$ represent the set $\{0,\ldots,k-1\}$.

Proposition 1: If $A$ is finite and $B \subset A$ then $B$ is finite.
Proof
To get a contradiction, take the minimal $n$ for which there exist sets $A$ and $B$ and a function $\sigma: [n] \to A$ such that $B \subset A$ and $B$ is not finite.
It must be true that $B \subsetneq A$ and so let $a \in A$ with $a \notin B$.
Let $j_a = \sigma^{-1}(a)$ and define

$\tau(x) = \left\{\begin{array}{lr} \;\sigma(x)\, \;\;\;\;\;\;\text{ |} & \text{for } x \lt j_a \\ \;\sigma(x+1) \; \text{ |} & \text{for } x \ge j_a \end{array}\right\}$

The function $\tau$ is a bijective correspondence between $[n-1]$ and $A \setminus \{a\}$; also, $B \subset A \setminus \{a\}$.
But then $n$ is not the minimal integer and we've reached a contradiciton. $\quad \blacksquare$

CopyPasteIt
  • 11,366
0

For any $k \in \Bbb N$ let $[k]$ represent the set $\{0,\ldots,k-1\}$.

Lemma 1: If $A$ is a finite set then so is $A \cup \{b\}$.
Proof
Let $\sigma: A \xrightarrow{\sim} [n]$ be a bijective correspondence.
If $b \in A$ there is nothing to do.
Otherwise, define $\tau: A \cup \{b\} \to [n+1]$ as follows:

$\tau(x) = \left\{\begin{array}{lr} \;\;\;\sigma(x)\, \;\;\text{ |} & \text{for } x \in A\\ \;\;\;n \;\;\;\;\;\;\;\text{ |} & \text{for } x = b \end{array}\right\}$

It is elementary to check that $\tau$ is a bijection. $\quad \blacksquare$

Proposition 2: If $A \subset [n]$ then $A$ is a finite set.
Proof
We can assume that $A \ne \emptyset$.
For $0 \le m \le n$ define $A_m = A \cap [m]$ so that $A = A_n$.
Each $A_m$ with $m \lt n$ is either equal to $A_{m+1}$ or is equal to $A_{m+1} \setminus \{m\}$.
To get a contradiction, assume that $A$ is infinite.
By lemma 1 and step-by-step finite decremental induction, if $A_n$ is infinite then all the sets $A_m$ with $0 \le m \le n$ must also be infinite. But

$\quad A_0 = A \cap [0] = A \cap \emptyset = \emptyset$

and we've arrived at a contradiction. $\quad \blacksquare$


Remark: We can also use lemma 1 to supply a direct proof that uses straightforward induction; for $n \in \Bbb N$, define the statement

$P(n): $ If a set $A$ can be put into bijective correspondence with $[n]$ and $B \subset A$ then there exist $m \in \Bbb N$ such that $B$ can be put into bijective correspondence with $[m]$.

CopyPasteIt
  • 11,366
0

I have run into this old question and was surprised that noone seemed to have said the following.

The actual definition of finite set is the following: A set $A$ is finite if every injection $A\rightarrow A$ is a bijection.

(Note: this definition does not require the set $\mathbb{N}$)

Now let $B$ a finite set and $A\subset B$.

Suppose that $A$ is not finite. Then, by definition there exists a function $f:A\rightarrow A$ that is injective but not surjective. Now define $F:B\rightarrow B$ as follows. $$ F(x)=\begin{cases} f(x) & \text{if $x\in A$}\\ x & \text{if $x\in B\setminus A$} \end{cases} $$ Clearly $F$ is injective but not surjective contradicting the finiteness of $B$.

Andrea Mori
  • 26,969
  • This definition of finite was relies on the axiom of choice. So I'm not surprised. In fact, the user "skyking" has made this observation in their answer already. – Asaf Karagila Oct 02 '22 at 18:44