It appears that we can generalize cochain complex to quasi-cochain complex, that still allow us to define cohomology.


**Definition:**
A quasi-cochain complex is a sequence of commutative monoids $M\_n$ connected
by monoid-homomorphisms $d\_n$:
\begin{align}
\cdots \overset{d\_{n-1}}{\rightarrow}
 M\_n
\overset{d\_n}{\rightarrow}
 M\_{n+1}
\overset{d\_{n+1}}{\rightarrow}
 M\_{n+2}
\overset{d\_{n+2}}{\rightarrow} \cdots ,
\end{align}
such that
$d\_{n+1}d\_n$ maps $M\_n$ to $0\_{n+2}$ (the identity in $M\_{n+2}$), 
the subset of $M\_n$, $A\_n=\{a\_n|d\_n(a\_n)=0,a\_n\in M\_n\}$
is an Abelian group, --Edit-- and the Img$(d\_n)$ is also an Abelian group. 


In the quasi-cochain complex, we can define the cohomology classes
since both $\text{Ker}(d\_n)$ and $\text{Img}(d\_{n-1})$ are Abelian groups:
$H^n=\text{Ker}(d\_n)/\text{Img}(d\_{n-1})$.


I wonder 


(1) if the above definition is OK


(2) Has any one studied such a quasi-cochain complex.



A generalization of cochain complex: quasi-cochain complex
Kong Liang told me a proof for
the statement **if both kernels and images of $d\_n$ are Abelian groups then all the monoids $M\_n$ are Abelian groups**.


Let $f: A \to B$ be a surjective morphism between two commutative monoids.
Surjectivity means $B =$ Img$(f)$.
Assume that Ker$(f)$ is an Abelian group and $B =$ Img$(f)$ is an Abelian group.


Then $A$ is automatically an Abelian group.


Proof:


1. it is enough to show that any element $a$ in $A$ has a right inverse $a'$,
i.e. $a a' = 1$. (by the commutativity, $a' a = a a' = 1$.)
Notice that if such $a'$ exists, it must be unique. Otherwise,
let $a'$ and $a''$ be such that $a a' =1 = a a''$.
Then we have $a' = a' a a'' = a''$ (use commutativity)
2. For any $a$ in $A$, let $b$ be the inverse of $f( a )$
and let $c$ be an element in $A$ such that $f( c ) = b$. Then we have
$f(a c) = f( a ) f( c ) = f( a ) b =1$.
Therefore, $a c$ is in the Ker$(f)$. Since Ker$(f)$ is an Abelian group,
there is an element $d \in A$ such that $acd = 1$.
Hence $cd$ is the right inverse of $a$.


Therefore the quasi-cochain complex is the usual cochain complex, and there is a lot of work on cochain complex, as well as a lot of theorems. :-)
Thanks, @ Fernando Muro !


