# Complex ** Matrix -- create the tensor product of a complex and a map of modules

## Synopsis

• Operator: **
• Usage:
h = C ** f
h = f ** C
• Inputs:
• C, , over a ring $R$
• f, , defining a homomorphism from the $R$-module $M$ to the $R$-module $N$
• Outputs:
• h, , from $C \otimes M$ to $C \otimes N$

## Description

For any chain complex $C$, a map $f \colon M \to N$ of $R$-modules induces a morphism $C \otimes f$ of chain complexes from $C \otimes M$ to $C \otimes N$. This method returns this map of chain complexes.

 i1 : R = ZZ/101[a..d]; i2 : I = ideal(c^2-b*d, b*c-a*d, b^2-a*c) 2 2 o2 = ideal (c - b*d, b*c - a*d, b - a*c) o2 : Ideal of R i3 : J = ideal(I_0, I_1) 2 o3 = ideal (c - b*d, b*c - a*d) o3 : Ideal of R i4 : C = koszulComplex vars R 1 4 6 4 1 o4 = R <-- R <-- R <-- R <-- R 0 1 2 3 4 o4 : Complex i5 : f = map(R^1/I, R^1/J, 1) o5 = | 1 | o5 : Matrix i6 : C ** f o6 = 0 : cokernel | c2-bd bc-ad b2-ac | <--------- cokernel | c2-bd bc-ad | : 0 | 1 | 1 : cokernel {1} | c2-bd bc-ad b2-ac 0 0 0 0 0 0 0 0 0 | <------------------- cokernel {1} | c2-bd bc-ad 0 0 0 0 0 0 | : 1 {1} | 0 0 0 c2-bd bc-ad b2-ac 0 0 0 0 0 0 | {1} | 1 0 0 0 | {1} | 0 0 c2-bd bc-ad 0 0 0 0 | {1} | 0 0 0 0 0 0 c2-bd bc-ad b2-ac 0 0 0 | {1} | 0 1 0 0 | {1} | 0 0 0 0 c2-bd bc-ad 0 0 | {1} | 0 0 0 0 0 0 0 0 0 c2-bd bc-ad b2-ac | {1} | 0 0 1 0 | {1} | 0 0 0 0 0 0 c2-bd bc-ad | {1} | 0 0 0 1 | 2 : cokernel {2} | c2-bd bc-ad b2-ac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | <----------------------- cokernel {2} | c2-bd bc-ad 0 0 0 0 0 0 0 0 0 0 | : 2 {2} | 0 0 0 c2-bd bc-ad b2-ac 0 0 0 0 0 0 0 0 0 0 0 0 | {2} | 1 0 0 0 0 0 | {2} | 0 0 c2-bd bc-ad 0 0 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 c2-bd bc-ad b2-ac 0 0 0 0 0 0 0 0 0 | {2} | 0 1 0 0 0 0 | {2} | 0 0 0 0 c2-bd bc-ad 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 0 0 0 c2-bd bc-ad b2-ac 0 0 0 0 0 0 | {2} | 0 0 1 0 0 0 | {2} | 0 0 0 0 0 0 c2-bd bc-ad 0 0 0 0 | {2} | 0 0 0 0 0 0 0 0 0 0 0 0 c2-bd bc-ad b2-ac 0 0 0 | {2} | 0 0 0 1 0 0 | {2} | 0 0 0 0 0 0 0 0 c2-bd bc-ad 0 0 | {2} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c2-bd bc-ad b2-ac | {2} | 0 0 0 0 1 0 | {2} | 0 0 0 0 0 0 0 0 0 0 c2-bd bc-ad | {2} | 0 0 0 0 0 1 | 3 : cokernel {3} | c2-bd bc-ad b2-ac 0 0 0 0 0 0 0 0 0 | <------------------- cokernel {3} | c2-bd bc-ad 0 0 0 0 0 0 | : 3 {3} | 0 0 0 c2-bd bc-ad b2-ac 0 0 0 0 0 0 | {3} | 1 0 0 0 | {3} | 0 0 c2-bd bc-ad 0 0 0 0 | {3} | 0 0 0 0 0 0 c2-bd bc-ad b2-ac 0 0 0 | {3} | 0 1 0 0 | {3} | 0 0 0 0 c2-bd bc-ad 0 0 | {3} | 0 0 0 0 0 0 0 0 0 c2-bd bc-ad b2-ac | {3} | 0 0 1 0 | {3} | 0 0 0 0 0 0 c2-bd bc-ad | {3} | 0 0 0 1 | 4 : cokernel {4} | c2-bd bc-ad b2-ac | <------------- cokernel {4} | c2-bd bc-ad | : 4 {4} | 1 | o6 : ComplexMap i7 : f ** C o7 = 0 : cokernel | c2-bd bc-ad b2-ac | <--------- cokernel | c2-bd bc-ad | : 0 | 1 | 1 : cokernel {1} | c2-bd 0 0 0 bc-ad 0 0 0 b2-ac 0 0 0 | <------------------- cokernel {1} | c2-bd 0 0 0 bc-ad 0 0 0 | : 1 {1} | 0 c2-bd 0 0 0 bc-ad 0 0 0 b2-ac 0 0 | {1} | 1 0 0 0 | {1} | 0 c2-bd 0 0 0 bc-ad 0 0 | {1} | 0 0 c2-bd 0 0 0 bc-ad 0 0 0 b2-ac 0 | {1} | 0 1 0 0 | {1} | 0 0 c2-bd 0 0 0 bc-ad 0 | {1} | 0 0 0 c2-bd 0 0 0 bc-ad 0 0 0 b2-ac | {1} | 0 0 1 0 | {1} | 0 0 0 c2-bd 0 0 0 bc-ad | {1} | 0 0 0 1 | 2 : cokernel {2} | c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 0 b2-ac 0 0 0 0 0 | <----------------------- cokernel {2} | c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 0 | : 2 {2} | 0 c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 0 b2-ac 0 0 0 0 | {2} | 1 0 0 0 0 0 | {2} | 0 c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 | {2} | 0 0 c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 0 b2-ac 0 0 0 | {2} | 0 1 0 0 0 0 | {2} | 0 0 c2-bd 0 0 0 0 0 bc-ad 0 0 0 | {2} | 0 0 0 c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 0 b2-ac 0 0 | {2} | 0 0 1 0 0 0 | {2} | 0 0 0 c2-bd 0 0 0 0 0 bc-ad 0 0 | {2} | 0 0 0 0 c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 0 b2-ac 0 | {2} | 0 0 0 1 0 0 | {2} | 0 0 0 0 c2-bd 0 0 0 0 0 bc-ad 0 | {2} | 0 0 0 0 0 c2-bd 0 0 0 0 0 bc-ad 0 0 0 0 0 b2-ac | {2} | 0 0 0 0 1 0 | {2} | 0 0 0 0 0 c2-bd 0 0 0 0 0 bc-ad | {2} | 0 0 0 0 0 1 | 3 : cokernel {3} | c2-bd 0 0 0 bc-ad 0 0 0 b2-ac 0 0 0 | <------------------- cokernel {3} | c2-bd 0 0 0 bc-ad 0 0 0 | : 3 {3} | 0 c2-bd 0 0 0 bc-ad 0 0 0 b2-ac 0 0 | {3} | 1 0 0 0 | {3} | 0 c2-bd 0 0 0 bc-ad 0 0 | {3} | 0 0 c2-bd 0 0 0 bc-ad 0 0 0 b2-ac 0 | {3} | 0 1 0 0 | {3} | 0 0 c2-bd 0 0 0 bc-ad 0 | {3} | 0 0 0 c2-bd 0 0 0 bc-ad 0 0 0 b2-ac | {3} | 0 0 1 0 | {3} | 0 0 0 c2-bd 0 0 0 bc-ad | {3} | 0 0 0 1 | 4 : cokernel {4} | c2-bd bc-ad b2-ac | <------------- cokernel {4} | c2-bd bc-ad | : 4 {4} | 1 | o7 : ComplexMap i8 : f' = random(R^2, R^{-1, -1, -1}) o8 = | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | 2 3 o8 : Matrix R <--- R i9 : C ** f' 2 3 o9 = 0 : R <--------------------------------------------------------- R : 0 | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | 8 12 1 : R <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- R : 1 {1} | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 0 0 0 | {1} | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 0 0 0 | {1} | 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 | {1} | 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 | {1} | 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 | {1} | 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 | {1} | 0 0 0 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | {1} | 0 0 0 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | 12 18 2 : R <----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- R : 2 {2} | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | {2} | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | {2} | 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 0 0 0 0 0 0 | {2} | 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 | {2} | 0 0 0 0 0 0 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 | {2} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | {2} | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | 8 12 3 : R <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- R : 3 {3} | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 0 0 0 | {3} | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 0 0 0 | {3} | 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 0 0 0 | {3} | 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 0 0 0 | {3} | 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d 0 0 0 | {3} | 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d 0 0 0 | {3} | 0 0 0 0 0 0 0 0 0 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | {3} | 0 0 0 0 0 0 0 0 0 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | 2 3 4 : R <------------------------------------------------------------- R : 4 {4} | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | {4} | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | o9 : ComplexMap i10 : f' ** C 2 3 o10 = 0 : R <--------------------------------------------------------- R : 0 | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | 8 12 1 : R <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- R : 1 {1} | 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d 0 0 0 | {1} | 0 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d 0 0 | {1} | 0 0 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d 0 | {1} | 0 0 0 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d | {1} | 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d 0 0 0 | {1} | 0 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d 0 0 | {1} | 0 0 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d 0 | {1} | 0 0 0 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d | 12 18 2 : R <----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- R : 2 {2} | 24a-36b-30c-29d 0 0 0 0 0 -8a-22b-29c-24d 0 0 0 0 0 34a+19b-47c-39d 0 0 0 0 0 | {2} | 0 24a-36b-30c-29d 0 0 0 0 0 -8a-22b-29c-24d 0 0 0 0 0 34a+19b-47c-39d 0 0 0 0 | {2} | 0 0 24a-36b-30c-29d 0 0 0 0 0 -8a-22b-29c-24d 0 0 0 0 0 34a+19b-47c-39d 0 0 0 | {2} | 0 0 0 24a-36b-30c-29d 0 0 0 0 0 -8a-22b-29c-24d 0 0 0 0 0 34a+19b-47c-39d 0 0 | {2} | 0 0 0 0 24a-36b-30c-29d 0 0 0 0 0 -8a-22b-29c-24d 0 0 0 0 0 34a+19b-47c-39d 0 | {2} | 0 0 0 0 0 24a-36b-30c-29d 0 0 0 0 0 -8a-22b-29c-24d 0 0 0 0 0 34a+19b-47c-39d | {2} | 19a+19b-10c-29d 0 0 0 0 0 -38a-16b+39c+21d 0 0 0 0 0 -18a-13b-43c-15d 0 0 0 0 0 | {2} | 0 19a+19b-10c-29d 0 0 0 0 0 -38a-16b+39c+21d 0 0 0 0 0 -18a-13b-43c-15d 0 0 0 0 | {2} | 0 0 19a+19b-10c-29d 0 0 0 0 0 -38a-16b+39c+21d 0 0 0 0 0 -18a-13b-43c-15d 0 0 0 | {2} | 0 0 0 19a+19b-10c-29d 0 0 0 0 0 -38a-16b+39c+21d 0 0 0 0 0 -18a-13b-43c-15d 0 0 | {2} | 0 0 0 0 19a+19b-10c-29d 0 0 0 0 0 -38a-16b+39c+21d 0 0 0 0 0 -18a-13b-43c-15d 0 | {2} | 0 0 0 0 0 19a+19b-10c-29d 0 0 0 0 0 -38a-16b+39c+21d 0 0 0 0 0 -18a-13b-43c-15d | 8 12 3 : R <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- R : 3 {3} | 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d 0 0 0 | {3} | 0 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d 0 0 | {3} | 0 0 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d 0 | {3} | 0 0 0 24a-36b-30c-29d 0 0 0 -8a-22b-29c-24d 0 0 0 34a+19b-47c-39d | {3} | 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d 0 0 0 | {3} | 0 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d 0 0 | {3} | 0 0 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d 0 | {3} | 0 0 0 19a+19b-10c-29d 0 0 0 -38a-16b+39c+21d 0 0 0 -18a-13b-43c-15d | 2 3 4 : R <------------------------------------------------------------- R : 4 {4} | 24a-36b-30c-29d -8a-22b-29c-24d 34a+19b-47c-39d | {4} | 19a+19b-10c-29d -38a-16b+39c+21d -18a-13b-43c-15d | o10 : ComplexMap i11 : assert isWellDefined(C ** f') i12 : assert isWellDefined(f' ** C)

Tensoring with a complex defines a functor from the category of $R$-modules to the category of complexes over $R$.

 i13 : f'' = random(source f', R^{-2,-2}) o13 = {1} | -28a-47b+38c+2d -16a+7b+15c-23d | {1} | 16a+22b+45c-34d 39a+43b-17c-11d | {1} | -48a-47b+47c+19d 48a+36b+35c+11d | 3 2 o13 : Matrix R <--- R i14 : assert((C ** f') * (C ** f'') == C ** (f' * f'')) i15 : assert(C ** id_(R^{-1,-2,-3}) == id_(C ** R^{-1,-2,-3}))