# Linear Algebra over a Ring/Chain complexes of finitely generated free modules

Proposition (every chain complex of finitely generated free modules over a Bézout domain is the direct sum of some of its subcomplexes with at most two nonzero terms):
Let
    $\cdots {\overset {\partial }{\longrightarrow }}C_{n+1}{\overset {\partial }{\longrightarrow }}C_{n}{\overset {\partial }{\longrightarrow }}C_{n-1}{\overset {\partial }{\longrightarrow }}\cdots$
be a chain complex whose objects are finitely generated free modules over a Bézout domain $R$. This chain complex is then the countable direct sum of chain complexes of the form
    $\cdots \longrightarrow 0\longrightarrow 0\longrightarrow L_{n+1}\longrightarrow R_{n}\longrightarrow 0\longrightarrow 0\longrightarrow \cdots$,
where $L_{n+1}\leq C_{n+1}$ and $R_{n}\leq C_{n}$.
Proof: We shall construct a direct sum decomposition
    $C_{n}=L_{n}\oplus R_{n}$,
where $R_{n}=\ker \partial$. Once this is accomplished, we have in fact obtained a direct sum decomposition of the initial chain complex, because elements of $R_{n}$ are mapped to zero by $\partial$, and elements of $L_{n}$ are mapped to $R_{n-1}$ due to the chain complex condition $\partial \circ \partial =0$.
In order to achieve this decomposition, we invoke Dedekind's theorem for Bézout domains, which tells us that $\operatorname {im} \partial \leq C_{n-1}$ is finitely generated and free; indeed, it is finitely generated, since a generating set is given by the image (via $\partial$) of a generating set of $C_{n}$. Let thus $b_{1},\ldots ,b_{n}$ be a basis of $\operatorname {im} \partial \leq C_{n-1}$. For each $j\in \{1,\ldots ,n\}$, we choose an arbitrary, but fixed $a_{j}\in \partial ^{-1}(b_{j})$, and then we define $L_{n}:=\langle a_{1},\ldots ,a_{n}\rangle$. This yields the desired direct sum decomposition. Indeed, $L_{n}\cap R_{n}=\{0\}$, since whenever
    $r_{1}a_{1}+\cdots +r_{n}a_{n}=0$
for some elements $r_{1},\ldots ,r_{n}$ of $R$, applying $\partial$ to both sides of this equation and using its $R$-linearity yields
    $r_{1}b_{1}+\cdots +r_{n}b_{n}=0$,
which implies $r_{1}=r_{2}=\cdots =r_{n}=0$. Moreover, $L_{n}+R_{n}=C_{n}$, since if $c\in C_{n}$ is arbitrary, we may select $r_{1},\ldots ,r_{n}\in R$ such that
    $\partial (c)=r_{1}b_{1}+\cdots +r_{n}b_{n}$,
from which we may easily deduce that
    $c-r_{1}a_{1}-\ldots -r_{n}a_{n}\in \ker \partial$. $\Box$
Proposition (every chain complex of finitely generated free modules over a Bézout domain splits as the direct sum of two types of elementary chain complexes):
Let
    $\cdots {\overset {\partial }{\longrightarrow }}C_{n+1}{\overset {\partial }{\longrightarrow }}C_{n}{\overset {\partial }{\longrightarrow }}C_{n-1}{\overset {\partial }{\longrightarrow }}\cdots$
be a chain complex whose objects are finitely generated free modules over a Bézout domain $R$. This chain complex is the countable direct sum of copies of the following two chain complexes:
* $0\longrightarrow R\longrightarrow 0$
* $0\longrightarrow R{\overset {r}{\longrightarrow }}R\longrightarrow 0$ for an element $r\in R$, ie. the arrow represents the function which is given by multiplication by $r$
Proof: Using the notation of the last theorem, we have $C_{n}=L_{n}\oplus R_{n}$, where $L_{n}$ is finitely generated and $R_{n}$ is sent to zero by $\partial$. $\Box$