## 1. Introduction

Relation algebra ([

1,

2]) allows one to formulate first order logic (and set theory) in a quantifier-free, purely algebraic (equational) way. It has found numerous applications in mathematics and computer science (see, e.g., [

3,

4,

5,

6,

7,

8])., Inin particular, it is a foundation for relational databases [

9]. A relation algebra without some additional structures is equivalent in expressivity to three variable fragment of first order logic [

1]. A crucial ingredient that allows one to express with relation algebra all of the first order logic is the existence of Cartesian products. These can be defined equationally, as so-called relational products, within the relation algebra. In fact, the existence of relational products is strongly related to the representability of abstract relation algebras,

i.e., the possibility of their realization as subalgebras of the algebra of actual binary relations.

Allegories are enriched categories generalizing a category of sets and binary relations. Accordingly, relational products in an allegory can be viewed as a more abstract version of Cartesian products. Recently allegories were used as a mathematical framework to model databases in [

10,

11]. There, the authors had to assume the existence of appropriate relational products in order to make the formalism applicable in other than most trivial cases, in particular, relational products allow one to define

n-ary relations using binary ones.

There is a well-established definition of a binary relational product valid both for abstract relation algebras (see e.g., [

3,

7,

12,

13]) and allegories (see e.g., [

14] or Definition 9 in

Section 2 of this paper). In the case of the allegory of sets and binary relations, this definition characterizes, up to an isomorphism, the usual Cartesian products. For general allegories, one proves easily [

14] that the relational product is a categorical product for the subcategory of maps of the given allegory, that is a subcategory consisting of those arrows (generalized relations) that behave like total functions. It should be noted that, unlike the categorical definition of the product, which involves both universal and existential quantification (for all maps, such that …there exists a unique map, such that …), the definition of a relational product involves no quantification—it is just equations, in terms of constant arrows and projection arrows, which projection arrows must satisfy. Moreover, the unique factorization, the existence of which the categorical definition asserts, is given explicitly by a simple algebraic formula in terms of projection arrows and the maps to be factorized through the product. Unfortunately, this definition of a relational product is too strong to be considered an algebraic characterization of categorical product; there are examples (see e.g., [

15]) of allegories in which a categorical product in the subcategory of maps does not satisfy all of the standard axioms of a relational product. In [

15] and [

16], a weakening (see also Definition 10 in this paper) of the standard relational product was investigated, which still provides a categorical product in the subcategory of maps.

It is surprisingly difficult to generalize the definition of a binary relational product to an

n-ary one for an arbitrary

n. The most obvious one does not yield a categorical product in the subcategory of maps. A non-inductive definition (

i.e., one that did not rely on the iteration of binary products) of the

n-ary relational product was given in [

17]. the paper (concerned with abstract relational algebra rather than with allegories) does not contain the proof that the

n-ary relational product yields the

n-ary categorical product for functions, though the author proves that the

n-ary relational products of the same objects must be isomorphic.

In this paper, we define and investigate the weakening of an

n-ary relational product from [

17], which for

$n=2$ is equivalent to the binary relational product defined in [

15]. We prove that a weak

n-ary relational product yields an

n-ary categorical product in the subcategory of maps. Furthermore, we generalize to the case of weak

n-ary relational products some of the results proven in [

15] for weak binary relational products. Finally, we show that by composing the weak

n-ary products, we again get weak

n-ary products.

## 2. Preliminaries

We assume that the reader is familiar with basic category theory, and an excellent introduction can be found in [

18]. We recall some basic categorical definitions in order to fix the clean, but somewhat idiosyncratic, notation we use. The bulk of the preliminaries is taken by introductory material on allegories, which are not widely known and for which [

14] is the basic textbook.

Note that we consciously utilize the term “set” where “class” might be more appropriate in order not to clutter the presentation with the set-theoretical considerations.

#### 2.1. Categories and Graphs

A graph $\mathcal{G}$ consists of a set of vertices $\mathrm{Obj}\left[\mathcal{G}\right]$, a set of arrows $\mathrm{Arr}\left[\mathcal{G}\right]$ and a pair of maps $\overleftarrow{(\xb7)},\overrightarrow{(\xb7)}:\mathrm{Arr}\left[\mathcal{G}\right]\u27f6\mathrm{Obj}\left[\mathcal{G}\right]$, called the source and target, respectively. We denote by ${\mathrm{Arr}}_{\mathcal{G}}(A,B)$ the set of arrows with source A and target B, where $A,B\in \mathrm{Obj}\left[\mathcal{G}\right]$.

A category $\mathcal{C}$ is a graph with associative arrow composition $f;g\in {\mathrm{Arr}}_{\mathcal{C}}(\overleftarrow{f},\overrightarrow{g})$ defined whenever $\overrightarrow{f}=\overleftarrow{g}$ (note the diagrammatic order) and identity map $\mathrm{id}:\mathrm{Obj}\left[\mathcal{C}\right]\to \mathrm{Arr}\left[\mathcal{C}\right]$, such that $\mathrm{id}(\overleftarrow{f});f=f;\mathrm{id}(\overrightarrow{f})=f$ for all $f\in \mathrm{Arr}\left[\mathcal{C}\right]$. We write ${\mathrm{id}}_{A}:=\mathrm{id}(A)$. When using single letter arrow names, we will often omit the semicolon composition operator abbreviating $fg:=f;g$.

We will often declare the composability of arrows using diagrams, e.g.,

Note that unlike in [

14], the diagrams are not considered commutative by default.

A categorical n-ary product is a family of arrows ${\{{\pi}_{i}\}}_{i\in \{1,\dots ,n\}}$ with a common source, such that for any other family of arrows ${\{{f}_{i}\}}_{i\in \{1,\dots ,n\}}$ with a common source and such that $\overrightarrow{{f}_{i}}=\overrightarrow{{\pi}_{i}}$ for all $i\in \{1,\dots ,n\}$, there exists a unique arrow h, such that ${f}_{i}=h{\pi}_{i}$ for all $i\in \{1,\dots ,n\}$.

#### 2.2. Allegories

An allegory [

14]

$\mathcal{A}$ is a category enriched with intersection and reciprocation operators, respectively, for all

$A,B\in \mathrm{Obj}\left[\mathcal{A}\right]$:

We require these operators to satisfy the following conditions: Intersections make each hom-set a meet-semilattice (see, e.g., [

19]), where we denote the associated partial order by ⊑,

i.e.,

$R\u2291S:\equiv R\sqcap S=R$, for all

$R,S\in {\mathrm{Arr}}_{\mathcal{A}}(\overleftarrow{R},\overrightarrow{R})$. In addition,

$\xb7\sqcap \xb7$ and

${(\xb7)}^{\circ}$ are to satisfy:

For all

$R,S,T\in \mathrm{Arr}\left[\mathcal{A}\right]$, such that the above formulas are well defined. Applying the reciprocation to both sides of the Equation (1d) (right semi-distributivity) and (1e) (right modular identity), using the Equations (1a)–(1c) and redefining symbols yields easily the following right versions:

Allegories generalize the allegory

$\mathcal{R}$ of sets (objects) and binary relations (arrows). Because of this, we may refer to arrows in any allegory as “relations”. In

$\mathcal{R}$, we write

$aRb$ iff

$(a,b)\in R$. The identity in

$\mathcal{R}$ is

$\mathrm{id}:A\mapsto \{(a,a)|a\in A\}$, and the intersection is the set intersection,

i.e.,

$R\sqcap S:=R\cap S$, reciprocation is defined by

$a{R}^{\circ}b:\equiv bRa$ and composition of relations

$R,S\in \mathrm{Arr}\left[\mathcal{R}\right]$ such that

$\overrightarrow{R}=\overleftarrow{S}$ is defined by:

We distinguish the following classes of arrows in allegory:

If ${\mathrm{id}}_{\overleftarrow{{\scriptstyle R}}}\u2291R{R}^{\circ}$, then R is called total;

If ${R}^{\circ}R\u2291{\mathrm{id}}_{\overrightarrow{{\scriptstyle R}}}$, then R is called functional;

If R is functional and total, it is called a map. A set of all maps in an allegory $\mathcal{A}$ is denoted by $\mathrm{Map}\left[\mathcal{A}\right]$;

If $R{R}^{\circ}\u2291{\mathrm{id}}_{\overleftarrow{{\scriptstyle R}}}$, then R is called injective;

If ${\mathrm{id}}_{\overrightarrow{{\scriptstyle R}}}\u2291{R}^{\circ}R$, then R is called surjective;

If $\overleftarrow{R}=\overrightarrow{R}=C$ and $R\u2291{\mathrm{id}}_{C}$, then R is called coreflexive.

If $R\in \mathrm{Arr}\left[\mathcal{A}\right]$ is an isomorphism in an allegory $\mathcal{A}$, then both R and ${R}^{\circ}$ are maps, and ${R}^{-1}={R}^{\circ}$. Note that ${\mathrm{id}}_{A}$ for all $A\in \mathrm{Obj}\left[\mathcal{A}\right]$ is a map, and the composition of maps is a map. For any $A,B\in \mathrm{Obj}\left[\mathcal{A}\right]$, we denote by ${\top}_{A,B}$ the top element of ${\mathrm{Arr}}_{\mathcal{A}}(A,B)$, if it exists. In $\mathcal{R}$, we have ${\top}_{AB}:=A\times B$.

An arrow T is called symmetric if ${T}^{\circ}=T$. Some symmetric arrows might admit splittings:

**Definition 1.** An arrow R is called a splitting of a symmetric arrow T if and only if $R{R}^{\circ}={\mathrm{id}}_{\overleftarrow{R}}$, ${R}^{\circ}R=T$.

We will make frequent use of the following results (

cf. [

14]):

**Lemma 2.** $R(S\sqcap T)=RS\sqcap RT$ for all $\u2022\stackrel{R}{\to}\u2022\underset{T}{\overset{S}{\rightrightarrows}}\u2022$, such that R is functional. Similarly, $(S\sqcap T)R=SR\sqcap TR$ for all $\u2022\underset{T}{\overset{S}{\rightrightarrows}}\u2022\stackrel{R}{\to}\u2022$, such that ${R}^{\circ}$ is functional.

**Lemma 3.** Define $\mathfrak{Dom}(R):={\mathrm{id}}_{\overleftarrow{{\scriptstyle R}}}\sqcap R{R}^{\circ}$. Then, $\mathfrak{Dom}(R\sqcap S)={\mathrm{id}}_{\overleftarrow{{\scriptstyle R}}}\sqcap R{S}^{\circ}$ for all $\u2022\underset{S}{\overset{R}{\rightrightarrows}}\u2022$.

**Lemma 4.** Suppose that A is coreflexive. Then, $A={A}^{\circ}$ (A is symmetric). Moreover, if B is another coreflexive arrow, such that $\overleftarrow{A}=\overleftarrow{B}$ and $\overrightarrow{A}=\overrightarrow{B}$, then $AB=A\sqcap B$. In particular, this implies that $AB=BA$, $AB$ is again coreflexive (as $A\sqcap B$ obviously is) and that A is idempotent (i.e., $AA=A$). Finally, A (and, hence, ${A}^{\circ}$) is functional, as ${A}^{\circ}A=AA=A\u2291{\mathrm{id}}_{\overleftarrow{A}}$.

**Lemma 5.** Maps are incomparable The ordering restricted to maps is discrete, that is $f\u2291g\equiv f=g$ for all $f,g\in \mathrm{Map}\left[\mathcal{A}\right]$.

**Lemma 6.** ([15]) Suppose that and that S is functional. Then, $RS\sqcap T=(R\sqcap T{S}^{\circ})S$.

#### 2.3. Distributive and Division Allegories

A distributive allegory is an allegory

$\mathcal{A}$ in which for all hom-sets

${\mathrm{Arr}}_{\mathcal{A}}(A,B)$, there exists a bottom element

${\perp}_{AB}\in {\mathrm{Arr}}_{\mathcal{A}}(A,B)$ and a binary operation

$\xb7\bigsqcup \xb7:{\mathrm{Arr}}_{\mathcal{A}}(A,B)\times {\mathrm{Arr}}_{\mathcal{A}}(A,B)\to {\mathrm{Arr}}_{\mathcal{A}}(A,B)$, which together with

$\xb7\sqcap \xb7$ makes

${\mathrm{Arr}}_{\mathcal{A}}(A,B)$ a distributive lattice with

$\xb7\sqcap \xb7$ as the infimum and

$\xb7\bigsqcup \xb7$ as the supremum. In addition, we require that

$\xb7\bigsqcup \xb7$ and

${\perp}_{AB}$ satisfy:

for all

$R,S,T\in \mathrm{Arr}\left[\mathcal{A}\right]$, such that the above formulae are type-correct.

A division allegory is a distributive allegory with a partial binary operation

$\xb7\backslash \xb7$ (called a left division), defined if and only if both arguments have the same sources, and satisfying for all

Note that

$\mathcal{R}$ is a division allegory with the union defined as set union,

i.e.,

$R\bigsqcup S:=R\cup S$, bottom

${\perp}_{AB}=\varnothing $ and a left division defined by:

#### 2.4. A Functional Part of a Relation

The notion of a functional part

$\mathrm{unp}(R)$ of a relation

R was introduced in [

3] and was later generalized to division allegories in [

15]. Let

$\mathcal{A}$ be a division allegory, and let

$R\in \mathrm{Arr}\left[\mathcal{A}\right]$. Then, the functional part of R [

3,

15] is defined by:

Note that in

$\mathcal{R}$, we have, for any

$R\in \mathrm{Arr}\left[\mathcal{R}\right]$:

which, together with the following lemma, justifies interpreting

$\mathrm{unp}(R)$ as the functional part of

R.

**Lemma 7.** ([3,15]) For any $R\in \mathrm{Arr}\left[\mathcal{A}\right]$, where $\mathcal{A}$ is a division allegory, we have that $\mathrm{unp}(R)$ is functional, and moreover, R is functional if and only if $R=\mathrm{unp}(R)$.

The following result, which (slightly differently phrased) was proven in [

15], shows that, given relevant splittings, we can associate a map to any relation.

**Lemma 8.** Let $\mathcal{A}$ be a division allegory, and let $R\in \mathrm{Arr}\left[\mathcal{A}\right]$. Let also A be a coreflexive arrow, such that $A\u2291\mathrm{unp}(R)\mathrm{unp}{(R)}^{\circ}$. Suppose that A has a splitting s, i.e., ${s}^{\circ}s=A$, $s{s}^{\circ}={\mathrm{id}}_{\overleftarrow{s}}$. Then $s;\mathrm{unp}(R)\in \mathrm{Map}\left[\mathcal{A}\right]$.

**Proof.** We provide the proof for completeness. Note first that s is functional as

${s}^{\circ}s=A\u2291{\mathrm{id}}_{\overrightarrow{s}}$. Furthermore,

$\mathrm{unp}(R)$ is functional by Lemma 7. Hence,

$s;\mathrm{unp}(R)$ must be functional, as well, being a composition of functional arrows. The arrow

$s;\mathrm{unp}(R)$ is also total as:

☐

#### 2.5. Relational Products

Here is a standard definition of a relational binary product in an allegory. Note that it is necessary to assume the existence of the top relation between objects that are supposed to be the components of the relational product.

**Definition 9.** ([14]) Let $\mathcal{A}$ be an allegory. A pair of arrows $\u2022\stackrel{{\pi}_{1}}{\leftarrow}C\stackrel{{\pi}_{2}}{\to}\u2022$ is called a relational product if and only if it satisfies the following conditions:

The following is the weakening of the above definition formulated in [

15]:

**Definition 10.** ([15]) Let $\mathcal{A}$ be an allegory. A pair of arrows $\u2022\stackrel{{\pi}_{1}}{\leftarrow}C\stackrel{{\pi}_{2}}{\to}\u2022$ is called a weak relational product if and only if it satisfies the following conditions:In [

15], it was proven that a weak relational product is a categorical product in the subcategory of maps. Additionally, it is immediate.

## 3. Weak n-Ary Relational Products

The following is a generalization of the characterization of binary relational products to the characterization of n-ary products.

**Definition 11.** ([17]) Let $I=\{1,\dots ,n\}$. A finite family of arrows ${\{{\pi}_{i}\}}_{i\in I}\subseteq \mathrm{Arr}\left[\mathcal{A}\right]$ with a common source C, that is, such that $\overleftarrow{{\pi}_{i}}=C$ for all $i\in I$, is called an n-ary relational product if and only if it satisfies the following conditions:Before we present the weakening of the above definition, we need the following piece of notation. Let

$\pi :={\{{\pi}_{i}\}}_{i\in I}$ be a finite family of arrows in an allegory

$\mathcal{A}$ with a common source. We denote:

The following is the weakening of Definition 11:

**Definition 12.** Let $I=\{1,\dots ,n\}$. A finite family of arrows ${\{{\pi}_{i}\}}_{i\in I}\subseteq \mathrm{Arr}\left[\mathcal{A}\right]$ with a common source C, that is, such that $\overleftarrow{{\pi}_{i}}=C$ for all $i\in I$, is called a weak n-ary relational product if and only if it satisfies the following conditions:An immediate corollary of Equations (8a) and (8c) is that arrows ${\pi}_{i}$ for all i are maps. Another immediate corollary is that an n-ary relational product is also a weak n-ary relational product. The following result shows that any categorical product in $\mathrm{Map}\left[\mathcal{A}\right]$ satisfies most of the Conditions (8):

**Lemma 13.** (cf. [15]). Let ${\{{\pi}_{i}\}}_{i\in I}$ be an n-ary categorical product in $\mathrm{Map}\left[\mathcal{A}\right]$. Then, ${\{{\pi}_{i}\}}_{i\in I}$ satisfies Conditions (8a), (8b), (8d) and the “⊒” part of (8c).**Proof.** Condition (8a) and the “⊒” part of Condition (8c) are satisfied, because all

${\pi}_{i}$’s are maps, hence, respectively, functional and total. Let now

${\{{f}_{i}\}}_{i\in I}\in {\mathcal{F}}_{\pi}$. Because

${\{{\pi}_{i}\}}_{i\in I}$ is a categorical

n-ary product, it follows that there exists a (unique) map

$h\in \mathrm{Map}\left[\mathcal{A}\right]$, such that

${f}_{i}=h{\pi}_{i}$ for all

$i\in I$. Hence, for all

$i\in I$:

which proves Condition (8b). Similarly, we prove Condition (8d). Let

$J\u228aI$, and let

$k\in I\backslash J$. Tthen:

☐

Both the binary weak relational product and n-ary relational product are axiomatized using three axioms, two of which correspond to the properties (8a) and (8c) of a weak n-ary relational product. It is therefore interesting to check if the remaining properties (8b) and (8d) are really independent or if one of them implies the other in the presence of other axioms. The following two examples prove that neither implication holds:

**Example 14.** Consider the allegory $\mathcal{R}$ of binary relations, and let $A\in \mathrm{Obj}\left[\mathcal{R}\right]$ be any set that is neither empty nor a singleton. It is immediate that the three maps ${\pi}_{1},{\pi}_{2},{\pi}_{3}:={\mathrm{id}}_{A}$ satisfy the Conditions (8a), (8b) and (8c) (for $I:=\{1,2,3\}$). They fail, however, to satisfy Condition (8d). Indeed, let ${f}_{1},{f}_{2},{f}_{3}:A\times A\to A$, where ${f}_{1}$ and ${f}_{2}$ are both projections on the first component of a Cartesian product $A\times A$ and ${f}_{3}$ is the projection on the second component. Then, we have that $\left({\sqcap}_{i\in \{1,2\}}{\pi}_{i}{\pi}_{i}^{\circ}\right){\pi}_{3}={\mathrm{id}}_{A}$, and $\left({\sqcap}_{i\in \{1,2\}}{\pi}_{i}{f}_{i}^{\circ}\right){f}_{3}={f}_{2}^{\circ}{f}_{3}={\top}_{A}$. However, as A is neither empty nor singleton, we must have ${\mathrm{id}}_{A}\u228f{\top}_{A}$, contradicting Condition (8d).

**Example 15.** Consider the allegory $\mathcal{A}$, with two distinct objects, A and B, and with:where π satisfies:This allegory can be realized in $\mathcal{R}$ by setting, e.g., Let now $I:=\{1,2,3\}$, and let ${\pi}_{1},{\pi}_{2},{\pi}_{3}:=\pi $. It is immediate that both Equations (8a) and (8c) are satisfied by the ${\pi}_{i}$’s. To check the remaining two axioms of n-ary weak relational product, first note that ${\mathcal{F}}_{\pi}$ contains only two families of maps ${\{{f}_{i}\}}_{i\in \{1,2,3\}}$: one obtained by setting ${f}_{1},{f}_{2},{f}_{3}:={\mathrm{id}}_{B}$; the other one by setting ${f}_{1},{f}_{2},{f}_{3}:=\pi $. Both families satisfy property (8d); however, setting ${f}_{1},{f}_{2},{f}_{3}:={\mathrm{id}}_{B}$ provides a counterexample to Equation (8b).

The following two lemmas are crucial for proving the main result of this paper:

**Lemma 16.** Let $I:=\{1,\dots ,n\}$, and let ${\{{\pi}_{i}\}}_{i\in I}\subseteq \mathrm{Arr}\left[\mathcal{A}\right]$ be a weak n-ary relational product. Let ${\{{f}_{i}\}}_{i\in I}\in {\mathcal{F}}_{\pi}$. Define ${h}_{J}:={\sqcap}_{i\in J}{f}_{i}{\pi}_{i}^{\circ}$, for all $\varnothing \ne J\subseteq I$. Then, for all $\varnothing \ne J\u228aI$ and $k\in I\backslash J$, the totality of ${h}_{J}$ implies that ${h}_{J}{\pi}_{k}{f}_{k}^{\circ}\u2292{\mathrm{id}}_{\overleftarrow{{\scriptstyle {h}_{J}}}}$.

**Proof.** Let

$\varnothing \ne J\u228aI$ and

$k\in J\backslash I$. Assume that

${h}_{J}$ is total. Then:

☐

**Lemma 17.** Let $I:=\{1,\dots ,n\}$, and let ${\{{\pi}_{i}\}}_{i\in I}\subseteq \mathrm{Arr}\left[\mathcal{A}\right]$ be a weak n-ary relational product. Let ${\{{f}_{i}\}}_{i\in I}\in {\mathcal{F}}_{\pi}$. Then, ${h}_{J}:={\sqcap}_{i\in J}{f}_{i}{\pi}_{i}^{\circ}$ is total for all $\varnothing \ne J\subseteq I$.

**Proof.** We prove the lemma using induction on

J. For the base case, note that for all

$i\in I$:

Suppose now that we have proven for some

$\varnothing \ne J\u228aI$ that

${h}_{J}$ is total. Note that

$\mathfrak{Dom}(R)={\mathrm{id}}_{\overleftarrow{{\scriptstyle R}}}$ is equivalent with R being total. We have:

☐

The following result, which is the main result of this paper, shows that an n-ary weak relational product is in fact a categorical product for maps.

**Theorem 18.** Suppose that ${\{{\pi}_{i}\}}_{i\in I}\subseteq \mathrm{Arr}\left[\mathcal{A}\right]$ is a weak n-ary relational product. Let an arrow $h\in \mathrm{Arr}\left[\mathcal{A}\right]$ and family of maps ${\{{f}_{i}\}}_{i\in I}\subseteq \mathrm{Map}\left[\mathcal{A}\right]$ be such that for all $i\in I$, we have .

Note that the diagram in the assumptions of the above theorem above implicitly implies that all of the maps ${f}_{i}$ have a common source.

**Proof.** (Theorem 18) First, assume that

$h\in \mathrm{Map}\left[\mathcal{A}\right]$ and

$h{\pi}_{i}={f}_{i}$ for all

$i\in I$. Then:

Assume now that

$h={\sqcap}_{i}{f}_{i}{\pi}_{i}^{\circ}$. Then:

The arrow

h is functional, that is

${h}^{\circ}h\u2291{\mathrm{id}}_{\overrightarrow{{\scriptstyle h}}}$. Indeed, for all

$k\in I$:

The arrow h is total, that is $h{h}^{\circ}\u2292{\mathrm{id}}_{\overleftarrow{{\scriptstyle h}}}$. Indeed, this is stated in Lemma 17.

Equality

$h{\pi}_{i}={f}_{i}$ holds for all i. Indeed,

On the other hand, we have already proven that h is a map, and so, both $h{\pi}_{i}$ and ${f}_{i}$ are maps; hence, by Lemma 5, $h{\pi}_{i}\u2291{f}_{i}$ implies $h{\pi}_{i}={f}_{i}$. ☐

Let us also note that our definition of a weak

n-ary relational product is a generalization of a weak binary relational product,

i.e., a pair of arrows

${\pi}_{i}$,

$i=1,2$ with a common source in an allegory

$\mathcal{A}$ is a weak binary relational product (Definition 10) if and only if it is a weak two-ary relational product (Definition 12). Indeed, by Theorem 18 and ([

15], Theorem 2), a pair of arrows satisfying conditions of either of these two definitions is a categorical product for maps. Then, by Lemma 13 and ([

15], Lemma 5) a categorical product satisfies all of the conditions of Definitions 10 and 12 apart from the “⊑” part of Equations (5b) and (8c), which in this case, are identical anyway.

An example given in [

15] shows that there are indeed allegories

$\mathcal{A}$ for which a categorical product in

$\mathrm{Map}\left[\mathcal{A}\right]$ does not satisfy the “⊑” part of Equation (8c); hence, one needs to assume something more about

$\mathcal{A}$ to ensure that

n-ary categorical products in

$\mathrm{Map}\left[\mathcal{A}\right]$ satisfy all Conditions (8). The following result is a generalization of ([

15], Lemma 6) to the case of weak

n-ary relational products.

**Lemma 19.** Suppose that ${\{{\pi}_{i}\}}_{i\in I}$, $I=\{1,\dots ,n\}$ is an n-ary categorical product in $\mathrm{Map}\left[\mathcal{A}\right]$. If there exists a splitting $R\in \mathrm{Arr}\left[\mathcal{A}\right]$ of ${\sqcap}_{i\in I}{\pi}_{i}{\pi}_{i}^{\circ}$, then ${\{{\pi}_{i}\}}_{i\in I}$ is an n-ary weak relational product.

**Proof.** The basic idea of the proof is the same as of the proof of ([

15], Lemma 6): we first prove that

${\{R{\pi}_{i}\}}_{i\in I}$ is a weak

n-ary relational product, and then, we use this result to prove that

${\{{\pi}_{i}\}}_{i\in I}$ must be a weak

n-ary relational product, too. Let us denote

${\tilde{\pi}}_{i}:=R{\pi}_{i}$ for all

$i\in I$. The family

${\{{\tilde{\pi}}_{i}\}}_{i\in I}$ satisfies Condition (8a). Indeed, we have (

cf. the proof of ([

15], Lemma 6)) that for all

$i\in I$:

Note that

$R{R}^{\circ}={\mathrm{id}}_{\overleftarrow{R}}$ implies that

${R}^{\circ}$ is functional. Observe that for all

$i\in I$:

It follows that

${\{{\tilde{\pi}}_{i}\}}_{i\in I}$ satisfies (

cf. the proof of ([

15], Lemma 6)):

On the other hand, for all

$i\in I$, we have that [

15]

${\tilde{\pi}}_{i}{\tilde{\pi}}_{i}^{\circ}=R{\pi}_{i}{\pi}_{i}^{\circ}{R}^{\circ}\u2292R{R}^{\circ}={\mathrm{id}}_{\overleftarrow{R}}$, as

${\pi}_{i}$ is total, for all

$i\in I$; hence, also,

${\sqcap}_{i\in I}{\tilde{\pi}}_{i}{\tilde{\pi}}_{i}^{\circ}\u2292{\mathrm{id}}_{\overleftarrow{R}}$. Thus, the family

${\{{\tilde{\pi}}_{i}\}}_{i\in I}$ satisfies Condition (8c).

In order to see that the family

${\{{\tilde{\pi}}_{i}\}}_{i\in I}$ satisfies Condition (8b), note first that

${\mathcal{F}}_{\tilde{\pi}}={\mathcal{F}}_{\pi}$ and that

${\{{\pi}_{i}\}}_{i\in I}$ is by assumption a categorical product in

$\mathrm{Map}\left[\mathcal{A}\right]$ and, thus, by Lemma 13, satisfies all of Condition (8) but the “⊑” part of Condition (8c). Hence, for all families

${\{{f}_{i}\}}_{i\in I}\in {\mathcal{F}}_{\tilde{\pi}}$, we have:

In order to see that the family

${\{{\tilde{\pi}}_{i}\}}_{i\in I}$ satisfies Condition (8d), note first that, for any

${\{{f}_{i}\}}_{i\in I}\in {\mathcal{F}}_{\tilde{\pi}}={\mathcal{F}}_{\pi}$, as

${\{{\pi}_{i}\}}_{i\in I}$ is, by assumption, a categorical product in

$\mathrm{Map}\left[\mathcal{A}\right]$, there exists a map h, such that

${f}_{i}=h{\pi}_{i}$ for all

$i\in I$. Furthermore, note that, as, by Lemma 13,

${\{{\pi}_{i}\}}_{i\in I}$ satisfies “⊒” part of Condition (8c) and R is a splitting of

${\sqcap}_{i\in I}{\pi}_{i}{\pi}_{i}^{\circ}$, we must have

${R}^{\circ}R={\sqcap}_{i\in I}{\pi}_{i}{\pi}_{i}^{\circ}\u2292{\mathrm{id}}_{\overrightarrow{R}}$. Then, it follows that, for all

$\varnothing \ne J\subseteq I$ and

$k\in I\backslash J$, we have:

By Theorem 18, we know now that

${\{{\tilde{\pi}}_{i}\}}_{i\in I}$ is a categorical product in

$\mathrm{Map}\left[\mathcal{A}\right]$ and that the arrow

$g:={\sqcap}_{i\in I}{\pi}_{i}{\tilde{\pi}}_{i}^{\circ}$ is a map satisfying

${\pi}_{i}=g{\tilde{\pi}}_{i}$ for all

$i\in I$. On the other hand, as

${\{{\pi}_{i}\}}_{i\in I}$ is a categorical product in

$\mathrm{Map}\left[\mathcal{A}\right]$ by assumption, the standard argument shows that g must be an isomorphism. In any allegory, the inverse of an isomorphism equals the reciprocation of this isomorphism and both the isomorphism and its inverse are maps; hence, in particular

${g}^{-1}={g}^{\circ}$. Denote by C the common source of

${\pi}_{i}$’s. Putting it together, the argument being almost identical to the proof of ([

15], Lemma 6) shows that the family

${\{{\pi}_{i}\}}_{i\in I}$ satisfies the “⊑” part of Condition (8c):

This ends the proof, as, by Lemma 13, the family ${\{{\pi}_{i}\}}_{i\in I}$ satisfies all of the other conditions of Definition 12 by virtue of being the categorical product in $\mathrm{Map}\left[\mathcal{A}\right]$. ☐

In Conditions (8b) and (8d) the range of universal quantification was restricted to maps. The following result, which is the adaptation to

n-ary weak relational products of ([

15], Lemma 7), shows that we can modify those conditions, so that the range of quantification is restricted only by source-target considerations from the whole set of arrows in the allegory under consideration.

**Lemma 20.** (cf. ([15], Lemma 7)) Let $\mathcal{A}$ be a division allegory in which all partial identities split. A family ${\{{\pi}_{i}\}}_{i\in I}$, where $I=\{1,\dots ,n\}$, of arrows in $\mathcal{A}$ with a common source is an n-ary weak relational product if and only if it satisfies Conditions (8a) and (8c), as well as:for all families ${\{{R}_{i}\}}_{i\in I}$ of arrows in $\mathcal{A}$ with a common source and such that $\overrightarrow{{R}_{i}}=\overrightarrow{{\pi}_{i}}$ for all $i\in I$.

**Proof.** The basic idea of the proof is adapted from the proof of ([

15], Lemma 7). It is immediate that if a family

${\{{\pi}_{i}\}}_{i\in I}$ satisfies Conditions (8a) and (8c), as well as Conditions (10), then it is a weak

n-ary relational product, because for any

${\{{f}_{i}\}}_{i\in I}\in {\mathcal{F}}_{\pi}$, we have

$\mathrm{unp}({f}_{i})={f}_{i}$ by Lemma 7 and

$\mathfrak{Dom}(\mathrm{unp}({f}_{i}))=\mathfrak{Dom}({f}_{i})={\mathrm{id}}_{\overleftarrow{{f}_{i}}}$ for all

$i\in I$, and thus, Conditions 10 subsume trivially Conditions (8b) and (8d). Hence, it remains to prove that Conditions (8b) and (8d) imply Conditions (10).

Assume that

${\{{\pi}_{i}\}}_{i\in I}$ is an

n-ary weak relational product, and let

${\{{R}_{i}\}}_{i\in I}$ be a family

$\mathcal{A}$ with a common source

C and such that

$\overrightarrow{{R}_{i}}=\overrightarrow{{\pi}_{i}}$ for all

$i\in I$. Denote for brevity:

and let s be a splitting of

ı,

i.e.,

$s{s}^{\circ}={\mathrm{id}}_{\overleftarrow{s}}$ and

${s}^{\circ}s=\u0131$. By Lemma 8,

$s;\mathrm{unp}({R}_{i})$ is a map for all

$i\in I$. Now, the families

${\{{\pi}_{i}\}}_{i\in I}$ and

${\{{R}_{i}\}}_{i\in I}$ satisfy Condition (10a) as, for all

$i\in I$:

We prove Condition (10b) similarly. Let

$\varnothing \ne J\u228aI$ and

$k\in I\backslash J$. Then:

☐