Prove correctness of the following algorithm for computing the $n$th Fibonacci number.
algorithm fastfib (integer $n$)
if $n \lt 0$ return $0$;
else if $n = 0$ return $0$;
else if $n = 1$ return $1$;
else $a \leftarrow 1; b \leftarrow 0$;
$\qquad$for $i$ from $2$ to $n$ do
$\qquad$$\qquad$ $t \leftarrow a; a \leftarrow a + b; b \leftarrow t$;
return $a$;
end
Can anyone show me how to prove the correctness of this algorithm? It seems like a code