#12188: Bug in is_smooth for curves over CC
----------------------------------+-----------------------------------------
   Reporter:  johanbosman         |          Owner:  AlexGhitza
       Type:  defect              |         Status:  new       
   Priority:  major               |      Milestone:  sage-4.8  
  Component:  algebraic geometry  |       Keywords:  singular  
Work_issues:                      |       Upstream:  N/A       
   Reviewer:                      |         Author:            
     Merged:                      |   Dependencies:            
----------------------------------+-----------------------------------------
Changes (by burcin):

 * cc: malb, vbraun (added)


Comment:

 I'm not sure if this is actually supposed to work in Sage right now.
 Multivariate polynomial rings over `CC` use a generic implementation. The
 error message should just say "First parameter's ring must be multivariate
 polynomial ring via libsingular." This is not entirely clear, but at least
 it is a less scary message than "singular_ring_delete(ring*) called with
 NULL pointer."

 Here is a shorter segment to reproduce the problem:

 {{{
 sage: P.<X,Y,Z> = CC[]
 sage: I = P*X
 sage: GroebnerStrategy(I)
   File "/home/burcin/sage/sage-4.7.2/local/bin/sage-ipython", line 52, in
 <module>
     ipy_sage.mainloop(sys_exit=1, banner='')
   File "/home/burcin/sage/sage-4.7.2/local/lib/python2.6/site-
 packages/IPython/Shell.py", line 76, in mainloop
     self.IP.mainloop(banner)
   File "/home/burcin/sage/sage-4.7.2/local/lib/python2.6/site-
 packages/IPython/iplib.py", line 1762, in mainloop
     self.interact(banner)
   File "/home/burcin/sage/sage-4.7.2/local/lib/python2.6/site-
 packages/IPython/iplib.py", line 2001, in interact
     more = self.push(line)
   File "/home/burcin/sage/sage-4.7.2/local/lib/python2.6/site-
 packages/IPython/iplib.py", line 2305, in push
     more = self.runsource('\n'.join(self.buffer), self.filename)
   File "/home/burcin/sage/sage-4.7.2/local/lib/python2.6/site-
 packages/IPython/iplib.py", line 2231, in runsource
     if self.runcode(code) == 0:
   File "/home/burcin/sage/sage-4.7.2/local/lib/python2.6/site-
 packages/IPython/iplib.py", line 2260, in runcode
     exec code_obj in self.user_global_ns, self.user_ns
   File "<ipython console>", line 1, in <module>
 Exception KeyError: (The ring pointer 0x0,) in  ignored
 singular_ring_delete(ring*) called with NULL pointer.
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/burcin/sage/sage-4.7.2/<ipython console> in <module>()

 /home/burcin/sage/sage-4.7.2/local/lib/python2.6/site-
 packages/sage/libs/singular/groebner_strategy.so in
 sage.libs.singular.groebner_strategy.GroebnerStrategy.__cinit__
 (sage/libs/singular/groebner_strategy.cpp:2169)()

 TypeError: First parameter's ring must be multivariate polynomial ring via
 libsingular.
 }}}

 This is the message I get after adding an "except +" after the declaration
 of `singular_ring_delete()`.

 It seems that `GroebnerStrategy.__cinit__()` (why `__cinit__` and not
 `__init__`?) already has a doctest for this case. I don't see why the
 error message is not caught by the doctesting framework. Are these cython
 errors printed to `stderr` now?

 In any case, `GroebnerStrategy.__cinit__()` raises an error on line 99 of
 `sage/libs/singular/groebner_strategy.pyx`. I thought the `__dealloc__()`
 method is not called if there is an error during `__init__()`. Any ideas
 what is going wrong here?

 I suggest to open a new ticket to use libsingular from multivariate
 polynomial rings over CC and RR. This ticket can be about eliminating the
 scary `singular_ring_delete` error message.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12188#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to