Confusion regarding $Der_R(X,M)$ and $A\ltimes M$ I am trying to prove the following claim from the paper "Model Categories and Simplicial Methods" by Goerss and Schemmerhorn. Given a commutative $R$-algebra's $A, X$ (not necessarily unital) with $\varepsilon \colon X \to A$ an homomorphism and an $A$-(bi)module $M$. There is the following $R$-module isomorphism:
$$\mathbf{Alg}_R/A(X, A \ltimes M) \cong Der_R(X, M)$$
where $\mathbf{Alg}_R/A$ is the category of commutative $R$-algebras over $A$ and $Der_R(X, M)$ the the set of maps $\partial \colon X\to M$ such that $\partial(xy) = \partial(x)y + x\partial(y)$. This isomorphism is confusing me a lot. And $A\ltimes M$ denotes the direct sum $A\oplus M$ of $R$-modules with the multiplication $(a, m)(b,n) = (ab, an + bm)$. This seems to be well-known but I am getting confused and would like a hint as to where I'm going wrong. Maybe my definition of $A \ltimes M$ is wrong?
I have defined the map $\psi\colon \mathbf{Alg}_R/A(X, A \ltimes M) \to Der_R(X, M)$ by $\psi(f) = f_2$ where $f(x) = (f_1(x), f_2(x))$. I have proven that $f_1 = \varepsilon \colon X \to A$ using the definition of $\mathbf{Alg}_R/A$ but when thinking about injectivity if we assume that $f\in \mathbf{Alg}_R/A(X, A \ltimes M)$ such that $\psi(f)(x) = 0$ for all $x \in X$. Then $f_1 = \varepsilon$ is the zero map, which need not be true. The other idea I had is to try the inverse map $\phi\colon Der_R(X, M)\to \mathbf{Alg}_R/A(X, A \ltimes M)$ by sending $d\mapsto (\varepsilon, d)$ by then there is a problem with linearity since $ad \mapsto (\varepsilon, ad)\neq a(\varepsilon, d)$ for $a \in R$.
 A: Your map $\psi$ is correct, but note that a priori we don't have a natural additive structure on $(\textbf{Alg}_R/A)(X,A\ltimes M)$ (the sum of two multiplicative maps need not be multiplicative and as you said, the first coordinate is fixed to be $\varepsilon$). So $\psi$ is a priori just a map of sets. With what you proved it is also straightforward to see that $\psi$ is injective: as an element $f\in (\textbf{Alg}_R/A)(X,A\ltimes M)$ is always of the form $x\mapsto (\varepsilon(x),f_2(x))$, it is completely determined by $\psi(f)=f_2$.
To prove surjectivity, take a derivation $\partial\in\operatorname{Der}_R(X,M)$. Let us define $f:X\to A\ltimes M$ by $f(x)=(\epsilon(x),\partial(x))$. Then $f$ is clearly $R$-linear, and we have
$$
f(xy)=(\epsilon(xy),\partial(xy))=(\epsilon(x)\epsilon(y),\partial(x)y+x\partial(y))=(\epsilon(x),\partial(x))(\epsilon(y),\partial(y))
$$
Here, I presume that the left $A$-module structure on $M$ is the same as the right $A$-module structure (given by commutativity of $A$), and that the $X$-module sturcture on $M$ is given by $xm:=\varepsilon(x)m$. Let me know if this isn't the case.
So $f\in(\textbf{Alg}_R/A)(X,A\ltimes M)$ and $\psi(f)=\partial$. Hence $\psi$ is also surjective, and therefore a bijection.
