§1C1 Four inputs. What follows is an example of why four-input operations are not studied in this report: they are unwieldy.
For comparison, here are the 5 = 3! − 1 ways that commutativity could be defined for a three-input operation O:
one input is fixed:
| no input is fixed:
|
Here are the 23 = 4! − 1 ways that commutativity could be defined for a four-input operation N:
two inputs are fixed:
| one input is fixed:
| no input is fixed:
|
23 is too many formulas for most practical purposes.
Meanwhile, associativity with four inputs comes in six varieties:
|
§1C2 Majority operation. Although not a TQG, the simplest and most familiar nondecomposable ternary function is the majority operation M over values a and b, defined by:
Suppose that there were a decomposition M (p, q, r) = F (p, G (q, r)). Then we would have:
Observe:
§1C3 Cross product. There is a recognized ternary operation that delivers a result of the same data type as its inputs; it is a particular four-dimensional generalization of the cross product.
Let A be the vector [ a0, a1, a2, a3 ]; similarly for B and C. Also let W = { W0, W1, W2, W3 } be an orthonormal basis of an 4-dimensional vector space. Then it becomes convenient to define this cross product as the determinant of a formal matrix. (This report uses an HTML table to display the matrix.)
A × B × C = det |
|
To write this another way, expand the determinant. Let R = A × B × C. Then:
r0 = | + a3b2c1 | − a2b3c1 | + a2b1c3 | − a3b1c2 | + a1b3c2 | − a1b2c3 |
r1 = | + a2b3c0 | − a3b2c0 | + a3b0c2 | − a2b0c3 | + a0b2c3 | − a0b3c2 |
r2 = | + a1b0c3 | − a0b1c3 | + a0b3c1 | − a1b3c0 | + a3b1c0 | − a3b0c1 |
r3 = | + a0b1c2 | − a1b0c2 | + a1b2c0 | − a0b2c1 | + a2b0c1 | − a2b1c0 |