M2
M2 copied to clipboard
Inconsistent behavior when defining polynomial rings with duplicate variables
The following behavior seems reasonable, I suppose:
i1 : QQ[x,x]
o1 = QQ[x ..x ]
0 1
o1 : PolynomialRing
But as soon as we try including three or more variables, we get the following:
i2 : QQ[x,x,x]
stdio:2:1:(3): error: baseName: no base name available
Shouldn't this give us QQ[x_0,x_1,x_2] for consistency?
I think the issue is in this code:
https://github.com/Macaulay2/M2/blob/ec9e9ac60ed4a8e791448942202f077a88a87e15/M2/Macaulay2/m2/monoids.m2#L480-L481
The third argument to applyKeys is always a function of two arguments (the values of the clashing keys), so #dups will always be 2.
Closed in #3262 and #3265.