Construction of an increasing function from a general function Supposing $f: [0,\infty) \to [0,\infty)$. The goal is to make an increasing function from $f$ using the following rule:-
If $t_1 \leq t_2$ and $f(t_1) > f(t_2)$ then change the value of $f(t_1)$ to $f(t_2)$. 
After this change, we have $f(t_1) = f(t_2)$.
Let $g$ be the function resulting from applying the above rule for all $t_1,t_2$ recursively (recursively because  if $f(t_2)$ changes then the value of $f(t_1)$ needs
to be re-computed)
Is it correct to treat $g$ as a well defined (increasing) function?
Thanks,
Phanindra
 A: Consider the function $f(x)=1/x$ if $x>0$, with also $f(0)=0$. Then for example $f(1)$ will, for any $n>1$, get changed to $n$ on considering that $f(1/n)=n>f(1)=1$. Once this is done there will still be plenty of other $m>1$ for which $f(1/m)=m$ where $m>n$, so that $f(1)$ will have to be changed again from its present value of $n$ to the new value $m>n$. In this way, for this example, there will not be a finite value for $f(1)$ as the process is iterated, and the resulting function will not be defined at $x=1$. 
EDIT: As mkl points out in a comment, the interpretion in the above example has the construction backward. When $f(a)>f(b)$ where $a<b$ the jvp construction is to replace $f(a)$ by the "later value" $f(b)$.
In this version there is no problem with infinite values occuring, as a value of $f(x)$ is only decreased during the construction, and the decreasing is bounded below by $0$ because the original $f$ is nonnegative. In fact, if $g(x)$ denotes the constructed function, and if we interpret the "iterative procedure" in a reasonable way, it seems one has
$$g(x)=\inf \{f(t):t \ge x \},$$
which is a nondecreasing function for any given $f(x)$. Note that Stefan made exactly this suggestion.
