Open tthsqe12 opened 1 year ago
The ordering must cover all variables, resp. the corresponding matrix must be a square matrix of full rank. Maybe a new function is_ordering(ordering,R::PolyRing) helps.
How about all the other functions such as terms, leading_term etc. Same problem?
well, the user-facing cmp
sometimes detects this and throws an error, but I am now thinking that the error that cmp
can throw is useless.
All of the terms, coefficients, etc. don't detect this. Maybe one should be able to order x+y
wrt lex([x,y])
, but trying to order x+y+z
wrt lex([x,y])
should probably throw.
Um 10 habe ich das wöchentliche Algebraische Geometrie Treffen. 9:45?
Am 09.11.2022 um 14:03 schrieb Hans Schoenemann @.***>:
The ordering must cover all variables, resp. the corresponding matrix must be a square matrix of full rank. Maybe a new function is_ordering(ordering,R::PolyRing) helps.
— Reply to this email directly, view it on GitHub https://github.com/oscar-system/Oscar.jl/issues/1697#issuecomment-1308719524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASSXEQLI2P567426VIQMITWHOOLVANCNFSM6AAAAAAR3MZCGA. You are receiving this because you were mentioned.
Here is an only tangentially related issue brough to my attention by @afkafkafk13. Oscar's leading_ideal
function currently only works with global ordering because it calls groebner_basis
. Can we get around this just by using standard_basis
instead?
julia> R, (x, y, z) = QQ["x", "y", "z"]
(Multivariate Polynomial Ring in x, y, z over Rational Field, fmpq_mpoly[x, y, z])
julia> o = monomial_ordering(R, Singular.ordering_ds(3))
negdegrevlex([x, y, z])
julia> i = ideal([x+x*z, y+y*z])
ideal(x*z + x, y*z + y)
julia> leading_ideal(i; ordering = o)
ERROR: Ordering must be global
julia> my_leading_ideal(i::MPolyIdeal; ordering::MonomialOrdering) = ideal(base_ring(i), map(p->leading_term(p; ordering = o), gens(standard_basis(i; ordering = o))));
julia> my_leading_ideal(i; ordering = o)
ideal(x, y)
Yes, we should use standard_basis
in leading_ideal
.
To me is_global and is_total are two properties of orderings which should not be mixed in any way.
I suggested the name is_total in this morning's meeting, because the relevant property here is being a total ordering on the set of exponents ${\mathbb N}_0^n$ for a specified $n$ (number of variables in the polynomial ring, in which its use is desired). As @hannes14 pointed out: If $n$ is not equal to the number of columns of the quadratic ordering matrix, is_total should return false; if n matches the number of columns, it is a question on the ordering matrix being of maximal rank.
Due to the new definition of
is_global
, the following error is not caught by https://github.com/oscar-system/Oscar.jl/blob/c45e777cba4ef1ef0643e1712f5f09d221db6c45/src/Rings/groebner.jl#L159-L160@wdecker @ederc