Proof

The second statement of the theorem is a straightforward consequence of the first. So, we only prove the first. There are two parts to the proof:

If

Only if