Let $a,b \in \mathbb{R}$ and ${\{{u_n}}\}_{n\in\mathbb{N}}$ bounded in $X:=L^P\left([a,b]\right)$ with $1 \leq p < \infty$ such that:
$\forall\, \varepsilon>0,\,\exists\,\,\delta>0$ such that $|h|\leq \delta \implies\displaystyle\int\limits_c^{d} \left|u_n(x+h)-u_n(x)\right|^p\,dx \leq \varepsilon^p$
$\forall\,\,[c,d]\subset \left(a+|h|,b-|h|\right)$
Let's consider
$$A_Mu(x):=\frac{1}{|I_j|} \int\limits_{I_j}u(y)\,dy,\,\, x\in I_j:=\left[a+(j-1)\frac{b-a}{M},a+j\frac{b-a}{M}\right)$$
i) Use the fact that $\mathrm{ran}(A)$ has finite dimension to show that $\{{A_Mu_n\}}_{n\in \mathbb{N}}$ has a convergent subsequence for any fixed $M$.
ii) Show , dividing the integral in $I_1,\ldots,I_M$ and using Fubini's theorem that for some $\delta>0$ , as before and $\frac{b-a}{M}\leq \delta $ then $\| u_n- A_Mu_n\|_p\leq 2^{1/p} \varepsilon$
iii)Show using the prevoius points that $\{u_n\} $ has a convergent subsequence.
iv) Show that if $u\in W^{1,1}((a,b)) $ for $a,b \in \mathbb{R}$ then $\int_c^{d} |u_n(x+h)-u_n(x)|^p \leq(2\|u\|_{L^\infty([a,b])})^{p-1}\|u'\|_{L^1([a,b])}h$ , $\forall [c,d] \subset (a+|h|,b-|h|)$.
Deduce , that $W^{1,1}((a,b)) $ is compactly embedded in $L^p([a,b])$ if $1\leq p < \infty$
Could you please help me to solve this I have thought of several things but haven't reached anything consisten and don't know how to approach it .
For the first part, denote by $c_{M,j}(u)$ the quantity $\frac{1}{|I_j|} \int\limits_{I_j}u(y)\,dy$. In this way, $A_Mu(x)=\sum_{j=1}^Mc_{M,j}(u)\mathbf{1}_{I_j}(x)$. Using Hölder's inequality, we can see that the sequences $\left(c_{M,j}(u_n))\right)_{n\geqslant 1}$ are bounded, hence extracting successive subsequences gives a subsequence $(u_{n_k})$ such that for all $j\in\{1,\dots,M\}$, $ \left(c_{M,j}(u_{n_k}))\right)_{k\geqslant 1}$ converges to some $c_j$. Then it remains to show that $A_Mu_{n_k}\to \sum_{j=1}^Mc_j\mathbf{1}_{I_j}$ in $L^p$.