Well here's the question.
From some previous excercises we know that from \begin{align} A&=\int F\;ds,\\ &=\int ma\;ds, &&(F=ma)\\ &=\int m \frac{dv}{dt}\;ds, &&(a=dv/dt)\\ &=m \int_{v_1}^{v_2}v\; dv,\\ &=m \frac{v_2^2}{2}-m \frac{v_1^2}{2},\\ &=W_2-W_1, &&(W_i=\frac12mv_i^2)\\ &=\Delta W. \end{align} Meanwhile for potential energy we have the shown figure \begin{align} A&= \int m a\;ds,\\ &= \int m \frac{dv}{dt}\;ds, \end{align} Here the professor did something like: $$ds \times \cos \alpha =-dh$$ and then the equation goes \begin{align} A&=- \int m \frac{dv}{dt}\;dh,\\ &=- \int m v \;dv,\\ &=-m \int v \text{ }dv \end{align} and up to
$$A=-\Delta W_p$$
Now what I'd like to understand from you is one logic explanation for
$$ds \times \cos \alpha=-dh$$
I'd be very grateful!