# Defining a cocycle

Hello everyone,

I would like to define an arbitrary group cocycle. That is, I want to define a function $f:A\times A\to \mathbb{T}$, where $A$ is my group and $\mathbb{T}$ is the unit circle, such that $f$ satisfies the following rule:

$f(a,b)f(ab,c) = f(b,c)f(a,bc) \quad\forall a,b,c\in A.$

Any help will be appreciated it.

The given property does not uniquely define the function, and so your question is unclear.

Can you provide some Sage-specific details? What have you tried so far?