Solution (source code)

= Solution

Part b places $\delta=\widehat\beta-\beta^0$ in the <Lasso cone condition>. Keeping the prediction-error term in the same argument gives
$$
\frac1n\lVert X\delta\rVert_2^2
\leq\frac{3\lambda}{2}\lVert\delta_S\rVert_1
\leq\frac{3\lambda\sqrt{|S|}}2\lVert\delta\rVert_2,
$$
where the second step is the <Cauchy-Schwarz inequality>. The <restricted eigenvalue condition> gives
$$
\frac1n\lVert X\delta\rVert_2^2>\gamma\lVert\delta\rVert_2^2
$$
for nonzero $\delta$ in this cone. Division by $\lVert\delta\rVert_2$ proves
$$
\lVert\widehat\beta-\beta^0\rVert_2
\leq\frac{3\lambda\sqrt{|S|}}{2\gamma}.
$$
The result is immediate when $\delta=0$.