Opened 3 years ago
Last modified 3 years ago
#25250 new defect
Ideal operations unsupported over quotient rings
Reported by: | gh-BrentBaccala | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-8.2 |
Component: | algebra | Keywords: | Singular, quotient ring, ideal |
Cc: | slelievre | 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 (2)
comment:1 Changed 3 years ago by
comment:2 Changed 3 years ago by
- Cc slelievre added