Let $ (X,A,\mu) $ be a measure-space and let we have the function $ f:X \to \mathbb{R} $ for which $$\{x\in X , f(x)>\lambda\}\in A$$ for $\forall\lambda\in{\mathbb{R}}$. I have to prove that $$\{x\in X , f(x)=\lambda\} \in{A}.$$
What I have done is:
As $\{x\in X , f(x)>\lambda\} \in A$ I know that $$\{x\in X, f(x)>\lambda\}^c=\{x\in X , f(x)\le\lambda\}\in A$$ and $$\{ x\in X , f(x)\le\lambda\}=\{x\in X, f(x)<\lambda\}\cup\{x\in {X}, f(x)=\lambda\}, $$ so can I say that $\{x\in X, f(x)=\lambda\}\in A$?
If not, what can I do?
$A$ is a $\sigma$-algebra and is closed under countable unions and intersections. Consider the sets $$E_n=\{x\in X, f(x)>\lambda-1/n\}$$ Then $E_n\in A$ by assumption. What is the union of the $E_n$? It is also in $A$.