Hi, 

I've just been hit by a quite annoying bug, a minimal example of which is

sage: r, b = var('r b', domain='real')
sage: s = function('a', latex_name=r'\alpha')(r)
sage: latex(s)    
\alpha\left(r\right)
sage: latex(s.simplify())
a\left(r\right)
sage: s - s.simplify()
a(r) - a(r)
sage: latex(s - s.simplify())
-a\left(r\right) + \alpha\left(r\right)

This occurs both in Sage 8.4 and 8.5.beta3. Notice that the output of 
latex(s.simplify()) is not correct ('a' instead of '\alpha') and the output 
of s - s.simplify() should be immediately zero. It is zero though if we add 
another simplify():
sage: (s - s.simplify()).simplify()
0

So it seems that the latex name of the function is lost somewhere in the 
interface between Sage and Maxima, the latter being invoked by the method 
simplify() (the code of simplify() is merely "return 
self._parent(self._maxima_())"). 
This bug is pretty annoying because it makes completely useless the latex 
display in a Jupyter notebook. 
What is strange is that the above example seems to be really minimal. In 
particular, if we remove the declaration of the symbolic variable b, which 
is not used at all (!), everything is OK. Same thing if we remove the 
argument domain='real'.  

Is this a known bug? Shall I open a ticket?

Eric. 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to