Correctness Invariant (python) - original