Skip to content

Commit

Permalink
More adjustments to expected upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
joschmitt committed Feb 21, 2024
1 parent 6baa077 commit 7e31096
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/ZeroDec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Rings/PBWAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/Rings/mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)),
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/imports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ import AbstractAlgebra:
NCRingElem,
number_of_generators,
number_of_variables,
ordering,
internal_ordering,
parent_type,
polynomial_ring,
PolyRing,
Expand Down
2 changes: 1 addition & 1 deletion test/Rings/orderings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7e31096

Please sign in to comment.