# ComplexMap ^ ZZ -- the n-fold composition

## Synopsis

• Operator: ^
• Usage:
f^n
• Inputs:
• f, , whose source and target are the same complex
• n, an integer,
• Outputs:
• , the composition of $f$ with itself $n$ times.

## Description

A complex map $f : C \to C$ can be composed with itself. This method produces these new maps of chain complexes.

The differential on a chain complex always composes with itself to give the zero map.

 i1 : S = ZZ/101[a..c]; i2 : C = freeResolution coker matrix{{a^2, b^2, c^2}} 1 3 3 1 o2 = S <-- S <-- S <-- S 0 1 2 3 o2 : Complex i3 : f = dd^C 1 3 o3 = 0 : S <---------------- S : 1 | a2 b2 c2 | 3 3 1 : S <----------------------- S : 2 {2} | -b2 -c2 0 | {2} | a2 0 -c2 | {2} | 0 a2 b2 | 3 1 2 : S <--------------- S : 3 {4} | c2 | {4} | -b2 | {4} | a2 | o3 : ComplexMap i4 : f^2 o4 = 0 o4 : ComplexMap i5 : assert(source f == target f) i6 : assert(degree f == -1) i7 : assert(degree f^2 == -2)
 i8 : g = randomComplexMap(C, C, Degree => -1) 1 o8 = -1 : 0 <----- S : 0 0 1 3 0 : S <-------------------------------------------------------------------------------------------------- S : 1 | 24a2-36ab-29b2-30ac+19bc+19c2 -10a2-29ab-22b2-8ac-29bc-24c2 -38a2-16ab+21b2+39ac+34bc+19c2 | 3 3 1 : S <-------------------------------------------------------------------------------------------------------- S : 2 {2} | -47a2-39ab-13b2-18ac-43bc-15c2 -16a2+7ab-23b2+15ac+39bc+43c2 a2-3ab-47b2+22ac-23bc-7c2 | {2} | -28a2-47ab+2b2+38ac+16bc+22c2 -17a2-11ab+36b2+48ac+35bc+11c2 2a2+29ab+15b2-47ac-37bc-13c2 | {2} | 45a2-34ab-47b2-48ac+47bc+19c2 -38a2+33ab+11b2+40ac+46bc-28c2 -10a2+30ab+39b2-18ac+27bc-22c2 | 3 1 2 : S <------------------------------------------ S : 3 {4} | 32a2-9ab-20b2-32ac+24bc-30c2 | {4} | -48a2-15ab+39ac+33bc-49c2 | {4} | -33a2-19ab-20b2+17ac+44bc-39c2 | o8 : ComplexMap i9 : g^2 1 3 o9 = 0 : S <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ S : 2 | -33a4-16a3b+13a2b2-13ab3-48b4-43a3c+15a2bc+47ab2c-21b3c+19a2c2-35abc2-16b2c2-40ac3+21bc3-48c4 18a4-6a3b-34a2b2+37ab3+5b4+19a3c-36a2bc+13ab2c-22b3c-27a2c2+40b2c2+49ac3+18bc3+21c4 -20a4-22a3b-14a2b2+5ab3+34b4+34a3c-3a2bc-24ab2c+26b3c-3a2c2-34abc2-42b2c2-47ac3-45bc3-37c4 | 3 1 1 : S <------------------------------------------------------------------------------------------------------- S : 3 {2} | 39a4-33a3b+28a2b2-27ab3-12b4-14a3c+19a2bc-39ab2c-b3c-37a2c2-37abc2+3b2c2-25ac3+17bc3+30c4 | {2} | -45a4-50a3b+14a2b2+22ab3-37b4+23a3c+4a2bc-22ab2c-7b3c+37a2c2+41abc2+49b2c2-34ac3-29bc3+15c4 | {2} | -42a4+26a3b-31a2b2+ab3-42b4+5a3c+42a2bc+45ab2c-24b3c+7a2c2+35abc2+12b2c2+27ac3+8bc3+44c4 | o9 : ComplexMap i10 : g^3 1 1 o10 = 0 : S <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ S : 3 | -48a6-20a4b2-29a3b3+23a2b4-28ab5-23b6+28a5c-17a4bc-4a3b2c+46a2b3c-27ab4c+5b5c+31a4c2-30a3bc2-39a2b2c2-48ab3c2+34b4c2-13a3c3-15a2bc3+47ab2c3-41b3c3+20a2c4+40abc4-34b2c4+35ac5-26bc5+36c6 | o10 : ComplexMap i11 : assert(g^4 == 0)

The zero-th power returns the identity map

 i12 : f^0 == id_C o12 = true i13 : g^0 == id_C o13 = true

When $n$ is negative, the result is the $n$-fold power of the inverse complex map, if it exists.

 i14 : h = randomComplexMap(C, C) 1 1 o14 = 0 : S <---------- S : 0 | 36 | 3 3 1 : S <----------------------- S : 1 {2} | 9 13 -49 | {2} | -39 -26 -11 | {2} | 4 22 -8 | 3 3 2 : S <---------------------- S : 2 {4} | 43 -3 41 | {4} | -8 -22 16 | {4} | 36 -30 -28 | 1 1 3 : S <-------------- S : 3 {6} | -6 | o14 : ComplexMap i15 : h^-1 1 1 o15 = 0 : S <----------- S : 0 | -14 | 3 3 1 : S <---------------------- S : 1 {2} | 31 -46 -13 | {2} | 6 -35 24 | {2} | 32 7 -29 | 3 3 2 : S <----------------------- S : 2 {4} | 32 -45 50 | {4} | -17 -6 33 | {4} | -20 -37 -18 | 1 1 3 : S <--------------- S : 3 {6} | -17 | o15 : ComplexMap i16 : assert(h * h^-1 == id_C) i17 : h^-4 1 1 o17 = 0 : S <---------- S : 0 | 36 | 3 3 1 : S <----------------------- S : 1 {2} | -43 41 -32 | {2} | -16 41 -10 | {2} | 31 -33 -29 | 3 3 2 : S <----------------------- S : 2 {4} | -6 -30 11 | {4} | 4 15 -50 | {4} | -31 -23 -1 | 1 1 3 : S <-------------- S : 3 {6} | -6 | o17 : ComplexMap i18 : assert(h^-4 * h^4 == id_C)