I made the following claim over at the [Secret Blogging Seminar](http://sbseminar.wordpress.com/2009/10/26/concrete-categories/), and now I'm not sure it's true:


Let $f: X \to Y$ and $g: X \to Y$ be two maps between finite CW complexes. If f and g induce the same map on $\pi\_k$, for all k, then f and g are homotopic.


Was I telling the truth?


EDIT: Since I didn't say anything about basepoints, I probably should have said that f and g induce the same map 


$[S^k, X] \to [S^k, Y]$.


This will also deal better with the situation where X and Y are disconnected. I'd be interested in knowing a result like this either with pointed maps or nonpointed maps. (Although, of course, if you work with pointed maps you have to take X and Y connected, because $[S^k, -]$ can't see anything beyond the number of components in that case.)



Whitehead for maps
This is not true. Consider, for example, a degree 1 map from a torus $S^1 \times S^1$ to $S^2$ (concretely, realize the torus as a square with identifications, and then collapse the boundary of the square to a point). This map is trivial on all homotopy groups (since for any $n>0, \pi\_n$ is 0 for either the domain or the codomain), but it is not homotopically trivial because it is nonzero on $H\_2$.


If you want to demand that the spaces be simply connected, you can get a counterexample by considering cohomology operations: the cup square, for example, gives a map from $K(\mathbb{Z},n)$ to $K(\mathbb{Z},2n)$ which is nontrivial, but for the same reason as the previous example it must be 0 on homotopy groups. This example is not finite-dimensional, but it's probably possible to find one that is--I just don't know how because I don't know how to show a map is trivial on homotopy groups if the spaces have infinitely many nontrivial homotopy groups whose values are unknown, which is the case for most finite-dimensional examples.


