Let $f: N a t \rightarrow R e ; f$ is a sequence (or array) which returns values in Re. Define another function,
$$
\max : \mathrm{Nat} \rightarrow \mathrm{Re}
$$
as follows: For any $k \in N a t$,
$$
\begin{gathered}
\max (0)=f(0), \\
\text { and } \\
\max (k+1)=[\text { if } f(k+1)>\max (k) \text { then } f(k+1) \text { else } \max (k)],
\end{gathered}
$$
where $>$ is the greater than relation on the reals. Prove that: For any $j, n \in N a t$, if $j \leq n$, then $f(j) \leq \max (n)$. [Remark. One can implement this max function as an inefficient computer program. Since the value returned by $\max (n)$ is equal to the value returned by $f(j)$ for some $j \leq n$, this proof establishes that the program returns the maximum value of the array elements up to, and including, element $n$.]