1 Introduction

The present paper concerns the relationship between sum-and-distance systems and sum systems, and their general structure, including a construction method for all such systems. Roughly speaking, a sum-and-distance system consists of several component sets of natural numbers such that the sums comprising one element, or its negative, of each set generate a prescribed target set, specifically an arithmetic progression. More simply, a sum system consists of several sets of non-negative integers such that the sums formed by choosing exactly one term from each set generate a sequence of consecutive integers. For the precise definitions, see Sect. 2 below.

Two-component sum-and-distance systems arise naturally when we consider square arrays of consecutive integers with certain symmetry properties. The algebraic properties of square matrices with different types of symmetries were recently explored in [4], also giving construction formulae for the various types. In that paper, the matrix entries were assumed to be general real numbers, allowing the symmetry classes to form direct summands in a \({{\mathbb {Z}}}_2\)-graduation of the matrix algebra over \({\mathbb R}\). However, an additional level of complication is introduced when we require the matrix entries to be integers or, more specifically, a consecutive sequence of integers, such as in a magic square or a principal reversible square [7].

A reversible square M is an \(n \times n\) matrix with the properties of column and line reversal symmetry (R) and the vertex sum property (V) (see [4] and Eqs. (4.7), (4.1) in Sect. 4 below). Such a matrix also has the associated symmetry that any two entries in diametrically opposite positions with respect to the centre of the matrix add up to the same constant 2w (see [4], Lemma 7.1). Subtracting w from each matrix entry, we obtain a reversible square \(M_0\) whose entries sum up to 0. If \(n = 2 \nu \) is even, it is then of the form ( [4] Theorem 7.2)

$$\begin{aligned} M_0&= \frac{1}{2} \left( \begin{matrix} J\left( 1_\nu \,a^T + b\,1_\nu ^T\right) J &{} J \left( -1_\nu \,a^T + b\,1_\nu ^T\right) \\ \left( 1_\nu \,a^T - b\,1_\nu ^T\right) J &{} -1_\nu \,a^T - b\,1_\nu ^T \end{matrix}\right) , \end{aligned}$$
(1.1)

where \(1_\nu \in {\mathbb R}^\nu \) is the vector with all entries equal to 1, \(J \in {\mathbb R}^{\nu \times \nu }\) is the matrix which has entries 1 on the anti-diagonal and 0 elsewhere, and \(a, b \in {{\mathbb {R}}}^\nu \) are arbitrary vectors. If the reversible square M is to contain exactly the integers \(1, \dots , n^2,\) then the weight w can be found as the average of all entries, \(w = (n^2 + 1)/2;\) hence the weightless reversible square \(M_0\) will have as entries the numbers

$$\begin{aligned} \left\{ -\frac{n^2-1}{2}, -\frac{n^2-1}{2} + 1, \dots , \frac{n^2-1}{2} - 1, \frac{n^2-1}{2} \right\} . \end{aligned}$$

Considering that multiplication by J on the left or right just inverts the order of the rows or columns of a matrix, respectively, we find from (1.1) that the sums \(\pm \, a_j \pm \, b_k,\) with \(j, k \in \{1, \dots , \nu \}\) and independently chosen signs, must generate each odd number from \(-n^2 + 1\) to \(n^2 - 1\) exactly once. In other words, the sets of entries of the vectors a and b form a two-component non-inclusive sum-and-distance system as defined in Sect. 2 below.

If \(n = 2 \nu + 1\) is odd, then the weightless reversible square \(M_0\) will have the form ([4] Theorem 7.2)

$$\begin{aligned} M_0&= \left( \begin{matrix} J\left( 1_\nu \,a^T + b\,1_\nu ^T\right) J &{} J b &{} J\left( -1_\nu \,a^T + b\,1_\nu ^T\right) \\ (J a)^T &{} 0 &{} - a^T \\ \left( 1_\nu \,a^T - b\,1_\nu ^T\right) J &{} - b &{} -1_\nu \,a^T - b\,1_\nu ^T \end{matrix}\right) \end{aligned}$$

with vectors \(a, b \in {{\mathbb {R}}}^\nu ,\) and by the same reasoning as above, we find that, for the reversible square M to contain the integers \(1, \dots , n^2,\) the sums \(\pm \, a_j \pm \, b_k,\) where \(j, k \in \{1, \dots , \nu \}\) and the signs are chosen independently, taken together with the entries \(\pm \, a_j, \pm \, b_j\)\((j \in \{1, \dots , \nu \}),\) must generate exactly the integers \(1, 2, \dots , (n^2-1)/2\) and their negatives. In other words, the sets of entries of the vectors a and b form a two-component inclusive sum-and-distance system, as defined in Sect. 2 below.

As shown in Lemma 3.1 and Theorem 4.1 of [4] a \(2\nu \times 2 \nu \) matrix M will have all rows and columns adding up to the same number, and also the associated symmetry described above, if, after subtracting the weight w,  it has the form

$$\begin{aligned} M_0&= \frac{1}{2} \left( \begin{matrix} J(J V^T + W J)J &{} J(-J V^T + W J) \\ (J V^T - W J)J &{} -J V^T - W J \end{matrix}\right) \end{aligned}$$

with matrices \(V, W \in {{\mathbb {R}}}^{\nu \times \nu }\) whose rows add up to 0. Specifically, if \(\nu \) is even and we choose vectors vw with entries \(\pm \,1\) which, for each vector, add up to 0, and further vectors \(a, b \in {{\mathbb {R}}}^\nu ,\) and set \(V = a\,v^T,\)\(W = b\,w^T,\) then the resulting matrix M (after adding the weight \(w = (n^2+1)/2\)) will be an associated magic square with entries \(1, \dots , n^2\) if and only if the sets of entries of a and b form a two-component non-inclusive sum-and-distance system.

As a final example, we mention most perfect squares; these are square matrices of even dimensions which, in addition to having all rows and columns adding up to the same number, have the properties that all \(2 \times 2\) submatrices have the same sum of entries, and that all pairs of entries half the matrix size apart on any diagonal add up to the same number. By [4] Theorem 6.2 any \(2 \nu \times 2 \nu \) most perfect square, with even \(\nu ,\) is, after subtracting the weight from each entry, of the form

$$\begin{aligned} M_0&= \left( \begin{matrix} a\,\S _\nu ^T + \S _\nu \,b^T &{} a\,\S _\nu ^T - \S _\nu \,b^T \\ -a\,\S _\nu ^T + \S _\nu \,b^T &{} -a\,\S _\nu ^T - \S _\nu \,b^T \end{matrix}\right) , \end{aligned}$$

where \(a, b \in {{\mathbb {R}}}^\nu \) are any vectors and \(\S _\nu = (1, -1, 1, -1, \dots , 1, -1)^T \in {{\mathbb {R}}}^\nu .\) Again we see that M will have entries \(1, \dots , (2 \nu )^2\) if and only if the sets of entries of the vectors 2a and 2b form a two-component non-inclusive sum-and-distance system.

Sum systems are conceptually simpler. They are directly related to reversible cuboids, the multidimensional analogues of reversible squares and rectangles, as shown in Theorem 4.5 below. Further, it is one of the results of the present study that sum systems are in one-to-one correspondence with sum-and-distance systems (Theorems 3.43.5).

We remark that sum systems can be interpreted as discrete local coordinate systems for a set of consecutive integers, generalising the base q decimal representation. Indeed, the integers \(0, 1, \dots , q^m-1\) can be uniquely represented in the form

$$\begin{aligned} \sum _{j=1}^m a_j q^{j-1}, \end{aligned}$$

where \(a_j \in \{0, 1, \dots , q-1\},\) so the sets

$$\begin{aligned}&\{0, 1, 2, \dots , q-1\}, \{0, q, 2q, \dots , q^2-q\}, \{0, q^2, 2q^2, \dots , q^3-q^2\},\\&\qquad \qquad \dots , \{0, q^{m-1}, 2 q^{m-1}, \dots , q^m - q^{m-1}\} \end{aligned}$$

form an m-component sum system in the sense defined in Sect. 2 below. Using this system as a basis, the m entries, one taken from each component set, which add up to a given number can be considered as that number’s discrete coordinates. In general, sum systems will have a considerably more complicated structure than the above simple arithmetic progressions, and it is one of the main results of the present paper to provide a constructive description of the general sum system (see Theorem 6.7).

Research on some related topics has been undertaken previously, including the study of arithmetic progressions arising in the sum of two sets of integers [1, 3]; comparing the sizes of the sum set and the difference set of a set with itself [5, 6, 8]; for an overview of this subject, see [2]. However, it seems that despite the simplicity of the concepts, sum systems and sum-and-distance systems, as studied here, have not attracted much attention in the mathematical literature, and our present results are new.

The paper is organised as follows. After giving the definitions of sum-and-distance systems and sum systems in Sect. 2, we use a polynomial factorisation method to show in Sect. 3 that there is a one-to-one relationship between sum-and-distance systems and sum systems of suitable size. It is fairly straightforward to see that a sum-and-distance system generates a corresponding sum system, but the fact that every sum system arises in this way is not obvious. In Sect. 4, we explore the connection between m-component sum systems and m-dimensional principal reversible cuboids, which are generalisations of Ollerenshaw and Brée’s principal reversible squares [7] from square matrices to more general order m tensors. This shows that the structure of sum systems (and hence, by means of the bijection, of sum-and-distance systems) can be fully understood in terms of the construction of principal reversible cuboids. In Sect. 5, we establish that the structure of the latter is essentially recursive, in the sense that any principal reversible cuboid arises from glueing offset copies of a maximal principal reversible subcuboid together. Finally, in Sect. 6 we show that, due to this recursive property, every principal reversible cuboid can be constructed by means of a chain of building operators with parameters arising from a joint ordered factorisation of the cuboid’s dimensions, thus linking the structure of principal reversible cuboids with number theoretic properties of their sizes. As a result, we obtain the general structure of the component sets of sum systems as nested arithmetic progressions. We conclude with some examples which illustrate how sum systems and sum-and-distance systems arise from joint ordered factorisations.

2 Definition of sum-and-distance systems and sum systems

Arithmetic progressions play a central role in the present paper. We use the notation \(\langle m \rangle := \{0, 1, \dots , m-1\}\) for any \(m \in {{\mathbb {N}}},\) so the arithmetic progression with start value a,  step size s and N terms can be expressed as \(s \langle N \rangle + a \ (= \{a, a+s, a+2s, \dots , a+(N-1)s \}).\)

Note that we use the standard convention that \(A + B = \{x + y : x \in A, y \in B\}\) and \(a A + b = \{a x + b : x \in A\}\) for sets \(A, B \subset {{\mathbb {R}}}\) and \(a, b \in {{\mathbb {R}}}\) throughout. As usual, \(A - B = A + (-B).\) We write |M| for the cardinality of a finite set M.

Definition 2.1

Let \(\nu , \mu \in {{\mathbb {N}}}.\) We call a pair of sets \(\{a_1, \dots , a_\nu \}, \{b_1, \dots , b_\mu \} \subset {{\mathbb {N}}}\) a (non-inclusive) sum-and-distance system if

$$\begin{aligned} \{|a_j \pm b_k| : j \in \{1, \dots , \nu \}, k \in \{1, \dots , \mu \}\}&= 2 \langle 2 \nu \mu \rangle + 1. \end{aligned}$$

The set of pairs is called an inclusive sum-and-distance system if

$$\begin{aligned} \{|a_j \pm b_k|, a_j, b_k : j \in \{1, \dots , \nu \}, k \in \{1, \dots , \mu \}\}&= \langle 2 \nu \mu + \nu + \mu \rangle + 1. \end{aligned}$$

The target set \(2 \langle 2 \nu \mu \rangle +1 = \{1, 3, 5, \dots , 4 \nu \mu -1\},\) for a non-inclusive sum-and-distance system, differs from \(\langle 2 \nu \mu + \nu + \mu \rangle + 1 = \{1, 2, \dots , 2 \nu \mu + \nu + \mu \},\) required for an inclusive sum-and-distance system, in that the former only has odd integers; this difference is motivated by the situations outlined above in which sum-and-distance systems arise, and the reason for it will be made transparent by Theorems 3.43.5.

Sum-and-distance systems can be equivalently characterised by a target set of positive and negative numbers in the following way.

Lemma 2.2

Let \(\{a_1, \dots , a_\nu \}, \{b_1, \dots , b_\mu \} \subset {\mathbb N},\)\(\nu , \mu \in {{\mathbb {N}}}.\)

  1. (a)

    These sets form a non-inclusive sum-and-distance system if and only if

    $$\begin{aligned} \{\pm a_j \pm b_k : j \in \{1, \dots , \nu \}, k \in \{1, \dots , \mu \}\} = 2 \langle 4 \nu \mu \rangle - 4 \nu \mu + 1, \end{aligned}$$

    where the signs ± are chosen independently, so there are 4 elements of the set for each pair (jk).

  2. (b)

    These sets form an inclusive sum-and-distance system if and only if

    $$\begin{aligned}&\{\pm a_j \pm b_k, \pm a_j, \pm b_k, 0 : j \in \{1, \dots , \nu \}, k \in \{1, \dots , \mu \}\} \\&\qquad = \langle (2 \nu + 1) (2 \mu + 1) \rangle - 2 \nu \mu - \nu - \mu , \end{aligned}$$

    where the signs ± are chosen independently, so there are 8 elements of the set for each pair (jk).

Proof

  1. (a)

    The sums \(\pm \, a_j \pm \, b_k\) will give exactly the sums and absolute distances \(|a_j \pm b_k|\) and their negatives \(-|a_j \pm \, b_k|,\) so the resulting set will be the union of the target set of the non-inclusive sum-and-distance system with its negative; this can be written as the step-2 arithmetic progression on the right-hand side.

  2. (b)

    The sums \(\pm \, a_j \pm \, b_k\) give the same results as in (a), and including the elements \(\pm \, a_j\) and \(\pm \, b_k,\) we obtain the union of the target set of the inclusive sum-and-distance system with its negative. By adding the element 0 to the set, we can complete this to the arithmetic progression on the right-hand side.

\(\square \)

The above lemma motivates the following generalisation.

Definition 2.3

Let \(m \in {{\mathbb {N}}}\) and \(A_j \subset {\mathbb N}\)\((j \in \{1, \dots , m\}).\) Then we call \(A_1, A_2, \dots , A_m\) a (non-inclusive) m-part sum-and-distance system if

$$\begin{aligned} \sum _{j=1}^m (A_j \cup (-A_j))&= 2 \left\langle 2^m \prod _{j=1}^m |A_j| \right\rangle - 2^m \prod _{j=1}^m |A_j| + 1. \end{aligned}$$

We call \(A_1, A_2, \dots , A_m\) an inclusive m-part sum-and-distance system if

$$\begin{aligned} \sum _{j=1}^m \left( A_j \cup \{0\} \cup (-A_j)\right)&= \left\langle \prod _{j=1}^m (2|A_j|+1) \right\rangle - \frac{1}{2} \left( \prod _{j=1}^m (2|A_j|+1) - 1 \right) . \end{aligned}$$

Definition 2.4

Let \(n_1, n_2 \in {{\mathbb {N}}}+1.\) We call a pair of sets \(A = \{a_1, \dots , a_{n_1}\}, B = \{b_1, \dots , b_{n_2}\} \subset {{\mathbb {N}}}_0\) a sum system if

$$\begin{aligned} A + B&= \langle n_1 n_2 \rangle , \end{aligned}$$

i.e. in explicit form,

$$\begin{aligned} \{a_j + b_k : j \in \{1, \dots , n_1\}, k \in \{1, \dots , n_2\}\}&= \{0, 1, \dots , n_1 n_2 - 1\}. \end{aligned}$$

More generally, we call a collection of m sets \(A_1, A_2, \dots , A_m \subset {{\mathbb {N}}}_0,\) each of cardinality at least 2, an m-part sum system if

$$\begin{aligned} \sum _{k=1}^m A_k&= \left\langle \prod _{k=1}^m \left| A_k \right| \right\rangle ; \end{aligned}$$

note that

$$\begin{aligned} \sum _{k=1}^m A_k = \left\{ \sum _{k=1}^m a_k : a_k \in A_k \ (k \in \{1, \dots , m\})\right\} . \end{aligned}$$

Since the number 0 in the target set can only arise as a sum of 0s, as all numbers in the sets are non-negative, it follows that each component set of a sum system contains the number 0.

3 Correspondence between sum-and-distance systems and sum systems

Given a finite set \(M \subset {{\mathbb {N}}}_0,\) we can associate with it the polynomial

$$\begin{aligned} p_M(x)&= \sum _{j \in M} x^j. \end{aligned}$$
(3.1)

More generally, for a finite set \(M \in {{\mathbb {Z}}},\) we have an associated Laurent polynomial (3.1) which may include negative powers.

Specifically for the arithmetic progression \(M = s \langle N \rangle + a,\) where \(s, N \in {{\mathbb {N}}}\) and \(a \in {{\mathbb {N}}}_0,\) we find

$$\begin{aligned} p_{s \langle N \rangle + a}(x)&= \sum _{j=0}^{N-1} x^{a+j s} = x^a \sum _{j=0}^{N-1} (x^s)^j. \end{aligned}$$

Clearly this polynomial has root 0 with multiplicity a;  it is also evident that 1 is not a root, nor are the other sth roots of unity. Hence, to find the further roots of this polynomial, we may assume \(x^s \ne 1\) and observe that

$$\begin{aligned} p_{s \langle N \rangle + a}(x)&= x^a \sum _{j=0}^{N-1} (x^s)^j = x^a\,\frac{1 - (x^s)^N}{1 - x^s} = x^a\,\frac{1 - x^{s N}}{1 - x^s}, \end{aligned}$$

which shows that the non-zero roots of \(p_{s \langle N \rangle + a}\) are exactly the (sN)th roots of unity which are not sth roots of unity; in particular, they all lie on the complex unit circle.

Definition 3.1

Let \(m \in {{\mathbb {N}}}.\) A polynomial p of degree d is called palindromic if it is equal to its reciprocal polynomial, i.e. if \(p(x) = x^{d} p(\frac{1}{x}),\) so

$$\begin{aligned} p(x) = \sum _{j=0}^{d} \alpha _j\, x^j \end{aligned}$$

with \(\alpha _j = \alpha _{d - j}\)\((j \in \{0, \dots , d\}).\)

The results of this section will rely on the following key observation.

Lemma 3.2

Let p be a polynomial with real coefficients and with all its roots situated on the complex unit circle.

  1. (a)

    If all roots of p are non-real, then p is palindromic and of even degree.

  2. (b)

    If all roots of p are non-real except for the simple root \(-1,\) then p is palindromic and of odd degree.

Proof

  1. (a)

    As the polynomial has real coefficients, its (non-real) roots come in complex conjugate pairs, say \(\{r_j, \overline{r_j} \mid j \in \{1, \dots , m\}\}.\) Thus

    $$\begin{aligned} p(x)&= \prod _{j=1}^m (x - r_j) (x - \overline{r_j}) = x^{2m} \prod _{j=1}^m \left( 1 - \frac{r_j}{x}\right) \left( 1 - \frac{\overline{r_j}}{x}\right) \\&= x^{2m} \prod _{j=1}^m r_j\,\overline{r_j}\,\left( \frac{1}{r_j} - \frac{1}{x}\right) \left( \frac{1}{\overline{r_j}} - \frac{1}{x}\right) = x^{2m} \prod _{j=1}^m \left( \frac{1}{x} - \overline{r_j}\right) \left( \frac{1}{x} - r_j\right) \\&= x^{2m}\,p\left( \frac{1}{x}\right) , \end{aligned}$$

    with 2m the degree of the polynomial, so p is palindromic.

  2. (b)

    The polynomial p can be factorised as \(p(x) = (x + 1) \tilde{p}(x),\) where \({\tilde{p}}\) only has non-real roots situated on the unit circle. Writing

    $$\begin{aligned} p(x) = \sum _{j=0}^{d} \alpha _j\,x^j, \qquad&{\tilde{p}}(x) = \sum _{j=0}^{d-1} {\tilde{\alpha }}_j\,x^j, \end{aligned}$$

    where d is the degree of the polynomial p,  a straightforward calculation gives

    $$\begin{aligned} \alpha _j&= \left\{ \begin{matrix} {\tilde{\alpha }}_0 &{}\quad if\, j=0, \\ {\tilde{\alpha }}_j + {\tilde{\alpha }}_{j+1} &{}\quad if\, j \in \{1, \dots , d-1\}, \\ \tilde{\alpha }_{d-1} &{} \quad if \,j = d; \end{matrix}\right. \end{aligned}$$
    (3.2)

    and hence it follows by recursion that \({\tilde{\alpha }}_j \in {{\mathbb {R}}}\)\((j \in \{0, \dots , d-1\}),\) since p has real coefficients. Therefore we can apply part (a) to find that \({\tilde{p}}\) is palindromic of even degree, i.e. \({\tilde{\alpha }}_j = {\tilde{\alpha }}_{d-1-j}\)\((j \in \{0, \dots , d-1\}).\) Hence p is of odd degree, and we deduce from (3.2) that

    $$\begin{aligned} \alpha _{d}&= {\tilde{\alpha }}_{d-1} = {\tilde{\alpha }}_0 = \alpha _0,\\ \alpha _j&= {\tilde{\alpha }}_j + {\tilde{\alpha }}_{j-1} = \tilde{\alpha }_{d-1-j} + {\tilde{\alpha }}_{d-1-j+1} = \alpha _{d-j} \quad (j \in \{1, \dots , d-1\}), \end{aligned}$$

    so p is palindromic.

\(\square \)

Using this result, we can show that the component sets of sum systems always have a palindromic structure, too, in the following sense.

Theorem 3.3

Let \(m \in {{\mathbb {N}}}.\) Suppose the sets \(A_1, A_2, \dots , A_m \subset {{\mathbb {N}}}_0\) form an m-part sum system. Then, for each \(j \in \{1, \dots , m\},\)

$$\begin{aligned} A_j = (\max A_j) - A_j, \end{aligned}$$

i.e. \(x \in A_j\) if and only if \((\max A_j - x) \in A_j.\)

Moreover, if all component sets \(A_j\) have odd cardinality, then \(\max A_j\) is even for every \(j \in \{1, \dots , m\};\) if at least one component set has even cardinality, then \(\max A_j\) is odd for exactly one \(j \in \{1, \dots , m\}.\)

Proof

Denoting the elements of the set \(A_j\) by \(a^{(j)}_1, a^{(j)}_2, \dots , a^{(j)}_{d_j},\) where \(d_j = |A_j|,\) and setting \(d = \prod \limits _{k=1}^m |A_k|,\) we find

$$\begin{aligned} \prod _{j=1}^m p_{A_j}(x)&= \left( \sum _{k_1=1}^{d_1} x^{a^{(1)}_{k_1}}\right) \left( \sum _{k_2=1}^{d_2} x^{a^{(2)}_{k_2}}\right) \cdots \left( \sum _{k_m=1}^{d_m} x^{a^{(m)}_{k_m}}\right) \nonumber \\&= \sum _{k_1=1}^{d_1} \sum _{k_2=1}^{d_2} \cdots \sum _{k_m=1}^{d_m} x^{a^{(1)}_{k_1} + a^{(2)}_{k_2} + \cdots + a^{(m)}_{k_m}} = \sum _{j=0}^{d-1} x^j = \frac{1 - x^d}{1 - x}, \end{aligned}$$
(3.3)

where we used the sum system property \(\sum \nolimits _{k=1}^m A_k = \langle d \rangle \) in the penultimate step. This shows that the polynomials \(p_{A_j}\) form a factorisation of the polynomial on the right-hand side of (3.3). Now we distinguish between two cases.

1st case If \(d = \prod \limits _{j=1}^m d_j\) is odd, i.e. if all \(d_j\) are odd, then the polynomial on the right-hand side of (3.3) has no real roots; its roots are the non-real dth roots of unity. Hence, for any \(j \in \{1, \dots , m\},\)\(p_{A_j}\) has only non-real roots situated on the complex unit circle, and it has real coefficients (in fact, coefficients in \(\{0, 1\}\)). Hence, by Lemma 3.2 (a), \(p_{A_j}\) has even degree and is palindromic, which gives the stated property for \(A_j.\)

2nd case If at least one of the component set cardinalities \(d_j\) is even, then d is even, so \(-1\) is a (simple) root of the polynomial on the right-hand side of (3.3). Therefore exactly one of the polynomials \(p_{A_j}\) has the root \(-1;\) w.l.o.g. we may assume that \(p_{A_1}\) is this polynomial. Then for any \(j \in \{2, \dots , m\},\) the same reasoning as in the first case shows that \(p_{A_j}\) has even degree and is palindromic, while, by Lemma 3.2 (b), \(p_{A_1}\) is palindromic of odd degree. \(\square \)

This observation allows us to establish the following bijection between sum-and-distance systems and sum systems.

Theorem 3.4

Let \(m \in {{\mathbb {N}}}\) and suppose the non-empty sets \(A_1, A_2, \dots , A_m \subset {{\mathbb {N}}}\) form an m-part non-inclusive sum-and-distance system. For \(j \in \{1, \dots , m\},\) let

$$\begin{aligned} {\tilde{A}}_j&:= \frac{1}{2}\,\max A_j + \frac{1}{2}\,(A_j \cup (-A_j)) = \left\{ \frac{(\max A_j) - a}{2}, \frac{(\max A_j) + a}{2} : a \in A_j \right\} ; \end{aligned}$$

then \({\tilde{A}}_1, {\tilde{A}}_2, \dots , \tilde{A}_m\) form an m-part sum system, where each part has even cardinality.

Conversely, suppose the sets \({\tilde{A}}_1, {\tilde{A}}_2, \dots , \tilde{A}_m \subset {{\mathbb {N}}}_0\) form an m-part sum system, where each component set has even cardinality. Then, for each \(j \in \{1, \dots , m\},\) denoting the elements of \({\tilde{A}}_j\) by \(0 = \alpha _1< \alpha _2< \cdots < \alpha _{2 \nu _j},\) let

$$\begin{aligned} A_j&:= \left\{ \alpha _{\nu _j + k} - \alpha _{\nu _j + 1 - k} : k \in \{1, \dots , \nu _j\}\right\} ; \end{aligned}$$

then the sets \(A_1, A_2, \dots , A_m\) form an m-part non-inclusive sum-and-distance system.

Proof

We find for the set sum

$$\begin{aligned} \sum _{j=1}^m {\tilde{A}}_j&= \frac{1}{2} \sum _{j=1}^m \max A_j + \frac{1}{2} \sum _{j=1}^m (A_j \cup (-A_j)) \\&= \frac{1}{2} \sum _{j=1}^m \max A_j + \left\langle 2^m \prod _{j=1}^m |A_j| \right\rangle - 2^{m-1} \prod _{j=1}^m |A_j| + \frac{1}{2} \\&= \left\langle 2^m \prod _{j=1}^m |A_j| \right\rangle = \left\langle \prod _{j=1}^m |{\tilde{A}}_j| \right\rangle , \end{aligned}$$

bearing in mind that

$$\begin{aligned} \frac{1}{2} \sum _{j=1}^m \max A_j&= 2^m \prod _{j=1}^m |A_j| - 1 - 2^{m-1} \prod _{j=1}^m |A_j| + \frac{1}{2}, \end{aligned}$$

as the sum of the largest elements of the component sets of a sum-and-distance system gives the largest element of its target set.

For the converse, we note that for each \(j \in \{1, \dots , m\},\) the component set \({\tilde{A}}_j\) of the sum system has palindromic symmetry by Theorem 3.3, i.e. its ordered elements satisfy

$$\begin{aligned} \alpha _{\nu _j+k} + \alpha _{\nu _j+1-k}&= \alpha _{2 \nu _j} \qquad (k \in \{1, \dots , \nu _j\}). \end{aligned}$$

Hence

$$\begin{aligned} \alpha _{\nu _j+k} - \alpha _{\nu _j+1-k}&= 2 \alpha _{\nu _j+k} - \alpha _{2\nu _j} \end{aligned}$$

and also

$$\begin{aligned} -(\alpha _{\nu _j+k} - \alpha _{\nu _j+1-k})&= 2 \alpha _{\nu _j+1-k} - \alpha _{2 \nu _j}, \end{aligned}$$

which gives

$$\begin{aligned} A_j \cup (-A_j)&= \{2 \alpha _{\nu _j+k} - \alpha _{2 \nu _j} : k \in \{1, \dots , \nu \}\} \cup \{2 \alpha _{\nu _j+1-k} - \alpha _{2 \nu _j} : k \in \{1, \dots , \nu \}\} \\&= 2 {\tilde{A}}_j - \max {\tilde{A}}_j. \end{aligned}$$

Therefore

$$\begin{aligned} \sum _{j=1}^m (A_j \cup (-A_j))&= \sum _{j=1}^m (2 {\tilde{A}}_j - \max {\tilde{A}}_j) = 2 \sum _{j=1}^m {\tilde{A}}_j - \sum _{j=1}^m \max \tilde{A}_j \\&= 2 \left\langle \prod _{j=1}^m |{\tilde{A}}_j| \right\rangle - \left( \prod _{j=1}^m |\tilde{A}_j| - 1 \right) \\&= 2 \left\langle 2^m \prod _{j=1}^m |A_j| \right\rangle - 2^m \prod _{j=1}^m |A_j| + 1, \end{aligned}$$

as required. \(\square \)

Theorem 3.5

Let \(m \in {{\mathbb {N}}}\) and suppose the non-empty sets \(A_1, A_2, \dots , A_m \subset {{\mathbb {N}}}\) form an m-part inclusive sum-and-distance system. For \(j \in \{1, \dots , m\},\) let

$$\begin{aligned} {\tilde{A}}_j := \max A_j + (A_j \cup \{0\} \cup (-A_j)); \end{aligned}$$

then \({\tilde{A}}_1, {\tilde{A}}_2, \dots , \tilde{A}_m\) form an m-part sum system, where each part has odd cardinality.

Conversely, suppose the sets \({\tilde{A}}_1, {\tilde{A}}_2, \dots , \tilde{A}_m \subset {{\mathbb {N}}}_0\) form an m-part sum system, where each component set has odd cardinality. Then, for each \(j \in \{1, \dots , m\},\) denoting the elements of \({\tilde{A}}_j\) by \(0 = \alpha _1< \alpha _2< \cdots < \alpha _{2 \nu _j+1},\) let

$$\begin{aligned} A_j&:= \{\textstyle {\frac{1}{2}}\,(\alpha _{\nu _j+1+k} - \alpha _{\nu _j+1-k}) : k \in \{1, \dots , \nu _j\}\}; \end{aligned}$$

then the sets \(A_1, A_2, \dots , A_m\) form an m-part inclusive sum-and-distance system.

Proof

In analogy to the proof of Theorem 3.4, we find the set sum

$$\begin{aligned} \sum _{j=1}^m {\tilde{A}}_j&= \sum _{j=1}^m \max A_j + \sum _{j=1}^m (A_j \cup \{0\} \cup (-A_j)) \\&= \sum _{j=1}^m \max A_j + \left\langle \prod _{j=1}^m (2|A_j|+1) \right\rangle - \frac{1}{2} \prod _{j=1}^m (2|A_j|+1) + \frac{1}{2} \\&= \left\langle \prod _{j=1}^m (2|A_j|+1) \right\rangle = \left\langle \prod _{j=1}^m |{\tilde{A}}_j| \right\rangle . \end{aligned}$$

For the converse, we use the fact that for each \(j \in \{1, \dots , m\},\) the component set \({\tilde{A}}_j\) of the sum system has palindromic symmetry by Theorem 3.3, which gives

$$\begin{aligned} \alpha _{\nu _j+1+k} + \alpha _{\nu _j+1-k}&= \alpha _{2\nu _j+1} \qquad (k \in \{0, \dots , \nu \}) \end{aligned}$$

(bearing in mind that \(\alpha _1 = 0\)), and in particular \(2 \alpha _{\nu _j+1} = \alpha _{2\nu _j+1}.\) Thus \(\alpha _{2\nu _j+1} = \max {\tilde{A}}_j\) is even, which also follows from Theorem 3.3, as all component sets of the sum system have odd cardinality. Hence

$$\begin{aligned} {\textstyle \frac{1}{2}}\,\left( \alpha _{\nu _j+1+k} - \alpha _{\nu _j+1-k}\right)&= \alpha _{\nu _j+1+k} - {\textstyle \frac{1}{2}}\,\alpha _{2\nu _j+1} = \alpha _{\nu _j+1+k} - \alpha _{\nu _j+1} \in {{\mathbb {N}}}, \end{aligned}$$

and

$$\begin{aligned} -{\textstyle \frac{1}{2}}\,\left( \alpha _{\nu _j+1+k} - \alpha _{\nu _j+1-k}\right)&= \alpha _{\nu _j+1-k} - {\textstyle \frac{1}{2}}\,\alpha _{2\nu _j+1} = \alpha _{\nu _j+1-k} - \alpha _{\nu _j+1} \in {{\mathbb {N}}} \end{aligned}$$

\((k \in \{1, \dots , \nu \}).\) Consequently,

$$\begin{aligned} A_j&\cup \{0\} \cup (-A_j)\\&= \{\alpha _{\nu +1+k} - \alpha _{\nu _j+1} : k \in \{1, \dots , \nu \}\} \cup \{0\} \cup \{\alpha _{\nu +1-k} - \alpha _{\nu _j+1} : k \in \{1, \dots , \nu \}\}\\&= \{\alpha _k - \alpha _{\nu _j+1} : k \in \{1, \dots , 2 \nu _j + 1\}\} = {\tilde{A}}_j - {\textstyle \frac{1}{2}} \max {\tilde{A}}_j. \end{aligned}$$

This gives

$$\begin{aligned} \sum _{j=1}^m (A_j \cup \{0\} \cup (-A_j))&= \sum _{j=1}^m {\tilde{A}}_j - \frac{1}{2} \sum _{j=1}^m \max {\tilde{A}}_j = \left\langle \prod _{j=1}^m |\tilde{A}_j| \right\rangle - \frac{1}{2} \left( \prod _{j=1}^m |{\tilde{A}}_j| - 1 \right) \\&= \left\langle \prod _{j=1}^m (2|A_j|+1) \right\rangle - \frac{1}{2} \left( \prod _{j=1}^m (2|A_j|+1) - 1 \right) , \end{aligned}$$

proving the claim. \(\square \)

Remark 3.6

Note that sum systems with odd cardinality throughout correspond to inclusive sum-and-distance systems, and the tight target set (containing consecutive integers) of the latter is related to the fact that the maximum of each component set of the sum system is even, as apparent from the proof of Theorem 3.5. However, sum systems with even cardinality do not have this property, and hence their corresponding non-inclusive sum-and-distance systems have a more sparse target set containing consecutive odd integers only. Thus the discrepancy between inclusive and non-inclusive sum-and-distance systems resolves into the simple dichotomy between odd and even cardinality of the component sets when considering the sum systems.

We remark further that at the level of sum systems, there is no reason to require that the components have all odd or all even cardinality. A sum system with mixed parity will, by the transforms given in Theorems 3.4 and 3.5, correspond to a hybrid inclusive/non-inclusive sum-and-distance system, but we do not pursue this correspondence further in the present study.

4 Principal reversible cuboids and sum systems

In this section we shall extend the definition of reversible square matrices, which can be considered as order 2 tensors, to general order m tensors. We use multiindex notation, i.e. tensor components are indexed by coordinate vectors \(k \in {{\mathbb {N}}}^m,\) which have a partial ordering given by

$$\begin{aligned} k \le n \iff k_j \le n_j \ (j \in \{1, \dots , m\}) \qquad (k, n \in {{\mathbb {N}}}^m). \end{aligned}$$

The root element of the tensor (corresponding to the top left entry of a matrix) has index \(1_m = (1, 1, \dots , 1) \in {{\mathbb {N}}}^m.\) We shall also use the standard unit vectors \(e_j \in {{\mathbb {N}}}^m\)\((j \in \{1, \dots ,m\}),\) where \((e_j)_l = \delta _{j l}\)\((j, l \in \{1, \dots , m\}),\) i.e. \(e_j\) has jth entry 1 and all other entries 0.

Definition 4.1

Let \(m \in {{\mathbb {N}}}\) and \(n \in {{\mathbb {N}}}^m.\) Then \(M \in {{\mathbb {N}}}_0^n\) is called an ordermtensor (of dimensions \(n_1, n_2, \dots , n_m\)). It has entries \(M_k = M_{k_1, k_2, \dots , k_m} \in {{\mathbb {N}}}_0\)\((k \in {\mathbb N}^m, k \le n).\)

For \(j < m,\) we call any subtensor where \(m-j\) indices are fixed while the remaining j indices vary in the range determined by n an order j slice of M.

Remark 4.2

Strictly speaking, the order of the tensor is \(|\{j \in \{1, \dots , m\} : n_j > 1\}| \le m,\) so it has order at mostm. The order will be exactly m if \(n \in ({\mathbb N}+1)^m.\) However, we allow \(n \in {{\mathbb {N}}}^m\) for ease of reference later.

The following is an extension of the vertex-cross sum property (V) of matrices which states that the two pairs of diagonally opposite corners of any rectangular submatrix add up to the same number [4].

Definition 4.3

Let \(M \in {{\mathbb {N}}}_0^n,\)\(n \in {\mathbb N}^m,\)\(m \in {{\mathbb {N}}} + 1.\) Then we say that M has the vertex cross sum property (V) if and only if every order 2 slice of M has the property (V) for matrices, i.e. if

$$\begin{aligned}&M_{k_1, \dots , k_i, \dots , k_j, \dots , k_m} + M_{k_1, \dots , k_i', \dots , k_j', \dots , k_m}\nonumber \\&= M_{k_1, \dots , k_i, \dots , k_j', \dots , k_m} + M_{k_1, \dots , k_i', \dots , k_j, \dots , k_m} \end{aligned}$$
(4.1)

for all \(1\le i < j \le m\) and \(k_1, \dots , k_m, k_i', k_j' \in {{\mathbb {N}}}\) such that \(k_l, k_l' \le n_l\)\((l \in \{1, \dots , m\}).\)

Lemma 4.4

Let \(M \in {{\mathbb {N}}}_0^n,\)\(n \in {{\mathbb {N}}}^m,\)\(m \in {\mathbb N}+1.\) Then M has property (V) if and only if

$$\begin{aligned} M_k&= \sum _{j=1}^m M_{1_m + (k_j-1)e_j} - (m-1) M_{1_m} \qquad (k \in {{\mathbb {N}}}^m, k \le n). \end{aligned}$$
(4.2)

Proof

Suppose M has property (V). We shall show by induction on \(l \in \{2, \dots , m\}\) that for any \(k \in {{\mathbb {N}}}^m,\)\(k \le n,\) and any cardinality l subset \(\{j_1, j_2, \dots , j_l\} \subset \{1, 2, \dots , m\},\)

$$\begin{aligned} M_{1_m + \sum _{r=1}^l (k_{j_r}-1)e_{j_r}}&= \sum _{r=1}^l M_{1_m + (k_{j_r}-1)e_{j_r}} - (l-1) M_{1_m}. \end{aligned}$$
(4.3)

For \(l = 2,\) property (V) gives

$$\begin{aligned} M_{1_m + (k_{j_1}-1)e_{j_1} + (k_{j_2}-1)e_{j_2}}&= M_{1_m + (k_{j_1}-1)e_{j_1}} + M_{1_m + (k_{j_2}-1)e_{j_2}} - M_{1_m}. \end{aligned}$$

Now suppose \(l \in \{2, \dots , m-1\}\) is such that identity (4.3) holds for up to l terms. Then, again by property (V), we find

$$\begin{aligned}&M_{1_m + \sum _{r=1}^{l+1} (k_{j_r}-1)e_{j_r}} \nonumber \\&= M_{1_m + \sum _{r=1}^{l-1} (k_{j_r}-1)e_{j_r} + (k_{j_l}-1)e_{j_l}} + M_{1_m + \sum _{r=1}^{l-1} (k_{j_r}-1)e_{j_r} + (k_{j_{l+1}}-1)e_{j_{l+1}}} \nonumber \\&\qquad - M_{1_m + \sum _{r=1}^{l-1} (k_{j_r}-1)e_{j_r}} \nonumber \\&= \sum _{r=1}^l M_{1_m + (k_{j_r}-1)e_{j_r}} + \sum _{r \in \{1, \dots ,l-1\} \cup \{l+1\}} M_{1_m + (k_{j_r}-1)e_{j_r}} \nonumber \\&\qquad - 2\,(l-1) M_{1_m} - \sum _{r=1}^{l-1} M_{1_m + (k_{j_r}-1)e_{j_r}} + (l-2) M_{1_m} \nonumber \\&= \sum _{r=1}^{l+1} M_{1_m + (k_{j_r}-1)e_{j_r}} - l\,M_{1_m}. \end{aligned}$$
(4.4)

The identity (4.2) now follows when we take \(l = m\) in (4.3), which forces \(\{j_1, j_2, \dots , j_m\} = \{1, 2, \dots , m\}.\) The converse follows directly from applying identity (4.2) to (4.1). \(\square \)

The preceding lemma shows that if the root entry \(M_{1_m} = 0,\) then each entry of the order m tensor M is the sum of the entries on the axes for each of its index coordinates, i.e.

$$\begin{aligned} M_k&= M_{k_1,1,\dots ,1} + M_{1, k_2, 1, \dots , 1} + \cdots + M_{1, \dots , 1, k_m}. \end{aligned}$$

This means that overall the set of entries of M is equal to the sum set of the sets of entries on each coordinate axis, where all but one entry of the index vector are kept equal to 1. This gives the following connection with sum systems.

Theorem 4.5

Let \(m \in {{\mathbb {N}}},\)\(n \in ({{\mathbb {N}}}+1)^m\) and \(M \in {{\mathbb {N}}}_0^n\) an order m tensor with property (V), \(M_{1_m} = 0\) and set of entries

$$\begin{aligned} \{M_k : k \in {{\mathbb {N}}}^m, k \le n\}&= \left\langle \prod _{j=1}^m n_j \right\rangle . \end{aligned}$$

Then the sets \(A_1, A_2, \dots , A_m \subset {{\mathbb {N}}}_0,\)

$$\begin{aligned} A_j&= \{M_{1_m + k e_j} : k \in \langle n_j \rangle \} \qquad (j \in \{1, \dots , m\}) \end{aligned}$$
(4.5)

form an m-part sum system.

Proof

The statement follows from Lemma 4.4 when we note that the identity (4.2) will turn into

$$\begin{aligned} M_k&= \sum _{j=1}^m M_{1_m + (k_j-1)e_j} \qquad (k \in {\mathbb N}^m, k \le n), \end{aligned}$$
(4.6)

and that the set of entries of M is equal to the target set for the sum system. \(\square \)

Conversely, given an m-part sum system and choosing the entries on the coordinate axes of M such that they satisfy (4.5) and \(M_{1_m} = 0,\) it is clear that defining the remaining entries via (4.6) will result in an order m tensor with property (V).

In fact, M can be considered as an m-dimensional tabular representation of the sum system with a certain arrangement of the elements of each component set.

There is some freedom of choice in assigning the elements of the component sets of a sum system to tensor entries so as to satisfy (4.5), with only the constraint that \(M_{1_m} = 0.\) In order to establish a bijection, we introduce the following generalisation of Ollerenshaw and Brée’s definition of a principal reversible square [7].

Definition 4.6

We call an order m tensor \(M \in {\mathbb N}_0^n,\)\(n \in ({{\mathbb {N}}}+1)^m,\)\(m \in N,\) a principal reversible m-cuboid if M has property (V), its set of entries is

$$\begin{aligned} \{M_k : k \in {{\mathbb {N}}}^m, k \le n\}&= \left\langle \prod _{j=1}^m n_j \right\rangle , \end{aligned}$$

and for every \(j \in \{1, \dots , m\},\) every row in the jth direction is arranged in strictly increasing order, i.e. \(M_{k} < M_{k + l e_j} \ (k \in {{\mathbb {N}}}^m, 1 \le l \le n_j-k_j).\)

Putting the elements of the sum system component \(A_j\) onto the jth coordinate axis of M,  we obtain the following relationship by virtue of Theorem 4.5.

Corollary 4.7

Let \(m \in {{\mathbb {N}}}.\) There is a bijection between the principal reversible m-cuboids with dimension vector \(n \in ({\mathbb N}+1)^m\) and the m-part sum systems \(A_1, \dots , A_m\) with cardinalities \(|A_j| = n_j\)\((j \in \{1, \dots , m\}).\)

In conjunction with Theorem 3.3, this shows that principal reversible m-tensors also have a generalised form of the row and column reversal symmetry (R) defined for matrices [4], as follows.

Theorem 4.8

Let \(m \in {{\mathbb {N}}},\)\(n \in ({{\mathbb {N}}}+1)^m,\) and let \(M \in {{\mathbb {N}}}_0^n\) be a principal reversible m-cuboid. Then M has the line reversal symmetry (R), i.e. for all \(j \in \{1, \dots , m\}\) and any \(k \in {{\mathbb {N}}}^m, k \le n,\)

$$\begin{aligned}&M_{k_1, \dots , k_{j-1}, l, k_{j+1}, \dots , k_m} + M_{k_1, \dots , k_{j-1}, n_j+1-l, k_{j+1}, \dots , k_m} \nonumber \\&= M_{k_1, \dots , k_{j-1}, 1, k_{j+1}, \dots , k_m} + M_{k_1, \dots , k_{j-1}, n_j, k_{j+1}, \dots , k_m} \qquad (l \in \{1, \dots , n_j\}). \end{aligned}$$
(4.7)

Proof

Let \(A_1, A_2, \dots , A_m\) be the sum system corresponding to M by Theorem 4.5. Then, for each \(j \in \{1, \dots , m\},\)

$$\begin{aligned} 0&= M_{1_m}< M_{1_m + e_j}< M_{1_m + 2 e_j}< \cdots < M_{1_m + (n_j - 1) e_j} = \max A_j \end{aligned}$$

are the elements of the component set \(A_j,\) which by Theorem 3.3 has the palindromic property

$$\begin{aligned} M_{1_m + k e_j} + M_{1_m + (n_j -1-k) e_j}&= M_{1_m + (n_j-1) e_j} + M_{1_m} \qquad (k \in \langle n_j \rangle ). \end{aligned}$$

This proves the identity (4.7) along the coordinate axes of M;  the general case follows by observing that Lemma 4.4 gives the representation

$$\begin{aligned} M_k&= M_{k_1, \dots , k_{j-1}, 1, k_{j+1}, \dots , k_m} + M_{1_m + (k_j-1) e_j} \qquad (j \in \{1, \dots , m\}, k \in {{\mathbb {N}}}^m, k \le n) \end{aligned}$$

for the entries of M. \(\square \)

5 Structure and construction of principal reversible cuboids

Throughout this section, let \(m \in {{\mathbb {N}}},\)\(n \in {{\mathbb {N}}}^m \setminus \{1_m\},\) and consider a principal reversible cuboid \(M \in {{\mathbb {N}}}_0^n.\) For a multiindex \(\tilde{n} \in {{\mathbb {N}}}^m,\)\({\tilde{n}} \le n,\) we write

$$\begin{aligned} M_{[{\tilde{n}}]} := (M_k)_{k \le {\tilde{n}}} \end{aligned}$$

for the subcuboid of M which has dimensions \({\tilde{n}}\) and includes the root entry \(M_{1_m}.\) Moreover, we define

$$\begin{aligned} \mu _{{\tilde{n}}} := \min \{N \in {{\mathbb {N}}} : N \ne M_k \ (k \le {\tilde{n}})\}, \end{aligned}$$

the smallest positive integer not appearing as an entry in \(M_{[{\tilde{n}}]}.\) Then we have the following characterisation of principal reversible subcuboids of M.

Lemma 5.1

For \({\tilde{n}} \le n,\)

$$\begin{aligned} \mu _{{\tilde{n}}}&\le \prod _{j=1}^m {\tilde{n}}_j, \end{aligned}$$
(5.1)

with equality if and only if \(M_{[\tilde{n}]}\) is a principal reversible cuboid.

Proof

\(M_{[{\tilde{n}}]}\) inherits the ordering property and (V) from M. Hence it is a principal reversible cuboid if and only if

$$\begin{aligned} \{M_k : k \le {\tilde{n}}\}&= \left\langle \prod _{j=1}^m {\tilde{n}}_j \right\rangle . \end{aligned}$$

If this is the case, then evidently (5.1) holds; if it is not the case, then \(M_{[{\tilde{n}}]},\) having \(\prod _{j=1}^m {\tilde{n}}_j\) different entries, must skip some element of \(\left\langle \prod _{j=1}^m {\tilde{n}}_j \right\rangle ,\) so \(\mu _{{\tilde{n}}} < \prod _{j=1}^m {\tilde{n}}_j.\)\(\square \)

By Lemma 4.4, the entries of M arise as sums of the corresponding entries along the coordinate axes of M. Let us define

$$\begin{aligned} a_{j,k} := M_{1_m + k e_j}&\qquad (j \in \{1, \dots , m\}, k \in \langle n_j \rangle ); \end{aligned}$$

then the identity (4.2), with \(M_{1_m} = 0,\) gives

$$\begin{aligned} M_{1_m + k}&= \sum _{j=1}^m M_{1_m + k_j e_j} = \sum _{j=1}^m a_{j, k_j} \qquad (k \in {{\mathbb {N}}}_0^m, 1_m + k \le n). \end{aligned}$$
(5.2)

The following observation shows that for any subcuboid (containing the root element) \(M_{[{\tilde{n}}]},\) the smallest missing integer \(\mu _{{\tilde{n}}}\) appears on a coordinate axis of M,  just outside \(M_{[{\tilde{n}}]}.\)

Lemma 5.2

Let \({\tilde{n}} \le n,\)\({\tilde{n}} \ne n.\) Then there is \(j \in \{1, \dots , m\}\) such that \(\mu _{{\tilde{n}}} = a_{j, {\tilde{n}}_j}.\)

Proof

By definition, \(\mu _{{\tilde{n}}}\) is the smallest entry of M outside \(M_{[{\tilde{n}}]},\)

$$\begin{aligned} \mu _{{\tilde{n}}}&= \min \{M_{{\hat{n}}} : {\hat{n}} \le n, {\hat{n}} \not \le {\tilde{n}}\}. \end{aligned}$$

By the increasing arrangement of all lines parallel to coordinate axes, we have for any \({\hat{n}}\) and any \(j \in \{1, \dots , m\}\) that \(a_{j, {\hat{n}}_j -1} = M_{1_m + ({\hat{n}}_j -1)e_j} \le M_{{\hat{n}}},\) so

$$\begin{aligned} \mu _{{\tilde{n}}}&= \min \{a_{j, {\hat{n}}_j -1} : j \in \{1, \dots , m\}, {\tilde{n}}_j< {\hat{n}}_j < n_j\} \\&= \min \{a_{j, {\tilde{n}}_j} : j \in \{1, \dots , m\}\}, \end{aligned}$$

by the increasing arrangement of \(a_{j, \cdot }.\)\(\square \)

If the cuboid in Lemma 5.2 arises by truncating a principal reversible subcuboid in one direction only, the smallest missing integer must appear on the axis of the direction of truncation, since the other directions would lead outside the larger enclosing principal reversible subcuboid.

Corollary 5.3

Let \({\tilde{n}} \in {{\mathbb {N}}}^m,\)\({\tilde{n}} \le n,\) such that \(M_{[{\tilde{n}}]}\) is a principal reversible subcuboid. Let \(j \in \{1, \dots , m\}\) and \({\hat{n}} \in {{\mathbb {N}}}^m\) such that \({\hat{n}}_i = {\tilde{n}}_i\)\((i \ne j)\) and \({\hat{n}}_j < {\tilde{n}}_j.\) Then \(\mu _{{\hat{n}}} = a_{j, {\hat{n}}_j}.\)

The following statement gives an extension of this beyond the confines of the principal reversible subcuboid.

Lemma 5.4

Let \({\tilde{n}} \le n,\)\({\tilde{n}} \ne n,\) be such that \(M_{[\tilde{n}]}\) is a proper principal reversible subcuboid of M,  and let \(j \in \{1, \dots , m\}.\) Suppose for some \(k_0 \in {{\mathbb {N}}},\)\(k_0 < {\tilde{n}}_j,\)

$$\begin{aligned} a_{j, {\tilde{n}}_j + k}&= a_{j, k} + \prod _{i=1}^m {\tilde{n}}_i \qquad (k \in \langle k_0 \rangle ). \end{aligned}$$

Then \(\mu _{{\tilde{n}} + k_0 e_j} = a_{j, k_0} + \prod _{i=1}^m {\tilde{n}}_i.\)

Proof

By definition, \(\mu _{{\tilde{n}} + k_0 e_j}\) is the smallest positive integer not in the set \(\{M_{{\hat{n}}} : {\hat{n}} \le {\tilde{n}} + k_0 e_j\}.\) Since, by Lemma 5.1, \(\{M_{{\hat{n}}} : {\hat{n}} \le {\tilde{n}}\} = \left\langle \prod _{i=1}^m {\tilde{n}}_i \right\rangle ,\) we have in fact that \(\mu _{{\tilde{n}} + k_0 e_j} \) is the smallest positive integer not in the set

$$\begin{aligned} \{M_{{\hat{n}}}&: {\hat{n}}_i \le {\tilde{n}}_i \ (i \ne j), {\tilde{n}}_j < {\hat{n}}_j \le {\tilde{n}}_j + k_0\} \\&= \left\{ a_{j, {\tilde{n}}_j + k} + \sum _{i \ne j} a_{i, k_i} : k_i \in \langle {\tilde{n}}_i \rangle \ (i \ne j), k \in \langle k_0 \rangle \right\} \\&= \left\{ \prod _{i=1}^m {\tilde{n}}_i + \sum _{i=1}^m a_{i, k_i} : k_i \in \langle {\tilde{n}}_i \rangle \ (i \ne j), k_j \in \langle k_0 \rangle \right\} \\&= \prod _{i=1}^m {\tilde{n}}_i + \{M_{{\hat{n}}} : {\hat{n}}_i \le {\tilde{n}}_i \ (i \ne j), {\hat{n}}_j \le k_0\}, \end{aligned}$$

using (5.2) in the first and the hypothesis of the Lemma in the second equality. Taking the minimum on both sides, we find \(\mu _{{\tilde{n}} + k_0 e_j} = \mu _{{\tilde{n}} + (k_0 - {\tilde{n}}_j) e_j} + \prod _{i=1}^m {\tilde{n}}_i.\) Corollary 5.3 gives \(\mu _{{\tilde{n}} + (k_0 - {\tilde{n}}_j) e_j} = a_{j, k_0},\) and the statement follows. \(\square \)

The following lemma provides the key to understanding the structure of principal reversible cuboids. Essentially it shows that, starting from a principal reversible subcuboid, finding the entry of M giving the next integer in sequence and adding the slice in the corresponding direction to the subcuboid, and continuing in this way, the next integer in sequence will always be found in the same direction as the previous one, until the addition of slices has completed a larger principal reversible subcuboid (or exhausted M). Thus the next integer in sequence can only appear in a new direction if the starting point is a complete principal reversible subcuboid, not a general subcuboid.

Lemma 5.5

Suppose \(M_{[{\tilde{n}}]}\) is a proper principal reversible subcuboid of M\({\tilde{n}} \le n,\)\({\tilde{n}} \ne n,\) such that for some \(j \in \{1, \dots , m\}\) and some \(K \in \{1, \dots , {\tilde{n}}_j-1\},\)

$$\begin{aligned} a_{j, {\tilde{n}}_j + k}&= \mu _{{\tilde{n}} + k e_j} \qquad (k \in \langle K \rangle ). \end{aligned}$$

Then either \(M_{[{\tilde{n}} + K e_j]}\) is a principal reversible cuboid, or \(\mu _{{\tilde{n}} + K e_j} = a_{j, {\tilde{n}}_j + K}.\)

Proof

Applying Lemma 5.4 recursively to \(k_0 \in \{1, \dots , K\},\) we find that

$$\begin{aligned} a_{j, {\tilde{n}}_j + K -1}&= \mu _{{\tilde{n}} + (K-1) e_j} = a_{j, K-1} + \prod _{i=1}^m {\tilde{n}}_i, \end{aligned}$$

and

$$\begin{aligned} \mu _{{\tilde{n}} + K e_j}&= a_{j,K} + \prod _{i=1}^m {\tilde{n}}_i. \end{aligned}$$
(5.3)

Hence the slice of M with indices \({\hat{n}}_i \le {\tilde{n}}_i\)\((i \ne j),\)\({\hat{n}}_j = {\tilde{n}}_j + K\) has entries

$$\begin{aligned} S_1&:= \{M_{{\hat{n}}} : {\hat{n}}_i \le {\tilde{n}}_i \ (i \ne j), {\hat{n}}_j = {\tilde{n}}_j + K\} \\&= \left\{ \sum _{i=1}^m a_{i,k_i} : 0 \le k_i \le {\tilde{n}} - 1 \ (i \ne j), k_j = {\tilde{n}}_j + K - 1 \right\} \\&= \left\{ a_{j,K-1} + \prod _{r=1}^m {\tilde{n}}_r + \sum _{i \ne j} a_{i,k_i} : 0 \le k_i \le {\tilde{n}} - 1 \ (i \ne j) \right\} \end{aligned}$$

using (5.2). Now suppose that \(\mu _{{\tilde{n}} + K e_j} \ne a_{j, {\tilde{n}}_j + K}.\) By Lemma 5.2, there is then \(l~\in ~\{1, \dots , m\},\)\(l \ne j,\) such that \(\mu _{{\tilde{n}} + K e_j} = a_{l, {\tilde{n}}_l}.\) This means [again by (5.2)] that the slice of M with indices \({\hat{n}}_i \le {\tilde{n}}_i\)\((i \ne l),\)\({\hat{n}}_l = {\tilde{n}}_l + 1\) has entries

$$\begin{aligned} S_2&:= \{M_{{\hat{n}}} : {\hat{n}}_i \le {\tilde{n}}_i \ (i \ne l), {\hat{n}}_l = {\tilde{n}}_l + 1\} \\&= \left\{ \sum _{i=1}^m a_{i, {\tilde{k}}_i} : 0 \le {\tilde{k}}_i \le {\tilde{n}}_i - 1 \ (i \ne l), {\tilde{k}}_l = {\tilde{n}}_l \right\} . \end{aligned}$$

As the index sets appearing in the definitions of \(S_1\) and \(S_2\) are disjoint and all entries of M are different, it follows that \(S_1 \cap S_2 = \emptyset .\)

Now if \(M_{[{\tilde{n}} + (K- {\tilde{n}}_j) e_j]}\) is a principal reversible subcuboid, then \(M_{[{\tilde{n}} + K e_j]}\) will have entries

$$\begin{aligned} \left\langle \prod _{i=1}^m {\tilde{n}}_i \right\rangle \cup \left( \prod _{i=1}^m {\tilde{n}}_i + \left\langle K \prod _{i \ne j} {\tilde{n}}_i \right\rangle \right)&= \left\langle ({\tilde{n}}_j + K) \prod _{i \ne j}{\tilde{n}}_i \right\rangle \end{aligned}$$

and hence be a principal reversible subcuboid. If, on the other hand, \(M_{[{\tilde{n}} + (K- {\tilde{n}}_j) e_j]}\) is not a principal reversible subcuboid, then by Lemma 5.1 and Corollary 5.3,

$$\begin{aligned} a_{j,K}&= \mu _{{\tilde{n}} + (K- {\tilde{n}}_j) e_j} < K \prod _{i \ne j} {\tilde{n}}_i; \end{aligned}$$

also,

$$\begin{aligned} a_{j, {\tilde{n}}_j - K}&= \mu _{{\tilde{n}} - K e_j} \le ({\tilde{n}}_j-K) \prod _{i \ne j} {\tilde{n}}_i, \end{aligned}$$

so \(\displaystyle a_{j,K} + a_{j, {\tilde{n}}_j - K} < \prod \nolimits _{i=1}^m {\tilde{n}}_i\). As \(M_{[{\tilde{n}}]}\) is a principal reversible subcuboid with entries \(\displaystyle \left\langle \prod \nolimits _{i=1}^m {\tilde{n}}_i \right\rangle ,\) there are suitable indices \(k_i \in \langle {\tilde{n}}_i \rangle \)\((i \in \{1, \dots , m\})\) such that

$$\begin{aligned} a_{j,K} + a_{j, {\tilde{n}}_j - K}&= \sum _{i=1}^m a_{i, k_i}. \end{aligned}$$

Setting \({\tilde{k}}_j := {\tilde{n}}_j - 1 - k_j \in \langle {\tilde{n}}_j \rangle ,\) this equation can be written in the form

$$\begin{aligned} a_{j,K} + a_{j,{\tilde{n}}_j-K}&= a_{j,{\tilde{n}}_j - 1 - {\tilde{k}}_j} + \sum _{i \ne j} a_{i,k_i}. \end{aligned}$$
(5.4)

By the reversal symmetry of the principal reversible subcuboid \(M_{[{\tilde{n}}]}\) (Theorem 4.8), the numbers \(0 = a_{j,0}< a_{j,1}< \cdots < a_{j,{\tilde{n}}_j-1}\) have the property

$$\begin{aligned} a_{j, {\tilde{n}}_j -1}&= a_{j,r} - a_{j, {\tilde{n}}_j-1-r} \qquad (r \in \langle {\tilde{n}}_j \rangle ), \end{aligned}$$

so in particular \(a_{j, {\tilde{n}}_j-1-{\tilde{k}}_j} = a_{j, {\tilde{n}}_j-1} - a_{j, {\tilde{k}}_j}\) and \(a_{j,{\tilde{n}}_j - K} = a_{j, {\tilde{n}}_j-1} - a_{j, K-1}.\) Hence Eq. (5.4) is equivalent to

$$\begin{aligned} a_{j,K} + a_{j, {\tilde{k}}_j}&= a_{j,K-1} + \sum _{i \ne j} a_{i,k_i}. \end{aligned}$$

Taking into account (5.3), we hence find

$$\begin{aligned} S_2 \ni a_{l, {\tilde{n}}_l} + a_{j, {\tilde{k}}_j}&= \mu _{{\tilde{n}} + K e_j} + a_{j, {\tilde{k}}_j} = a_{j,K-1} + \prod _{r=1}^m {\tilde{n}}_r + \sum _{i \ne j} a_{i,k_i} \in S_1. \end{aligned}$$

This contradicts the fact that \(S_1\) and \(S_2\) are disjoint. \(\square \)

Clearly, given two principal reversible subcuboids of M,  one must contain the other, since both contain a consecutive sequence of integers starting from 0 and the entries of M are all different. Therefore the concept of maximality of a proper principal reversible subcuboid of M is well-defined, and there is a unique maximal proper principal reversible subcuboid of M.

Theorem 5.6

Let \(m \in {{\mathbb {N}}}+1,\)\(n \in {{\mathbb {N}}}^m \setminus \{1_m\},\) and \(M \in {{\mathbb {N}}}_0^n\) a principal reversible cuboid. If \(M_{[{\tilde{n}}]},\) with \({\tilde{n}} \le n,\)\({\tilde{n}} \ne n,\) is a maximal proper principal reversible subcuboid, then there is \(j \in \{1, \dots , m\}\) such that \({\tilde{n}}_i = n_i\)\((i \ne j).\)

Proof

Suppose \({\tilde{n}}_j < n_j\) and \({\tilde{n}}_k < n_k\) for some \(j \ne k.\) Then, by Lemma 5.2, \(\mu _{{\tilde{n}}} \in \{a_{j,\tilde{n}_j}, a_{k, {\tilde{n}}_k}\};\) w.l.o.g. let \(\mu _{{\tilde{n}}} = a_{j,{\tilde{n}}_j}.\) Then, by Lemma  5.5, the next smallest missing number from each extension \(M_{[{\tilde{n}} + e_j]},\)\(M_{[{\tilde{n}} + 2 e_j]}, \dots \) of \(M_{[{\tilde{n}}]}\) in direction j will again be found in direction j,  until a larger principal reversible subcuboid \(M_{[{\tilde{n}} + K e_j]}\) is completed, with some \(K > 0.\) As the kth entry of the multiindex \({\tilde{n}} + K e_j\) is equal to \({\tilde{n}}_k < n_k,\)\(M_{[{\tilde{n}} + K e_j]} \ne M;\) on the other hand, \(M_{[{\tilde{n}}]}\) is a proper principal reversible subcuboid of \(M_{[{\tilde{n}} + K e_j]},\) contradicting its maximality. \(\square \)

Theorem 5.7

Let \(m \in {{\mathbb {N}}}+1,\)\(n \in {{\mathbb {N}}}^m \setminus \{1_m\}\) and \(M \in {{\mathbb {N}}}_0^n\) a principal reversible cuboid. Then there is some \(j \in \{1, \dots , m\}\) and some \({\tilde{n}} \in {{\mathbb {N}}}^m\) such that \({\tilde{n}}_i = n_i\)\((i \ne j),\)\(\tilde{n}_j < n_j,\)\({\tilde{n}}_j | n_j\) and \(M_{[{\tilde{n}}]}\) is a principal reversible subcuboid of M. Moreover, for any \({\hat{n}} \le {\tilde{n}}\) and \(k \in \left\langle \frac{n_j}{{\tilde{n}}_j} \right\rangle ,\) we have \(M_{{\hat{n}} + k {\tilde{n}}_j e_j} = M_{{\hat{n}}} + k \prod _{i=1}^m {\tilde{n}}_i.\)

Proof

Since M is not just the trivial m-cuboid \((0) \in {\mathbb N}_0^{1_m},\) it has a maximal proper principal reversible subcuboid \(M_{n'},\) with \(n' \le n,\)\(n' \ne n;\) note that \(n' = 1_m\) and hence \(M_{n'} = (0)\) is possible. By Theorem 5.6, there is \(j \in \{1, \dots , m\}\) such that \(n'_i = n_i\)\((i \ne j)\) and \(n'_j < n_j.\) Let \({\tilde{n}} \in {{\mathbb {N}}}^m\) be such that \({\tilde{n}}_i = n_i\)\((i \ne j)\) and such that \({\tilde{n}}_j\) is the minimal number for which \(M_{[{\tilde{n}}]}\) is a principal reversible subcuboid of M.

By Lemmas 5.4 and 5.5 and Eq. (5.2), we find

$$\begin{aligned} M_{{\hat{n}} + {\tilde{n}}_j e_j}&= \sum _{i \ne j} a_{i, {\hat{n}}_i - 1} + a_{j, {\hat{n}}_j - 1} + \prod _{r=1}^m {\tilde{n}}_r = M_{{\hat{n}}} + \prod _{r=1}^m {\tilde{n}}_r \end{aligned}$$

for \({\hat{n}} \le \tilde{n},\) and this makes \(M_{[{\tilde{n}} + {\tilde{n}}_j e_j]}\) a principal reversible subcuboid which is composed of \(M_{[{\tilde{n}}]}\) and an a copy of this cuboid with entries offset with \(\prod _{r=1}^m \tilde{n}_r.\) Applying the same reasoning to this larger subcuboid, if it is not already equal to M,  gives the last statement of the Theorem.

By minimality of \(M_{[{\tilde{n}}]},\) the principal reversible cuboid M must be composed of a number of complete offset copies of it to contain a complete arithmetic sequence. Hence it follows that \({\tilde{n}}_j\) is a divisor of \(n_j.\)\(\square \)

6 Building operators and joint ordered factorisations

Theorem 5.7 has shown that every principal reversible cuboid, except the trivial \((0) \in {{\mathbb {N}}}_0^{1_m},\) is composed of shifted copies of a smaller principal reversible cuboid, stacked in one of the m directions. By recursion, this observation gives a description of principal reversible cuboids which can be used to construct them. In order to make the construction more transparent, we introduce building operators which describe the stacking process.

We shall use the following notation. For \(k \in {{\mathbb {N}}},\) we denote the arithmetic progression vector by

$$\begin{aligned} \overrightarrow{\langle k \rangle }&= (0, 1, 2, \dots , k-1). \end{aligned}$$

Moreover, for \(m \in {{\mathbb {N}}}\) and any multiindex \(n \in {{\mathbb {N}}}^m,\) we write \(1_{[n]}\) for the cuboid with dimension vector n and all entries equal to 1.

Definition 6.1

Let \(k, m \in {{\mathbb {N}}},\)\(j \in \{1, \dots , m\},\)\(n \in {{\mathbb {N}}}^m,\)\(v \in {{\mathbb {N}}}_0^k\) and \(M \in {{\mathbb {N}}}_0^n.\) Then we define the direction j Kronecker product of v with M as \(v \otimes _j M,\) where

$$\begin{aligned} (v \otimes _j M)_{{\hat{n}} + l n_j e_j}&= v_{l+1} M_{{\hat{n}}} \qquad ({\hat{n}} \le n, l \in \langle k \rangle ). \end{aligned}$$

If \(m = 1,\) then this product turns into the standard Kronecker product of the vectors \(v \in {{\mathbb {N}}}_0^k\) and \(w = M \in {{\mathbb {N}}}_0^{n_1},\) i.e.

$$\begin{aligned} (v \otimes w)_{l_1 n_1 + l_2 + 1}&= v_{l_1+1} w_{l_2+1} \qquad (l_1 \in \langle k \rangle , l_2 \in \langle n_1 \rangle ). \end{aligned}$$

This product is obviously bilinear.

Lemma 6.2

The direction j Kronecker product is associative, i.e. for \(k_1, k_2, m \in {{\mathbb {N}}},\)\(n \in {{\mathbb {N}}}^m,\)\(v \in {\mathbb N}_0^{k_1},\)\(w \in {{\mathbb {N}}}_0^{k_2}\) and \(M \in {\mathbb N}_0^n,\)

$$\begin{aligned} v \otimes _j (w \otimes _j M)&= (v \otimes w) \otimes _j M. \end{aligned}$$

Proof

For any \({\hat{n}} \le n\) and \(l = l_1 k_2 + l_2 \in \langle k_1 k_2 \rangle ,\)\(l_1 \in \langle k_1 \rangle ,\)\(l_2 \in \langle k_2 \rangle ,\) we find

$$\begin{aligned} (v \otimes _j (w \otimes _j M))_{{\hat{n}} + l n_j e_j}&= (v \otimes _j (w \otimes _j M))_{{\hat{n}} + l_2 n_j e_j + l_1 k_2 n_j e_j} \\&= v_{l_1+1} (w \otimes _j M)_{{\hat{n}} + l_1 n_j e_j} = v_{l_1+1} w_{l_2+1} M_{{\hat{n}}} \\&= (v \otimes w)_{l+1} M_{{\hat{n}}} = ((v \otimes w) \otimes _j M)_{{\hat{n}} + l n_j e_j}, \end{aligned}$$

as required. \(\square \)

Definition 6.3

Let \(k, m \in {{\mathbb {N}}},\)\(j \in \{1, \dots , m\}.\) Then we define the building operator

\(\mathcal{B}_{j,k}\) as the operation which turns any cuboid \(M \in {\mathbb N}_0^n,\)\(n \in {{\mathbb {N}}}^m,\) into

$$\begin{aligned} \mathcal{B}_{j,k}(M)&= \left( \prod _{r=1}^m n_r \right) \overrightarrow{\langle k \rangle } \otimes _j 1_{[n]} + 1_k \otimes _j M \in {{\mathbb {N}}}_0^{n + (k-1)n_j e_j}. \end{aligned}$$

The following observation shows that the composition of two building operators working in the same coordinate direction is just one building operator.

Lemma 6.4

Let \(k_1, k_2, m \in {{\mathbb {N}}}\) and \(j \in \{1, \dots , m\}.\) Then \(\mathcal{B}_{j,k_1} \circ \mathcal{B}_{j,k_2} = \mathcal{B}_{j,k_1 k_2}.\)

Proof

Let \(M \in {{\mathbb {N}}}_0^n,\)\(n \in {{\mathbb {N}}}^m.\) Then

$$\begin{aligned} \mathcal{B}_{j,k_1} \circ \mathcal{B}_{j,k_2} (M)&= \mathcal{B}_{j,k_1} \left( \left( \prod _{r=1}^m n_r \right) \overrightarrow{\langle k_2 \rangle } \otimes _j 1_{[n]} + 1_{k_2} \otimes _j M \right) \\&= \left( \prod _{r=1}^m n_r \right) k_2\,\overrightarrow{\langle k_1 \rangle } \otimes _j 1_{[n + (k_2-1)n_j e_j]} \\&\qquad + 1_{k_1} \otimes _j \left( \left( \prod _{r=1}^m n_r \right) \overrightarrow{\langle k_2 \rangle } \otimes _j 1_{[n]} + 1_{k_2} \otimes _j M \right) \\&= \left( \prod _{r=1}^m n_r \right) (k_2\,\overrightarrow{\langle k_1 \rangle } \otimes 1_{k_2} + 1_{k_1} \otimes \overrightarrow{\langle k_2 \rangle }) \otimes _j 1_{[n]} + (1_{k_1} \otimes 1_{k_2}) \otimes _j M \\&= \left( \prod _{r=1}^m n_r \right) \overrightarrow{\langle k_1 k_2 \rangle } \otimes _j 1_{[n]} + 1_{k_1 k_2} \otimes _j M = \mathcal{B}_{j,k_1 k_2} (M), \end{aligned}$$

using Lemma 6.2 in the penultimate line. \(\square \)

Applying this setup in conjunction with Theorem 5.7, we can deduce the following structure theorem for principal reversible cuboids.

Theorem 6.5

Let \(m \in {{\mathbb {N}}},\)\(n \in {{\mathbb {N}}}^m\) and \(M \in {\mathbb N}_0^n\) a principal reversible cuboid. Then there is a number \(L \in {{\mathbb {N}}}\) and numbers \(j_l \in \{1, \dots , m\},\)\(f_l \in {{\mathbb {N}}}+1\)\((l \in \{1, \dots , L\})\) such that \(\prod _{j_l = j} f_l = n_j\)\((j \in \{1, \dots , m\})\) and

$$\begin{aligned} M&= \mathcal{B}_{j_L, f_L} \circ \mathcal{B}_{j_{L-1}, f_{L-1}} \circ \cdots \circ \mathcal{B}_{j_1, f_1} ((0)), \end{aligned}$$
(6.1)

where \((0) \in {{\mathbb {N}}}_0^{1_m}\) is the trivial principal reversible cuboid. Without loss of generality, we can assume that \(j_l \ne j_{l-1}\)\((l \in \{2, \dots , L\}).\)

Proof

Using the building operator defined above, the statement of Theorem 5.7 can be paraphrased in the following way. There is some \(j \in \{1, \dots , m\}\) and \(f \in {{\mathbb {N}}},\)\(f | n_j,\) such that \(M = \mathcal{B}_{j,f} (M_{[{\tilde{n}}]}),\) where \({\tilde{n}} \in {{\mathbb {N}}}^m\) has entries \({\tilde{n}}_i = n_i\)\((i \ne j)\) and \({\tilde{n}}_j = n_j / f.\) Here \(M_{[{\tilde{n}}]}\) is again a principal reversible cuboid. Unless this is the trivial cuboid \((0) \in {{\mathbb {N}}}_0^{1_m},\) we can again apply Theorem 5.7 to it, and thus recursively obtain the building operator chain in (6.1). The last statement reflects Lemma 6.4, which allows fusion of consecutive building operators in the same direction into one. \(\square \)

Theorem 6.5 shows that principal reversible cuboids are obtained from building operator chains; the coefficients of such a chain arise from factorising the individual dimensions \(n_j\)\((j \in \{1, \dots , m\})\) of the principal reversible cuboid, and arranging the factors in a sequence such that consecutive factors in the sequence belong to different coordinate directions.

Note that in the special (and untypical) case \(m = 2,\) this condition (which corresponds to the last sentence in Theorem 6.5) enforces alternation of directions \(j_1 = 1,\)\(j_2 = 2,\)\(j_3 = 1,\)\(j_4 = 2,\) etc. (or the analogue starting with \(j_2 = 2\)), ending with either the same or the other direction depending on whether L is odd or even. If \(n_1 = n_2\) and we start with \(j_1 = 1,\) this gives a building operator chain equivalent to Ollerenshaw and Brée’s construction of principal reversible squares [7]. However, if \(m > 2,\) then the possible patterns are considerably more complex.

Definition 6.6

Let \(m \in {{\mathbb {N}}}\) and \(n \in {{\mathbb {N}}}^m.\) Then we call

$$\begin{aligned} ((j_1, f_1), (j_2, f_2), \dots , (j_L, f_L)) \in (\{1, \dots , m\} \times ({{\mathbb {N}}}+1))^L, \end{aligned}$$

where \(L \in {{\mathbb {N}}},\) a joint ordered factorisation of \(n = (n_1, \dots , n_m)\) if

$$\begin{aligned} \prod _{j_l = j} f_l&= n_j \qquad (j \in \{1, \dots , m\}) \end{aligned}$$

and \(j_l \ne j_{l-1}\)\((l \in \{2, \dots , L\}).\)

By Theorem 4.5, the entries on the coordinate axes of a principal reversible cuboid form a sum system (with the entries of each component set appearing in increasing order on the corresponding axis, and the coordinate axes arranged in the order of the smallest non-zero entry of the component sets). Thus the building operator chain of Theorem 6.5 also gives rise to a construction for the corresponding sum system, as follows.

Theorem 6.7

Let \(m \in {{\mathbb {N}}}.\) Suppose the sets \(A_1, A_2, \dots , A_m \subset {{\mathbb {N}}}_0\) form a sum system. Let \(n_j := |A_j|\)\((j \in \{1, \dots , m\}).\)

Then there is a joint ordered factorisation \(((j_1, f_1), \dots , (j_L, f_L))\) of \((n_1, \dots , n_m)\) such that

$$\begin{aligned} A_j&= \sum _{j_l = j} \left( \prod _{s=1}^{l-1} f_s \right) \langle f_l \rangle \qquad (j \in \{1, \dots , m\}). \end{aligned}$$
(6.2)

Conversely, given any joint ordered factorisation of \(n \in {\mathbb N}^m,\) (6.2) generates an m-part sum system.

Proof

By Corollary 4.7, there is a one-to-one relationship between m-part sum systems and principal reversible m-cuboids with dimension vector \(n \in ({{\mathbb {N}}}+1)^m.\) Consider a principal reversible cuboid \(M \in {{\mathbb {N}}}_0^n\) and its corresponding building operator chain (6.1). Set \(M^{(0)} = (0) \in {{\mathbb {N}}}_0^{1_m}\) and \(M^{(l)} = \mathcal{B}_{j_l, f_l} \circ \dots \circ \mathcal{B}_{j_1, f_1} (0)\)\((l \in \{1, \dots , L\});\) then \(M = M^{(L)}\) and \(M^{(l)} = \mathcal{B}_{j_l, f_l}(M^{(l-1)})\)\((l \in \{1, \dots , L\}).\) By recursion, the number of entries of \(M^{(l)}\) (which is equal to the product of its dimensions) will be \(F_l := \prod _{s=1}^l f_s.\)

Let \(A_j^{(l)}\) be the set of entries on the j-th coordinate axis of \(M^{(l)},\) for any \(j \in \{1, \dots , m\}\) and \(l \in \{0, \dots , L\}.\) Then we find that \(A_j^{(0)} = \{0\}\) for all \(j \in \{1, \dots , m\},\) and that \(A_j^{(l)} = A_j^{(l-1)}\) if \(j \ne j_l,\) and

$$\begin{aligned} A_{j_l}^{(l)}&= A_{j_l}^{(l-1)} \cup (A_{j_l}^{(l-1)} + F_{l-1}) \cup (A_{j_l}^{(l-1)} + 2 F_{l-1}) \cup \cdots \cup (A_{j_l}^{(l-1)} + (f_l-1) F_{l-1}) \nonumber \\&= A_{j_l}^{(l-1)} + \left( \prod _{s=1}^{l-1} f_s \right) \langle f_l \rangle ; \end{aligned}$$
(6.3)

note that, since \(M^{(l-1)}\) is a principal reversible cuboid,

$$\begin{aligned} F_{l-1}&= \prod _{s=1}^{l-1} f_s = \sum _{r=1}^m \max A_r^{(l-1)} + 1 > \max A_{j_l}, \end{aligned}$$

so the union in (6.3) is a union of disjoint sets. The formula (6.2) follows by recursion, as \(A_j = A_j^{(L)}.\)\(\square \)

We conclude with some examples to illustrate the workings of Theorem 6.7 to construct sum systems, and further the use of Theorems 3.43.5 to obtain corresponding sum-and-distance systems.

Example 6.8

Take \(m = 3,\)\(n = (15, 8, 6)\) and consider the joint ordered factorisation

$$\begin{aligned} ((1,5),(2,2),(1,3),(3,3),(2,2),(3,2),(2,2)); \end{aligned}$$

then, by Eq. (6.2), we find the corresponding sum system

$$\begin{aligned} A_1&= \{0,1,2,3,4,10,11,12,13,14,20,21,22,23,24\}, \\ A_2&= \{0,5,90,95,360,365,450,455\}, \\ A_3&= \{0,30,60,180,210,240\}, \end{aligned}$$

which generates all integers \(0, 1, \dots , 6!-1\) exactly once. Rearranging the same factors in a different joint ordered factorisation,

$$\begin{aligned} ((1,5),(3,3),(2,2),(3,2),(2,2),(1,3),(2,2)), \end{aligned}$$

we obtain a different sum system with component sets of the same cardinalities \(n_1, n_2, n_3,\) and the same target set,

$$\begin{aligned} A_1&= \{0,1,2,3,4,120,121,122,123,124,240,241,242,243,244\}, \\ A_2&= \{0,15,60,75,360,375,420,435\}, \\ A_3&= \{0,5,10,30,35,40\}. \end{aligned}$$

Example 6.9

Consider \(m = 3\) and \(n = (14,8,6),\) all even. Then the joint ordered factorisation

$$\begin{aligned} ((1,2),(3,3),(2,2),(3,2),(2,2),(1,7),(2,2)) \end{aligned}$$

gives the corresponding sum system

$$\begin{aligned} {\tilde{A}}_1&= \{0,1,48,49,96,97,144,145,192,193,240,241,288,289\}, \\ {\tilde{A}}_2&= \{0,6,24,30,336,342,360,366\}, \\ {\tilde{A}}_3&= \{0,2,4,12,14,16\}, \end{aligned}$$

and hence, by Theorem 3.4, the non-inclusive sum-and-distance system

$$\begin{aligned} A_1 = \{1, 95, 97, 191, 193, 287, 289\}, A_2 = \{306, 318, 354, 366\}, A_3 = \{8, 12, 16\}. \end{aligned}$$

Example 6.10

Consider \(m = 3\) and \(n = (15, 7, 9),\) all odd. Then the joint ordered factorisation

$$\begin{aligned} ((1,5),(2,7),(3,3),(1,3),(3,3)) \end{aligned}$$

generates the sum system

$$\begin{aligned} {\tilde{A}}_1&= \{0,1,2,3,4,105,106,107,108,109,210,211,212,213,214\}, \\ {\tilde{A}}_2&= \{0,5,10,15,20,25,30\}, \\ {\tilde{A}}_3&= \{0,35,70,315,350,385,630,665,700\}, \end{aligned}$$

and further, by Theorem 3.5, the inclusive sum-and-distance system

$$\begin{aligned} A_1 = \{1, 2, 103, 104, 105, 106, 107\}, A_2 = \{5, 10, 15\}, A_3 = \{35, 280, 315, 350\}. \end{aligned}$$

Example 6.11

For \(m = 5\) and \(n = (28,20,30,18,12),\) the joint ordered factorisation

$$\begin{aligned} ((1,7),(2,4),(5,2),(3,2),(4,2),(2,5),(4,9),(3,3),(1,4),(5,3),(3,5),(5,2)) \end{aligned}$$

gives, by formula (6.2), the five-part sum system

$$\begin{aligned} A_1&= \{0,1,2,3,4,5,6,30240,30241,30242,30243,30244,30245,30246, 60480, \\&\qquad 60481,60482,60483,60484,60485,60486,90720,90721,90722,90723,90724, \\&\qquad 90725,90726\}, \\ A_2&= \{0,7,14,21,224,231,238,245,448,455,462,469,672,679,686,693,896,903, \\&\qquad 910,917\}, \\ A_3&= \{0,56,10080,10136,20160,20216,362880,362936,372960,373016,383040, \\&\qquad 383096,725760,725816,735840,735896,745920,745976,1088640,1088696, \\&\qquad 1098720,1098776,1108800,1108856,1451520,1451576,1461600,1461656, \\&\qquad 1471680,1471736\}, \\ A_4&= \{0,112,1120,1232,2240,2352,3360,3472,4480,4592,5600,5712,6720,6832, \\&\qquad 7840,7952,8960,9072\}, \\ A_5&= \{0,28,120960,120988,241920,241948,1814400,1814428,1935360,1935388, \\&\qquad 2056320,2056348\}, \end{aligned}$$

which generates the integers \(0, 1, 2, \dots , 10!-1,\) each exactly once.