Well-definedness of some map over $G$-modules Let $G$ be a group and $M,M',M''$ be $G$-modules. Again, I am trying to understand the following section from Milne's Fields and Galois Theory (page 70):

Here, the definition of the map $d: M''^G \to H^1(G, M')$ is described. For an $m'' \in M''^G$, the value $d(m'')$ is the class of the crossed homomorphism $G \to M', \: \sigma \mapsto \sigma m - m$ for a chosen $m \in M$ such that $m$ maps to $m''$ under the map $M \to M''$ from the first sequence.

Question: Why is $d$ well-defined (in particular, why does the definition not depend on the choice of $m$)?

The thing which makes me suspicious also is that $\sigma \mapsto \sigma m - m$ is a principal crossed homomorphism, so it must be $0$ in $H^1(G,M)$, isn't it? But then $d$ would be the zero map which makes me believe that I misunderstood something.
Could you please explain this to me?
 A: The issue here is that a crossed homomorphism $G\to M$ only vanishes in $H^1(G, M')$ if it's of the form $f_{m'}(\sigma) = \sigma m' - m'$ for some $m'\in M'$. The function $\sigma \to \sigma m - m$ happens to map $G$ to $M' \subset M$ as constructed, but we're not assuming $m\in M'$. Similarly, the crossed homomorphism $d(m'')$ is defined only up to addition of $f_{m'}$ for some element $f_m\in M$ with $m\in \ker (M \to M'')$; but the latter module is exactly $M'$ by the exactness of the original sequence, and $f_{m'} = 0$ in $H^1(G, M')$ for all $m'\in M'$. That also means that $d$ isn't the zero map in general, but it does lead to a proof that the long sequence in the post is exact at the $H^1(G, M')$ term.
By the way, if this is your first look at cohomology in general or group cohomology in particular, you might find Brown's "Cohomology of Groups" more useful. Robinson's "Course in the Theory Groups" also has a readable treatment, but it may not cover the types of applications you're interested in for the Galois theory setting. It may be overkill for this specific setting, but the treatment of cohomology in the Hartshorne is also a surprisingly good (given just how dense the book is otherwise) treatment of all the abstract nonsense that goes into cohomology.
A: Why is $d$ well-defined?
A priori $d$ depends on the choice of $m$, so let $m_1$ and $m_2$ be
elements of $M$ with $\pi(m_1)=\pi(m_2)=m''$ (writing $\pi$ for the map
in the exact sequence from $M$ to $M'$). Then $m'=m_1-m_2\in M'$
(where we consider $M'$ as a submodule of $M$).
We have crossed homomorphisms $G\to M'$ given by $\phi_1:\sigma \mapsto \sigma m_1-m_1$
and $\phi_2:\sigma \mapsto \sigma m_2-m_2$. Then $\phi = \phi_1-\phi_2:\sigma \mapsto
\sigma m'-m'$ and so is a principal crossed homomorphism from $G$ to $M'$.
Therefore $\phi_1$ and $\phi_2$ represent the same element of $H^1(G,M')$.
