# truncate(List,Matrix) -- truncation of a matrix

## Synopsis

• Usage:
truncate(degs, f)
• Function: truncate
• Inputs:
• degs, a list, a list of lists of integers (list of degrees), or a list of integers (a single degree), or an integer (a singly graded degree)
• f, , a graded map between graded modules (not necessarily free modules)
• Outputs:

## Description

This function truncates the source and target of f, and returns the induced map between them.

 ```i1 : R = ZZ/101[a..d, Degrees=>{{1,3},{1,0},{1,3},{1,2}}] o1 = R o1 : PolynomialRing``` ```i2 : C = res coker vars R 1 4 6 4 1 o2 = R <-- R <-- R <-- R <-- R <-- 0 0 1 2 3 4 5 o2 : ChainComplex``` ```i3 : g1 = truncate({1,1},C.dd_1) o3 = {1, 2} | 0 b 0 0 0 1 | {1, 3} | 0 0 b 0 1 0 | {1, 3} | 1 0 0 b 0 0 | o3 : Matrix``` ```i4 : g2 = truncate({1,1},C.dd_2) o4 = {1, 3} | -b -c 0 -d 0 0 | {2, 2} | 0 0 0 0 -1 0 | {2, 3} | 0 0 -1 0 0 0 | {2, 3} | 1 0 0 0 0 0 | {1, 3} | 0 a b 0 0 -d | {1, 2} | 0 0 0 a b c | o4 : Matrix``` ```i5 : g3 = truncate({1,1},C.dd_3) o5 = {2, 3} | c d 0 0 | {2, 6} | -b 0 d 0 | {2, 3} | a 0 0 d | {2, 5} | 0 -b -c 0 | {2, 2} | 0 a 0 -c | {2, 5} | 0 0 a b | o5 : Matrix``` ```i6 : g4 = truncate({1,1},C.dd_4) o6 = {3, 6} | -d | {3, 5} | c | {3, 8} | -b | {3, 5} | a | o6 : Matrix``` `i7 : assert(g1 * g2 == 0)` `i8 : assert(g2 * g3 == 0)` `i9 : assert(g3 * g4 == 0)`

This functor is exact.

 `i10 : assert(ker g1 == image g2)` `i11 : assert(ker g2 == image g3)` `i12 : assert(ker g3 == image g4)`