Opened 5 years ago
Last modified 9 months ago
#25250 new defect
Ideal operations unsupported over quotient rings
Reported by: | Brent Baccala | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-8.2 |
Component: | algebra | Keywords: | Singular, quotient ring, ideal |
Cc: | Samuel Lelièvre | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Some basic ideal operations are unsupported over quotient rings.
R.<x,y,z> = QQ[] SE = R.quotient(y^2*z - x*(x-z)*(x+3*z)) (x,y,z) = SE.gens() I = ideal(x,z) J = ideal(SE(1))
Now, both quotient and saturation:
I.quotient(J) I.saturation(J)
fail with almost the same error message:
TypeError: Cannot call Singular function 'quotient' with ring parameter of type '<class 'sage.rings.quotient_ring.QuotientRing_generic_with_category'>'
Yet, we can perform the calculation by calling Singular directly:
def newquotient(i,j): iname = i._singular_().name() jname = j._singular_().name() return singular.ideal('quotient({0}, {1})'.format(iname, jname)).sage() newquotient(I,J)
Something similar would probably work for saturation.
The problem, as I see it, is two fold. First, in libs/singular/function.pyx's __call__
method, only rings of type MPolynomialRing_libsingular
or NCPolynomialRing_plural
are supported, although quotient rings can definitely be converted to Singular:
sage: SE._singular_() polynomial ring, over a field, global ordering // coefficients: QQ // number of vars : 3 // block 1 : ordering dp // : names x y z // block 2 : ordering C // quotient ring from ideal _[1]=-x^3-2*x^2*z+y^2*z+3*x*z^2
...so we should have something in __call__
that can handle a quotient ring, and maybe any ring that can be converted to a Singular representation.
Second, the ideal
and sat
functions in Singular don't seem to depend on the base ring being set, so the whole ring conversion problem is somewhat of a needless distraction. (Notice how simple the newquotient
routine is.) Perhaps Singular functions should accept an additional option to bypass setting the base ring.
Change History (3)
comment:1 Changed 5 years ago by
Authors: | → slelievre |
---|
comment:2 Changed 5 years ago by
Authors: | slelievre |
---|---|
Cc: | Samuel Lelièvre added |
Actually, I do not know why it does not work for saturation.
And some error occurs
I do not know why. Hope someone can help.