Let D denote the set of rationals in [0,1] and suppose that f: D--> R is increasing. show that there is an increasing function g:[0,1]-->R such that g(x)=f(x) whenever x is rational.

hint:[For x $\displaystyle \in$ [0,1], define g(x)=$\displaystyle sup${f(t): 0<=t<=1, t$\displaystyle \in$Q}]

according to the hint, we need to show that f is equal to its least upper bound, but f is increasing, so is f(1) the least upper bound?