The composition of measurable function is not measurable: only for Lebesgue-measurability? Let $\mathcal{I}:=[0,1]$. Let $\mathcal{R}(f)$ denote the range of a function $f$. Let $\Sigma$ be the $\sigma$-algebra of $\mathcal{I}$. 
Consider the measurable and continuous functions $\varphi:\mathcal{I}\rightarrow\mathcal{I}$ and $\psi:\mathcal{I}\rightarrow\mathcal{I}$.
For $t\in \mathcal{I}$, construct the functions 
$$
\alpha:\mathcal{I}\rightarrow \mathcal{I} \text{ with } \alpha(t):=\varphi(\overbrace{\varphi(t)}^{\in I})
$$
$$
\beta:\mathcal{I}\rightarrow \mathcal{I} \text{ with } \beta(t):=\varphi(\overbrace{\psi(t)}^{\in I})
$$
$$
\gamma:\mathcal{I}\rightarrow \mathcal{I} \text{ with } \gamma(t):=\psi(\overbrace{\varphi(t)}^{\in I})
$$
$$
\delta:\mathcal{I}\rightarrow \mathcal{I} \text{ with } \delta(t):=\psi(\overbrace{\psi(t)}^{\in I})
$$
Notice:
$$
\mathcal{R}(\alpha)=\varphi_{\star}(\mathcal{R}(\varphi)):=\{\varphi(t) \in \mathcal{R}(\varphi) \text{ s.t. } t \in \mathcal{R}(\varphi)\cap \mathcal{I}\}= \{\varphi(t) \in \mathcal{R}(\varphi) \text{ s.t. } t \in \mathcal{R}(\varphi)\}  \subseteq \mathcal{R}(\varphi)
$$
$$
\mathcal{R}(\beta)=\varphi_{\star}(\mathcal{R}(\psi)):=\{\varphi(t) \in \mathcal{R}(\psi) \text{ s.t. } t \in \mathcal{R}(\psi)\cap \mathcal{I}\}= \{\varphi(t) \in \mathcal{R}(\psi) \text{ s.t. } t \in \mathcal{R}(\psi)\} \subseteq \mathcal{R}(\varphi)
$$
$$
\mathcal{R}(\gamma)=\psi_{\star}(\mathcal{R}(\varphi)):=\{\psi(t) \in \mathcal{R}(\varphi) \text{ s.t. } t \in \mathcal{R}(\varphi)\cap \mathcal{I}\}= \{\psi(t) \in \mathcal{R}(\varphi) \text{ s.t. } t \in \mathcal{R}(\varphi)\}  \subseteq \mathcal{R}(\psi)
$$
$$
\mathcal{R}(\delta)=\psi_{\star}(\mathcal{R}(\psi)):=\{\psi(t) \in \mathcal{R}(\psi) \text{ s.t. } t \in \mathcal{R}(\psi)\cap \mathcal{I}\}= \{\psi(t) \in \mathcal{R}(\psi) \text{ s.t. } t \in \mathcal{R}(\psi)\}  \subseteq \mathcal{R}(\psi)
$$
Question: Are $\alpha, \beta,\gamma,\delta$ measurable functions? My confusion comes from the fact that I have read in several sources that the composition of Lebesgue measurable functions is not necessarily Lebesgue measurable.
If that holds also for generic measurability, what is wrong in the following proof? Do I need to use continuity for that to work?
Proof: 
Consider the function $\beta$. $\beta$ is measurable if
$$
\beta^\star(E):=\{t \in \mathcal{I} \text{ s.t. } \beta(t)\in E \cap \mathcal{R}(\beta)\}\in \Sigma \text{, $\forall E \in \Sigma$}
$$
We have that $\forall E \in \Sigma$
$$
\{t \in \mathcal{I} \text{ s.t. } \beta(t)\in E \cap \mathcal{R}(\beta)\}= \{t\in \mathcal{I} \text{ s.t. } \gamma(t)\in \overbrace{E \cap \varphi_{\star}(\mathcal{R}(\psi))}^{\subseteq E\cap \mathcal{R}(\varphi)} \}\subseteq \{t\in \mathcal{I} \text{ s.t. }E\cap \mathcal{R}(\varphi) \}\in \Sigma \text{ by $\varphi$ measurable}
$$
 A: Let us clarify it.
If $(X,\Sigma_1)$ and $(Y,\Sigma_2)$ are measurable spaces, then  a function $f:X \to Y$ is $\Sigma_1$-$\Sigma_2$-measurable if for all $A\in \Sigma_2$, $f^{-1}(A) \in \Sigma_1$. 
Now, take $X=Y=[0,1]$ and let us answer your questions
1. Composition of Lebesgue measurable functions may not be Lebesgue measurable
What is called a "Lebesgue measurable function" is actually a Lebesgue-Borel  measurable function. In other words, consider $\Sigma_1$ to be the Lebesgue $\sigma$-algebra, $\Sigma_2$ to be the Borel $\sigma$-algebra, then to say that $f$ is Lebesgue measurable means that $f$ is $\Sigma_1$-$\Sigma_2$-measurable. 
So if $f$ and $g$ are Lebesgue measurable from $[0,1]$ to $[0,1]$, then,  $f \circ g$ may not be Lebesgue measurable. In fact, for all $A$ in the Borel $\sigma$-algebra, $f^{-1}(A)$ is in the Lebesgue $\sigma$-algebra. Since the Lebesgue $\sigma$-algebra is strictly larger that the Borel $\sigma$-algebra, it may happen that  $f^{-1}(A)$ is NOT in the Borel $\sigma$-algebra and then we can not use the fact that $g$ is Lebesgue measurable to ensure that $g^{-1}(f^{-1}(A))$ is in the Lebesgue $\sigma$-algebra.
2. Borel measurable function 
What is called a "Borel measurable function" is actually a Borel-Borel  measurable function. In other words, consider $\Sigma_1$ and  $\Sigma_2$ to be the Borel $\sigma$-algebra, then to say that $f$ is Borel measurable means that $f$ is $\Sigma_1$-$\Sigma_2$-measurable.
It is easy to prove that if $f$ and $g$ are Borel measurable functions from $[0,1]$ to $[0,1]$, then,  $f \circ g$ is Borel measurable. In fact, for all $A$ in the Borel $\sigma$-algebra, $f^{-1}(A)$ is in the Borel $\sigma$-algebra. Since $g$ is Borel measurable, we have that $g^{-1}(f^{-1}(A))$ is in the Borel $\sigma$-algebra. So $f \circ g$  is Borel measurable. 
Note that: 
2.a. if $f$ is continuous, then $f$ is Borel measurable. 
2.b. if $f$ is Borel measurable, then $f$ is Lebesgue measurable. 
but neither 2.a. or 2.a. above works in the "other direction". 
3. Composition of Borel and Lebesgue measurable functions
It is easy to see that if $f$ is a Borel measurable function from $[0,1]$ to $[0,1]$ and $g$ are Lebesgue measurable function from $[0,1]$ to $[0,1]$, then,  $f \circ g$ is Lebesgue measurable. In fact, for all $A$ in the Borel $\sigma$-algebra, $f^{-1}(A)$ is in the Borel $\sigma$-algebra. Since $g$ is Lebesgue measurable, we have that $g^{-1}(f^{-1}(A))$ is in the Lebesgue $\sigma$-algebra. So $f \circ g$  is Lebesgue measurable. 
