Opened 3 years ago

Last modified 3 years ago

# Ideal operations unsupported over quotient rings

Reported by: Owned by: gh-BrentBaccala minor sage-8.2 algebra Singular, quotient ring, ideal slelievre N/A

### 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
_=-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.

### comment:1 Changed 3 years ago by slelievre

• Authors set to slelievre

### comment:2 Changed 3 years ago by slelievre

• Authors slelievre deleted
• Cc slelievre added
Note: See TracTickets for help on using tickets.