Let $f:[a,b]\to\Bbb R$ be a continuous function and$g:[a,b]\to\Bbb R, g(x)=\sup\{f(t):a\le t\le x\}.$ Show $g$ is a continuous function over $[a,b]$ I am a 31-year-old college student trying to study from some practice exam materials that my professor has given me. I will include an example of one of the problems I am struggling with.

Let $f: [a,b] \rightarrow  \Bbb R$ be a continuous function and define $$g: [a,b] \rightarrow \Bbb R, \quad g(x)= \sup\{f(t): a\leq t\leq x\}.$$

I am supposed to show that $g$ is a continuous function over $[a,b]$. I recall doing this by showing that $g$ is a monotone function or something along those lines but I am not quite sure how to proceed with this.
I am stuck with what it is exactly that I need to show to prove that g is continuous.
We need for all $\epsilon$ a $\delta$
$$|g(x)-g(x+h)|&lt;\epsilon, |\delta|&lt;h$$
$$\Leftrightarrow |\sup\{f(t): a\leq t\leq x\}-\sup\{f(t): a\leq t\leq x+h\}|&lt;\epsilon, h&lt;|\delta|$$
Immediately by continuity we have a $\delta$ such that $$|f(x)-f(x+h)|&lt;\epsilon/2, h&lt;|\delta|$$
$$...\leq|\sup\{f(t): a\leq t\leq x\}-\sup\{f(t): a\leq t\leq x\}|+|\epsilon/2|&lt;\epsilon, h&lt;|\delta|$$
We need for all $\epsilon$ a $\delta$
$$|g(x)-g(x+h)|&lt;\epsilon, |\delta|&lt;h$$
$$\Leftrightarrow |\sup\{f(t): a\leq t\leq x\}-\sup\{f(t): a\leq t\leq x+h\}|&lt;\epsilon, h&lt;|\delta|$$
Immediately by continuity we have a $\delta$ such that $$|f(x)-f(x+h)|&lt;\epsilon/2, h&lt;|\delta|$$
$$...\leq|\sup\{f(t): a\leq t\leq x\}-\sup\{f(t): a\leq t\leq x\}|+|\epsilon/2|&lt;\epsilon, h&lt;|\delta|$$