Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
345 stars 230 forks source link

isIsomorphic for free modules #2896

Open mahrud opened 1 year ago

mahrud commented 1 year ago

Is this intended?

i1 : R = QQ[x,y];

i2 : R^{-1,1} == R^{1,-1}

o2 = false

The reason seems to be this line: https://github.com/Macaulay2/M2/blob/5572c8a245d187f6c22f8eaa0b03cac0b8d86e02/M2/Macaulay2/m2/modules.m2#L239

The isIsomorphic command works, but it's slower than just

set degrees ambient M === set degrees ambient N
DanGrayson commented 1 year ago

Yes, it's intended. After all, F==G means F and G are equal.

mahrud commented 1 year ago

Okay, then isIsomorphic should have a strategy for free modules that simply checks the degrees, because currently it can sometimes fail.

pzinn commented 1 year ago

in a similar vein: what about #2885 -- is this also intended?