Proof

The proof is similar to the proof of the orbit algorithm.

Termination            Correctness