In order to mix James algebra expressions with standard algebraic notation, we must adopt the interpretation where juxtaposition or "space" is interpreted as multiplication. If you don't need to mix them, you can adopt the "addition space" interpretation, which is in some ways more fundamental, but it will not be explored in this article.

Here are the James operations and their traditional equivalents, for the "multiplication space" interpretation:

\(\def \ex #1{\enclose{top left}{#1}\,}

\def \lo #1{\enclose{bottom left}{#1}\,}

\def \re #1{\enclose{angletop}{#1}\,}

\def \no #1{\enclose{top right}{#1}\,}

\def \fracnl #1#2{\genfrac{}{}{0pt}{1}{#1}{#2}}

\def \dfracnl #1#2{\genfrac{}{}{0pt}{0}{#1}{#2}}

x y z = x × y × z \ \ \ \ \ \ \ \ \ \ \ {\small\text{(juxtaposition/grouping is n-ary multiplication, same as traditional algebra)}} \)

\(\ \ \ \ \ \ = 1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\small\text{(and hence the empty expression is equal to the multiplicative identity)}} \)

\(\ex{x} = \exp{x} = e^{x}\ \ \ \ \ \ \ \ {\small\text{(left bar with overline is natural exponential) Jeff's bracket notation: (x)}} \)

\(\lo{x} = \ln{x} = \log_e{x}\ \ \ \ \ {\small\text{(left bar with underline is natural logarithm) Jeff's bracket notation: [x]}} \)

\(\re{x} = \frac1x\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\small\text{(left slash with overline is reciprocal) Jeff's bracket notation: <x>}} \)

So we have three unary functions, represented by three kinds of enclosure, and we have one n-ary function, represented by grouping. "Juxtapostion" means "placing side by side" and is here contrasted with "nesting" meaning "placing one inside the other". I'm using "grouped" here to mean either juxtaposed directly, or juxtaposed with something that's juxtaposed with something that's ...". The order of the grouped operands is irrelevant because the n-ary function that grouping represents (multiplication) is fully associative and commutative. So "grouped" here means simply existing in the same space within the nested hierarchy of enclosures. And there is no reason why such groups of expressions have to be arranged horizontally. They can also be arranged vertically, or two dimensionally.

**Mnemonics**

The logarithm enclosure \(\lo{x}\) looks like an uppercase letter L, the initial letter of the word "logarithm".

The exponential enclosure \(\ex{x}\) looks like an inverted L as it represents the inverse of the logarithm function.

The left side of the reciprocal enclosure \(\re{x}\) looks like a division slash, the overline looks like a vinculum, and empty space is 1, so we have \(\ \ \re{x} = 1 / x = {\raise 0.6ex\dfrac1{\raise 0.6ex x}}\). Yes, it looks like a square root sign without the hook. It's a cute fact that \(\re{x}= \sqrt[-1]{x}\). Also \(\sqrt[n]{x}= x^{\hspace{2mu}\re{\hspace{-2mu}n}}\).

Note that the following pairs of nested enclosures cancel: \(\ \lo{\ex{x}} = x, \ \ \ex{\lo{x}} = x, \ \ \re{\re{x}} = x\).

From those interpretations we can derive the following numbers and elementary functions:

**Whole numbers**

\(\lo{} = 0 \)

\(\lo{\ex{}} = 1 \)

\(\lo{\ex{}\ex{}} = 2 \)

\(\lo{\ex{}\ex{}\ex{}} = 3 \)

\(\small\text{etc.}\)

**Elementary functions**

\(x\re{y} = \frac x y \)

\(\lo{\re{\ex{x}}} = -x \)

\(\lo{\ex{x}\ex{y}\ex{z}} = x + y + z \ \ \ \ \ \ \ \ \ \ \ {\small\text{(n-ary addition)}}\)

\(\lo{\ex{x}\re{\ex{y}}} = x - y \)

\(\ex{\lo{x}y} = x^y \)

\(\ex{\lo{x}\re{y}} = x^\frac1y = \sqrt[y]{x} \)

\(\lo{x}\re{\lo{y}} = log_y{x} \)

The enclosure notations for negation, addition and subtraction have little to recommend them, but those for power and its left and right inverses, root and log (with a variable base), indicate useful relationships between these 3 operations, that are lost in traditional notation. Notice how the reciprocal enclosure \(\re{\phantom{x}}\) functions as a general-purpose inverse-function generator.

You probably should pause here, get yourself a pen and paper, choose one or two of the James expressions on the left, translate each of its enclosures into familiar notation, and convince yourself that it is indeed equivalent to the traditional notation on the right.

As a convenience, a subscripted expression, e.g \(_y\), immediately to the right of a log enclosure, can be taken as equivalent to the same expression inside a nested reciprocal-of-log enclosure \(\re{\lo{y}}\) to obtain the following compact notation for log, which may be worthy of general adoption, even outside of any consideration of James algebra.

\(\hspace{1mu}\lo{x}_{y} = \log_y{x} \)

**Clever thing #1**

You don't need to know the interpretations of the three kinds of enclosure, in order to solve or simplify equations using this notation. What Jeff James discovered in 1993 is that we only need the following four mindless pattern-matching axioms (and, for convenience, some other simple rules derived from them):

**Axioms**

\(\ex{\lo{x}} = x \ \ \ \ \ \ \ {\small\text{(inversion 1) ( } \lo{\phantom{x}} \text{ and } \ex{\phantom{x}} \text{are functional inverses of each other)}} \)

\(\lo{\ex{x}} = x \ \ \ \ \ \ \ {\small\text{(inversion 2)}} \)

\(x\,\re{x} = \ \ \ \ \ \ \ \ \ {\small\text{<the empty expression> (cancellation)}} \)

\(\ex{x\,\lo{yz}} = \ex{x\,\lo{y}}\ex{x\,\lo{z}} \ \ \ \ \ {\small\text{(distribution)}}

\)

**Well formed expressions**

My understanding is that the only expression that is

*not*well formed is \(\re{\lo{}}\), as it represents \(\frac10\).

It may seem strange, but \(\lo{\lo{}} = \ln{0} = -\infty\)

*is*well formed. It occurs, for example, in the expression \(\ex{\lo{\lo{}}y} = 0^y\).

The expression \(\lo{\lo{\re{\ex{}}}} = \ln{-1}\) is also well formed, and represents the imaginary number \(i\pi\). This can be seen by taking Euler's identity as \(e^{i\pi} = -1\) and taking natural logs of both sides. This gives access to complex numbers.

Some useful theorems (rules derived from the above axioms and proved in James' thesis) are:

**Theorems**

\(x\,\lo{}z = \ \lo{} \ \ \ \ \ \ \ \ \ \ \ \ \ {\small\text{(multiplication by zero)}} \)

\(\re{\re{x}} = x \ \ \ \ \ \ \ \ \ \ \ \ {\small\text{(double reciprocal) ( }} \re{\phantom{x}} {\small\text{is its own functional inverse)}}\)

\(\re{x}\re{y}\re{z} = \re{xyz} \ \ \ \ \ \ \ \\ \ {\small\text{(product of reciprocals)}} \)

\(\re{\ex{\lo{x}y}} = \ex{\lo{\re{x}}y} \ \ \ \ \ \ \ \ \ {\small\text{(reciprocal of a power)}} \)

\(x\dots x = \ex{\lo{x}\lo{\ex{}\dots\,\ex{}}}\ \ {\small\text{(iterated multiplication is power)}} \)

The iteration theorem above, is intended to indicate the same number of \(\ex{}\)'s as \(x\)'s, and can also be used to show that iterated addition is multiplication.

**Clever thing #2**

You don't have to remember any rules about operation precedence, commutativity, associativity (right or left), or operand order. James expressions are fully commutative and associative, so the ordering of sub-expressions that are grouped within an enclosure doesn't matter, nor does the ordering of groups at the outermost level. To demonstrate this, we can rewrite some of the elementary functions that were shown earlier, with each one rearranged so that \(y\) is on the left:

\(\re{y}x = \frac x y \)

\(\lo{\re{\ex{y}}\ex{x}} = x - y \)

\(\ex{y\,\lo{x}} = x^y \)

\(\ex{\re{y}\lo{x}} = x^\frac1y = \sqrt[y]{x} \)

\(\re{\lo{y}}\lo{x} = \log_y{x} \)

We can even arrange them vertically, as: \({\dfracnl{x}{\re{y}}} = \ \dfrac x y, \ \ \ {\dfracnl{\lo{x}}{\re{\lo{y}}}} = \log_y{x}, \ \ \ \ex{\dfracnl{\lo{x}}{\re{y}}} = \sqrt[y]{x}, \ \ \ \ \ex{\dfracnl{y}{\lo{x}}} = x^y\).

To make this point more concrete, let's take a closer look at one of these expressions, \(\ex{y\,\lo{x}} = \ex{\lo{x}y}\). Notice that what distinguishes the base from the exponent here is not the sub-expressions' order. Rather, it is which sub-expression is inside \(\lo{\phantom{x}}\) and which is not.

Now let's consider a trickier example. In traditional notation we may come across iterated powers, such as \(\large x^{y^z}\). To a novice, this expression is ambiguous. It raises the question: is this the same as \(\large x^{(y^z)}\) or \({\large (x^y)}^{\small z}\). In James notation however, it is simply impossible to write such an ambiguous expression. The first possibility \(\large x^{(y^z)}\) would be written \(\ex{\lo{x}\ex{\lo{y}z}}\) and the second \({\large (x^y)}^{\small z}\) would be written \(\ex{\lo{\ex{\lo{x}y}}z}\). The only way to answer this question with traditional notation, is to memorise the rule that \(\large x^{y^z} = \large x^{(y^z)}\), or in other words, power is right associative — a rule that is difficult to remember, because every other binary operation is

*left*associative (or fully associative).

But it gets even better. James notation can provide us with still further insight here. Notice how, in the second expression, there are two opposite enclosures that are enclosing the same sub-expression \(\lo{x}y\). These opposite enclosures cancel, leaving \(\ex{\lo{x}yz}\) which is the same as \(x^{yz}\). So you don't need to remember the rule that \({\large (x^y)}^{\small z} = x^{yz}\) either.

Incidentally, that's the reason why power-by-superscript is right associative. There wouldn't be much point in having it be left associative when that can be written more simply as a power whose exponent is a product.

I note that, although we are free to move sub-expressions around, it is useful to have canonical arrangements, to facilitate human pattern recognition. We recommend that, If there is a sub-expression that has a reciprocal enclosure, it should be placed on the right or the bottom (like a divisor). Otherwise, a sub-expression that is an exponent should go on the right or the top. The only expressions in this article that have not been laid out canonically are the horizontal arrangements above that have \(y\) on the left.

**Clever thing #3**

**Boolean algebra**

We can create a similarly-minimal set of primitives for two-valued Boolean algebra by defining a fourth kind of enclosure, as shorthand for a certain combination of the elementary-function primitives:

\(\no{p} = \ \lo{\ex{}\!\re{\ex{p}}} = 1-p = \lnot\hspace{2mu}p \ \ \ \ {\small\text{(overline with right bar is one-complement or logical negation or logical NOT)}} \)

Defining this operation as the complement from 1, means that it is useful for probability calculations with values

*between*zero and one, as well as for two-valued logic.

The mnemonic is the similarity in shape between this "outfix" logical-negation enclosure \(\no{\phantom{x}}\) and the traditional prefix logical-negation symbol \(\lnot\ \). But note that they are not interchangeable, as the empty NOT enclosure \(\no{}\) represents the constant \(\mathrm{false}\).

Then we obtain the following:

**Boolean values and functions**

\(pqr = p \land q \land r \ \ \ {\small\text{(juxtaposition/grouping is n-ary logical AND)}} \)

\(\ = 1 = \mathrm{true} \ \ \ \ \ \ \ \ {\small\text{(and hence the empty expression is the identity element for AND)}} \)

\(\no{}\, = 0 = \mathrm{false} \ \ \ \ \ \ \ {\small\text{(the logical negation of TRUE)}} \)

\(\no{p} = \lnot(p) \ \ \ \ \ \ \ \ \ \ \ \ {\small\text{(logical NOT)}} \)

\(\no{pqr} = \lnot(p\land q\land r) \ \ \ \ \ \ {\small\text{(n-ary NAND)}} \)

\(\no{\no{p}\no{q}\no{r}} = p\lor q\lor r \ \ \ \ \ \ \ {\small\text{(n-ary OR)}} \)

\(\no{p}\no{q}\no{r} = \lnot(p\lor q\lor r) \ \ \ {\small\text{(n-ary NOR)}} \)

\(\no{p \no{q}} \ \ \ \ = \ \ \ \ p\Rightarrow q \ \ \ \ \ \ \ \ {\small\text{(implication)}} \)

\(\no{\no{p \no{q}}\no{q \no{p}}} = p\oplus q \ \ \ \ \ \ \ \ \ {\small\text{(XOR)}} \)

Historically, this came

*before*James algebra. Instead of defining the logical-negation operation in terms of the James operations, Boolean algebra can be axiomatised independently, using various small sets of simple axioms, such as:

**Boolean axioms**

\(\no{p \no{p}} = \ \ \ \ \ \ \ \ \ {\small\text{<the empty expression> (p implies p)}} \)

\(\no{\no{p}\no{q}}r = \no{\no{pr}\no{qr}} \ \ \ \ \ {\small\text{(logical distribution)}} \)

As with the James algebra, commutativity and associativity of juxtaposition or grouping are assumed. This notation and axiomatisation are due to George Spencer-Brown.

**Conclusion**

Binary operations and prefix unary operations cause nothing but trouble. They can be replaced with a small set of unary outfix operations (enclosures) in combination with a single n-ary operation represented by juxtaposition or grouping that is commutative and associative. This greatly reduces the number of transformation rules that must be remembered.

The use of these novel enclosures and the "multiplication space" interpretation for James algebra, mean that the adoption of James algebra is no longer all-or-nothing, but can be gradual or partial, as this form of James algebra is compatible with traditional notation.