# Simplifying equation for two qubit syndrome extraction code

In the paper Quantum Error Correction: An Introductory Guide, the author gives the following formula for a simple two qubit code (eq. 19 on the paper).

$$E|\psi\rangle_L|0\rangle_A \xrightarrow{\text{syndrome extraction}} \frac{1}{2}(\mathbb{I}_1\mathbb{I}_2 + Z_1Z_2) E|\psi\rangle_L|0\rangle_A + \frac{1}{2}(\mathbb{I}_1\mathbb{I}_2 - Z_1Z_2) E|\psi\rangle_L|1\rangle_A$$

For reference, the circuit corresponding to this code is:

Where $$E \in \{\mathbb{I}, X_1, X_2, X_1X_2\}$$ is an error gate. Now, after giving that equation, the paper says

Now, consider the case where $$E = X_1$$ so that the logical state occupies the error space $$E|\psi\rangle_L \in \mathcal{F}$$. In this scenario, it can be seen that the first term in equation (19) goes to zero. [...] Considering the other error patterns, we see that if the logical state is in the codespace (i.e., if $$E = \{\mathbb{I}, X_1X_2\}$$) then the ancilla is measured as ‘0’.

$$\mathcal{F}$$ is the error space, which contains the states $$|01\rangle$$ and $$|10\rangle$$. By making $$|\psi\rangle_L = \alpha|0\rangle_L + \beta|1\rangle_L$$ and working out the equation with $$E = X_1$$ and $$E = X_2$$ I can see how the first term cancels and we are left with $$|1\rangle_A$$ in the ancilla qubit. Similarly with $$E = X_1X_2$$ and $$E = \mathbb{I}$$ I can see how we are left with $$|0\rangle_A$$ in the ancilla qubit.

As you can see, I needed to expand the logical qubit to see how the code is able to measure the error. However, I feel like it is implied in the paper that you can figure this out by just substituting $$E$$ and leaving $$|\psi\rangle_L$$ as it is. How can I show this? For example, in the case that $$E=X_1$$, how does the expression

$$\frac{1}{2}(\mathbb{I}_1\mathbb{I}_2 + Z_1Z_2) X_1|\psi\rangle_L|0\rangle_A + \frac{1}{2}(\mathbb{I}_1\mathbb{I}_2 - Z_1Z_2) X_1|\psi\rangle_L|1\rangle_A$$

simplify such that the first term disappears, without making $$|\psi\rangle_L = \alpha|0\rangle_L + \beta|1\rangle_L$$? I tried doing it with matrix multiplication but the term didn't disappear.