Simplified correctness proof.