# map(Complex,Complex,List) -- make a map of chain complexes

## Synopsis

• Function: map
• Usage:
f = map(D, C, L)
• Inputs:
• C, ,
• D, ,
• L, a list, consisting of either matrices, or lists of maps of complexes
• Optional inputs:
• Degree => an integer, default value null, the degree of the resulting map
• DegreeLift => ..., default value null, unused
• DegreeMap => ..., default value null, unused
• Outputs:
• f, , from $C$ to $D$

## Description

A map of complexes $f \colon C \rightarrow D$ of degree $d$ is a sequence of maps $f_i \colon C_i \rightarrow D_{d+i}$. No relationship between the maps $f_i$ and and the differentials of either $C$ or $D$ is assumed.

This method has two very different usages. The first is to construct a chain complex map from a list of matrices. The second constructs a chain complex map from essentially a block matrix whose entries are chain complex maps.

In the first case, we construct a map of chain complexes by specifying the individual maps between the terms.

 i1 : R = ZZ/101[a,b,c]; i2 : C = freeResolution coker matrix{{a^2-b^2,b^3-c^3,c^4}} 1 3 3 1 o2 = R <-- R <-- R <-- R 0 1 2 3 o2 : Complex i3 : D = freeResolution coker vars R 1 3 3 1 o3 = R <-- R <-- R <-- R 0 1 2 3 o3 : Complex i4 : L = {map(D_0, C_0, 1), map(D_1, C_1, {{a, 0, 0}, {-b, b^2, 0}, {0, -c^2, c^3}}), map(D_2, C_2, {{a*b^2, 0, 0}, {-a*c^2, a*c^3, 0}, {b*c^2, -b*c^3, b^2*c^3}}), map(D_3, C_3, {{a*b^2*c^3}}) } o4 = {| 1 |, {1} | a 0 0 |, {2} | ab2 0 0 |, {3} | ab2c3 |} {1} | -b b2 0 | {2} | -ac2 ac3 0 | {1} | 0 -c2 c3 | {2} | bc2 -bc3 b2c3 | o4 : List i5 : f = map(D, C, L) 1 1 o5 = 0 : R <--------- R : 0 | 1 | 3 3 1 : R <--------------------- R : 1 {1} | a 0 0 | {1} | -b b2 0 | {1} | 0 -c2 c3 | 3 3 2 : R <-------------------------- R : 2 {2} | ab2 0 0 | {2} | -ac2 ac3 0 | {2} | bc2 -bc3 b2c3 | 1 1 3 : R <----------------- R : 3 {3} | ab2c3 | o5 : ComplexMap i6 : assert isWellDefined f i7 : assert isHomogeneous f i8 : assert(degree f == 0) i9 : assert isComplexMorphism f

In the second, we construct a map of chain complexes via a block matrix whose individual entries are already maps of chain complexes. We illustrate by constructing a mapping cone.

 i10 : f = extend(D,C,id_(R^1)) 1 1 o10 = 0 : R <--------- R : 0 | 1 | 3 3 1 : R <--------------------- R : 1 {1} | a 0 0 | {1} | -b b2 0 | {1} | 0 -c2 c3 | 3 3 2 : R <-------------------------- R : 2 {2} | ab2 0 0 | {2} | -ac2 ac3 0 | {2} | bc2 -bc3 b2c3 | 1 1 3 : R <----------------- R : 3 {3} | ab2c3 | o10 : ComplexMap i11 : assert(degree f == 0) i12 : g = map(D, C[-1], f[-1], Degree => -1) -- a variant of f having degree -1 1 1 o12 = 0 : R <--------- R : 1 | 1 | 3 3 1 : R <--------------------- R : 2 {1} | a 0 0 | {1} | -b b2 0 | {1} | 0 -c2 c3 | 3 3 2 : R <-------------------------- R : 3 {2} | ab2 0 0 | {2} | -ac2 ac3 0 | {2} | bc2 -bc3 b2c3 | 1 1 3 : R <----------------- R : 4 {3} | ab2c3 | o12 : ComplexMap i13 : cf = map(E = C[-1] ++ D, E, { {dd^(C[-1]), 0}, { g, dd^D} }) 1 4 o13 = 0 : R <--------------- R : 1 | 1 a b c | 4 6 1 : R <-------------------------------------- R : 2 {0} | -a2+b2 -b3+c3 -c4 0 0 0 | {1} | a 0 0 -b -c 0 | {1} | -b b2 0 a 0 -c | {1} | 0 -c2 c3 0 a b | 6 4 2 : R <----------------------------------- R : 3 {2} | b3-c3 c4 0 0 | {3} | -a2+b2 0 c4 0 | {4} | 0 -a2+b2 -b3+c3 0 | {2} | ab2 0 0 c | {2} | -ac2 ac3 0 -b | {2} | bc2 -bc3 b2c3 a | 4 1 3 : R <------------------ R : 4 {5} | -c4 | {6} | b3-c3 | {7} | -a2+b2 | {3} | ab2c3 | o13 : ComplexMap i14 : assert isWellDefined cf i15 : assert(degree cf == -1)

We convert this map of complexes cf into the differential of the mapping cone. For the following constructor, the source and target of the input must be identical, in this case the chain complex $E$.

 i16 : conef = complex cf 1 4 6 4 1 o16 = R <-- R <-- R <-- R <-- R 0 1 2 3 4 o16 : Complex i17 : assert isWellDefined conef i18 : assert(conef == cone f)