A dozen scores of operations.
Version of Monday 2 March 2020.
Dave Barber's e-mail and other pages.

§ 1. Like many mathematical articles, this one begins with a set, specifically S5 = { 0, 1, 2, 3, 4 }. Variables representing elements of this set are written a, b, c et cetera. Appearing also in the discussion are integers i, j, k, m and n, which are not necessarily elements of S5. Any arithmetic involving the members of S5 is done in modulo 5.

The principal undertaking is to introduce 240 ("dozen score" = 12 × 20) binary operations over this set, the operations satisfying two cancellation properties that can be explained after some notation is established. Each operation is denoted by a nonnegative integer followed by the nabla symbol: 0∇, 1∇, 2∇ … 239∇. Variables representing operations are written Z, Y, X et cetera. For an example of such an operation, here is the table that defines 58∇:

58∇ 0 1 2 3 4 second input firstinput 1 0 4 3 2 3 2 1 0 4 0 4 3 2 1 2 1 0 4 3 4 3 2 1 0

First-order cancellativity (FOC) is the well-known property where:

• If Z (a, b) equals Z (a, c), then b must equal c.
• If Z (a, c) equals Z (b, c), then a must equal b.
For the dozen-scores, FOC can also be described as:
• If Z (a + n, b) equals Z (a, b), then n must equal 0.
• If Z (a, b + n) equals Z (a, b), then n must equal 0.
As a result of FOC, no value is repeated within any row of the table, nor within any column. A Latin square results.

Second-order cancellativity (SOC) is achieved when:

• If Z (a + n, b + n) equals Z (a, b), then n must equal 0.
• If Z (a + n, bn) equals Z (a, b), then n must equal 0.
The effect of SOC is that no value can be repeated on a diagonal that "wraps around"; this is reminiscent of the toroidal topology. The term "pandiagonal" is sometimes used with a similar meaning in relation to magic squares, and could be used here without confusion.

There are 240 binary operations on S5 that satisfy both FOC and SOC, and they are the target of this report. They are all listed in a large table, and formatted as a C-language array.

This report generally uses prefix notation for applications of the operations, but infix notation is equally valid and sometimes clearer:

Z (a, b) ⇔ a Z b

Parentheses and the comma are retained in the prefix notation to reduce confusion, because the arguments are sometimes expressions involving more than one symbol.

§ 2. The nabla numbers of the dozen-scores are based on an obvious manner of lexicographic ordering. The table below is explicit about how the properties of operations m∇ and n∇ are used to establish a relation between integers m and n.

dozen-score lexicographic ordering
first
criterion
• If m∇(0, 0) < n∇(0, 0), then m < n.
• If m∇(0, 0) > n∇(0, 0), then m > n.
• If m∇(0, 0) = n∇(0, 0), then use the second criterion.
second
criterion
• If m∇(0, 1) < n∇(0, 1), then m < n.
• If m∇(0, 1) > n∇(0, 1), then m > n.
• If m∇(0, 1) = n∇(0, 1), then use the third criterion.
third
criterion
• If m∇(0, 2) < n∇(0, 2), then m < n.
• If m∇(0, 2) > n∇(0, 2), then m > n.
• If m∇(0, 2) = n∇(0, 2), then use the fourth criterion.
fourth
criterion
• If m∇(0, 3) < n∇(0, 3), then m < n.
• If m∇(0, 3) > n∇(0, 3), then m > n.
• If m∇(0, 3) = n∇(0, 3), then use the fifth criterion.
fifth
criterion
• If m∇(0, 4) < n∇(0, 4), then m < n.
• If m∇(0, 4) > n∇(0, 4), then m > n.
• If m∇(0, 4) = n∇(0, 4), then use the sixth criterion.
sixth
criterion
• If m∇(0, 5) < n∇(0, 5), then m < n.
• If m∇(0, 5) > n∇(0, 5), then m > n.
• If m∇(0, 5) = n∇(0, 5), then m = n.

§ 3. The dozen-scores sometimes do, and sometimes do not, exhibit familiar algebraic properties.

Because of SOC, the operations are strictly non-commutative: if Z (a, b) equals Z (b, a), then a must equal b.

The standard associative property always fails, but some multiple-operation versions succeed. Also a distributive law works for some combinations of operations. These are discussed in section 6 below.

No operations have a two-sided identity element, although some have a left identity, which means that there exists an a such that Z (a, b) = b for all b. Some others have the corresponding right identity. FOC guarantees that when such a one-sided identity exists, it is unique. Examples:

193∇ 0 1 2 3 4 second input firstinput 4 0 1 2 3 2 3 4 0 1 0 1 2 3 4 3 4 0 1 2 1 2 3 4 0
151∇ 0 1 2 3 4 second input firstinput 3 0 2 4 1 4 1 3 0 2 0 2 4 1 3 1 3 0 2 4 2 4 1 3 0
left identity = 2right identity = 1

Only two operations are idempotent in that Z (a, a) = a:

46∇ 0 1 2 3 4 second input firstinput 0 4 3 2 1 2 1 0 4 3 4 3 2 1 0 1 0 4 3 2 3 2 1 0 4
21∇ 0 1 2 3 4 second input firstinput 0 2 4 1 3 4 1 3 0 2 3 0 2 4 1 2 4 1 3 0 1 3 0 2 4

§ 4. One operation can be systematically altered into other. If X (a, b) = W (a, b) for all a and b, the identity shorthand XW is often used.

§ 4a. Three self-inverse transformations:

• If Y (a, b) equals Z (b, a), then each is the transpose of the other. By superscript, YZT
• If Y (a, b) equals Z (a, 4 − b), then each is the vertical reverse of the other. By superscript, YZV
• If Y (a, b) equals Z (4 − a, b), then each is the horizontal reverse of the other. By superscript, YZH
Examples, where the immobile elements are highlighted:

100∇ 0 1 2 3 4 second input firstinput 2 0 3 1 4 1 4 2 0 3 0 3 1 4 2 4 2 0 3 1 3 1 4 2 0
110∇ 0 1 2 3 4 second input firstinput 2 1 0 4 3 0 4 3 2 1 3 2 1 0 4 1 0 4 3 2 4 3 2 1 0
167∇ 0 1 2 3 4 second input firstinput 3 1 4 2 0 4 2 0 3 1 0 3 1 4 2 1 4 2 0 3 2 0 3 1 4
213∇ 0 1 2 3 4 second input firstinput 4 1 3 0 2 3 0 2 4 1 2 4 1 3 0 1 3 0 2 4 0 2 4 1 3
100∇ 110∇ ≡ 100∇T 167∇ ≡ 100∇V 213∇ ≡ 100∇H

The elements unmoved in transposition lie on the principal diagonal.

Successive superscripts are evaluated in the natural fashion: ZHTV ≡ ((ZH)T)V.

Two notable relations are Z (b, a) = ZT (a, b) and ZTHZVT.

The vertical and horizontal reversing operations suggest establishing a unary reversing operation, superscripted with I (for inverse) to avoid confusion with an operation introduced in the next section:

 a 0 1 2 3 4 aI = 4 − a 4 3 2 1 0

Thus Z (a, b) = ZV (aI, b) = ZH (a, bI) = ZHV (aI, bI) = ZVH (aI, bI).

§ 4b. Two cyclical transformations:

• Under row rotation, Y (a, b) equals Z (a + n, b). By superscript, YZR+n
• Under column rotation, Y (a, b) equals Z (a, b + n). By superscript, YZC+n
Examples:

62∇ 0 1 2 3 4 second input firstinput 1 2 0 4 3 0 4 3 1 2 3 1 2 0 4 2 0 4 3 1 4 3 1 2 0
107∇ 0 1 2 3 4 second input firstinput 2 0 4 3 1 4 3 1 2 0 1 2 0 4 3 0 4 3 1 2 3 1 2 0 4
161∇ 0 1 2 3 4 second input firstinput 3 1 2 0 4 2 0 4 3 1 4 3 1 2 0 1 2 0 4 3 0 4 3 1 2
62∇ 107∇ ≡ 62∇R+3 161∇ ≡ 62∇C+4

These four statements are equivalent:

• 107∇ ≡ 62∇R+3
• 107∇R−3 ≡ 62∇
• 107∇ ≡ 62∇R−2
• 107∇R+2 ≡ 62∇

Row and column rotations are not independent:

• (ZR+n)T ≡ (ZT)C+n
• For half of the operations, Z (a, b) = Z (a + 1, b + 2). For these, ZR+2ZC+1
• For the other half, Z (a, b) = Z (a + 2, b + 1). For these, ZR+1ZC+2

There is not an transformation to in general exchange two rows, or two colums, as this could disturb SOC.

§ 4c. Elements of the table can be pairwise swapped, as denoted by a superscript S and two numbers from { 0, 1, 2, 3, 4 }. Only the output values, not the input values, are changed. The highlighted squares of this example show the effect of swapping:

1∇ 0 1 2 3 4 second input firstinput 0 1 2 3 4 3 4 0 1 2 1 2 3 4 0 4 0 1 2 3 2 3 4 0 1
43∇ 0 1 2 3 4 second input firstinput 0 4 2 3 1 3 1 0 4 2 4 2 3 1 0 1 0 4 2 3 2 3 1 0 4
1∇ ≡ 43∇S1,4 43∇ ≡ 1∇S1,4

The swap being pairwise, ZSm,nZSn,m. If m = n, nothing happens.

Canonization (or canonicalization) is the process of performing a sequence of pairwise swaps ultimately producing an operation where Z(0, a) = a; this condition is equivalent to saying that 0 is a left identity of Z. Such a canonical form helps to reveal the "shape" of the operation. Anywhere between zero and four swaps will be necessary. Example:

159∇ 0 1 2 3 4 second input firstinput 3 1 0 4 2 4 2 3 1 0 1 0 4 2 3 2 3 1 0 4 0 4 2 3 1
7∇ 0 1 2 3 4 second input firstinput 0 1 3 4 2 4 2 0 1 3 1 3 4 2 0 2 0 1 3 4 3 4 2 0 1
3∇ 0 1 2 3 4 second input firstinput 0 1 2 4 3 4 3 0 1 2 1 2 4 3 0 3 0 1 2 4 2 4 3 0 1
1∇ 0 1 2 3 4 second input firstinput 0 1 2 3 4 3 4 0 1 2 1 2 3 4 0 4 0 1 2 3 2 3 4 0 1
159∇ 7∇ ≡ 159∇S0,3 3∇ ≡ 7∇S3,2 1∇ ≡ 3∇S4,3

For the dozen-scores:

• Transposition, vertical reversal, or horizontal reversal does change the operation's canonical form.
• Rotation by row, rotation by column, or element swapping does not change the operation's canonical form.
All of the dozen-scores are canonizable to only two operations, namely 0∇ or 1∇. However, canonization becomes very helpful in managing the complexity that arises in generalizations, as when the set has more than five members or the operations have more than two inputs.

If Z reduces to 0∇ and Y reduces to 1∇, then Z and Y taken together form a Graeco-Latin square. Each cell of the table contains a different ordered pair. Example:

60∇, 104∇ 0 1 2 3 4 second input firstinput 1, 2 2, 0 0, 4 3, 1 4, 3 0, 1 3, 3 4, 2 1, 0 2, 4 4, 0 1, 4 2, 1 0, 3 3, 2 2, 3 0, 2 3, 0 4, 4 1, 1 3, 4 4, 1 1, 3 2, 2 0, 0

§ 5. The dozen-scores can be partitioned into six subsets (quadragintas) of 40 operations each, as shown in the tables below.

• Within each column of a quadraginta (for instance 0∇, 110∇, 167∇, 213∇, 181∇, 238∇, 20∇, 100∇), the operations are related by transposition, vertical reversion, and horizontal reversion.
• Within each row of a quadraginta (for instance 0∇, 192∇, 180∇, 129∇, 66∇), the operations are related by row rotation or column rotation.
• Within the first four rows of each quadraginta (red), Z (0, 0) = Z (2, 1); within the last four (green), Z (0, 0) = Z (1, 2).
• Element swapping carries an operation from one quadraginta to another. For instance, 0∇ is in quadraginta A, but 48∇ ≡ 0∇S0,1 is in quadraginta F.

0∇192∇180∇129∇66∇
110∇59∇47∇239∇173∇
167∇101∇89∇26∇218∇
213∇150∇138∇72∇21∇
181∇128∇67∇1∇193∇
238∇172∇111∇58∇46∇
20∇212∇151∇139∇73∇
100∇88∇27∇219∇166∇
2∇144∇228∇141∇71∇
108∇54∇35∇191∇221∇
215∇105∇77∇38∇170∇
165∇198∇126∇84∇17∇
229∇140∇70∇3∇145∇
190∇220∇109∇55∇34∇
16∇164∇199∇127∇85∇
104∇76∇39∇171∇214∇
5∇194∇132∇177∇78∇
158∇57∇42∇227∇125∇
119∇149∇93∇14∇230∇
209∇102∇186∇60∇33∇
133∇176∇79∇4∇195∇
226∇124∇159∇56∇43∇
32∇208∇103∇187∇61∇
148∇92∇15∇231∇118∇
6∇96∇216∇189∇83∇
156∇50∇23∇143∇233∇
210∇153∇65∇36∇122∇
117∇203∇174∇86∇29∇
217∇188∇82∇7∇97∇
142∇232∇157∇51∇22∇
28∇116∇202∇175∇87∇
152∇64∇37∇123∇211∇
9∇146∇120∇225∇90∇
206∇53∇30∇179∇137∇
114∇197∇81∇12∇182∇
161∇107∇234∇62∇45∇
121∇224∇91∇8∇147∇
178∇136∇207∇52∇31∇
44∇160∇106∇235∇63∇
196∇80∇13∇183∇115∇
11∇98∇168∇237∇95∇
204∇48∇18∇131∇185∇
162∇201∇69∇24∇134∇
113∇155∇222∇74∇41∇
169∇236∇94∇10∇99∇
130∇184∇205∇49∇19∇
40∇112∇154∇223∇75∇
200∇68∇25∇135∇163∇

The following formulas show more specifically how the dozen-scores within a column or row of a quadraginta table are connected, by giving as examples some relations within the first column and the first row of quadraginta B:

 2∇ ≡ 16∇T ≡ 229∇V ≡ 190∇H 108∇ ≡ 104∇T ≡ 190∇V ≡ 229∇H 215∇ ≡ 229∇T ≡ 104∇V ≡ 16∇H 165∇ ≡ 190∇T ≡ 16∇V ≡ 104∇H 229∇ ≡ 215∇T ≡ 2∇V ≡ 108∇H 190∇ ≡ 165∇T ≡ 108∇V ≡ 2∇H 16∇ ≡ 2∇T ≡ 165∇V ≡ 215∇H 104∇ ≡ 108∇T ≡ 215∇V ≡ 165∇H

2∇ ≡ 144∇C+1 ≡ 228∇C+2 ≡ 141∇C+3 ≡ 71∇C+4

The operations in quadraginta A exhibit linearity in the following sense: for each operation there exist i, j and k such that Z(a, b) = i × a + j × b + k. With 128∇ for instance, i = 3, j = 1, and k = 2:

128∇ 0 1 2 3 4 second input firstinput 2 3 4 0 1 0 1 2 3 4 3 4 0 1 2 1 2 3 4 0 4 0 1 2 3

For a linear operation Z, the coëfficients are easily found:

• i = Z(1, 0) − Z(0, 0)
• j = Z(0, 1) − Z(0, 0)
• k = Z(0, 0)

With linear operations, four relations can never occur, because they would be connected with a violation of FOC or SOC:

• i = 0
• j = 0
• i + j = 0
• ij = 0

In the next section are more examples of how quadraginta A is distinguished from the others.

§ 6. Combining operations.

§ 6a. There are 48,000 combinations (out of 2404 possibilities) of operations that satisfy this four-operation generalization of the associative law, here written in both prefix and infix notations:

Z (a, Y (b, c)) = X (W (a, b), c)
a Z (b Y c) = (a W b) X c

Necessary conditions are that operations Z and X must come from the same quadraginta, and operations Y and W must come from quadraginta A. Never does the particular case ZYXW succeed.

§ 6b. There are 576,000 combinations (of 2404) of operations that satisfy this next version of associativity:

Z (Y (a, b), c) = X (W (a, b), c)
(a Y b) Z c = (a W b) X c

A necessary condition is that Z and X must come from the same quadraginta. Always successful is ZYXW.

§ 6c. There are 160 combinations (of 2402) of operations, all from quadraginta A, that satisfy this distributive law:

Z (Y (a, b), c) = Y (Z (a, c), Z (b, c))
(a Y b) Z c = (a Z c) Y (b Z c)

Only 21∇ and 46∇, the idempotent operations, fulfill the constraint YZ.

§ 6d. A general approach to composite operations is lengthy enough to need its own page.

§ 7. Thus far, great attention has been paid to a collection of 240 operations over the set S5 = { 0, 1, 2, 3, 4 }. Why not the more general Sn = { 0, 1, 2 … n − 1 }? There is an important result about binary operations over Sn that are first- and second-order cancellative:

• They do not exist when n is a multiple of 2 or 3.
• They do exist when n is not a multiple of 2 or 3.
(Pertinent citations are found at OEIS, in the context of the n queens on a toroidal chess board problem.) Thus S2, S3 and S4 are excluded. The triviality of S1 = { 0 } leaves S5 to be the simplest case with any substance, and that is why it was selected for detailed examination in this report. Still, a brief mention of the larger sets is in order.

For each of S7 and S11, there are two substantively different configurations. Examples, in canonical form, appear below preceded by 1∇ for comparison:

1∇ 0 1 2 3 4 second input firstinput 0 1 2 3 4 3 4 0 1 2 1 2 3 4 0 4 0 1 2 3 2 3 4 0 1
1∇(a, b) = 1∇(a + 1, b + 2)

U1 0 1 2 3 4 5 6 second input firstinput 0 1 2 3 4 5 6 5 6 0 1 2 3 4 3 4 5 6 0 1 2 1 2 3 4 5 6 0 6 0 1 2 3 4 5 4 5 6 0 1 2 3 2 3 4 5 6 0 1
U2 0 1 2 3 4 5 6 second input firstinput 0 1 2 3 4 5 6 4 5 6 0 1 2 3 1 2 3 4 5 6 0 5 6 0 1 2 3 4 2 3 4 5 6 0 1 6 0 1 2 3 4 5 3 4 5 6 0 1 2
U1(a, b) = U1(a + 1, b + 2) U2(a, b) = U2(a + 1, b + 3)

U3 0 1 2 3 4 5 6 7 8 9 10 second input firstinput 0 1 2 3 4 5 6 7 8 9 10 9 10 0 1 2 3 4 5 6 7 8 7 8 9 10 0 1 2 3 4 5 6 5 6 7 8 9 10 0 1 2 3 4 3 4 5 6 7 8 9 10 0 1 2 1 2 3 4 5 6 7 8 9 10 0 10 0 1 2 3 4 5 6 7 8 9 8 9 10 0 1 2 3 4 5 6 7 6 7 8 9 10 0 1 2 3 4 5 4 5 6 7 8 9 10 0 1 2 3 2 3 4 5 6 7 8 9 10 0 1
U4 0 1 2 3 4 5 6 7 8 9 10 second input firstinput 0 1 2 3 4 5 6 7 8 9 10 8 9 10 0 1 2 3 4 5 6 7 5 6 7 8 9 10 0 1 2 3 4 2 3 4 5 6 7 8 9 10 0 1 10 0 1 2 3 4 5 6 7 8 9 7 8 9 10 0 1 2 3 4 5 6 4 5 6 7 8 9 10 0 1 2 3 1 2 3 4 5 6 7 8 9 10 0 9 10 0 1 2 3 4 5 6 7 8 6 7 8 9 10 0 1 2 3 4 5 3 4 5 6 7 8 9 10 0 1 2
U3(a, b) = U3(a + 1, b + 2) U4(a, b) = U4(a + 1, b + 3)

All the other FOC and SOC operations over S7 and S11 can be found by making the obvious adaptations to the following transformations that were defined for S5:

• ZT
• ZV
• ZH
• ZR+n
• ZC+n
• ZSm,n

When n ≤ 11, each operation over Sn can, through canonization, be transformed into a linear function (section 5). However, this property no longer applies when n ≥ 13, the point at which the operations become far more complicated. The following is an operation over S13 that, although it is in canonical form, is conspicuously non-linear:

U5 0 1 2 3 4 5 6 7 8 9 10 11 12 second input firstinput 0 1 2 3 4 5 6 7 8 9 10 11 12 9 10 11 12 0 1 2 3 4 5 6 7 8 5 6 7 8 9 10 11 12 0 1 2 3 4 12 0 1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10 11 12 0 1 7 8 9 10 11 12 0 1 2 3 4 5 6 10 11 12 0 1 2 3 4 5 6 7 8 9 4 5 6 7 8 9 10 11 12 0 1 2 3 1 2 3 4 5 6 7 8 9 10 11 12 0 8 9 10 11 12 0 1 2 3 4 5 6 7 11 12 0 1 2 3 4 5 6 7 8 9 10 3 4 5 6 7 8 9 10 11 12 0 1 2 6 7 8 9 10 11 12 0 1 2 3 4 5
U5(a, b) = U5(a + m, b + n) cannot be satisfied

§ 8. The three-operand case can also be glimpsed. The following definitions are practically inevitable, and assume modulo-n arithmetic when the operation is over Sn:

FOC is satisfied when:

• If Z (a + n, b, c) = Z (a, b, c), then n = 0.
• If Z (a, b + n, c) = Z (a, b, c), then n = 0.
• If Z (a, b, c + n) = Z (a, b, c), then n = 0.

SOC is satisfied when:

• If Z (a + n, b + n, c) = Z (a, b, c), then n = 0.
• If Z (a + n, bn, c) = Z (a, b, c), then n = 0.
• If Z (a, b + n, c + n) = Z (a, b, c), then n = 0.
• If Z (a, b + n, cn) = Z (a, b, c), then n = 0.
• If Z (a + n, b, c + n) = Z (a, b, c), then n = 0.
• If Z (an, b, c + n) = Z (a, b, c), then n = 0.

Third-order cancellativity (TOC) is satisfied when:

• If Z (a + n, b + n, c + n) = Z (a, b, c), then n = 0.
• If Z (a + n, b + n, cn) = Z (a, b, c), then n = 0.
• If Z (a + n, bn, c + n) = Z (a, b, c), then n = 0.
• If Z (a + n, bn, cn) = Z (a, b, c), then n = 0.

Within the formulas there are more plus signs than minus signs, but this is not a problem because n itself can be positive or negative,.

SOC and TOC form two different kinds of pandiagonality. (Analogous are the face-centered and body-centered cubic lattices.)

Some existences:

• With S5:
• There are 240 two-operand operations that satisfy FOC and SOC, as discussed above.
• There are no three-operand operations that satisfy FOC and SOC.
• With S7:
• There are three-operand operations that satisfy FOC and SOC.
• There are no three-operand operations that satisfy FOC, SOC and TOC.
• With S11:
• There are three-operand operations that satisfy FOC, SOC and TOC, all of them linear. An example is U6(a, b, c) = 5 × a + 8 × b + 1 × c + 0.