M2
M2 copied to clipboard
Error message when defining a ring with a variables x and x_1
The error message when defining a ring with variables x and x_1 needs attention (I'm not arguing that I should be allowed to do this - just that the error message should look less like it's a bug).
Example:
Macaulay2, version 1.9.2 with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone
i1 : R=QQ[x,x_1] warning: clearing value of symbol x to allow access to subscripted variables based on it : debug with expression debug 9868 or with command line option --debug 9868 warning: clearing value of symbol x to allow access to subscripted variables based on it : debug with expression debug 9868 or with command line option --debug 9868
o1 = R
Diane
Good point. What's needed is to rewrite this code of enginering.m2
scan(R.generatorSymbols,R.generators,(sym,val) -> sym <- val);
as
R.generatorSymbols <-R.generators
and then to modify the D code that implements <- so it detects problems like that. But does the inner interpreter even know about indexed variable tables? Hmm, no it's defined at top level.
We should also find out why the warning message appears twice.