此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)

Operators without Built-in Meanings

When you enter a piece of input such as 2+2, Mathematica first recognizes the + as an operator and constructs the expression Plus[2, 2], then uses the built-in rules for Plus to evaluate the expression and get the result 4.
But not all operators recognized by Mathematica are associated with functions that have built-in meanings. Mathematica also supports several hundred additional operators that can be used in constructing expressions, but for which no evaluation rules are initially defined.
You can use these operators as a way to build up your own notation within the Mathematica language.
The CirclePlus is recognized as an infix operator, but has no predefined value.
In[1]:=
Click for copyable input
Out[1]//FullForm=
In StandardForm, CirclePlus prints as an infix operator.
In[2]:=
Click for copyable input
Out[2]=
You can define a value for CirclePlus.
In[3]:=
Click for copyable input
Now CirclePlus is not only recognized as an operator, but can also be evaluated.
In[4]:=
Click for copyable input
Out[4]=
xCirclePlusyCirclePlus[x,y]
xTildeTildeyTildeTilde[x,y]
xThereforeyTherefore[x,y]
xLeftRightArrowyLeftRightArrow[x,y]
DelxDel[x]
SquarexSquare[x]
LeftAngleBracketx,y,...RightAngleBracketAngleBracket[x,y,...]

A few Mathematica operators corresponding to functions without predefined values.

Mathematica follows the general convention that the function associated with a particular operator should have the same name as the special character that represents that operator.
\[Congruent] is displayed as Congruent.
In[5]:=
Click for copyable input
Out[5]=
It corresponds to the function Congruent.
In[6]:=
Click for copyable input
Out[6]//FullForm=
x \[name] yname[x, y]
\[name] xname[x]
\[Leftname] x,y,... \[Right name]
name[x, y, ...]

The conventional correspondence in Mathematica between operator names and function names.

You should realize that even though the functions CirclePlus and CircleTimes do not have built-in evaluation rules, the operators CirclePlus and CircleTimes do have built-in precedences. "Operator Input Forms" lists all the operators recognized by Mathematica, in order of their precedence.
The operators CircleTimes and CirclePlus have definite precedences—with CircleTimes higher than CirclePlus.
In[7]:=
Click for copyable input
Out[7]//FullForm=

Some two-dimensional forms without built-in meanings.

Subscripts have no built-in meaning in Mathematica.
In[8]:=
Click for copyable input
Out[8]//InputForm=
Most superscripts are however interpreted as powers by default.
In[9]:=
Click for copyable input
Out[9]//InputForm=
A few special superscripts are not interpreted as powers.
In[10]:=
Click for copyable input
Out[10]//InputForm=
Bar and hat are interpreted as OverBar and OverHat.
In[11]:=
Click for copyable input
Out[11]//InputForm=