# canonicalMap -- gets the natural map arising from various constructions

## Synopsis

• Usage:
g = canonicalMap(D, C)
• Inputs:
• C, ,
• D, ,
• Optional inputs:
• UseTarget => , default value null, determines the choice of canonical map when $D$ is a cylinder of a map $f$ and the source and target of $f$ are the same
• Outputs:
• g, ,

## Description

A canonical map, also called a natural map, is a map that arises naturally from the definition or the construction of the object.

The following six constructions are supported: kernel, cokernel, image, coimage, cone, and cylinder.

The kernel of a complex map comes with a natural injection into the source complex. This natural map is always a complex morphism.

 i1 : R = ZZ/101[a,b,c,d]; i2 : D = freeResolution coker vars R 1 4 6 4 1 o2 = R <-- R <-- R <-- R <-- R 0 1 2 3 4 o2 : Complex i3 : C = (freeResolution coker matrix"a,b,c")[1] 1 3 3 1 o3 = R <-- R <-- R <-- R -1 0 1 2 o3 : Complex i4 : f = randomComplexMap(D, C, Cycle=>true) 1 o4 = -1 : 0 <----- R : -1 0 1 3 0 : R <------------------------------------------------------- R : 0 | -46a+17b-8c+26d -38a-2b+23c-10d -30a-18b-9c+37d | 4 3 1 : R <----------------------------------------------------------- R : 1 {1} | 38a+3b-10c+25d 30a+36b+14c-9d -47b-19c+2d | {1} | -47a+17b-29c-8d -18a+39c-22d -24a+18b-32c-27d | {1} | -13a+21b-34d 50a-22b-8c+24d -19a+39b+23c-18d | {1} | -15a+34b+34c -28a+22b+2c -2a-10b+8c | 6 1 2 : R <--------------------------- R : 2 {2} | 24a-36b-30c-29d | {2} | 19a+19b-10c-29d | {2} | -8a-22b-29c-24d | {2} | 2a+38b-47c | {2} | 45a+22b+16c | {2} | -47a-48b-34c | o4 : ComplexMap i5 : assert isComplexMorphism f i6 : K1 = kernel f 1 o6 = R <-- image {1} | -14a-22b-50c-9d -32b+17c-42d -27a-21b+50c+27d | <-- image 0 <-- image 0 {1} | a+15b-13c+17d 22b+40c+33d -27b+6c+10d | -1 {1} | 0 b+31c-38d a+27c-19d | 1 2 0 o6 : Complex i7 : g = canonicalMap(source f, K1) 1 1 o7 = -1 : R <--------- R : -1 | 1 | 3 0 : R <--------------------------------------------------------- image {1} | -14a-22b-50c-9d -32b+17c-42d -27a-21b+50c+27d | : 0 {1} | -14a-22b-50c-9d -32b+17c-42d -27a-21b+50c+27d | {1} | a+15b-13c+17d 22b+40c+33d -27b+6c+10d | {1} | a+15b-13c+17d 22b+40c+33d -27b+6c+10d | {1} | 0 b+31c-38d a+27c-19d | {1} | 0 b+31c-38d a+27c-19d | 3 1 : R <----- image 0 : 1 0 1 2 : R <----- image 0 : 2 0 o7 : ComplexMap i8 : degree g o8 = 0 i9 : assert(isWellDefined g and isComplexMorphism g)
 i10 : f2 = randomComplexMap(D, C) 1 o10 = -1 : 0 <----- R : -1 0 1 3 0 : R <------------------------------------------------------- R : 0 | 47a+19b-16c+7d 15a-23b+39c+43d -17a-11b+48c+36d | 4 3 1 : R <------------------------------------------------------------ R : 1 {1} | 35a+11b-38c+33d -47a+15b-37c-13d -48a-15b+39c | {1} | 40a+11b+46c-28d -10a+30b-18c+39d 33a-49b-33c-19d | {1} | a-3b+22c-47d 27a-22b+32c-9d 17a-20b+44c-39d | {1} | -23a-7b+2c+29d -32a-20b+24c-30d 36a+9b-39c+4d | 6 1 2 : R <--------------------------- R : 2 {2} | 13a-26b+22c-49d | {2} | -11a-8b+43c-8d | {2} | 36a-3b-22c-30d | {2} | 41a+16b-28c-6d | {2} | 35a-9b-35c+6d | {2} | 40a+3b-31c+25d | o10 : ComplexMap i11 : assert not isComplexMorphism f2 i12 : K2 = kernel f2 1 o12 = R <-- image {1} | -39a-21b+40c-31d -20b-28c+37d 24a+47b+6c+38d | <-- image 0 <-- image 0 {1} | a+9b+19c-2d -17b+26c-23d -49b-32c+5d | -1 {1} | 0 b-c-19d a+28c-33d | 1 2 0 o12 : Complex i13 : g2 = canonicalMap(source f2, K2) 1 1 o13 = -1 : R <--------- R : -1 | 1 | 3 0 : R <-------------------------------------------------------- image {1} | -39a-21b+40c-31d -20b-28c+37d 24a+47b+6c+38d | : 0 {1} | -39a-21b+40c-31d -20b-28c+37d 24a+47b+6c+38d | {1} | a+9b+19c-2d -17b+26c-23d -49b-32c+5d | {1} | a+9b+19c-2d -17b+26c-23d -49b-32c+5d | {1} | 0 b-c-19d a+28c-33d | {1} | 0 b-c-19d a+28c-33d | 3 1 : R <----- image 0 : 1 0 1 2 : R <----- image 0 : 2 0 o13 : ComplexMap i14 : assert(isWellDefined g2 and isComplexMorphism g2)

The cokernel of a complex map comes with a natural surjection from the target complex.

 i15 : Q = cokernel f 4 1 o15 = cokernel | -46a+17b-8c+26d -38a-2b+23c-10d -30a-18b-9c+37d | <-- cokernel {1} | 38a+3b-10c+25d 30a+36b+14c-9d -47b-19c+2d | <-- cokernel {2} | 24a-36b-30c-29d | <-- R <-- R {1} | -47a+17b-29c-8d -18a+39c-22d -24a+18b-32c-27d | {2} | 19a+19b-10c-29d | 0 {1} | -13a+21b-34d 50a-22b-8c+24d -19a+39b+23c-18d | {2} | -8a-22b-29c-24d | 3 4 {1} | -15a+34b+34c -28a+22b+2c -2a-10b+8c | {2} | 2a+38b-47c | {2} | 45a+22b+16c | 1 {2} | -47a-48b-34c | 2 o15 : Complex i16 : g3 = canonicalMap(Q, target f) 1 o16 = 0 : cokernel | -46a+17b-8c+26d -38a-2b+23c-10d -30a-18b-9c+37d | <--------- R : 0 | 1 | 4 1 : cokernel {1} | 38a+3b-10c+25d 30a+36b+14c-9d -47b-19c+2d | <------------------- R : 1 {1} | -47a+17b-29c-8d -18a+39c-22d -24a+18b-32c-27d | {1} | 1 0 0 0 | {1} | -13a+21b-34d 50a-22b-8c+24d -19a+39b+23c-18d | {1} | 0 1 0 0 | {1} | -15a+34b+34c -28a+22b+2c -2a-10b+8c | {1} | 0 0 1 0 | {1} | 0 0 0 1 | 6 2 : cokernel {2} | 24a-36b-30c-29d | <----------------------- R : 2 {2} | 19a+19b-10c-29d | {2} | 1 0 0 0 0 0 | {2} | -8a-22b-29c-24d | {2} | 0 1 0 0 0 0 | {2} | 2a+38b-47c | {2} | 0 0 1 0 0 0 | {2} | 45a+22b+16c | {2} | 0 0 0 1 0 0 | {2} | -47a-48b-34c | {2} | 0 0 0 0 1 0 | {2} | 0 0 0 0 0 1 | 4 4 3 : R <------------------- R : 3 {3} | 1 0 0 0 | {3} | 0 1 0 0 | {3} | 0 0 1 0 | {3} | 0 0 0 1 | 1 1 4 : R <------------- R : 4 {4} | 1 | o16 : ComplexMap i17 : assert(isWellDefined g3 and isComplexMorphism g3)

The image of a complex map comes with a natural injection into the target complex.

 i18 : I = image f o18 = image | -46a+17b-8c+26d -38a-2b+23c-10d -30a-18b-9c+37d | <-- image {1} | 38a+3b-10c+25d 30a+36b+14c-9d -47b-19c+2d | <-- image {2} | 24a-36b-30c-29d | <-- image 0 <-- image 0 {1} | -47a+17b-29c-8d -18a+39c-22d -24a+18b-32c-27d | {2} | 19a+19b-10c-29d | 0 {1} | -13a+21b-34d 50a-22b-8c+24d -19a+39b+23c-18d | {2} | -8a-22b-29c-24d | 3 4 {1} | -15a+34b+34c -28a+22b+2c -2a-10b+8c | {2} | 2a+38b-47c | {2} | 45a+22b+16c | 1 {2} | -47a-48b-34c | 2 o18 : Complex i19 : g4 = canonicalMap(target f, I) 1 o19 = 0 : R <------------------------------------------------------- image | -46a+17b-8c+26d -38a-2b+23c-10d -30a-18b-9c+37d | : 0 | -46a+17b-8c+26d -38a-2b+23c-10d -30a-18b-9c+37d | 4 1 : R <----------------------------------------------------------- image {1} | 38a+3b-10c+25d 30a+36b+14c-9d -47b-19c+2d | : 1 {1} | 38a+3b-10c+25d 30a+36b+14c-9d -47b-19c+2d | {1} | -47a+17b-29c-8d -18a+39c-22d -24a+18b-32c-27d | {1} | -47a+17b-29c-8d -18a+39c-22d -24a+18b-32c-27d | {1} | -13a+21b-34d 50a-22b-8c+24d -19a+39b+23c-18d | {1} | -13a+21b-34d 50a-22b-8c+24d -19a+39b+23c-18d | {1} | -15a+34b+34c -28a+22b+2c -2a-10b+8c | {1} | -15a+34b+34c -28a+22b+2c -2a-10b+8c | 6 2 : R <--------------------------- image {2} | 24a-36b-30c-29d | : 2 {2} | 24a-36b-30c-29d | {2} | 19a+19b-10c-29d | {2} | 19a+19b-10c-29d | {2} | -8a-22b-29c-24d | {2} | -8a-22b-29c-24d | {2} | 2a+38b-47c | {2} | 2a+38b-47c | {2} | 45a+22b+16c | {2} | 45a+22b+16c | {2} | -47a-48b-34c | {2} | -47a-48b-34c | 4 3 : R <----- image 0 : 3 0 1 4 : R <----- image 0 : 4 0 o19 : ComplexMap i20 : assert(isWellDefined g4 and isComplexMorphism g4)

The coimage of a complex map comes with a natural surjection from the source complex. This natural map is always a complex morphism.

 i21 : J = coimage f 3 1 o21 = cokernel | 1 | <-- cokernel {1} | -14a-22b-50c-9d -32b+17c-42d -27a-21b+50c+27d | <-- R <-- R {1} | a+15b-13c+17d 22b+40c+33d -27b+6c+10d | -1 {1} | 0 b+31c-38d a+27c-19d | 1 2 0 o21 : Complex i22 : g5 = canonicalMap(J, source f) 1 o22 = -1 : cokernel | 1 | <----- R : -1 0 3 0 : cokernel {1} | -14a-22b-50c-9d -32b+17c-42d -27a-21b+50c+27d | <----------------- R : 0 {1} | a+15b-13c+17d 22b+40c+33d -27b+6c+10d | {1} | 1 0 0 | {1} | 0 b+31c-38d a+27c-19d | {1} | 0 1 0 | {1} | 0 0 1 | 3 3 1 : R <----------------- R : 1 {2} | 1 0 0 | {2} | 0 1 0 | {2} | 0 0 1 | 1 1 2 : R <------------- R : 2 {3} | 1 | o22 : ComplexMap i23 : assert(isWellDefined g5 and isComplexMorphism g5)
 i24 : J2 = coimage f2 3 1 o24 = cokernel | 1 | <-- cokernel {1} | -39a-21b+40c-31d -20b-28c+37d 24a+47b+6c+38d | <-- R <-- R {1} | a+9b+19c-2d -17b+26c-23d -49b-32c+5d | -1 {1} | 0 b-c-19d a+28c-33d | 1 2 0 o24 : Complex i25 : g6 = canonicalMap(J2, source f2) 1 o25 = -1 : cokernel | 1 | <----- R : -1 0 3 0 : cokernel {1} | -39a-21b+40c-31d -20b-28c+37d 24a+47b+6c+38d | <----------------- R : 0 {1} | a+9b+19c-2d -17b+26c-23d -49b-32c+5d | {1} | 1 0 0 | {1} | 0 b-c-19d a+28c-33d | {1} | 0 1 0 | {1} | 0 0 1 | 3 3 1 : R <----------------- R : 1 {2} | 1 0 0 | {2} | 0 1 0 | {2} | 0 0 1 | 1 1 2 : R <------------- R : 2 {3} | 1 | o25 : ComplexMap i26 : assert(isWellDefined g6 and isComplexMorphism g6)

The cone of a complex morphism comes with two natural maps. Given a map $f : C \to D$, let $E$ denote the cone of $f$. The first is a natural injection from the target $D$ of $f$ into $E$. The second is a natural surjection from $E$ to $C[-1]$. Together, these maps form a short exact sequence of complexes.

 i27 : E = cone f 2 7 9 5 1 o27 = R <-- R <-- R <-- R <-- R 0 1 2 3 4 o27 : Complex i28 : g = canonicalMap(E, target f) 2 1 o28 = 0 : R <--------- R : 0 | 0 | | 1 | 7 4 1 : R <------------------- R : 1 {1} | 0 0 0 0 | {1} | 0 0 0 0 | {1} | 0 0 0 0 | {1} | 1 0 0 0 | {1} | 0 1 0 0 | {1} | 0 0 1 0 | {1} | 0 0 0 1 | 9 6 2 : R <----------------------- R : 2 {2} | 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 | {2} | 1 0 0 0 0 0 | {2} | 0 1 0 0 0 0 | {2} | 0 0 1 0 0 0 | {2} | 0 0 0 1 0 0 | {2} | 0 0 0 0 1 0 | {2} | 0 0 0 0 0 1 | 5 4 3 : R <------------------- R : 3 {3} | 0 0 0 0 | {3} | 1 0 0 0 | {3} | 0 1 0 0 | {3} | 0 0 1 0 | {3} | 0 0 0 1 | 1 1 4 : R <------------- R : 4 {4} | 1 | o28 : ComplexMap i29 : h = canonicalMap((source f)[-1], E) 1 2 o29 = 0 : R <----------- R : 0 | 1 0 | 3 7 1 : R <------------------------- R : 1 {1} | 1 0 0 0 0 0 0 | {1} | 0 1 0 0 0 0 0 | {1} | 0 0 1 0 0 0 0 | 3 9 2 : R <----------------------------- R : 2 {2} | 1 0 0 0 0 0 0 0 0 | {2} | 0 1 0 0 0 0 0 0 0 | {2} | 0 0 1 0 0 0 0 0 0 | 1 5 3 : R <--------------------- R : 3 {3} | 1 0 0 0 0 | o29 : ComplexMap i30 : assert(isWellDefined g and isWellDefined h) i31 : assert(isComplexMorphism g and isComplexMorphism h) i32 : assert isShortExactSequence(h,g)

The cylinder of a complex map comes with four natural maps. Given a map $f : C \to D$, let $F$ denote the cylinder of $f$. The first is the natural injection from the source $C$ of $f$ into the cylinder $F$. Together these two maps form a short exact sequence of complexes.

 i33 : F = cylinder f 1 5 10 10 5 1 o33 = R <-- R <-- R <-- R <-- R <-- R -1 0 1 2 3 4 o33 : Complex i34 : g = canonicalMap(F, source f) 1 1 o34 = -1 : R <--------- R : -1 | 1 | 5 3 0 : R <----------------- R : 0 {0} | 0 0 0 | {1} | 1 0 0 | {1} | 0 1 0 | {1} | 0 0 1 | {0} | 0 0 0 | 10 3 1 : R <----------------- R : 1 {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | {2} | 1 0 0 | {2} | 0 1 0 | {2} | 0 0 1 | {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | 10 1 2 : R <------------- R : 2 {2} | 0 | {2} | 0 | {2} | 0 | {3} | 1 | {2} | 0 | {2} | 0 | {2} | 0 | {2} | 0 | {2} | 0 | {2} | 0 | o34 : ComplexMap i35 : h = canonicalMap(E, F) 2 5 o35 = 0 : R <----------------- R : 0 | 1 0 0 0 0 | | 0 0 0 0 1 | 7 10 1 : R <------------------------------- R : 1 {1} | 1 0 0 0 0 0 0 0 0 0 | {1} | 0 1 0 0 0 0 0 0 0 0 | {1} | 0 0 1 0 0 0 0 0 0 0 | {1} | 0 0 0 0 0 0 1 0 0 0 | {1} | 0 0 0 0 0 0 0 1 0 0 | {1} | 0 0 0 0 0 0 0 0 1 0 | {1} | 0 0 0 0 0 0 0 0 0 1 | 9 10 2 : R <------------------------------- R : 2 {2} | 1 0 0 0 0 0 0 0 0 0 | {2} | 0 1 0 0 0 0 0 0 0 0 | {2} | 0 0 1 0 0 0 0 0 0 0 | {2} | 0 0 0 0 1 0 0 0 0 0 | {2} | 0 0 0 0 0 1 0 0 0 0 | {2} | 0 0 0 0 0 0 1 0 0 0 | {2} | 0 0 0 0 0 0 0 1 0 0 | {2} | 0 0 0 0 0 0 0 0 1 0 | {2} | 0 0 0 0 0 0 0 0 0 1 | 5 5 3 : R <--------------------- R : 3 {3} | 1 0 0 0 0 | {3} | 0 1 0 0 0 | {3} | 0 0 1 0 0 | {3} | 0 0 0 1 0 | {3} | 0 0 0 0 1 | 1 1 4 : R <------------- R : 4 {4} | 1 | o35 : ComplexMap i36 : assert(isWellDefined g and isWellDefined h) i37 : assert(isComplexMorphism g and isComplexMorphism h) i38 : assert isShortExactSequence(h,g)

The third is the natural injection from the target $D$ of $F$ into the cylinder $F$. The fourth is the natural surjection from the cylinder $F$ to the target $D$ of $f$. However, these two maps do not form a short exact sequence of complexes.

 i39 : g' = canonicalMap(F, target f) 5 1 o39 = 0 : R <------------- R : 0 {0} | 0 | {1} | 0 | {1} | 0 | {1} | 0 | {0} | 1 | 10 4 1 : R <------------------- R : 1 {1} | 0 0 0 0 | {1} | 0 0 0 0 | {1} | 0 0 0 0 | {2} | 0 0 0 0 | {2} | 0 0 0 0 | {2} | 0 0 0 0 | {1} | 1 0 0 0 | {1} | 0 1 0 0 | {1} | 0 0 1 0 | {1} | 0 0 0 1 | 10 6 2 : R <----------------------- R : 2 {2} | 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 | {2} | 0 0 0 0 0 0 | {3} | 0 0 0 0 0 0 | {2} | 1 0 0 0 0 0 | {2} | 0 1 0 0 0 0 | {2} | 0 0 1 0 0 0 | {2} | 0 0 0 1 0 0 | {2} | 0 0 0 0 1 0 | {2} | 0 0 0 0 0 1 | 5 4 3 : R <------------------- R : 3 {3} | 0 0 0 0 | {3} | 1 0 0 0 | {3} | 0 1 0 0 | {3} | 0 0 1 0 | {3} | 0 0 0 1 | 1 1 4 : R <------------- R : 4 {4} | 1 | o39 : ComplexMap i40 : h' = canonicalMap(target f, F) 1 5 o40 = 0 : R <----------------------------------------------------------- R : 0 | 0 -46a+17b-8c+26d -38a-2b+23c-10d -30a-18b-9c+37d 1 | 4 10 1 : R <------------------------------------------------------------------------- R : 1 {1} | 0 0 0 38a+3b-10c+25d 30a+36b+14c-9d -47b-19c+2d 1 0 0 0 | {1} | 0 0 0 -47a+17b-29c-8d -18a+39c-22d -24a+18b-32c-27d 0 1 0 0 | {1} | 0 0 0 -13a+21b-34d 50a-22b-8c+24d -19a+39b+23c-18d 0 0 1 0 | {1} | 0 0 0 -15a+34b+34c -28a+22b+2c -2a-10b+8c 0 0 0 1 | 6 10 2 : R <--------------------------------------------- R : 2 {2} | 0 0 0 24a-36b-30c-29d 1 0 0 0 0 0 | {2} | 0 0 0 19a+19b-10c-29d 0 1 0 0 0 0 | {2} | 0 0 0 -8a-22b-29c-24d 0 0 1 0 0 0 | {2} | 0 0 0 2a+38b-47c 0 0 0 1 0 0 | {2} | 0 0 0 45a+22b+16c 0 0 0 0 1 0 | {2} | 0 0 0 -47a-48b-34c 0 0 0 0 0 1 | 4 5 3 : R <--------------------- R : 3 {3} | 0 1 0 0 0 | {3} | 0 0 1 0 0 | {3} | 0 0 0 1 0 | {3} | 0 0 0 0 1 | 1 1 4 : R <------------- R : 4 {4} | 1 | o40 : ComplexMap i41 : assert(isWellDefined g' and isWellDefined h') i42 : assert(isComplexMorphism g' and isComplexMorphism h') i43 : assert not isShortExactSequence(h',g')

When $D == C$, the optional argument UseTarget selects the appropriate natural map.

 i44 : f' = id_C 1 1 o44 = -1 : R <--------- R : -1 | 1 | 3 3 0 : R <----------------- R : 0 {1} | 1 0 0 | {1} | 0 1 0 | {1} | 0 0 1 | 3 3 1 : R <----------------- R : 1 {2} | 1 0 0 | {2} | 0 1 0 | {2} | 0 0 1 | 1 1 2 : R <------------- R : 2 {3} | 1 | o44 : ComplexMap i45 : F' = cylinder f' 2 7 9 5 1 o45 = R <-- R <-- R <-- R <-- R -1 0 1 2 3 o45 : Complex i46 : g = canonicalMap(F', C, UseTarget=>true) 2 1 o46 = -1 : R <--------- R : -1 | 0 | | 1 | 7 3 0 : R <----------------- R : 0 {0} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | {1} | 1 0 0 | {1} | 0 1 0 | {1} | 0 0 1 | 9 3 1 : R <----------------- R : 1 {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | {2} | 0 0 0 | {2} | 0 0 0 | {2} | 0 0 0 | {2} | 1 0 0 | {2} | 0 1 0 | {2} | 0 0 1 | 5 1 2 : R <------------- R : 2 {2} | 0 | {2} | 0 | {2} | 0 | {3} | 0 | {3} | 1 | o46 : ComplexMap i47 : h = canonicalMap(F', C, UseTarget=>false) 2 1 o47 = -1 : R <--------- R : -1 | 1 | | 0 | 7 3 0 : R <----------------- R : 0 {0} | 0 0 0 | {1} | 1 0 0 | {1} | 0 1 0 | {1} | 0 0 1 | {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | 9 3 1 : R <----------------- R : 1 {1} | 0 0 0 | {1} | 0 0 0 | {1} | 0 0 0 | {2} | 1 0 0 | {2} | 0 1 0 | {2} | 0 0 1 | {2} | 0 0 0 | {2} | 0 0 0 | {2} | 0 0 0 | 5 1 2 : R <------------- R : 2 {2} | 0 | {2} | 0 | {2} | 0 | {3} | 1 | {3} | 0 | o47 : ComplexMap i48 : assert(isWellDefined g and isWellDefined h) i49 : assert(g != h) i50 : assert(isComplexMorphism g and isComplexMorphism h)