From 7e310967ce8f8ffe301879911807b42e63d76423 Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Sat, 17 Feb 2024 07:43:50 +0100 Subject: [PATCH] More adjustments to expected upstream changes --- examples/ZeroDec.jl | 2 +- src/Rings/PBWAlgebra.jl | 2 +- src/Rings/mpoly.jl | 8 ++++---- src/exports.jl | 1 + src/imports.jl | 2 +- test/Rings/orderings.jl | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/ZeroDec.jl b/examples/ZeroDec.jl index bd4afd851801..2df78ad172af 100644 --- a/examples/ZeroDec.jl +++ b/examples/ZeroDec.jl @@ -27,7 +27,7 @@ before returning the primary decomposition. #OUTPUT: Primary decomposition of I with associated primes in a list function zerodecomp(I::Singular.sideal, outputReduced::Bool = false, usefglm::Bool = false) - if ordering(I.base_ring) != :lex + if Singular.ordering(I.base_ring) != :lex Icopy = changeOrderOfBasering(I, :lex); else Icopy = Singular.deepcopy(I) diff --git a/src/Rings/PBWAlgebra.jl b/src/Rings/PBWAlgebra.jl index 01336c8bd689..d7f9d7afd4a4 100644 --- a/src/Rings/PBWAlgebra.jl +++ b/src/Rings/PBWAlgebra.jl @@ -529,7 +529,7 @@ function _opposite(a::PBWAlgRing{T, S}) where {T, S} n = length(revs) bsring = Singular.PluralRing{S}(ptr, a.sring.base_ring, revs) bspolyring, _ = Singular.polynomial_ring(a.sring.base_ring, - revs, ordering = ordering(bsring)) + revs, ordering = Singular.ordering(bsring)) bsrel = Singular.zero_matrix(bspolyring, n, n) for i in 1:n-1, j in i+1:n bsrel[i,j] = _unsafe_coerce(bspolyring, a.relations[n+1-j,n+1-i], true) diff --git a/src/Rings/mpoly.jl b/src/Rings/mpoly.jl index 7e0b185185cb..c4864147b7e0 100644 --- a/src/Rings/mpoly.jl +++ b/src/Rings/mpoly.jl @@ -158,7 +158,7 @@ mutable struct IdealGens{S} r.isGB = S.isGB r.isReduced = isReduced if T <: Union{MPolyRing, MPolyRingLoc} - r.ord = monomial_ordering(Ox, ordering(base_ring(S))) + r.ord = monomial_ordering(Ox, Singular.ordering(base_ring(S))) end r.keep_ordering = true return r @@ -311,7 +311,7 @@ function singular_generators(B::IdealGens, monorder::MonomialOrdering=default_or singular_assure(B) # in case of quotient rings, monomial ordering is ignored so far in singular_poly_ring isa(B.gens.Ox, MPolyQuoRing) && return B.gens.S - isdefined(B, :ord) && B.ord == monorder && monomial_ordering(B.Ox, ordering(base_ring(B.S))) == B.ord && return B.gens.S + isdefined(B, :ord) && B.ord == monorder && monomial_ordering(B.Ox, Singular.ordering(base_ring(B.S))) == B.ord && return B.gens.S SR = singular_poly_ring(B.Ox, monorder) f = Singular.AlgebraHomomorphism(B.Sx, SR, gens(SR)) return Singular.map_ideal(f, B.gens.S) @@ -544,7 +544,7 @@ function singular_poly_ring(Rx::MPolyRing{T}; keep_ordering::Bool = false) where if keep_ordering return Singular.polynomial_ring(singular_coeff_ring(base_ring(Rx)), _variables_for_singular(symbols(Rx)), - ordering = ordering(Rx), + ordering = internal_ordering(Rx), cached = false)[1] else return Singular.polynomial_ring(singular_coeff_ring(base_ring(Rx)), @@ -613,7 +613,7 @@ Fields: function MPolyIdeal(Ox::T, s::Singular.sideal) where {T <: MPolyRing} r = MPolyIdeal(IdealGens(Ox, s)) #=if s.isGB - ord = monomial_ordering(Ox, ordering(base_ring(s))) + ord = monomial_ordering(Ox, Singular.ordering(base_ring(s))) r.ord = ord r.isGB = true r.gb[ord] = r.gens diff --git a/src/exports.jl b/src/exports.jl index d326c628d8e4..df002cd2f7f0 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -1117,6 +1117,7 @@ export orbit_polytope export orbit_representatives_and_stabilizers export orbits export order, has_order, set_order +export ordering export order_field_of_definition export orders_centralizers export orders_class_representatives diff --git a/src/imports.jl b/src/imports.jl index b17da7fc48b9..f2df7ed9bc66 100644 --- a/src/imports.jl +++ b/src/imports.jl @@ -101,7 +101,7 @@ import AbstractAlgebra: NCRingElem, number_of_generators, number_of_variables, - ordering, + internal_ordering, parent_type, polynomial_ring, PolyRing, diff --git a/test/Rings/orderings.jl b/test/Rings/orderings.jl index bc3dfb2c8eb6..522d2373e6b5 100644 --- a/test/Rings/orderings.jl +++ b/test/Rings/orderings.jl @@ -323,7 +323,7 @@ end negdeglex([x,y,s])*negdegrevlex([t,u]), negwdeglex([x,y,s],[1,2,3])*negwdegrevlex([t,u],[1,2])) @test O == monomial_ordering(R, singular(O)) - @test O == monomial_ordering(R, ordering(singular_poly_ring(R, O))) + @test O == monomial_ordering(R, Singular.ordering(singular_poly_ring(R, O))) end @test_throws ErrorException monomial_ordering(R, Singular.ordering_lp(4))