Is it possible to characterize the class of functions $g:{\bf R}\rightarrow {\bf R}$ which satisfies the following condition: for every measurable function $u:{\bf R}\rightarrow {\bf R}$ it follows that $g\circ u$ is a measurable function? Let us say that such functions $g$ are characterised by the property (L). So, the question is: what the property (L) exactly is?
${\bf DISCUSSSION.}$
Remark(1). Here measurability is meant in the sense of Lebesgue (so it is Lebesgue measurability): more precisely: We say that $u:{\bf R}\rightarrow {\bf R}$ is measurable iff for every open set $U\subseteq {\bf R}$ we have that $u^{\leftarrow}(U)$ is a (Lebesgue) measurable set.
Remark(2). I guess, the same question can be asked if we replace the notion of Lebesgue measurability by the notion of Borel measurability. Let us say the aforementioned property of function $g$ related to Borel measurability is (B) property. Can we establish which property exactly (B) property is?
Remark(3). The question is inspired by two superposition theorems in textbook G. Leoni: A First Course in Sobolev Spaces. 2nd edition, 2017, where, in chapter 2 (chapter 3, resp.), in Theorem 2.55, page 55 (Theorem 3.55, page 92, resp.), is established that the class of functions $g$ preserving $BPV_{loc}$-property ($AC_{loc}$-property, resp.) in post composition is exactly the class of locally Lipschitz functions.
Remark(4). Here are some questions which are generally related to this question (but which consider a different problem):
Composition of measurable & continuous functions, is it measurable?
Compositions preserving measurability
Remark(5). I note that, if $g:{\bf R}\rightarrow {\bf R}$ is a continuous function, then we have the following conclusion(it is a sufficiency condition): If $u: {\bf R}\rightarrow {\bf R}$ is Lebesgue measurable, then $g\circ u$ is also a Lebesgue measurable function on ${\bf R}$. This is easily proved from the identity $(g\circ u)^{\leftarrow}(U)=u^{\leftarrow}(g^{\leftarrow}(U))$, because, by continuity of $g$, we have that $g^{\leftarrow}(U)$ is an open set, and by measurability of $u$, we have that $u^{\leftarrow}(g^{\leftarrow}(U))$ is a measurable set, which proves the assertion. But I do not know if this sufficient condition is also necessary.
Remark(6). Is this the answer to the question, I am not absolutely sure:
Theorem on Measurability-Preserving Maps?
The issue here, is I believe, the following: in PhoemueX's answer to the question above, in terms of our terminology, it is shown that (B) property is exactly the property that $g$ is a Borel function (if I understood the argument correctly). So now, the problem with PhoemueX's argument in the case of (L) property is that, if we in particular consider invertible measurable functions $u:{\bf R}\rightarrow {\bf R}$ such that $u$ satisfies the Luzin (N)) property on ${\bf R}$, we can write $g=g\circ u\circ u^{-1}$, and the situation is the following: $$ g^{\leftarrow}(U)=u((g\circ u)^{\leftarrow}(U)) $$ whereby we know that $(g\circ u)^{\leftarrow}(U)$ is a measurable set. So, since we know that $u$ satisfies the Luzin (N) property, it follows that $u((g\circ u)^{\leftarrow}(U))$ is a measurable set (that the Luzin (N) property of $\psi$ is equivalent to preserving measurability of sets under the action of $\psi$ is already established here:
In particular, by
Measurability of the inverse of a measurable function
it follows that $u^{-1}:{\bf R}\rightarrow {\bf R}$ is also a measurable function). My point is that, even if we have measurability of $u((g\circ u)^{\leftarrow}(U))$, can we conclude that $g^{\leftarrow}(U)$ is a Borel set? If we can, we completed the proof of necessity. I am not sure if this line of reasoning is correct. Maybe it is simply the case that we have to consider the smaller class of functions $u$ in order to get that $g$ is Borel function, namely the class of measurable functions $u:{\bf R}\rightarrow {\bf R}$ such that $u$ is invertible, such that $u$ satisfies the Luzin (N) property, and such that $u^{-1}$ is a Borel function WHICH SATISFIES THAT FOR EVERY MEASURABLE SET $M$ WE HAVE THAT $u(M)$ IS A BOREL SET (IF SUCH FUNCTIONS EXIST...). Then, we should get that $g^{\leftarrow}(U)$ is a Borel set. I would like to hear another opinion on this, just to be safe.