# Milnor, Lectures on the h-cobordism theorem, proof of Theorem 3.4

I have a question while reading the proof of Theorem 3.4 in Milnor's book Lectures on the h-cobordism theorem. (https://www.maths.ed.ac.uk/~v1ranick/surgery/hcobord.pdf)

Theorem 3.4. If the Morse number $$\mu$$ of the triad $$(W;V_0,V_1)$$ is zero, then $$(W;V_0,V_1)$$ is a product cobordism.

Proof) $$(\cdots)$$ We obtain an integral which satisfies $$f(\psi(s))=s$$. Each integral curve can be extended uniquely over a maximal interval, which, since $$W$$ is compact, must be $$[0,1]$$. $$(\cdots)$$

My question is: How did the compactness of $$W$$ used to show that the maximal domain of an integral curve must be $$[0,1]$$?

The function $$f$$ is assumed to have value $$0$$ on $$V_0$$ and $$1$$ on $$V_1$$. An integral curve of an ODE/vector field on a compact manifold with boundary can be extended until it hits the boundary. Since $$f(\psi(s))=s$$ this will happen precisely at $$s=0$$ and at $$s=1$$.