Syntax of Universal Algebra
<p>The functions and operations in an algebra are often in the form: f: X<sup>n</sup>→X
An operation such as addition which takes two operands and returns a single value: X+X→X
This is known as 'infix' notation where the operation symbol is put between the values it is operating on.
In order to generalise this to any number of operands, prefix notation is used. This also emphasises that it is a function: +(X,X)→X
We can represent (X,X) as X².
When we generalise from 'binary' to 'n-ary' operations we get the form here: f: X<sup>n</sup>→X
We can have multiple operations. A capital sigma is used to indicate this: Σ f: X<sup>n</sup>→X</p>
<table><tbody>
<tr>
<td><img src="/ee1bca56-193b-587a-85f0-02120c0c9013.png"/></td>
<td>
<p>Using these function signatures we can build up expressions of any complexity. This is built up recursively, that is, an operand may be not only a constant of a variable but also another expression.
The expression on the left would usually be written: 3+x*2.  Here it is drawn as a tree structure to emphasise its recursive nature.</p>
</td>
</tr>
</tbody></table>
<p>Adapted from: http://www.euclideanspace.com/maths/algebra/index.htm</p>