Exercise using Sard's theorem Let $M$ be a compact $n$-dimensional differentiable manifold and $f:M\to\mathbb{R}^{n+1}$ differentiable with $0\notin f(M)$. Show that there is a straight line through the origin in $\mathbb{R}^{n+1}$ that intersects with $f(M)$ only finitely many times.
This was given as an exercise for the consequences of Sard's theorem. I can't think of how I should apply the theorem however. A direct consequence would be that the set of the critical points of $f$ has the measure zero. But neither does this go into the direction of the assertion I shall but prove, nor does a set of measure zero has to be finite. For example every line in $\mathbb{R}^2$ has measure zero but infinitely many points. Could someone help me out?
 A: As $0\notin f(M)$ you may postcompose $f$ with the projection $\pi:\Bbb R^{n+1}\to\Bbb {RP}^n$ and still have a differentiable map. By Sard the critical values $(\pi\circ f)(X)$ have zero measure, the consequence we draw from this is only the fact that image of the critical points is not all of $\Bbb {RP}^n$.
Now $M$ is compact and the set of critical points $X$ is always closed, so the critical values $\pi(f(X))$ are a closed set in $\Bbb{RP}^n$ that is not all of $\Bbb{RP}^n$.  They are thus contained in an open set $U_1\subset \Bbb{RP}^n$ that is not all of $\Bbb{RP}^n$.
For every point in $M-X$ the differential of $\pi\circ f$ must be invertible, hence $(\pi\circ f)$ is a local diffeomorphism on $M-X$. So for $p\in M -X$ consider open neighbourhoods on which $\pi\circ f$ restricts to a diffeomorphism. All these open neighbourhoods together with $(\pi\circ f)^{-1}(U_1)$ must cover $M$, hence there is a finite subcover. In particular by construction any point of $\Bbb {RP}^n$ will have at most one pre-image in each open set of this finite cover (as the map $\pi\circ f$ is a diffeomorphism on these sets), thus at most finitely many pre-images.
So the points in $\Bbb {RP}^n-U_1$ must have finite pre-image, meaning the lines they correspond to only intersect $f(M)$ finitely many times.
