## proper function

Hello,

i want so solve this exercise, but i don't know how?:
"X,Y metric spaces, Y locally compact. F $\in$C(X,Y).

f is proper iff $f^-1(K) \subset X$ is compact for all K $\subset Y compact$

proper means in our definition, that forall top. spaces Z:
f x id_z: X x Z->Y x Z is closed.

How can i proof this thm.?`

i try a lot of things, but i can't solve this problem.

i hope, you can help me by hints..

Regards