# The interior of $\{f \leq 0\}$ is $\{ f < 0\}$

Let $$X\subseteq \mathbb{R}^n$$, $$f: X \rightarrow \mathbb{R}$$: what further conditions on $$X$$ and $$f$$ do we need to ensure that $$\text{Int}\{x|f(x)\leq 0\}=\{x|f(x)<0\}$$?

Context: I've encountered this kind of question when dealing with open bounded $$X$$ with $$C^1$$ boundary, in partial differential equations, but I'm sure that one could benefit from such a fact in optimization, for instance.

Clearly, continuity is not enough, since $$f:[0,1]\rightarrow \mathbb{R} , f(x)=0$$ is such that $$[0,1]=\{f\leq 0\}$$, but the interior of this set is not the empty set.

If $$f$$ is continuous, it is easy to see that $$\tag {1}\{x:f(x)<0\}\subseteq \text{Int}\{x:f(x)\le 0\}$$

This holds because the LHT is open and the RHT is, by definition, the biggest open subset of $$\{x:f(x)\le 0\}$$.

Let us first suppose $$X=\mathbb{R}^n$$:

One necessary and sufficient condition for equality, provided that $$f$$ is differentiable, is that $$\nabla f\neq 0$$ on $$f^{-1}(0)$$.

To prove it, let $$x$$ be a point inside $$\text{Int}\{x:f(x)\le 0\}\backslash \{x:f(x)<0\}$$. This means that $$x$$ is locally a maximum, and thus $$\nabla f=0$$

This clearly generalizes to open subsets of $$\mathbb{R}^n$$. It is now easy to see that, for general $$X$$ and continuous $$f$$, a necessary and sufficient condition is that $$f^{-1}(0)$$ does not contain local maxima (although this is not a very useful condition)

Note that some kind of regularity hypotesis is necessary: as Whitney proved, given a closed subset $$K$$ of $$\mathbb{R}^n$$, there's always a $$\mathcal{C}^\infty(\mathbb{R}^n)$$ function with $$f^{-1}(0)=K$$. Given such an $$f$$, considering $$f^2$$ gives you a class of smooth examples with strict (or trivial) inclusion.

• Thank you. Why is there such a neighborhood? Nov 17, 2020 at 13:14
• @warm_fish My argument was faulty, I modified it. Indeed, there does not need to be such a neighbourhood as the one I was describing, as $f(x,y)=-y^2$ shows
– user515010
Nov 17, 2020 at 13:24
• You only need $\nabla f$ to be nonzero at the points where $f(x) = 0$. Nov 17, 2020 at 13:28
• From a slightly different perspective, this is also essentially the condition that $f(x)=0$ defines a submanifold. Nov 18, 2020 at 13:01