# Revision history [back]

According to the documentation for ChainComplex, the default degree for the differential is +1. So when you say ChainComplex([d0,d1,d2]), you are defining a chain complex with maps

d_0: ZZ^0 --> ZZ^3,
d_1: ZZ^3 --> ZZ^4,
d_2: ZZ^4 --> ZZ^2.


sage: C = ChainComplex([d0.transpose(), d1.transpose(), d2.transpose()], degree=-1)

sage: C.homology()

Now, regarding kernels, you could instead use left_kernel or right_kernel, depending on which side the matrix is acting, to make things more explicit. The vectors v so that v*A=0 is the left kernel of A, for example. In your case, the differential d2 is injective, so it has zero kernel, so the homology in that degree is zero. The image of d2 is equal to the kernel of d1, so the homology in degree 1 is zero. I haven't thought about doing the degree zero case by hand, but see no reason not to trust Sage's answer of Z x C2.