$\mathrm{ess\, sup}(f)=\text{sup}(f)$ for a continuous non negative function $f$

My intuition tells me that the following proposition is true:

Let $$f: \Omega \rightarrow \mathbb{R}$$ be a measurable function on a measurable set $$\Omega \subseteq \mathbb{R}^n$$. If $$f$$ is continuous and non negative then $$\mathrm{ess\, sup}(f)=\text{sup}(f)$$.

I'm using here the Borel sigma algebras on $$\Omega$$ and $$\mathbb{R}$$ respectively, and the Lebesgue measure $$m$$ on $$\Omega$$.

My measure theory background is very poor, that being said I tried to give a proof for the case where $$\Omega$$ is compact:

Let $$A=\{a: m(\{ f\geq a \})=0 \}$$. Therefore $$\mathrm{ess\, sup}(f)= \inf A = E$$. Let also $$M=\max f = \sup f$$ (it exists because $$f$$ is continuous on a compact set). I will prove $$E \geq M$$, and $$E \leq M$$ (otherwise there would be a contradiction on the defition of $$\inf A$$).

• $$E \leq M$$: if $$a>M$$ then $$\{ f\geq a \}=\emptyset$$, so $$m(\{ f\geq a \})=0$$, so $$a \in A$$. Therefore $$E=\inf A \leq M$$
• $$E \geq M$$: let $$a \in A$$, and suppose there's $$x$$ such that $$f(x)>a$$. By continuity of $$f$$ there also an open neighbourood $$U(x)$$ such that for every $$y\in U(x)$$ $$f(y)>a$$. Therefore $$m(\{ f>a\})>0$$ and this is impossible, since $$m(\{ f\geq a \})=0$$ (because $$a \in A$$), $$\Omega$$ has finite measure since it is (closed and) bounded and $$\{ f and $$\{ f > a \}$$ are disjoint.

Provided the above reasoning holds I would like to extend from here the conclusion to a generic measurable $$\Omega$$: anybody could give me a hint in this direction? (or show me why the general proposition is wrong?)

Thanks!

Edit

Thanks to everybody for the help. Maybe it could be more interesting to require $$\Omega$$ non empty and connected.

• $\mathrm{ess\, sup}$ has three consecutive $s$'s in defiance of the usual rules of spelling. Try using $\mathrm{ess\, sup}$. – Umberto P. Jan 11 at 16:53
• Does $f: \mathbb{R}^n \supseteq \Omega \rightarrow \mathbb{R}$ mean $f: \Omega \rightarrow \mathbb{R}$ such that $\Omega \subseteq \mathbb{R}^n$? If so the proposition seems false. – 6005 Jan 11 at 18:25
• @6005 Yes, can you give me a counterexample? And I would really appreciate some additional hypothesis to make the statement true – Leonardo Jan 11 at 18:29
• @Leonardo I have given an answer with a counterexample, but my counterexample feels too simple so I may have missed something in the question – 6005 Jan 11 at 18:30

2 Answers

For a counterexample to this proposition, take $$\Omega = [0,1] \cup \{2\}$$ in $$\mathbb{R}$$ with $$f: \Omega \to \mathbb{R}$$ given by $$f(x) = x$$. This function is continuous.

Then $$\sup f = 2$$, whereas $$\mathrm{ess\,sup} f = 1$$, since $$\{f \ge 1\} = \{1,2\}$$ and $$\lambda(\{1,2\}) = 0$$ where $$\lambda$$ is Lebesgue measure.

Additional condition to make it true: Let's additionally assume that

$$\Omega \ne \varnothing$$, and for all $$x \in \Omega$$, for any open ball $$B$$ around $$x$$, $$\lambda(B \cap \Omega) > 0. \tag{1}$$

Then, in this case your proposition is true. For the proof, we already know $$\mathrm{ess\,sup} f \le \sup f$$, so we need to show $$\mathrm{ess\,sup} f \ge \sup f$$. Equivalently, fix any $$a < \sup f$$; we want to show that $$\lambda(\{f \ge a\}) > 0$$. Since $$a < \sup f$$, there exists $$x_0$$ such that $$f(x_0) > a$$. Since $$f$$ is continuous, there exists an open ball $$B$$ containing $$x_0$$ such that for $$x \in B \cap \Omega$$, $$f(x) > a$$. By our assumption (1) above, $$\lambda(B \cap \Omega) > 0$$. So $$\lambda(\{f \ge a\}) > 0$$.

Therefore, $$\mathrm{ess\,sup} f = \sup f$$.

• Thanks, this is very helpful and extends my work to non empty open sets. I added some hypothesis at the end of the post, to see if this can be further extended. – Leonardo Jan 11 at 19:24
• Somehow I was implicitly taking $\Omega$ to be open when I thought up my answer, so I wasn't thinking carefully enough. The proposition that the complement of a zero set is dense holds precisely if the condition you invoke is true, so my answer is useless and I've deleted it accordingly. +1 Nice answer! – user159517 Jan 11 at 21:41

If $$m(\Omega)=0$$ then $$\mathrm{ess\, sup}_{\Omega} f=-\infty$$ so the claim is false.

The result does hold if we assume that $$m(Q\cap \Omega)>0$$ for almost every $$x\in \Omega$$, and each open cube $$Q$$ containing $$x$$. (Without this condition, one of the other answers shows the claim is still false.)

In general, $$\sup f\ge \mathrm{ess\, sup} f$$. So, suppose $$b:=\sup f>\mathrm{ess\, sup}f:=a$$ and without loss of generality, assume that $$f$$ is bounded above (if not, consider $$\Omega\cap Q_n$$ for compact cubes $$Q_n$$ of edge length $$n$$).

Then, there is an $$x_0\in \Omega$$ and an $$a'$$ such that $$a and a $$\delta >0$$ and a cube $$Q\ni x_0$$ such that $$f(Q)\subseteq (a',b).$$ But then, $$m(\{ f\geq a' \})\ge m(Q\cap \Omega)>0,$$ which is a contradiction.

• Is $m(Q \cap \Omega) > 0$ for each $x \in \Omega$ is an additional assumption you are making? I have given a counterexample to the proposition in my answer. – 6005 Jan 11 at 18:47
• The additional assumption is that $m(\Omega)>0$ which implies that for all open cubes for which $\Omega\cap Q\neq \emptyset$, one has $m(\Omega\cap Q)>0$. As you point out, the result is false if $m(\Omega)=0.$ – Matematleta Jan 11 at 18:55
• No, my counterexample has $m(\Omega) = 1$. Your condition is stronger than that because you are saying that for all $x \in \Omega$ and for all open cubes $Q$ around $x$, $m(Q \cap Q) > 0$. – 6005 Jan 11 at 18:58
• Yes, that is always true, as I have said in my answer. – 6005 Jan 11 at 19:04
• Do you agree that $[0,1] \cup \{2\}$ is an $\Omega$ that does not satisfy your open cube condition, and that in my answer I give a counterexample using this $\Omega$? – 6005 Jan 11 at 19:05