From the First Law of Thermodynamics, dQ=dU+dW
Sudden processes are adiabatic, so dQ=0 dU=−dW
In compression, dW<0
So, dU>0 which means dT>0
With passage of time (i.e. slow process), piston is maintained at the same place. Hence, Volume is constant.
So, P α T.
As temperature decreases with time, pressure decreases too.