M2 icon indicating copy to clipboard operation
M2 copied to clipboard

degreeLength of a ZZ module

Open pzinn opened this issue 1 year ago • 3 comments

This is related to the discussion of why it's so slow to create high rank modules (tangentially related to #3001). I don't understand this behaviour:

i1 : M=ZZ^6

       6
o1 = ZZ

o1 : ZZ-module, free

i2 : degreeLength M

o2 = 0

i3 : peek M

o3 = Module of Vector{cache => CacheTable{...2...}                              }
                     {numgens => 6                                              }
                     {RawFreeModule => free(rank 6 degrees = {1, 1, 1, 1, 1, 1})}
                     {ring => ZZ                                                }

why the degrees? since it's degree length 0, there's really no need... and is that the reason that it's so slow to create say ZZ^1000? The same thing happens with modules over say QQ[x,DegreeRank=>0] (incidentally I thought we fixed the degreeLength vs DegreeRank inconsistency?)

pzinn avatar Nov 21 '23 10:11 pzinn

@pzinn I'll look at this

mikestillman avatar Nov 21 '23 12:11 mikestillman

@mikestillman do you think a fix for this could make it in the next release? If it's easy, I'm happy to take a look if you point out where I need to look.

mahrud avatar Jan 30 '24 18:01 mahrud

going through old issues, seems now degreeLength M now returns error: no method found for applying degreeLength to argument(s): Z^6 of class Module. The actual issue remains.

pzinn avatar Jul 24 '24 03:07 pzinn