A bug in a ring with matrix ordering
kwankyu · Wed Jan 08, 2020 4:11 am
Let us create a ring with a matrix ordering:
{{{
> intmat m[3][3] = 3, 0, 1, 0, 1, 0, 0, 0, 1;
> ring R = 0, (x,y,z), M(m);
> x > 1;
1
> y > 1;
1
> z > 1;
1
}}}
Hence the monomial ordering of R is a well-ordering, and the value of internal attribute `OrdSgn` of R should be 1. But presently `OrdSgn` of R is set to -1. There seems to be a bug in the implementation of `rCheckOrdSgn` function in `libpolys/polys/monomials/ring.cc` file.
This bug was revealed while fixing a bug of Sage tracked in #28954.
{{{
> intmat m[3][3] = 3, 0, 1, 0, 1, 0, 0, 0, 1;
> ring R = 0, (x,y,z), M(m);
> x > 1;
1
> y > 1;
1
> z > 1;
1
}}}
Hence the monomial ordering of R is a well-ordering, and the value of internal attribute `OrdSgn` of R should be 1. But presently `OrdSgn` of R is set to -1. There seems to be a bug in the implementation of `rCheckOrdSgn` function in `libpolys/polys/monomials/ring.cc` file.
This bug was revealed while fixing a bug of Sage tracked in #28954.