Proving Algorithm Correctness