I am doing my first course in module theory, and our teacher gave us the following exercise, which I am completely stuck on:
Let $R$ be the ring $\mathbb{Z}[x]/(x^2-1)$. An $R$-module is an abelian group $M$ with a map $f : M \to M$ such that $f^2=1$. We say that $M$ has the trivial $R$-module structure if $f$ is the identity map. Show that $\mathbb{Q}$ with the trivial $R$-module structure is a flat $R$-module.
I know that $\mathbb{Q}$ is a flat $\mathbb{Z}$-module, so for an injective map $\psi:L\to M$ of $\mathbb{Z}$-modules, the induced map $1\otimes\psi:\mathbb{Q}\otimes_\mathbb{Z}L \to \mathbb{Q}\otimes_\mathbb{Z}M$ is injective, where $1\otimes\psi(a\otimes b) = a\otimes\psi(b)$. Can I somehow use this to show that $\mathbb{Q}$ is also a flat $R$-module?
Let's use a few general lemmas. Let $A \to B$ be a homomorphism of commutative rings.
Lemma 1. If $M$ is a flat $A$-module, then $M \otimes_A B$ is a flat $B$-module.
Lemma 2. If $A \to B$ is flat* and $N$ is a flat $B$-module, then $N|_A$ (what we often just denote as $N$) is a flat $A$-module. In particular: If $A \to B$ and $B \to C$ are flat ring homomorphisms, then their composition $A \to C$ is flat as well.
*Recall that that this means that $B$ is a flat $A$-module.
Both Lemmas follow easily from the natural isomorphism $(M \otimes_A B) \otimes_B N \cong M \otimes_A N|_A$.
Now, since $\mathbb{Z} \to \mathbb{Q}$ is flat, we conclude with Lemma 1 that $\mathbb{Z}[x]/\langle x^2 - 1 \rangle \to \mathbb{Z}[x]/\langle x^2 - 1 \rangle \otimes_{\mathbb{Z}} \mathbb{Q}$ is flat. This ring is just $\mathbb{Q}[x]/\langle x^2 - 1 \rangle$. By the Chinese Remainder Theorem, the canonical homomorphism $$\mathbb{Q}[x]/\langle x^2 - 1 \rangle \to \mathbb{Q} \times \mathbb{Q},\quad [f] \mapsto (f(1),f(-1))$$ is an isomorphism. (Notice that this is not true over $\mathbb{Z}$, since here the two factors $x+1$ and $x-1$ are coprime, but their principal ideals are not coprime. In fact, one can show that $\mathbb{Z}[x]/\langle x^2 - 1 \rangle$ has no non-trivial idempotent elements, so that it does not decompose as a product of non-trivial rings).
So $\mathbb{Q}$ with the action $x := 1$ is a projective $\mathbb{Q}[x]/\langle x^2-1 \rangle$-module: it is a direct summand of the free module of rank $1$. Projective modules are flat. Thus, $\mathbb{Q}[x]/\langle x^2 - 1 \rangle \to \mathbb{Q}$, $[x] \mapsto 1$ is flat.
Since also $\mathbb{Z}[x]/\langle x^2 - 1 \rangle \to \mathbb{Q}[x]/\langle x^2 - 1 \rangle$ is flat, we conclude with Lemma 2 that $\mathbb{Z}[x]/\langle x^2 - 1 \rangle \to \mathbb{Q}$, $[x] \mapsto 1$ is flat.