# nullHomotopy(ComplexMap) -- a map which is a candidate for being a null homotopy

## Synopsis

• Function: nullHomotopy
• Usage:
h = nullHomotopy f
• Inputs:
• f, ,
• Outputs:
• h, ,

## Description

A map of chain complexes $f \colon C \to D$ is null-homopic if there exists a map of chain complexes $h : C \to D$ of degree $\deg(f)+1$, such that we have the equality $f = \operatorname{dd}^D h + (-1)^{\deg(f)} h \operatorname{dd}^C.$ Given $f$, this method returns a map $h$ of chain complexes that will be a null-homotopy if one exists.

As a first example, we construct a map of chain complexes in which the null homotopy is given by the identity.

 i1 : R = ZZ/101[x,y,z]; i2 : M = cokernel matrix{{x,y,z^2}, {y^2,z,x^2}} o2 = cokernel | x y z2 | | y2 z x2 | 2 o2 : R-module, quotient of R i3 : C = complex {id_M} o3 = cokernel | x y z2 | <-- cokernel | x y z2 | | y2 z x2 | | y2 z x2 | 0 1 o3 : Complex i4 : assert isNullHomotopic id_C i5 : h = nullHomotopy id_C o5 = 1 : cokernel | x y z2 | <----------- cokernel | x y z2 | : 0 | y2 z x2 | | 1 0 | | y2 z x2 | | 0 1 | 2 : 0 <----- cokernel | x y z2 | : 1 0 | y2 z x2 | o5 : ComplexMap i6 : assert(h_0 == id_M) i7 : assert isNullHomotopyOf(h, id_C)

A random map of chain complexes, arising as a boundary in the associated Hom complex, is automatically null homotopic.

 i8 : C = (freeResolution M) ** R^1/ideal(x^3, z^3-x) o8 = cokernel | x3 z3-x 0 0 | <-- cokernel {1} | x3 z3-x 0 0 0 0 | <-- cokernel {5} | x3 z3-x | | 0 0 x3 z3-x | {2} | 0 0 x3 z3-x 0 0 | {2} | 0 0 0 0 x3 z3-x | 2 0 1 o8 : Complex i9 : f = randomComplexMap(C, C[1], Boundary => true) o9 = -1 : 0 <----- cokernel | x3 z3-x 0 0 | : -1 0 | 0 0 x3 z3-x | 0 : cokernel | x3 z3-x 0 0 | <-------------------------------------------------------------------------- cokernel {1} | x3 z3-x 0 0 0 0 | : 0 | 0 0 x3 z3-x | | -5y+30z 30x2+19xy-10y2-29yz-32z2-22x -29xy+6y2-38yz-16z2+15x | {2} | 0 0 x3 z3-x 0 0 | | 36y+48z 21x2-22y2+19xz-10yz+7z2 -16x2-33y2-29xz-24yz-38z2+36x | {2} | 0 0 0 0 x3 z3-x | 1 : cokernel {1} | x3 z3-x 0 0 0 0 | <---------------------------------------------------------------------------------- cokernel {5} | x3 z3-x | : 1 {2} | 0 0 x3 z3-x 0 0 | {1} | 24x2y2+19xy3-10y4+38x2yz-29y3z-19y2z2-19x2z+10xyz+29xz2-29x2-24xy-38xz | {2} | 0 0 0 0 x3 z3-x | {2} | 16x2y-8y3+8xz-16x | {2} | -39x2y-22y3+22xz+39x | o9 : ComplexMap i10 : assert isNullHomotopic f i11 : h = nullHomotopy f o11 = 0 : cokernel | x3 z3-x 0 0 | <---------------------------- cokernel | x3 z3-x 0 0 | : -1 | 0 0 x3 z3-x | | 24 -30 | | 0 0 x3 z3-x | | 39x2yz-36 -39x2y2-29 | 1 : cokernel {1} | x3 z3-x 0 0 0 0 | <--------------------------------------- cokernel {1} | x3 z3-x 0 0 0 0 | : 0 {2} | 0 0 x3 z3-x 0 0 | {1} | 19 19x-10y-29z -29x-24y-38z | {2} | 0 0 x3 z3-x 0 0 | {2} | 0 0 0 0 x3 z3-x | {2} | 0 -8 -16 | {2} | 0 0 0 0 x3 z3-x | {2} | 0 -22 -39x2y2+39 | 2 : cokernel {5} | x3 z3-x | <----- cokernel {5} | x3 z3-x | : 1 0 o11 : ComplexMap i12 : assert isNullHomotopyOf(h, f)

When a map of chain complexes is not null-homotopic, this method nevertheless returns a map $h$ of chain complexes, having the correct source, target and degree, but cannot be a null homotopy.

 i13 : g = randomComplexMap(C, C[1]) o13 = -1 : 0 <----- cokernel | x3 z3-x 0 0 | : -1 0 | 0 0 x3 z3-x | 0 : cokernel | x3 z3-x 0 0 | <---------------------------------------------------------------------------------- cokernel {1} | x3 z3-x 0 0 0 0 | : 0 | 0 0 x3 z3-x | | 21x+34y+19z -13x2-43xy-28y2-15xz-47yz+38z2 -47x2+47xy-16y2+19xz+7yz+15z2 | {2} | 0 0 x3 z3-x 0 0 | | -47x-39y-18z 2x2+16xy+45y2+22xz-34yz-48z2 -23x2+39xy-17y2+43xz-11yz+48z2 | {2} | 0 0 0 0 x3 z3-x | 1 : cokernel {1} | x3 z3-x 0 0 0 0 | <---------------------------------------------------------------------- cokernel {5} | x3 z3-x | : 1 {2} | 0 0 x3 z3-x 0 0 | {1} | 36x2y2-38xy3+11y4+35x2yz+33xy2z+46y3z+11x2z2+40xyz2-28y2z2 | {2} | 0 0 0 0 x3 z3-x | {2} | x2y+22xy2-7y3-3x2z-47xyz+2y2z-23xz2+29yz2 | {2} | -47x2y-37xy2+30y3+15x2z-13xyz-18y2z-10xz2+39yz2 | o13 : ComplexMap i14 : assert not isNullHomotopic g i15 : h' = nullHomotopy g o15 = 0 : cokernel | x3 z3-x 0 0 | <------------------------------------------------------------------------------------------------------------------------------------------------- cokernel | x3 z3-x 0 0 | : -1 | 0 0 x3 z3-x | | -33xyz2-11xz2+15xz+50yz-33z2-12z-45 40xyz2+46xz2+33yz+11z-2 | | 0 0 x3 z3-x | | 47x2yz+37xy2z-15x2z2+13xyz2-30xz2-23x2+47xz+37yz-38z2-43z-7 -47x2y2-37xy3+15x2yz-13xy2z-10xyz2+30xyz+39x2-47xy-37y2+15xz-13yz+23z2+30z+45 | 1 : cokernel {1} | x3 z3-x 0 0 0 0 | <--------------------------------------------------------------------------------------------------------------------------------------------------- cokernel {1} | x3 z3-x 0 0 0 0 | : 0 {2} | 0 0 x3 z3-x 0 0 | {1} | -33xyz2-11xz2+15xz+28 -38x+11y+46z 40xy2z2+37x2y2+13x2yz+10x2z2+46xyz2+47x2y-7x2z+33y2z+11xz2+40yz2-47x2+37xy-38xz+11yz+46z2+50y-35z+37 | {2} | 0 0 x3 z3-x 0 0 | {2} | 0 0 0 0 x3 z3-x | {2} | 40xyz+46xz+39z -7 -3x2yz-47xy2z-23xyz2-33x2y-7xyz-11x2-11xy-40y2-3xz-47yz-23z2-23x-46y-7z-12 | {2} | 0 0 0 0 x3 z3-x | {2} | 0 30 -47x2y2-37xy3+15x2yz-13xy2z-10xyz2+30xyz+39x2-47xy-37y2+15xz-13yz-10z2+30z | 2 : cokernel {5} | x3 z3-x | <----- cokernel {5} | x3 z3-x | : 1 0 o15 : ComplexMap i16 : assert isWellDefined h' i17 : assert(degree h' === degree g + 1) i18 : assert not isNullHomotopyOf(h', g)

For developers: when the source of $f$ is a free complex, a procedure, that is often faster, is attempted. In the general case this method uses the Hom complex.

## Caveat

The output is only a null homotopy when one exists.