TraditionalForm bug?

*To*: mathgroup at smc.vnet.net*Subject*: [mg66068] TraditionalForm bug?*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Fri, 28 Apr 2006 06:33:14 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

I just noticed something in my version of Mathematica: $Version 5.1 for Mac OS X (October 25, 2004) which certainly looks like a bug that should have been spotted a long time ago. The "bug" is simply this. Evaluate In[14]:= Sin' Out[14]= cos(#1)& This is fine. But now simple convert the above input to TraditionalForm and evaluate it again: In[15]:= \!\(\*FormBox[ SuperscriptBox["sin", "â?²", MultilineFunction->None], TraditionalForm]\) Out[15]= \!\(\*FormBox[ SuperscriptBox["sin", "â?²", MultilineFunction->None], TraditionalForm]\) What happens is that Mathematica converts Sin` to sin` and then forgets what sin means. This does not happen if you do the same with an argument: In[17]:= Sin'[x] Out[17]= cos(x) In[18]:= \!\(\*FormBox[ RowBox[{ SuperscriptBox["sin", "â?²", MultilineFunction->None], "(", "x", ")"}], TraditionalForm]\) Out[18]= cos(x) The embarrassing thing is that I discovered this while trying to show my students the advantages of functional notation, and in particular the fact that one can refer to functions and their derivatives without introducing unnecessary variables. Of course this is true, but if you sue TraditionalForm form input! This reminds me that there was recently a discussion of whether TraditionalForm is or is not suitable for this purpose. I recall that Paul Abbott and Daniel Lichtblau expressed opposing views and I was tempted to enter the fray but decided to stay out, because while my heart sided with Paul my brain did not. As is often the case the brain seems to have been right. Andrzej Kozlowski