regarding measurability of functions

in this question Borel Measurability of a function with countable discontinuity points. $$X$$ is a Borel set , but I have $$2$$ questions $$1)$$ if $$X$$ is every subset of $$\mathbb{R}$$ I think the theorem is also valid we only used preimage of open set is an open set and countability so I don't see the point of being Borel . $$2)$$ And I also think that the function also Lebesgue measurable since borel sigma algebra is contained in lebesgue sigma algebra , so open set are also measurable in lebesgue sigma algebra . Are my statements correct?

• The answer to the question in your link is invalid. Commented Apr 29, 2023 at 7:49

• For $$f$$ being Borel Measurable, $$X$$ must be a Borel set. Indeed, take a (Lebesgue) measurable set $$N$$ set that is not a Borel set. Then, $$f:N\to \mathbb R$$ defined by $$f(x)=1$$ is continuous, However, $$f^{-1}(\{1\})=N$$ which is not Borel, and thus, $$f$$ is not Borel measurable.
• Indeed, if $$f$$ is Borel measurable, then it's Lebesgue measurable.
• Thanks for your answer , instead for $f$ being Lebesgue Measurable is true that $X$ could be any subset of $\mathbb{R} ?$ Commented Apr 29, 2023 at 8:01
• For your first question, yes as far as $X$ is Lebesgue measurable. For your second question, since the Borel $\sigma -$algebra is generated by open sets, open sets are Borel sets, so no chance to find an open set that is not a Borel set... @Dsrksidemath