Hi Francisco,

On 5 Jun., 08:26, Simon King <[email protected]> wrote:
> Anyway, IMHO it *should* work to do
> sage: P*[p.sage_poly(P) for p in I]  # not implemented

My fault: Singular has an optional parameter, determining whether a
short or a long polynomial representation is used. So, I should have
done:

sage: singular.eval('ring R')
'ring R;'
sage: singular.eval('short=0') # That's what I forgot to do
'short=0;'
sage: RS = singular('basering')
sage: br = GF(*repr(RS.charstr()).split(','))
sage: br
Finite Field of size 32003
sage: vars = [repr(singular.var(i)) for i in range(1,RS.nvars()+1)]
sage: vars
['x', 'y', 'z']
sage: P = br[tuple(vars)]
sage: I = singular.ideal(['x^2','y*z','z+x'])
sage: I  # now it is a long representation: x^2, not x2
x^2,
y*z,
x+z
sage: P*[p.sage_poly(P) for p in I]
Ideal (x^2, y*z, x + z) of Multivariate Polynomial Ring in x, y, z
over Finite Field of size 32003

I think the procedure above should be automated (but the term order
should be taken care of as well, I suppose). I'll open a ticket.

Cheers,
Simon

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to