Skip to content

Commit

Permalink
pass the whole MonomialOrdering to singular_poly_ring
Browse files Browse the repository at this point in the history
  • Loading branch information
tthsqe12 committed Jun 28, 2022
1 parent 302bfbd commit 720184d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Modules/missing_functionality.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function lift(f::MPolyElem, I::MPolyIdeal, o::MonomialOrdering)
iszero(f) && return zero(MatrixSpace(base_ring(I), 1, ngens(I)))
R = parent(f)
R == base_ring(I) || error("polynomial does not belong to the base ring of the ideal")
Rsing = singular_poly_ring(R, o.o)
Rsing = singular_poly_ring(R, o)
fsing = Singular.Ideal(Rsing, [Rsing(f)])
gsing = Singular.Ideal(Rsing, Rsing.(gens(I)))
a_s, rem_s, u_s = lift(gsing, fsing, false, false, false)
Expand Down
2 changes: 1 addition & 1 deletion src/Rings/mpoly-graded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ end

function singular_poly_ring(R::MPolyRing_dec; keep_ordering::Bool = false)
if !keep_ordering
return singular_poly_ring(R.R, default_ordering(R).o)
return singular_poly_ring(R.R, default_ordering(R))
end
return singular_poly_ring(R.R, keep_ordering = keep_ordering)
end
Expand Down
6 changes: 3 additions & 3 deletions src/Rings/mpoly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ end
singular(ord::MonomialOrdering) = singular(ord.o)
singular(ord::ModuleOrdering) = singular(ord.o)

function singular_poly_ring(Rx::MPolyRing{T}, ord::Orderings.AbsOrdering) where {T <: RingElem}
function singular_poly_ring(Rx::MPolyRing{T}, ord::MonomialOrdering) where {T <: RingElem}
return Singular.PolynomialRing(singular_coeff_ring(base_ring(Rx)),
[string(x) for x = Nemo.symbols(Rx)],
ordering = singular(ord),
Expand Down Expand Up @@ -571,7 +571,7 @@ end
function singular_assure(I::BiPolyArray, ordering::MonomialOrdering)
if !isdefined(I, :S
I.ord = ordering.o
I.Sx = singular_poly_ring(I.Ox, ordering.o)
I.Sx = singular_poly_ring(I.Ox, ordering)
I.S = Singular.Ideal(I.Sx, elem_type(I.Sx)[I.Sx(x) for x = I.O])
if I.isGB
I.S.isGB = true
Expand All @@ -581,7 +581,7 @@ function singular_assure(I::BiPolyArray, ordering::MonomialOrdering)
= attached, thus we have to create a new singular ring and map the ideal. =#
if !isdefined(I, :ord) || I.ord != ordering.o
I.ord = ordering.o
SR = singular_poly_ring(I.Ox, ordering.o)
SR = singular_poly_ring(I.Ox, ordering)
f = Singular.AlgebraHomomorphism(I.Sx, SR, gens(SR))
I.S = Singular.map_ideal(f, I.S)
I.Sx = SR
Expand Down

0 comments on commit 720184d

Please sign in to comment.