# Homotopy classes of functions from a finite CW complex

I am given the following problem: taken $X$ finite CW complex and $Y$ a space such that for every basepoint $y \in Y$ the group $\pi_i(Y,y)$ is finite $\forall i \leq \text{dim} X$ then the set $[X, Y]$ is finite.

My first approach was the following: use induction on $\text{dim} X=n$, if $n=0$ trivially $[X, Y]$ has the cardinality of $|\pi_1(Y,y)|^{|X|}$ since $X$ must be a finite discrete set and every class $[f] \in [X,Y]$ is represented by a fixed function $g$ s.t. $\forall x\in X$ $g(x)$ and $f(x)$ are in the same path-connected component of $Y$.

Suppose then $n>0$, take $[f] \in [X,Y]$ then $[f|_{X_{n-1}}] \in [X_{n-1}, Y]$ which is finite by inductive assumption, thus if $[X_{n-1}, Y]=\{ [g_i] \ : \ 1 \leq i \leq k\}$ we have $f|_{X_{n-1}} \sim g_j$ for some $j$.

Since $(X, X_{n-1})$ has the HEP we can extend the homotopy to $f \sim h_j$ with $h_j|_{X_{n-1}}= g_j$, now I wanted to control the possible homotopy classes of $h_j$ using the fact that $\pi_n(Y,y)$ is finite: taken $\phi \colon (D^n, \partial D^n) \rightarrow (X, X_{n-1})$ characteristic map (which are finitely many) at first I tought that $h_j \circ \phi \in \pi_n(Y,y)$ therefore $h_j \circ \phi$ is homotopic to one of finitely many classes in $\pi_n(Y,y)$.

This would induce an homotopy of $f|_{X_{n-1}\cup_{\phi} D^n}$ to some function and since we have finitely many cells gluing togheter all the homotopies I could obtain an homotopy $f \sim f'$ where $f'$ should depend only on $[X_{n-1}, Y]$ and $\pi_n(Y,y)$ which are finite.

The obvious problem is that in general $h_j \circ \phi(\partial D^n) \neq \{ y\}$ thus the function doesn't provide a class in $\pi_n(Y,y)$ and I have no ides how to associate such a class to $h_j \circ \phi$ in a manner useful to the proof.

Any help and hint to how to prove the claim or adjust my proof is welcome, thanks in advance for your attention.

• Are you familiar with obstruction theory? – Qiaochu Yuan Oct 31 '15 at 21:15
• No, the exercise is in Hatcher section 4.1 in which he deals only basic homotopy theory. If you can propose a solution using obstruction theory feel free to post it but I would prefer to use only basic facts about homotopy theory. – N.B. Oct 31 '15 at 21:24