# checkDegrees -- compares the degrees of generators of two modules

## Synopsis

• Usage:
d = checkDegrees(N,M)
d = checkDegrees(n,m)
• Inputs:
• N, ,
• n, , presentation of N
• M, ,
• m, , presentation of M
• Optional inputs:
• Strict => ..., default value false
• Verbose => ..., default value false
• Outputs:
• d, , (Boolean, a degree in the ring of M and N)

## Description

This is to be used with isIsomorphic.

The routine compares the sorted lists of degrees of generators of the two modules; the degreeLength (can be anything). If the numbers of generators of M,N are different, the modules are not isomorphic, and the routine returns (false, null).

If the numbers are the same, and all the corresponding degrees pairs differ by the same amount (so that the modules might become isomorphic after a shift, then if Strict => false (the default) the output (true, e) tells how to adjust the modules to make the degrees equal: either tensor N with (ring N)^{e} or tensor M with (ring M)^{-e}.

If Strict => true, then the output is (false, null) unless the offset e is 0.

 i1 : S = ZZ/101[a,b,Degrees => {{1,0},{0,1}}] o1 = S o1 : PolynomialRing i2 : A = S^{{2,1}} 1 o2 = S o2 : S-module, free, degrees {{-2, -1}} i3 : B = S^{{1,1}} 1 o3 = S o3 : S-module, free, degrees {{-1, -1}} i4 : B' = S^{{3,3}}**B 1 o4 = S o4 : S-module, free, degrees {{-4, -4}} i5 : C = S^{{1,1}, {2,3}} 2 o5 = S o5 : S-module, free, degrees {{-1, -1}, {-2, -3}} i6 : checkDegrees(A,B) o6 = (true, {-1, 0}) o6 : Sequence i7 : checkDegrees(A,C) o7 = (false, ) o7 : Sequence i8 : d = checkDegrees(B',B) o8 = (true, {-3, -3}) o8 : Sequence i9 : degrees (S^{d_1}**B') == degrees B o9 = true i10 : degrees (B') == degrees (S^{-d_1}**B) o10 = true i11 : checkDegrees(B',B,Strict=>true) o11 = (false, ) o11 : Sequence