correctness proof of the K-atomicity protocol