Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dangerous symbol names that begin with a lowercase letter

I am looking for a full list of dangerous symbol names that begin with a lowercase letter in Mathematica.

At this moment I know three such names: min, max and lim. These names appear in the LimitsPositioningTokens list and are being treated as operators at least when they are entered in the FrontEnd with a superscript:

In[3]:= Options[$FrontEnd,LimitsPositioningTokens]
Out[3]= {LimitsPositioningTokens->{\[Sum],\[Product],\[Intersection],
         \[Union],\[UnionPlus],\[Wedge],\[Vee],lim,max,min,\[CirclePlus],
         \[CircleMinus],\[CircleTimes],\[CircleDot]}}

enter image description here

For example, type in the FrontEnd the following (use Ctrl+^ for making superscript - it is important!):

In[1]:= max^n+4
(max^n+4)//HoldComplete//FullForm
Out[1]= 4 max^n
Out[2]//FullForm= HoldComplete[Times[Power[max,n],Plus[4]]] 

screen

You see that max^n+4 is interpreted as 4*max^n in this case.

Can anyone explain what LimitsPositioningTokens option really does?

Are there other dangerous symbols that begin with a lowercase letter in Mathematica?

like image 349
Alexey Popkov Avatar asked Aug 10 '11 08:08

Alexey Popkov


1 Answers

I cannot confirm the problem you report. Besides, the tokens you've found seem to be strings rather than symbols.

enter image description here

This is on win7-64/M8.0.1, my wife's mac lion/M8 doesn't show it either.

The fact that they are strings seems to be consistent with the description on the doc page of LimitsPositioning

LimitsPositioningTokens is a Cell option which can be set to a list of forms for which LimitsPositioning->True should be used.

All examples given there use strings.


Update to illustrate the point made in the comments below

This is with the standard LimitsPositioningTokens setting in $FrontEnd:

enter image description here

and this is with SetOptions[$FrontEnd, LimitsPositioningTokens -> {}]:

enter image description here

Please note that the $FrontEnd setting with SetOptions is sticky. It is likely that yours isn't at default anymore. Use the option inspector to return LimitsPositioningTokens to its default value (search for LimitsPositioningTokens with Global Settings on and remove the cross next to the variable if there is any).

like image 175
Sjoerd C. de Vries Avatar answered Oct 03 '22 01:10

Sjoerd C. de Vries