{'fraction_non_alphanumeric': 0.03032854911150166, 'fraction_numerical': 0.01125268502245655, 'mean_word_length': 5.020795062091263, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Invitation to Higher Arity Science

Analytical thinking is dominated by binary ideas. From pair-wise interactions, to algebraic operations, to compositions of processes, to network models, binary structures are deeply ingrained in the fabric of most current scientific paradigms. In this article we introduce arity as the generic conceptualization of the order of an interaction between a discrete collection of entities and argue that there is a rich universe of higher arity ideas beyond binarity waiting to be explored. To illustrate this we discuss several higher order phenomena appearing in a wide range of research areas, paying special attention to instances of ternary interactions. From the point of view of formal sciences and mathematics, higher arity thinking opens up new paradigms of algebra, symbolic calculus and logic. In particular, we delve into the special case of ternary structures, as that itself reveals ample surprises: new notions of associativity (or lack thereof) in ternary operations of cubic matrices, ternary isomorphisms and ternary relations, the integration problem of 3-Lie algebras, and generalizations of adjacency in 3-uniform hypergraphs. All these are open problems that strongly suggest the need to develop new ternary mathematics. Finally, we comment on potential future research directions and remark on the transdisciplinary nature of higher arity science.

The task is not to see what has never been seen before, but to think what has never been thought before about what we see everyday.

Introduction
Discrete bits of quantifiable and communicable information -words in speech and text, digits in computers and records, and symbols in formulae and algorithms -are the building blocks of the human intellectual edifice. However, the architectural integrity of this construction relies on much more than the mere collection of its parts: basic ideas are connected, organized and composed thanks to the cohesive power of conceptual relations and associations. Our aim is to bring this structural aspect of modern science to the foreground and to illustrate how our understanding of its underpinnings may lead to the development of new theories and paradigms.
To this end we shall introduce the general concept of 'arity', which refers to the order or degree of a relation between a family of countable entities. For example, a predator-prey dynamic in an ecosystem is an instance of arity 2, i.e. a binary relation between two species, and the chemical bond of a methane molecule is an instance of arity 5, i.e. a quinary relation between five atoms. Motivating our discussion with elementary examples of ternary structures in mathematics, we will argue that restricting ourselves to the use of binary ideas, which currently dominate the intellectual landscape, has a limiting effect on our capacity to develop new conceptual paradigms. We will also present several ternary (and higher) phenomena appearing in a wide range of disciplines to illustrate the untapped potential of higher arity science 1 . For reasons we shall discuss below, the full scope of arity, particularly in theoretical frameworks involving higher order structures, is yet to be realized.
In recent years, an increasing number of voices coming from multiple research communities, including network science [CB16;Bat+20] MC15;Wol21a], are echoing concerns about the shortcomings of mainstream theoretical and computational paradigms due to their limited binary nature. This trend was succinctly captured in a recent Quanta Magazine article [Orn21]. The preponderance of binarity, and its potential limiting consequences to the development of new science, can only be adequately understood in the context of a general framework integrating higher forms of arity. This article aims to provide a first step towards such a framework.
From a purely mathematical point of view, higher arity has been largely historically ignored -almost to a surprising degree. Although relational structures [Pec99;Tar41], higher order matrices [Cay94] and n-ary operations [PB02] have been known since the inception of modern mathematics more than a century ago, non-binary instances of such structures have received much less attention than their binary counterparts. More recently, the development of higher category theory [Lur09;Sim11], operads [MSS02;Lei04], opetopes [BD98;Che04], hypercompositional algebra [DDV09; MM21] and hyperstructures [Baa19a;Baa19b], shows a growing interest in ideas that run parallel to the notion of higher arity, despite none of these approaches fully embracing it. In order to capture the essential features of higher arity we shall pay particular attention to ternarity -the next step above binarity in the arity ladder -as even the simplest cases display ample perplexing behaviour. Associativity (or lack of thereof) in ternary compositions and ternary products of 3-matrices, adjacency in 3-uniform hypergraphs, and the integration problem for 3-Lie algebras, are all instances where existing binary mathematical formalisms fail to adequately capture the relevant properties of ternary objects. Our observations below strongly suggest the need to develop new mathematical formalisms to faithfully encode genuinely ternary (and higher) structures.
All this compels us to claim that: technical and conceptual challenges aside, the potential for scientific discovery and the unparalleled opportunity for mathematical creativity make higher arity research an almost irresistible proposition.
The outline of this article is as follows: we start with a conceptual definition of 'arity' in 2; we discuss the ubiquity of binary structures and the need to search for genuine higher arity in 3; we analyze a series of ternary mathematical structures and argue for the development of new ternary mathematical theories in 4; we present multiple phenomena from several scientific, social and artistic disciplines to illustrate the ubiquity of higher order phenomena in 5; lastly, we comment on potential future research directions and emphasize the transdisciplinary nature of higher arity science in 6.
2 What is Arity?
The term 'arity' [Wik22] is a noun derived from words such as 'binary', 'ternary', 'n-ary', etc., typically used to describe the number of elements involved in a relation or the number of arguments of an operation. Other terms such as 'order', 'degree', 'adicity', 'valency', 'rank' or 'dimension' are sometimes used to refer to the same concept. However, given the myriad other meanings and connotations that these terms carry across the mathematical sciences, here we propose to fix the meaning of the far less frequently used term 'arity'. Still on the topic of nomenclature, we shall refer to the fundamental notion of perceived countable amount as 'numerosity' [Núñ17] to distinguish it from the more technically loaded 'quantity' or 'cardinality'.
We propose a concise conceptual definition of arity as follows: Definition 2.1. Arity is the exact numerosity of a relational or functional interdependence between a countable collection of separate entities or discernible parts of a system.
Arity may be generally understood as an elementary property of an interaction between parts of a system quantifying the amount of discrete components involved in the interaction. In this sense, arity appears as a rudimentary measure of atomic complexity. An effective way to isolate the notion of arity from neighbouring basic concepts related to numerosity is to counterpoise it with cardinality (quantity, size) and ordinality (order, sequence). Figure 1 illustrates the difference between the concepts of 'three', 'third' and 'ternary'.
Figure 1: The numerosity 3 (orange) in multiple guises for a collection of three objects (teal). Cardinality, perhaps the most direct expression of numerosity, refers to notions of quantity (comparisons of a set with its parts) or size (comparisons of a set with other sets). Ordinality refers notions of sequence, time-evolution or process between the objects. Arity refers to relations or operations involving all three objects simultaneously.

The Binarity Bias and Irreducible Higher Arity
Beyond the trivial arity 1, i.e. the concept of oneness, current intellectual discourse is dominated by one kind of arity alone: binarity. As exemplified by the following cases, the vast majority of formal devices frequently used to articulate models and theories have a very strong binary flavour: • "0 + 1" Operations, ranging from elementary arithmetic to sophisticated notions in abstract algebra, predominantly take two arguments.
• "x ∼ y" Relations are commonly taken between pairs of objects; crucially, equivalence relations and symbolic equality "=" are defined to be binary.
• "A → B" Processes, connections and transformations, abstracted in functions, graphs and categories, rely on input-output or source-and-target paradigms for pairs of objects.
• "cogito ergo sum" Natural language and truth-valued logic are primarily built from unary assignments or binary operations between sentences and propositions, e.g. subject-verb-object constructions and syllogisms.
Without a broader understanding of the neurobiological and cultural basis of arity, one can only speculate as to what causes this ubiquity of binary structures. We can, nonetheless, identify some factors that are likely to contribute to the status quo: • Biological and Cognitive Predispositions: Some notable features of human biology appear compatible with a preference for binary ideas: bilateral body plan, the perception of chirality (left-right distinction) or sexual reproduction in a binary mating pattern are some examples. Experience of time, causal thinking, perceived sameness of stimuli and limited working memory are aspects of human cognition that also seem to favour binary structures.
• Symbolic Language Constraints: Most recorded human languages have a strong sequential nature and tend to string symbols in linear arrays. This is particularly true for the Indo-European languages that found their way into the modern standards of science and mathematics. The development of pre-digital printing technology only exacerbated the preponderance of linear written languages among early scholars as it rendered the efficient communication of non-sequential symbolic information practically impossible. Only recently, with the advent of digital environments, diagrammatic languages and other forms of non-sequential symbolic communication started gaining some traction.
• Historical Bias: Beyond just language, the influence of idiosyncratic cultural evolution stretching millennia into the past can be easily recognized in present-day conventions and customs. Modern science and mathematics are relatively recent inventions and, despite the large volume of research output that already exists, only a minuscule fraction of the virtual universe of all possible ideas has been charted. Given their relative simplicity alone, binary structures are expected to be studied extensively before other higher arity generalizations are explored.
The thesis that most of current science and mathematics is dominated by binary structures could be contested on the basis of the existence of many examples of operations and relations effectively involving large amounts of elements, e.g. large data sets, multivariable functions, complex algorithms, etc. Although coarse descriptions of such examples will indeed lead to instances of higher arity, a closer look would likely reveal a composite arrangement of fundamentally binary structures. This leads us to the contrasting notions of irreducible arity and composite arity.
To articulate these notions we introduce the concept of ariton 2 : Definition 3.1. An ariton is a minimal expression of a fixed arity. More precisely, a collection of n objects together with an elementary relation or operation between them will be called a n-ariton; a concrete pair of related objects is a binariton, a concrete trio of related objects is a ternariton, and so on.
Let us clarify this definition with a few examples. Take, for instance, a field of numbers (F, +, ·) and consider some elements in it x, y, z ∈ F. The expressions x + y or y · z are binaritons constructed from the basic operations in F. Expressions involving three elements, such as x + y + z or x · (y + z), formally define ternary operations, however we would not call these ternaritons, but rather composite binaritons, since they are constructed by concatenating binary operations. An example from euclidean geometry is the operation that takes three concurring segments a, b, c as arguments and gives the volume of the parallelepiped spanned by them; the object V (a, b, c) is a ternariton since the volume of a region of space is a primitive notion and all three segments are needed in simultaneous conjunction to define the parallelepiped. In contrast, the analogous construction in linear algebra, i.e. the determinant of the three vectors representing the segments in a 3-dimensional space det( a, b, c), is not a ternariton, but rather a composite binariton, since it can be written in terms of the dot and cross products det( a, b, c) = a · b × c or, choosing a basis, as a polynomial expression of the vector components, which uses the binary addition and multiplication operations of scalars.
The well-known case of the Borromean rings [LM94; Baa09] is perhaps the most illustrative example of composite vs irreducible arity. Consider the 'linkedness' relation between rings depicted in Figure 2. By carefully arranging multiple rings in space, it is easy to see that we can define several linkedness relations of arbitrary arity. Then a natural question arises: given a particular arrangement of rings, are any two of the rings pair-wise linked when considered in isolation from the rest? Knot diagrams help us catalogue topologically different configurations of rings; Figure  3 shows some possible configurations of three rings based on crossing patterns. The Borromean configuration is remarkable since the isolated pairs of rings are unlinked despite all three being linked in conjunction. In other words, a physical model of the Borromean rings will, in fact, hold together while breaking one of the rings will unlock the other two from each other. This is in stark contrast to the closed chain configuration depicted in Figure 3, where breaking one ring does not compromise the linkedness of the remaining two. We thus see that, under the linkedness relation, a chain is a composite binariton while the Borromean configuration is a ternariton (Figure 4).
Aritons appear in a broad spectrum of complex systems as atomic cells of interaction: fundamental forces in multi-particle systems [Coh93;Dob+02] [Med+22], aritons occurring across different size scales appear as coarse-graining [Fla17] and aritons persistent in time give rise to the notion of individual [Kra+20]. From this viewpoint, the general phenomenon of emergence [And72] may be hypothesized to be a manifestation of arity discrepancies across time and scale that could be measured by some form of arity cohomology.

Ternary Mathematics
If we are interested in finding instances of arity higher than 2, it is natural to reach for the next rung in the arity ladder: ternarity. The benefits of focusing on arity 3 are twofold. Firstly, the fact that it is the smallest arity above 2 minimizes the cognitive load when thinking about concrete examples of multi-object systems, as imagining simultaneous interacting components becomes practically unfeasible for human minds beyond numerosities not much larger than 3 [SP99]. Secondly, a good understanding of ternarity, in combination with our current knowledge of binarity, will provide a manner of first induction step in the arity ladder similar to how we can think about higher geometric dimensions aided by lower dimensional analogies [Bla14].
The abstract realm of mathematics provides the ideal grounds to systematically investigate ternarity and to get a general sense of its fundamental features. Ternary structures, although rarely found in the existing literature, occupy a natural place in the landscape of mathematical objects and many simple non-trivial examples are readily available. We introduce several such examples in this section by generalizing familiar binary notions such as graphs, matrices, relations, categories and groups. Interestingly, however, making any substantial progress in developing a mathematical theory about these ternary generalizations, one that is at least comparable to those available for their binary counterparts, will turn out to be very challenging. We suspect that among the underlying causes for this difficulty are the limitations imposed by the binarity bias, as explained in 3.
A question that can hardly be avoided when thinking about generalizations of binary structures is how to extend the notion of sequentiality into higher arities. A sequence can be understood as iterated binarity, as clearly exemplified by the simple case of a set with a successor function. What are the higher arity analogues of sequences? And, particularly, what is the ternary analogue of a successor function? Although approaches using simplicial complexes [CB16] or paths on hypergraphs [Car+20] may offer some preliminary answers, there is little consensus on the full extent of these questions.
A particularly profound and far-reaching manifestation of the prevalence of binary structures in mathematics is the ubiquity of associativity. From transitivity of relations in sets, to operations in algebras, to sequences of processes in algorithms, to composition of morphisms in categories, to concatenation of paths in networks, associativity is deeply ingrained in the vast majority of mathematical formalisms in use today. Given how universal associativity seems to be for binarity, one may hypothesize that a similar property plays an analogous role for ternarity. Could a form of generalized associativity, such as the naïve ternary extension of binary associativity (abc)de = a(bcd)e = ab(cde), have a similarly privileged place at the core of ternary mathematics? Excitingly, the answer to this question is not yet known. Ternary associativity is a very elusive concept and it appears that the obvious generalizations of binary associativity are ill-suited to capture the algebraic properties of even the simplest examples of ternary structures. Despite these difficulties, we shall present compelling evidence that points to the existence of a well-defined, if perhaps non-unique, notion of ternary associativity.
In the sections to follow we aim to highlight fundamental structural properties of ternary objects, therefore, we shall prioritize describing their compositional and algebraic features over combinatorial ones. More concretely, this means that we will remain deliberately agnostic with respect to the precise formalization of higher arity ordering and permutation symmetry, using unordered sets whenever possible and otherwise choosing convenient (possibly non-unique) orderings in the interest of conciseness. A more detailed treatment of these topics will follow in future work by the authors [Zap22].

3-Uniform Hypergraphs
The most minimalist mathematical expression of arity is encapsulated in the notion of hypergraph. Ordinary graphs, which we take as 2-uniform simple hypergraphs on a set of vertices [Vol09;Bre13], encode information in the form of links between pairs of vertices and we thus regard them as binary structures. A natural ternary generalization is to consider 3-uniform simple hypergraphs, which encode information in the form of ternary links between trios of vertices. Research on hypergraphs typically focuses on general traits and large scale structure, as seen in recent work on combinatorics [LM16; Con+19; VBK20], complex networks [Bat+21; NLS21], higher order dynamics [Car+20; CFN20; LR21] or computational complexity [LS12;Lan20]. In contrast, our interest in hypergraphs is much more humble as we will simply need to discuss some elementary topological properties of small uniform hypergraphs.
A connected k-uniform simple hypergraph will be called a k-graph for short. We shall regard hypergraphs as a general template to study the basic compositional properties of n-ary relations and operations. In this view, the emphasis is placed on hyperedges and their connectivity instead of the underlying vertices -a similar perspective to how category theory emphasizes morphisms and their compositions over individual objects [Lei14]. Accordingly, we define the size of a k-graph simply as the total number of edges, i.e. the cardinality of the set of edges. For any given k-graph we distinguish two kinds of vertices according to their degree, i.e. the number of edges containing them: vertices of minimum degree are called external vertices and all other vertices are called internal vertices, if all the vertices have the same degree they are all defined to be internal except when the k-graph is of size 1 (the unique smallest k-graph), in which case they are defined to be external. The number of external vertices of a k-graph will be called its externality.
The central notion that we would like to put forward in this section is what we call motif adjacency.
To motivate this idea let us first reinterpret the familiar notion of adjacency in ordinary graphs. Given a particular graph G, adjacency is simply captured as a Boolean function on pairs of vertices defined to be 1 when there is an edge between them and 0 otherwise, the information of this Boolean function is encoded in the so-called adjacency matrix A G . It is well known that powers of the adjacency matrix A l G encode information about the existence of paths of length l between pairs of vertices. Conversely, keeping the matrix algebra on Boolean values, each higher power of the adjacency matrix encodes the data of a graph that we denote by G l . The graph G l has the same vertex set as G and an edge between a pair of vertices of G l is drawn if and only if there exists at least one path of length l in the original graph G connecting them. Our key observation is that the graph G l can be generated by a motif detection algorithm: we choose our motif to be the graph P l+1 , consisting of a chain of l edges with an external vertex at each end, and define an edge of G l between a pair of vertices whenever there exists a subgraph of G that is isomorphic to the motif P l+1 and whose external vertices coincide with the pair of vertices under consideration. A pair of vertices of G that are linked by an edge in G l are said to be motif-adjacent or, specifically, P l+1 -adjacent.
Although anyone familiar with ordinary graph theory would probably find this characterization of adjacency unnecessarily convoluted, our approach opens up a straightforward way to define adjacency in general hypergraphs: consider a hypergraph H and a k-graph M of externality m ≥ 2 to be taken as the motif, then, a collection of vertices {i 1 , i 2 , . . . , i m } of H is said to be M -adjacent if there exists a subhypergraph S ⊂ H whose external vertices are precisely {i 1 , i 2 , . . . , i m } and such that S ∼ = M . We define the M -adjacency hypergraph derived from H by the motif detection algorithm described above in the obvious way. Note that the M -adjacency hypergraph is m-regular by construction. A thorough treatment of motif adjacency, involving multiway systems of hypergraph rewrites based on adjacency relations, would take us too far beyond the scope of the present article. The authors will revisit this topic in connection with ternary associativity in future work [ZA22].
Under the lens of motif adjacency, the conventional treatment of adjacency in ordinary graphs appears somewhat accidental in that the motifs chosen (P l ) always happen to have two external vertices, thus making adjacency-derived hypergraphs always 2-regular, that is, ordinary graphs again. This may give the false impression that adjacency rewrites are internal operations in the class of 2-graphs, however, as illustrated in Figure 6, this is not the case when more general motifs are considered. Our notion of motif adjacency can be thought of as a way to allow for more topological diversity in the probing tools to investigate graph structure: all P l graphs are topologically equivalent (homeomorphic to a segment regarded as topological spaces) while equally simple motifs, such as the claw K 1,3 [Rid21b] in Figure 6 or small graphs containing cycles like the bull [Rid21a], display different topologies. This being said, there is good reason for the extended use of P l as motif in ordinary graphs: a P l motif corresponds to the notion of path of length l, arguably the most central concept in graph theory.
Recall that our goal was to extend familiar ideas of graph theory from 2-graphs to 3-graphs. Although it may be debatable whether it is worthwhile to consider general motif adjacency in 2-graphs, the reality is that when it comes to 3-graphs we do not have much of a choice. This is directly connected with the sequentiality problem: there is no consensus on what constitutes a satisfactory higher order generalization of a path or a sequence. Even if we accept some of the definitions of paths in hypergraphs that have been proposed [Gal+93; LP19; Car+20], we must reconcile the fact that ternary (and higher) sequentiality is no longer uniquely characterized.
A parsimonious and unbiased approach would suggest that we consider all possible isomorphism classes of small k-graphs as potential motifs for adjacency rewrites. To this end, we catalogue small 2-graphs and 3-graphs according to their size and externality in Figure 7 giving them short suggestive names for later reference. We use a hypergraph generalization of the NAUTY graph isomorphism algorithm [McK+81;MP14] implemented in the SageMath software [Sof21] to generate all the isomorphism classes of hypergraphs of a fixed size. If we simply count the number of isomorphism classes of 2-graphs and 3-graphs of increasing size we find a first instance of the stark contrast between binarity and ternarity: Similar to how adjacency in ordinary graphs can be understood as iterated vee motif detection, i.e. paths are sequences of edges, it is natural to first consider the smallest 3-graphs of Figure 7 as motifs and then build larger motifs by iteration. In this sense, given a collection of k-graphs, we define their splicings as new k-graphs resulting from attachments of external vertices. It is easy to see that 2-graphs and 3-graphs in Figure 7 are generated in this way from splicings of smaller graphs. Also note how splicings recombine externalities in multiple ways: from the atomic 2-graph of externality 2 and the atomic 3-graph of externality 3 we find splicings of externalities 0, 1, 4, 5... This motivates the notion of externality-preserving splicings or compositions, defined as any splicing of a collection of k-graphs of the same externality n that results in a k-graph of externality n. The smallest composition in the class of 2-graphs is given by the vee shape and its iteration recovers the usual notion of paths in ordinary graph theory. In contrast, the smallest composition in the class of 3-graphs is no longer unique: the cone, blades, fish and triforce shapes all represent splicings preserving externality 3. The following sections 4.2, 4.3 and 4.4 will vindicate the compositional framework of k-graphs described in this section as an effective notational paradigm to capture the basic features of higher order matrix multiplications, higher arity relation composition and higher order isomorphism compositions, respectively. Particularly, we will see how the cone, the blades, the triforce and the fish shapes appear naturally as canonical ternary compositional patterns in all those different contexts.

3-Matrix Algebras
Consider some field 3 of numbers (F, +, ·). We define a n-matrix as a multi-index array of the form [a i 1 i 2 ···in ], where a i 1 i 2 ···in ∈ F and each of the n indices ranges in some finite interval i j ∈ {1, 2, . . . , N j }, the total number of indices n is called the dimension of a and the tuple of lengths of the index ranges (N 1 , N 2 , . . . , N n ) is called the size of a.  ]; and they provide the natural grounds to explore higher order generalizations of the eigenvalue problem [GER11], invertibility [GF20] or canonical forms [GT20].
Our goal is to investigate the basic algebraic structure of n-matrices but before we begin our discussion we must warn against the temptation to consider n-matrices as tensors in the ordinary sense of linear algebra. This is, in fact, a common practice -and the source of a great deal of confusion -in some of the research areas mentioned above, particularly in machine learning [BPS21] and physics [Ker97]. It is important to keep in mind that the basis expression of a tensor in conventional linear algebra is not just a multi-index array of scalars but an entire equivalence class of such arrays defined by the covariance relation induced by all the possible choices of basis. We emphasize that we take n-matrices simply as arrays of scalars, without any further structure, and, although they will be shown to share many features with ordinary (rectangular) matrices, we shall remain open-minded and let them speak for themselves before we bin them in an existing mathematical formalism.
A n-matrix a = [a i 1 i 2 ···in ] can be effectively thought of as an element of the set F N 1 ×N 2 ×···×Nn . This suggests a hypergraphic notational convention where we place the n-matrix a as a hyperedge on vertices {F N 1 , F N 2 , . . . , F Nn }. As can be seen in the many applications mentioned above, the most commonly occurring elementary n-matrix operations are what we call index splicings. Given a collection of matrices of generally different dimensions and sizes, index splicings are constructions that produce new matrices provided some of the indices range over the same interval. There are two kinds of splicing operations: by incidence, defined simply as multiplication of matrix elements along the common indices, and by contraction, defined by summing over or tracing out the common indices. Let us illustrate these. Take a n-matrix a i 1 i 2 ···in , a m-matrix b j 1 j 2 ···jm , a l-matrix c k 1 k 2 ···k l and suppose that the indices i 1 , j 2 and k l all range over the same interval {1, 2, . . . , N }, an incidence splicing of a and b results in a (n + m − 1)-matrix r whose entries are given by a contraction splicing of a, b and c results in a (m + n + l − 3)-matrix s whose entries are given by Note that general splicing constructions may combine several simultaneous incidences and contractions of matrices. Index splicings are natural minimal operations that only exploit the array structure of matrices and the additive and multiplicative operations of their scalar entries. Since splicings can only be defined on indices of the same size, the hypergraph notation suggested above naturally captures index splicing operations as n-graph splicings in the sense defined in 4.1. Let us illustrate the matrix splicing notation by applying it to some elementary constructions with 2-matrices. Given two 2-matrices a, b sharing an index of common size, we can define their ordinary associative multiplication by a contraction splicing or we can define a 3-matrix by an incidence splicing: where both splicings correspond to the same underlying 2-graph shape, the vee. For three 2-matrices a, b, c more 2-graph shapes are available to define splicings. Here are two splicings defined with the cycle and claw shapes: We recognize the familiar multiplication and trace operations for ordinary (rectangular) matrices in the splicings above but we also find two operations that combine 2-matrices to give a 3-matrix; this illustrates that splicings of matrices generally mix dimensions. The hypergraph notation we have introduced allows us to see that an effort to catalogue matrix splicings of increasing dimension would be analogous to our classification of the isomorphism classes of small n-graphs in 4.1. If we account for two kinds of vertices corresponding to incidence and contraction splicings, finding dimension-preserving splicings, like the familiar case of 2-matrix multiplication, becomes a simple combinatorial task on the vertices of small isomorphism classes of hypergraphs.
According to Figure 7, the next higher instances of dimension-preserving splicings occur for a pair of 3-matrices in diamond configuration and for trios of 3-matrices in cone, blades, triforce, clamp, boat and fish configurations. Let us define some of these explicitly by making use of our matrix splicing notation. Given two 3-matrices a, b sharing two indices of common size, we can arrange them in a diamond shape with an incidence and a contraction to yield a 3-matrix again: Now take three 3-matrices a, b, c. Using the cone shape with a contraction in the index shared by the three 3-matrices and incidences in the other pairs of shared indices we define the following operation: Using the triforce shape with contractions over all shared indices we find: As we anticipated in our note about ternary order at the start of this section 4, orderings are left deliberately loose to emphasize compositional patterns over combinatorial ones. For instance, by fixing a sequential order of indices, the formulas we have given become well-defined in terms of standard multi-index array notation, however, in doing so, we are making non-canonical choices and multiple order-inequivalent splicings can then be defined by combinatorial permutations of indices. We shall not discuss such order-inequivalent splicings here.
Dimension-preserving splicings induce internal operations for classes of regular n-matrices, i.e. n-matrices [a i 1 i 2 ···in ] whose indices all range over the same interval i j ∈ {1, 2, . . . , N }. We call a dimension-preserving splicing operation a multiplication. The lowest-dimensional instance of such an internal operation is the single-index contraction in the class of regular 2-matrices, that is, the familiar unital associative algebra of square matrices. Going one arity step higher, we see from the examples above that splicings give ternary multiplications for regular 3-matrices. We shall devote the rest of this section to the study of the basic properties of these ternary algebras.
A regular 3-matrix is often called a 'cubic matrix' in the existing literature [Ker97; Ker08; AS11].
In the interest of brevity, we propose the portmanteau 'cubix' to refer to the same concept. The space of cubices of size N over a field (or ring) F, denoted by F N 3 , is defined as the set of regular 3-matrices a = [a ijk ], where i, j, k ∈ {1, 2, . . . , N }, endowed with the obvious entry-wise F-vector space structure. By considering the 3-graphs of size 3 from Figure 7 and all the topologically-distinct distributions of index incidences and contractions, we can define the following inequivalent ternary multiplications for any given trio of cubices a, b, c ∈ F N 3 : Some of these have been identified in the literature: p 1 was originally found in the context of relational schemes [MB90; MB94] and has been called the Bhattacharya-Mesner product in later work that further investigated its properties [GF20], p 3 and p 4 appeared in early work on ternary relational structures [MM67] and are both well-known in recent cubic matrix research [AS11]. To the best of our knowledge, p 2 , p 5 , p 6 and p 7 are novel and introduced here for the first time.
Each of the ternary multiplications induces a different ternary algebra structure on the space of cubices (F N 3 , p i ). Although they all coexist simultaneously on F N 3 , we shall consider them separately and postpone for future work the study of their interaction. This is particularly useful to highlight the analogies between ternary algebras of cubices and the binary algebra of square matrices. Note that multiplications p 1 , p 2 and p 3 all involve index incidences and contractions of three cubices in symmetrical roles, similar to how multiplication of ordinary matrices involves index contractions of two matrices in symmetrical roles. Therefore, we argue that p 1 , p 2 and p 3 are the direct ternary generalizations of the ordinary multiplication of matrices. In contrast, all the other multiplications are asymmetric in their splicing patterns. For instance, p 4 involves cubices arranged in a manner of input-throughput-output scheme or, as pictorially suggested by the fish shape, a tail-body-head scheme. We shall focus on the algebras (F N 3 , p i ) i = 1, 2, 3, 4, which we call the cone, blades, triforce and fish cubix algebras, respectively.
The notion of identity matrix [δ ij ] as the neutral element for ordinary matrix multiplication finds natural analogues in the space of cubices F N 3 . We can define the partial identities i 1 , i 2 and i 3 as stacks of ordinary identity matrices in each of the three directions of the cubic arrays: We can also define the tridentity as the unit diagonal cubix: These four special cubices i 1 , i 2 , i 3 , I ∈ F N 3 satisfy identity-like properties with respect to ternary cubix multiplications. With the aid of a simple computer algebra implementation of cubix multiplication in Mathematica software we were able systematically list all such properties. Let an arbitrary a ∈ F N 3 , then we have the identity properties of the cone algebra: the identity properties of the blades algebra: the identity properties of the triforce algebra: Furthermore, the four identity cubices {i 1 , i 2 , i 3 , I} form partial subalgebras in each of the cubix algebras, in the sense that properties such as p 1 (i 2 , i 1 , i 3 ) = I or p 3 (I, I, I) = I hold. With some possible redundancies due to the general identity equations above, there are 63 such properties in the cone algebra, 52 in the blades algebra, 31 in the triforce algebra and 28 in the fish algebra. All these represent another staggering contrast between binarity and ternarity: what was a single element satisfying a single identity property in the binary algebra of square matrices turns into several identity elements satisfying a plethora of identity-like properties in the ternary algebras of cubices. To further underline the kaleidoscopic nature of the phenomenon of identity in cubix algebras, note that currying identity matrices into cubix multiplications gives binary operations of cubices, for instance p 1 (·, ·, i 3 ) or p 3 (·, I, ·). There are a total 4 of 12 different such binary operations in each cubix algebra.
To make matters more interesting, most of them satisfy no obvious axioms, in particular they are non-associative, such as p 3 (·, I, ·), while some of them turn out to be very well-behaved, as is the case for p 1 (·, ·, i 3 ) which is associative and unital.
Lastly, we turn to the question of generalized associativity: what is the analogue of binary matrix multiplication associativity for ternary multiplications of cubices? More specifically, we are interested in knowing whether compositions of multiple ternary multiplications satisfy some generic properties such as p 1 (p 1 (a, b, c), d, e) p 1 (b, c, d), e) a, b, p 1 (c, d, e)) p 2 (a, p 2 (b, c, d), p 2 (e, f, g)) ?
This question was partially addressed in [Abr+09; AS11], whence it was found that no ternary multiplication of cubices satisfies naïve ternary associativity (first line of equalities above) and that p 4 satisfies the so-called ternary associativity of the second kind: 4 (a, b, c), d, e) = p 4 (a, p 4 (d, c, b), e) = p 4 (a, b, p 4 (c, d, e)).
This axiom corresponds to the associativity-like property of heaps [Kol00; SB10], which are ternary algebraic structures that have been known since the early 20 th century. We suspect that the relatively well-developed understanding of the fish algebra found in the existing literature is due to the strongly sequential nature of the fish multiplication. Ongoing work by the authors [ZA22] indeed suggests that there is an elegant argument to relate the heap axiom to the hypergraphic properties of the fish shape. Using the computer algebra implementation we were able to check that p 1 , p 2 , p 3 satisfy no axioms involving 5 or 7 elements. Axioms involving 9 or more elements were not checked due to the limited computing power available to the authors. For all we know, the p 1 , p 2 and p 3 multiplications may satisfy relatively intelligible associativity-like properties involving 9 elements, they may satisfy obscure complicated properties involving large amounts of elements or they may simply not be amenable to this kind of axiom and fail to satisfy any form of higher associativity. The mystery remains.
In our view, the question of ternary associativity perfectly encapsulates the current impasse in the understanding of higher arity structures. We seem to have a confident understanding of the ingredients involved, after all, cubices are just arrays of numbers and their multiplications are defined by simple arithmetical operations, and we have grasped the ternary generalization of concepts such as composition and identity. Yet, something as apparently elementary as the analogue of associativity defies our intuition and eludes a concrete definition. Making any significant progress on this front will surely result in a qualitative leap towards the general understanding of higher arity.

Ternary Relations
Higher order relations have been occasionally studied in the context of logic and set theory since the mid 19 th century, as seen in the pioneering work of C. S. Peirce [Pei70; PB02] containing explicitly higher arity ideas. However, developments in logic [Pei80], the theory of relations [Tar41; Fra00] and formal languages [MAK12] focused almost exclusively on binary relations and sequential constructions. We do find select research pieces on relational structures [MM67; NN89; KO14; ZBD18; BZD21], association schemes [MB90] and semantics [Bea+12] that have investigated concrete higher arity relations in detail, although most work in these areas is often directed towards generalist questions such as algorithmic complexity [Kum92] or universality [Top93;Beh13]. Our goal is to focus on binary and ternary relations to highlight their elementary compositional properties.
A binary relation between two sets A and B is a set of pairs R ⊂ A × B. Diagrammatically, we represent a relation as an edge in a graph whose vertices represent the related sets. When elements a ∈ A and b ∈ B are related we write R ab , that is, (a, b) ∈ R ⇔ R ab . Two relations can be composed if they share a common set: let two relations R ⊂ A × B and S ⊂ B × C, the composed relation is defined by middle-element transitivity Composition of binary relations is associative by construction and the diagonal relations i A := {(a, a)) | a ∈ A} act as compositional identities for any set A. A ternary relation is simply defined as a set of trios of elements from three sets T ⊂ A × B × C and we shall write (a, b, c) ∈ T ⇔ T abc . Ternary relations are thus represented as triangular hyperedges in the relational graph. In general, n-ary relations are defined as sets of n-tuples and are represented as hyperedges of arity n. Note that our order agnosticism clashes here with the need to use cartesian products of sets to define relations. We shall again leave out any matters of order and sequentiality for ternary relations.
It is easy to see that compositions of n-ary relations via middle-element transitivity, generalizing the binary composition formula above, and middle-element equality are formally indistinguishable from index contractions and incidences of n-matrices as defined in 4.2. It follows from this observation that the compositional theory of ternary relations can be developed following the template provided by the compositional framework of 3-graphs. The discussion in 4.2 applies here mutatis mutandis replacing F N spaces by general sets and 3-matrices by ternary relations.
Following Figure 7, ternary arity-preserving compositions are defined analogously to the 3-matrix multiplications p 1 -p 7 in 4.2. We give here the explicit set-theoretic formulas for the compositions induced by the cone, blades, triforce and fish shapes: where R, S, T are arbitrary ternary relations among the sets A, B, C, placed in external vertices in the hypergraph diagrams, and sets X, Y , Z, placed in internal vertices. Composition 1 was defined indirectly in [MB90] as part of a ternary association scheme and 3 , 4 were defined in [MM67] in a pioneering attempt to understand compositions of ternary relations. To our knowledge, 2 , 5 , 6 , 7 are novel and introduced here for the first time.
The question of ternary associativity remains as mysterious for ternary relations as it appeared for 3-matrices in 4.2. Nevertheless, it turns out that ternary relations display the properties of ternary identities much more transparently than 3-matrices. Ternary identity relations are defined by partial diagonal subsets i AAB := {(a, a, b) | a ∈ A , b ∈ B} ⊂ A × A × B, called partial identity relations, and diagonal subsets I A := {(a, a, a) | a ∈ A} ⊂ A×A×A, called tridentity relations. Not only are these definitions direct generalizations of the binary notion of identity relation as diagonal subset but they also operate diagrammatically in entirely analogous ways. To see this, note that we can easily adapt the matrix splicing notation introduced in 4.2 to represent relations between sets: a binary relation R ⊂ A × B and a ternary relation T ⊂ A × B × C are simply notated as The compositional behaviour of binary identity relations can be efficiently captured in the following diagrammatic property Similarly, two partial identities simplify a cone composition: and a partial identity together with a tridentity simplify a triforce composition:

Ternary Categories
The basic definition of a category [Mac13; Lei14] has a strongly binary and sequential flavour: morphisms are directed assignments between pairs of objects. Throughout the second half of the 20 th century, several developments in category theory gradually introduced higher notions that extended the basic binary structure of categories: multicategories [Lam89], n-categories [BE74], weak n-categories [Bén67], polycategories [Sza75], operads [KM95] and opetopes [BD98]. Despite the manifestly higher order nature of these generalizations, they all carry the intrinsic binary nature of arrow-like morphisms at their core. The recent work of N. Baas [Baa19a;Baa19b] underlines this aspect of typical categorical formalisms and addresses its limitations by proposing so-called hyperstructures, which serve as a general template that will fit higher arity generalizations of categories. The first (and, to our knowledge, only) attempt to systematically investigate category-like structures whose morphisms relate general collections of objects can be found in the work of V. Topentcharov in the late 20th century [Top88;Top93]. The concluding remarks of [Top88] include a mention of 3-matrix algebras and ternary relations as putative examples of ternary categories to be studied in detail in subsequent work. To this day, it seems that there has been no further research picking up that thread.
Similar to how the class of binary relations on sets serves as a model for the definition of ordinary categories [Lei14], our discussion on ternary relations in 4.3 offers a glimpse at what ternary categories may look like. Given the vast scope and high levels of abstraction of modern algebra and category theory [Com08], it may seem surprising at first that there is no agreed-upon definition of ternary category. Although we suspect that the binarity bias of 3 is at play again here as a broad cause of the status quo, given our investigation into ternary operations in 4.2 and 4.3, we can nevertheless confidently attribute the lack of a definition of ternary category to the poor understanding of ternary associativity. As soon as associativity-like properties are successfully captured for ternary objects such as 3-matrices or ternary relations, natural definitions of ternary category are likely to follow easily.
Despite the fundamentally binary nature of ordinary categories, we can exploit their basic properties to construct ternary structures. We shall see that this is not dissimilar to how in 4.2 and 4.3 we defined genuinely ternary operations of matrices and relations despite relying on strongly binary and sequential structures such as number fields, arrays, cartesian products, Boolean algebra, etc. Our goal is to define the ternary analogue of the elementary notion of isomorphism in a category C. Recall that an isomorphism between a pair of objects A, B ∈ C is defined as a pair of morphisms fitting in the following commutative diagram, where commutativity amounts to the property of inverse: We can easily extend this notion to a finite family of n objects and define an n-ary isomorphism as a commuting cycle of morphisms between them. In particular, due to our interest in the ternary case we define a ternary isomorphism, or trisomorphism for short, between a trio of objects A, B, C ∈ C as a trio of morphisms fitting in the following commutative diagram: It follows from this definition that each of the morphisms in a trisomorphism is also a binary isomorphism, however not any triangle of binary isomorphisms between a trio of objects forms a trisomorphism. Although trisomorphisms are determined by any pair of the trio of morphisms we will notate all three explicitly to highlight the ternary nature of the constructions we propose below. In this sense, we shall regard trisomorphisms as a manner of ternary morphisms between objects.
Binary isomorphisms in ordinary categories can be represented by graph-like diagrams, as directedness of morphisms is lost due to the existence of inverses. Similarly, we may represent trisomorphisms by 3-graphs where the vertices are objects and the hyperedges are given by commuting cycles of trios of morphisms. We are looking for elementary ways to define trisomorphism compositions. Let us begin by considering the simple case of two trisomorphisms sharing two objects: This diagram suggests that two trisomorphisms arranged this way may be spliced somehow to define a binary isomorphism between A and B. Indeed, the morphisms α = h 2 • f 1 and β = h 1 • f 2 map between the correct objects but the trisomorphism condition alone does not imply that α and β are inverses. A sufficient condition for this to happen is the natural requirement of isomorphism uniqueness: in any arrangement of a collection of n-ary isomorphisms, whenever more than one binary isomorphisms occur between a pair of objects they must all be equal. In the case at hand this amounts to g 1 = g −1 2 and it is a simple check to verify that this, together with the trisomorphism condition, implies that α = β −1 .
Given a collection of higher arity isomorphisms sharing some objects, we define a general splicing as a new higher arity isomorphism constructed from compositions of individual morphisms when the isomorphism uniqueness condition holds between pairs of shared objects. We can see, once more, that plausible splicings of higher arity isomorphisms are suggested by hypergraph splicings defined 4.1. Concretely for trisomorphisms, Figure 7 offers the template to define the simplest splicings. By parsing 3-graph shapes in different ways we find many possibilities to construct ternary compositions of trisomorphisms, i.e. arity-preserving splicings involving three trisomorphisms. Given their particular ternary symmetry and the attention we devoted to them in previous sections, we shall focus on three particular constructions using the cone, blades and triforce shapes.
The definition of ternary compositions of trisomorphisms can be easily understood by a straightforward diagrammatic procedure: we begin with three objects A, B, C that we label as outer, then progressively throw in inner objects X, Y , Z linked by trisomorphisms with the outer objects in a pattern so as to form the cone, blades and triforce shapes. The goal is to get a trisomorphism diagram between the outer objects as in (triso) by imposing the necessary isomorphism uniqueness conditions. We shall draw compositional diagrams following simplicial-like orientations of labelled morphisms for ease of notation. The cone composition is given by the diagram Here, isomorphism uniqueness demands that the morphisms from the outer objects to X are all the same, that is

then the outer trisomorphism is simply given by
Here, isomorphism uniqueness demands that the morphisms between X and Y are all equal g 1 = g 2 = g 3 =: z and the outer trisomorphism is given by The triforce composition is given by the diagram Here, isomorphism uniqueness demands that multiple paths between outer objects compose to the same morphism, which turns out to be equivalent to the condition that the triangle of morphisms between the inner objects is a trisomorphism. Explicitly, the composability condition is given by

so that the outer trisomorphism is then defined by
The existence of identity morphisms on all objects of a category induces notions of ternary identities similar to those described for compositions of ternary relations in 4.3. Any binary isomorphism induces a partial identity trisomorphism by trivially inserting an identity arrow to complete the triangle: Similarly, the tridentity trisomorphism can be constructed on any object: In order to clearly distinguish partial identities and tridentities in categorical diagrams we use equal signs: partial identity: The compositional behaviour of these special trisomorphisms indeed appears identity-like in a diagrammatic sense when considering the compositions defined above. The cone composition satisfies a compatibility condition between tridentity and partial identities and a general simplifying property for partial identities: Similarly, an identities compatibility property holds for the blades composition and the triforce composition Lastly, a general simplifying property also holds for the blades composition Although so far in our research on trisomorphisms we have not been able to make any further progress on the question of ternary associativity, being able to work with precisely defined notions in categories poses a great advantage over other set-theoretic approaches, such as cubix algebras 4.2 and ternary relations 4.3, which tend to be formally heavier and slightly more ambiguously defined. We currently place our hope on the fact that trisomorphism compositions are ultimately defined in terms of binary morphisms, and so one expects binary associativity to somehow permeate upwards into ternary and higher arity compositions.

3-Lie Algebras
Among all the mathematical structures that generalize binarity, higher arity algebras are perhaps the ones that have received the most attention [Lis71; MV98; Car80; MSS02; AMS10; Gal11; CV21]. The sustained interest in n-ary algebras is likely to have been fueled by the developments in theoretical and mathematical physics discussed in 5.2. This has been particularly true for n-ary Lie algebras, also known as Filippov algebras [Fil85], as explained in the excellent review [AI10]. We shall focus on the ternary instance of these algebras: a 3-Lie algebra is a vector space endowed with a trilinear operation (g, [ , , ]) that is totally skew-symmetric, i.e. [ , , ] : ∧ 3 g → g, and that satisfies the ternary Jacobi identity, sometimes also called the fundamental identity: Ordinary (2-)Lie algebras play a central role in modern physical theories since they encode the infinitesimal symmetry of Lie groups [AI98;Hal03]. A celebrated result in the theory of Lie groups and Lie algebras is the so-called Lie's Third Theorem [Car52] which states that for any finite-dimensional Lie algebra there exists a unique simply-connected Lie group that integrates it. This means that, aside from global topological aspects, Lie algebras and Lie groups are conceptually equivalent. A natural question then arises: is there an analogue of Lie's Third Theorem for 3-Lie algebras? As it stands, this is an open problem [AI10].
That this question remains unresolved to this day is perplexing for several reasons. Firstly, given the highly sophisticated mathematical theories and the immense computational power at our disposal, one may think that the relatively simple axioms of a 3-Lie algebra would pose no significant challenge. But perhaps more puzzling is the fact that, among the vast diversity of group-like algebraic structures that have been defined over the years, one finds no apparent candidates for 3-Lie algebra integrators. Higher arity groups with naïvely generalized associativity axioms [Pos40; Dud07; Gal11], hypergroups with operations defined on subsets instead of single elements [DDV09; MM21] and the n-categorical generalizations of groups [BH81;Zhu06], despite some recent partial results [Hue15], all fail to act as 3-Lie algebra integrators in any significant degree of generality.
What makes the problem of 3-Lie algebra integration particularly enticing is that simple examples of 3-Lie algebras abound. The most natural instance of 3-Lie algebra occurs in 4-dimensional euclidean space: let {e i } 4 i=1 be a basis in R 4 (regarded as an euclidean vector space with the standard inner product) and take three generic elements a, b, c ∈ R 4 , then the manifestly skew-symmetric ternary bracket defined by can be easily checked to satisfy the ternary Jacobi identity. Note that this is the canonical codimiension-1 orthogonal complement operation present in all euclidean spaces: in R 2 it manifests as the complex structure or rotation by π/2, in R 3 as the usual cross product Lie algebra so(3) and in R n+1 as a n-Lie algebra structure in general. These so-called euclidean n-Lie algebras have received considerable attention in the mathematical physics literature due to the famous BLG model [BL08] that used a 3-Lie bracket to describe M2 brane interactions. Another example of a 3-Lie algebra was found in efforts to quantize Nambu-Poisson structures [Awa+01]: for three ordinary square matrices A, B, C ∈ F N 2 the bracket is skew-symmetric and satisfies the ternary Jacobi identity. Similar constructions of 3-Lie brackets have also been found for cubices [BLZ14]. n-Lie algebras have been related to their higher-categorical analogous Lie n-algebras [CLM21]. Despite the dangerously similar notation, Lie n-algebras are a particular kind of L ∞ -algebras, which are structures generalizing ordinary (2-)Lie algebras via higher homotopy encompassing many important objects in differential geometry and mathematical physics [Sta19].
A first approach to the general problem of 3-Lie algebra integration is to simply search for candidates of integrators: can we find a smooth manifold carrying a ternary operation, presumably with appropriate notions of identity and invariance, which somehow induces an infinitesimal 3-Lie algebra structure on (some submodule of sections of) the tangent bundle? By analogy with the case of 2-Lie algebra integration, we would expect the integrating ternary structure to be group-like, satisfying some form of ternary associativity. If this turns out to be the case, the lack of integrator candidates comes as no surprise after our discussion on ternary associativity in previous sections. We thus conclude that a better understanding of higher associativity is likely to result in substantial progress towards the long-standing problem of n-Lie algebra integration.
The difficulties resulting from the lack of general understanding of ternary structures are compounded by a subtle issue already present in the binary case: J.L. Loday's coquecigrue problem [Lod93]. Leibniz algebras are non-commutative analogues of Lie algebras, that is, vector spaces with a bilinear operation that satisfies the Jacobi identity but has no particular symmetry properties. Leibniz algebras have been shown to be integrated by Lie racks [MO14], which are smooth manifolds carrying a compatible binary operation that satisfies a distributivity property instead of associativity. All Lie groups have an associated Lie rack given by the conjugation operation. The coquecigrue problem emerges because one obtains two inequivalent results when integrating a Lie algebra with a Lie group (in the usual fashion) and with a Lie rack (regarding the Lie algebra as a Leibniz algebra). This is particularly relevant to the ternary case because an elementary way to obtain a ternary operation is by nesting binary operations. In the case of a Lie algebra (g, [ , ]), the ternary nested bracket [ , [ , ]] satisfies the ternary Jacobi identity but it is not totally skew-symmetric. This is an instance of a 3-Leibniz algebra, more concretely a Lie triple system [Lis52]. As in the binary case, a complete solution to the 3-Lie algebra integration problem would also need to account for 3-Leibniz algebras.
Recent work on non-associative ternary algebras [Ker08; AS11; AKL17] shows that the symmetry properties of ternary operations should not be limited to the usual skew-symmetrization based on the ±1 signature of permutations, and invites to consider more general representations of Z 3 and S 3 . This suggests that the definition of 3-Lie algebras with totally skew-symmetric brackets is likely to represent only a small family within the zoology of 3-Leibniz algebras. Beyond symmetry considerations, there is increasing evidence that points to other ternary generalizations of the Jacobi identity. For instance, motivated by the ternary commutator of bounded operators on a Hilbert space, a modified version of the ternary derivation property appeared in a recent paper examining the role ternary algebras in quantum mechanics [Bru21].

Topology and Geometry
The Borromean rings were presented in 3 as the most compact and intuitive manifestation of irreducible ternarity. Beyond the knot theoretic generalization of the Borromean rings, known as Brunnian links [Deb61;MY06], the fields of topology and geometry are rich sources of higher arity. We suspect that the spatial nature of these branches of mathematics somehow keeps binarity at bay and favours the naturally higher order notions of shape, locus and structure. A synthesis of these ideas is beautifully captured in the work of N. Baas on higher topological structures [Baa16].
Although we postpone discussing any concrete ternary topological structures for future work, we would like to remark that topology offers a highly developed toolkit of concepts and mathematical theories that may aid in the systematic investigation of higher arity. Particularly, the theory of simplicial complexes and topological manifolds [Lee10] provides some useful notions to begin a systematic enquiry into ternary sequentiality. A sequence is a very special kind of simplicial complex, one whose pairs of 0-simplices are all connected by a single 1-simplex. In other words, topologically, a sequence is a connected oriented 1-manifold with boundary. The natural next step are 2-simplices, which matches the representation of ternary structures by 3-graphs 5 used in previous sections. We could define ternary sequences as simplicial complexes triangulating 2-manifolds with the same general topological properties as ordinary sequences. Under this approach, the notion of ternary sequence is far from unique since there exist many classes of topologically inequivalent connected oriented 2-manifolds with boundary. A disk may serve as the simplest obvious template for the topology of ternary sequences, however other non-trivial topologies will certainly play a significant role in a complete theory of ternary sequentiality.

Ternary Science
In this section we present a broad spectrum of phenomena that display explicitly ternary or higher qualities. Our intention is merely to illustrate the far-reaching scope of the concept of arity across disciplines. Depending on the field of study, the higher arity perspective may provide suggestive new approaches, help re-conceptualize established knowledge or simply offer a neat recollection of anecdotal information.
Macromolecule Function. The biological function of many molecular complexes can often be linked to low-arity interactions between structural sub-units [PF95;NT03;Ber+17]. Two explicitly ternary examples of molecular complexes are porins, found in human cells [SB15], and the triple-helix configuration of DNA strands, which is less stable than the double-helix but still occurs spontaneously in nature [Les11].
Gene Expression. Single discernible traits of a phenotype are often the result of complicated interactions of several gene expression processes [BSY99;HZ20]. Typical approaches to gene co-expression employ binary network methods [Zha+10;Boz+20], however it has recently been noted that higher order gene interactions also play an important role [TE15].
Organism Anatomy. Higher order models of tissue connectivity have become increasingly popular in recent years [KHT09;Bor+11]. The structure of slime mould outgrowths [JR12], plant vascular systems and cognition [Cal+20] or the function of glial cells in the brain [AB09] appear as promising applications of higher order tissue connectivity. Furthermore, in nervous systems, whose study has been dominated by binary network methods [BB11;VBS16], there is mounting evidence for higher order connectivity and structure [Yu+11; Pet+14; CM16; Rei+17; Tol19; KT22].
Epidemiology. The propagation of infectious diseases is typically modelled by diffusion mechanisms on binary networks [LV07], however new higher order approaches based on simplicial complexes [MGA20] and hypergraphs [BKS20; HK21] are becoming increasingly popular. Nuclear Interaction. The study of the strong nuclear force is noteworthy both in terms of the influence it has had in the development of many-particle formalisms [KN54] and the marked ternary flavour of quark models [Gel72; FGL73; NH74; HL78]. Furthermore, the search for quantization schemes to derive such models led to the first use of an explicitly ternary algebra in theoretical physics [Nam73;Tak94].
Mathematical Physics. This discipline deserves our special attention since most of our mathematical discussion on ternary structures in 4 is directly motivated by open problems in theoretical and mathematical physics. Higher arity ideas appear in mathematical physics in four different flavours: • n-ary Algebras. Since the first uses of cubic and ternary structures in the mid 20 th century, particularly in nuclear physics as discussed above [Nam73;NH74] • Higher Field Theories. The application of modern category theory to theoretical physics has led to the development of higher gauge theories [BH11], higher algebras in supergravity [Rav21], homotopical extensions of quantum field theories [Sch21], homotopical pregeometric theories [AG21; AGE21], higher topos theory [Lur09], polycategory-based theories [BZ20] and operad-based theories [BSW21]. Although, as we pointed out in 4.4, most of these higher categorical notions are still firmly based on binary morphisms, they represent a general trend towards higher order concepts.
• Many-Particle Systems. The mathematical modelling of classical many-particle systems has led to the use of higher arity devices such as higher generalization of the Boltzmann equation [AP21] or multi-particle instantaneous interactions [Dob+02]. On the quantum side, the most prominent appearance of higher arity ideas is in the phenomenon of higher order entanglement [ZHG92; YBP20].
• Generalizations of Duality. The notion of duality appears both as a fundamental aspect of the mathematical underpinnings of physics, e.g. dual vector spaces or duality functors, as well as a tool to capture equivalences between two seemingly different physical theories, e.g. dualities in string theory [Alv+94]. Recent research has found ternary analogues of these two notions of duality: a triality of vector spaces, generalizing the notion of dual pairing, in the context of the study of the SO(8) symmetry group [SPK94; Lou01; Sap01; BGR13] and a triality of equivalent theories in physics, algebraic geometry and algebraic topology [SV21].

Cognition
Colour Perception. The particulars of human colour perception [Boy90;Kin05] offer an intuitive source of ternary phenomena in the form of the experience of whiteness as emergent from the simultaneous combination of red, green and blue.
Flavour Perception. In the subjective experience of taste, it is common to abstract and name a flavour from a complicated mix of chemical components, each having their distinctive individual flavour [PTR04]. Interestingly, recent research on the ion channels involved in the nervous impulse for flavour and odour perception has shown that this higher arity is present even at the structural molecular level: several molecules can engage with multiple binding sites of a single ion channel simultaneously [MYR21].
Gestalt Psychology. The birth of gestalt psychology in the early 20th century was an attempt to describe certain phenomenological aspects of visual perception such as 'gist' or 'context' that could not be adequately explained by merely taking into account properties of individual components  [Lag72], where three particles of identical mass always remain in the vertices of an equilateral triangle as they orbit the centre of mass (image credit: [Riv13]); (right) hydrogen-bonding hcb-networks forming a 3-fold interlocking network of Borromean links [PS14].
of a stimulus [Wer38;Kof35]. This led gestalt theorists to operationalize the idea of "the whole being greater than the sum of its parts" [Smi88]. This notion of holism proposed in gestalt psychology precisely alludes to higher structures and organizational principles in perception. From this perspective, illusions such as the Kanizsa triangle ( Figure 11) are interpreted as perceptually emergent phenomena resulting from the global organization of the parts comprising the stimulus. It has been reported that the specific processes that explain the emergence of these phenomena range from local feature detection to global strategies of perceptual organisation [SD95]. A complete description of such perceptual phenomena will arguably require notions of higher arity.
Conceptual Spaces. A conceptual space is a non-symbolic cognitive model for higher-level associative representation of mental constructs and concept learning [Gär04]. Conceptual spaces consist of a number of quality dimensions derived from perceptual mechanisms and based on geometric similarity measures. For example, the concept of taste is represented as a geometric shape, a tetrahedron, whose vertices correspond to the bases tastes (sweet, sour, bitter, salineassociated to 4 types of receptors). Then any other of a plethora of representable tastes are points or regions on this geometric structure. More recently, this has been extended to a cognitive theory of semantic representations [Gar14]. This framework heavily relies on higher order structures and would immensely benefit from a mathematical theory of higher arity for classifying mental representations.

Consciousness.
Considerations of holism similar to gestalt theory have also influenced the neuroscientific study of consciousness, where a particular informational complexity of the brain, known as integrated information, has been postulated as a measure of consciousness [TE98;Ton04]. According to the Integrated Information Theory of consciousness, conscious experience is quantified in terms of the integrated information generated by the brain as a whole over and above the information generated individually by any of its parts [OAT14; AV16a; AV16b]. This integrated information captures the processing complexity associated to simultaneous integration and differentiation of the brain's structural and dynamical motifs at all architectural scales [Koc+16; Ars+17; AV18]. The qualia of consciousness are thus represented as informationally irreducible structures which strongly allude to notions of higher aritons [Ton+16].

Computation
Hypernetworks. Data scientists have long been noting the shortcomings of binary networks. Abundant research has been published advocating the use of hypergraphs and higher-order networks in data science and computation [BGL16], [Bat+20]. The need for higher-order networks and models have also been proposed in the artificial neural network and machine learning communities [ZHS06]. More recently, hypernetwork architectures have been used for addressing the weight-sharing problem across layers of deep convolutional and recurrent networks [HDL16].
Generalized Logic. The core limitations of ordinary formal languages when it comes to describing higher arity arise from (i) the sequential nature of most symbolic representations (typically, strings of characters) and (ii) from the use of binary truth values. Progress concerning the first point has been made via the use of symbolic reasoning systems that exploit 2-and 3-dimensional diagrams to articulate formal reasoning. In particular, automated reasoning systems using string diagram rewriting methods make use of hypergraph structures formalized as tensor network diagrams [Bon+20]. As for the second limitation, potential higher arity generalizations have been formulated as formal systems equipped with multiple symmetrical truth values. Specific examples of this case are type theories and their associated semantics that do away with the law of the excluded middle [Pro13].
Distributed Processing. Modern computer science is undergoing new paradigm shifts from single input-output-based sequential computation to distributed computation [AW04] on one hand, and multicomputation-based processes [Wol02; Wol20; Wol21a], on the other. While the former is concerned with distributed algorithms involving simultaneous message-passing, [Lyn96]; the latter is concerned with all possible threads of computation in parallel, requiring a model of an observer to determine states [Wol21a]. Both of these paradigms do away with sequential processes and offer new testing grounds for higher arity representation of computational processes. Recent examples utilizing the above paradigms include distributed consensus networks and blockchain systems [Wol21b].
Diagrammatic Quantum Computing. In recent years, Categorical Quantum Mechanics arose as a diagrammatic formalism for describing quantum processes and protocols [AC09]. This uses 2-dimensional category-theoretic string diagrams -as opposed to the conventional sequential representation of operator actions -for formal reasoning within systems of parallel quantum processes [CK18]. A particular class of this diagrammatic quantum process algebra, called ZX-Calculus, is used to represent and reason within quantum circuits [CD11]. This diagrammatic quantum formalism in fact gives a representation of quantum tensor networks and has been extremely successful at addressing problems related to quantum circuit simplification and optimization [Bac14; JPV18; Dun+20; KW19;GNA21a]. This framework of quantum computing naturally allows for higher arity operators and has recently been related to a class of multiway rewriting systems [GNA20; GNA21b].

Economics
Multiplayer Games. The competitive paradigm of dyadic games has been extensively studied [Mye97;Tad13], however, the mere addition of a third competitor introduces diplomacy and cooperation effects which dramatically increase the complexity of the strategy space that the players navigate [SL+09;Cam11]. A multiplayer game that requires inputs from all players for its progression can be naturally regarded as a higher arity relation between agents. Although relatively understudied when compared to 2-player game theory, multiplayer game theory is already finding some promising applications in evolutionary theory [GT14], linguistics [HT17] and machine learning [AS18].
Concurrent Competition. The dynamics of competition, particularly in economic and financial systems, have been typically modelled successfully with binary networks [MM09; BSB11], though in recent years there has been an increasing number of studies that approach the phenomenon of competition with higher order methods [Ama+17; LS19].
Tokenomics. Digital and cryptographic currency technologies [Nak08; Muk+16] offer a flexible template where generalized paradigms of transaction, e.g. requiring the concurrent participation of three parties in any exchange, can be easily implemented, deployed and studied.

Sociology
Collaboration. Human societies are known to be a rich source of instances of higher order organization [BGL16]. Collaborative activities, such as scientific research [New01] or governance [Tor12], give rise to natural aritons of concurrent human participation.
Association. At a smaller scale, relationships between individuals offer significant instances of low arity in the form of affectional bonds [Ain06] and small group dynamics [HHP17]. Romantic and sexual associations are perhaps particularly interesting given the observed frequency disparity between pairs and multi-party arrangements [Bal+19], which we may hypothesize as a socio-sexual analogue of the predominance of binary structures in intellectual disciplines.
Identity. Belonging and group recognition in complex societies often result in the intersection of multiple notions of identity on a single individual [Sim08; PE08]. Higher arity concepts might become helpful when navigating complex social environments by reducing the cognitive load on the individual when dealing with conflict.

Arts
Music. Western classical music composition [Sca+21] and repertoire [Par+15] has been recently investigated under the lens of higher order information. From a practitioner's point of view, harmonic relations between tones in a tuning system are natural examples of higher arity [Tym06; Hof08; CDL19]. In this picture, chords can be regarded as harmony aritons and the harmonic development of a piece of music can be accurately represented as a path in the harmony hypergraph.
Architecture. The rigidity properties of triangles makes them commonplace as structural elements in construction and architecture [Ros94]. From the point of view of equilibrium mechanics, ternary structures appear as the manifestation of a basic and intuitive statics fact: a tripod is the only piece of furniture that never wobbles.
Ritual and Spirituality. Multiple human traditions have captured cultural and mystical beliefs in ternary concepts such as trios of entities or objects with some form of ternary symmetry [PKB05].
Two prominent examples are the concept of the christian holy trinity [Let04] and the beliefs attached to symbols such as the triquetra or the valknut in pre-christian Norse and Germanic culture [And11].

Towards Transdisciplinary Higher Arity Science
Although higher arity methods are becoming increasingly popular across disciplines and higher order phenomena are something of a hot topic among some research communities these days, most approaches are often limited to theories and methodologies that merely extend conventional binary ideas. We believe that higher arity concepts and techniques should be embraced in their own right, challenges notwithstanding, as they present immense potential for scientific discovery and mathematical creativity. Indeed, the many natural phenomena and mathematical structures we have discussed in this article offer ample evidence for the existence of a rich universe of genuinely higher arity ideas waiting to be explored.
In the early stages of any field of enquiry, particularly those that push the boundaries of human intuition as higher arity does, it is paramount that theoretical accounts do not venture too far away from the phenomena they attempt to describe and that preliminary models remain in a tight feedback loop with experiments. Successful development of higher arity science in the intellectual landscape of the 21 st century would require the merging of formal and empirical disciplines and the blurring of boundaries between mathematics, science and computation. The transdisciplinary nature of higher arity ideas is perhaps best illustrated by the potential application of irreducible arity as a measure of atomic complexity or arity cohomology as a measure of emergent behaviour.
The prospect of these future lines of research becomes all the more exciting when we consider how poorly we currently understand the simplest forms of higher arity. Beyond the well-documented history of the difficulties faced when modelling systems with ternary or higher interactions, even the most elementary examples of ternary structures behave in unexpected ways that cannot be easily grasped as direct generalizations of familiar binary phenomena. This intangible conceptual barrier limiting all kinds of intellectual disciplines is what we may call an unthought frontier of science. The present article should be taken as a declaration of our determination to venture into uncharted territories and a rallying call for others to join what promises to be a thrilling expedition.

Author Contributions
Carlos Zapata-Carratalá is the lead author of this article. Carlos is currently coordinating a small interdisciplinary collaboration team to pursue research on higher arity science as outlined in this article. Xerxes D. Arsiwalla is the second author and has contributed substantially to the research, development and writing of Sections 4.2, 4.3, 4.4, 5.2, 5.3, 5.4 as well as overall revisions throughout the paper.