Let's say I have a discrete-time signal $y[n]$ that is passed through an Ideal Lowpass Filter (impulse response $h[n]$) to get $y_1[n]$. The filter has cutoff frequencies at $\pm \pi/N$ rad.
Now this $y_1[n]$ is downsampled by a factor of $N$ to obtain $z[n]$. I know that $z[n] = y_1[nN] = \sum_{k=-\infty}^{\infty} h[k] \ast y[nN - k]$.
So in order to show this procedure in the frequency domain I can use the fact that convolution in time-domain is equal to multiplication in frequency domain.
As such, the frequency response of $y_1[n]$ in terms of $y[n]$ is simply:
$$Y_1(e^{j\omega}) = H_{LP}(e^{j\omega}) \cdot Y(e^{j\omega})$$
And using the expression for downsampling in frequency domain:
$$Z(e^{j\omega}) = \frac 1N \sum_{k=0}^{N-1} Y_1\left(e^{j\frac{(\omega - 2\pi k)}{N}}\right)$$
Subbing in to the summation should we get this:
$$Z(e^{j\omega}) = \frac 1N \sum_{k=0}^{N-1} H_{LP}\left(e^{j\frac{(\omega - 2\pi k)}{N}}\right) \cdot Y\left(e^{j\frac{(\omega - 2\pi k)}{N}}\right)$$
or this:
$$Z(e^{j\omega}) = \frac{H_{LP}(e^{j\omega})}{N} \sum_{k=0}^{N-1} Y\left(e^{j\frac{(\omega - 2\pi k)}{N}}\right)$$
First of all which one is correct (should $H_{LP}$ be inside the summation?) and if so does this suffice? Or is there a more intuitive way of writing/explaining this procedure?
Edit:
One other minor question. What if we want to show $Z(e^{jω})$ only in terms of $Y(e^{jω})$. Then can we write $H_{LP}$ as $u(ω+π/N)−u(ω−π/N)$ and then shift and scale it inside the summation as follows: $$Z(e^{j\omega}) = \frac{1}{N} \sum_{k=0}^{N-1} \left(u(\frac{(\omega - 2\pi k)}{N} + \pi/N) - u(\frac{(\omega - 2\pi k)}{N} - \pi/N) \right) \cdot Y\left(e^{j\frac{(\omega - 2\pi k)}{N}}\right)$$