Zagier, in his paper 'Some Surprising Consequences of the Cohomology of SL$\_2(\bf{ Z})$' ([link](http://people.mpim-bonn.mpg.de/zagier/files/tex/ConsequencesCohomologySL/fulltext.pdf), p. 6), studies the action of $\Gamma=PSL\_2(\bf Z)$ on a vector space $V$, denoting the action by $v\ |\ \gamma$. Recall the following presentation of $\Gamma=\langle S,U\ | \ S^2,U^3=1\rangle$, where:
$$S=\begin{pmatrix}0 & -1\\ 1 & 0\end{pmatrix},
U=\begin{pmatrix}1 & -1\\ 1 & 0\end{pmatrix},
T=\begin{pmatrix}1&1\\0&1\end{pmatrix},
$$
satisfying $S=UT$ and $\begin{pmatrix}1&0\\1&1\end{pmatrix}=U^2S$. Also, call $f$ a cocyle if $f(\gamma\_1\gamma\_2)=f(\gamma\_1)|\gamma\_2+f(\gamma\_2).$


Now, Zagier makes the following claim:



> 
> The function $f:\Gamma\to V$ such that $f(T)=0$ and $f(S)=Q$ can be extended to a cocycle if and only if $Q$ satisfies the conditions $Q|{(1+S)=0}$ and $Q|{(1+U+U^2)}=0$.
> 
> 
> 


The $\Rightarrow$ direction is clear, but the $\Leftarrow$ direction does not seem obvious by direct computation, since in that case one does not know much about $f$. Is there some general fact needed to see this?



On a claim of Zagier on extending a map to cocycle
Define a function $\widehat f$ from $\Gamma$ to the semidirect product $\Gamma \ltimes V$ by $\widehat f(\gamma) = \bigl( \gamma, f(\gamma) \bigr)$. Saying that $f$ is a cocycle is exactly the same as saying that $\widehat f$ is a homomorphism. Therefore, $f$ extends to a cocycle if and only if $\widehat f(S)^2 = 1$ and $\widehat f(U)^3 = 1$. 


Under the given conditions, we have
 $$ \widehat f(S)^2 = (S, Q)^2 = (S^2 , Q|S + Q) = (1,0) .$$
Also,
 $$ \widehat f(U) = \widehat f(S) \cdot \widehat f(T)^{-1}
 = (S,Q) \cdot (T,0)^{-1} = (ST^{-1}, Q|T^{-1}) = (U, -Q|U) ,$$
so
 $$ \widehat f(U)^3 = (U, -Q|U)^3 = (U^3, -Q(U^3 + U^2 + U) \bigr) = (1,0) .$$


