Hi all,

While playing with the quotient of a polynomial ring with an ideal, I 
encountered several glitches.

*) Trying to compute the inverse of something which is not invertible. 

I know it is kind of weird to try this. However, it raises a 
NotImplementedError exception, instead of something more informative such as 
NonInvertible or whatever. I am willing to patch this, but could someone tell 
me what is the correct exception to raise? 

*) Non-deterministic output of some (presumably deterministic) functions

Here is an example :

sage: R.<x1,x2> = QQ[]
sage: I = R.ideal(x2**2 + x1 - 2, x1**2 - 1)
sage: test = I.gen(0) + x2*I.gen(1)
sage: (test).lift( I )
[1, x2]                         # this is correct

sage: R.<x1,x2> = QQ[]
sage: I = R.ideal(x2**2 + x1 - 2, x1**2 - 1)
sage: test = I.gen(0) + x2*I.gen(1)
sage: (test + 1).lift( I )
[0, 0]                       # this is correct

sage: R.<x1,x2> = QQ[]
sage: I = R.ideal(x2**2 + x1 - 2, x1**2 - 1)
sage: test = I.gen(0) + x2*I.gen(1)
sage: (test).lift( I )
[0, 0]                       # this is WRONG !!! should be [1, x2]

It looks like this could be a caching issue, so I am not sure whether I need to 
open a new ticket for this, or if it is already "catch" by an already-opened 
ticket.

*) Segfault

The same kind of problem allows a small piece of code to cause segfaults in 
SAGE (apparently in singular-related stuff) : 

sage: R.<x1,x2> = QQ[]
sage: S = R.quotient_ring( R.ideal(x2**2 + x1 - 2, x1**2 - 1) )
sage: 1 / S(x1 + x2)        # should raise NotImplementedError
sage:
sage: R.<x1,x2> = QQ[]
sage: S = R.quotient_ring( R.ideal(x2**2 + x1 - 2, x1**2 - 1) )
sage: S.is_integral_domain()

---> BOOM

*) bizarre output of p.lift(….)

When R is a Polynomial Ring, I is an ideal of R, and p is a polynomial of I, 
then p.lift( I ) returns a polynomial combination of a (groebner) basis of I 
which is equal to p. However, when p is not in I, then p.lift( I ) returns 
[0,0,…,0]. I find this a bit strange. Should p.lift(…) raise an exception 
instead? This would be a change of specification, so I guess it should be 
discussed first…




---
Charles Bouillaguet
http://www.lifl.fr/~bouillaguet/



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to