Proof of correctness of reversal algorithm for array rotation
Here is a proof by picture, which follows the steps of the algorithm:
$$
0,\ldots,d-1,d,\ldots,n-1 \\
d-1,\ldots,0,d,\ldots,n-1 \\
d-1,\ldots,0,n-1,\ldots,d \\
d,\ldots,n-1,0,\ldots,d-1
$$
You can easily turn this into a formal proof by giving a formula for the permutation after each step, which you can easily prove correct.