# Decomposing a controlled phase gate into CNOTs

I'm trying to understand the following derivation of decomposing a controlled $$R_k$$ (phase) gate into a combination of CNOTs and single qubit gates, but there's one main thing about the process that I'm not following and that is:

What is the effect that the CNOT gate is having on $$|\psi_{mn} \rangle$$?

I thought that CNOT simply flipped the target bit if the control qubit was 1, but in that answer, it doesn't seem like the CNOT is having this effect at all. The arbitrary state just seems to be staying the same (in the first example where they show the effect of CNOT on $$|\psi_{mn} \rangle$$)?

Then in the full derivation later in the post, the CNOT seems to be removing parts of the phases from the qubits? I don't quite understand that either.

In the linked post, $$|\psi_{mn}\rangle$$ is defined as $$|\psi_{mn}\rangle = a_{00}|0_m 0_n\rangle + a_{10}|1_m 0_n\rangle + a_{01}|0_m 1_n\rangle + a_{11}|1_m 1_n\rangle,$$ and the action of a CNOT operating between $$m$$-th and $$n$$-th qubit is written as $$\mathrm{CNOT}^{(m,n)}|\psi_{mn}\rangle = a_{00}|0_m 0_n\rangle + a_{10}|1_m 0_n\rangle + a_{11}|0_m 1_n\rangle + a_{01}|1_m 1_n\rangle.$$
Note how the last two coefficients are swapped in the second expression, so the expressions are not identical. Here, $$\mathrm{CNOT}^{(m,n)}$$ denotes a CNOT having the $$m$$-th qubit as control and the $$n$$-th one as target, so its action on the basis states is: \begin{align} \mathrm{CNOT}^{(m,n)}|0_m 0_n\rangle &= |0_m 0_n\rangle, \\ \mathrm{CNOT}^{(m,n)}|1_m 0_n\rangle &= |1_m 0_n\rangle, \\ \mathrm{CNOT}^{(m,n)}|1_m 1_n\rangle &= |0_m 1_n\rangle, \\ \mathrm{CNOT}^{(m,n)}|0_m 1_n\rangle &= |1_m 1_n\rangle. \end{align}