Proof of Cover's theorem