1 Introduction

This paper means to kick off a general programme aimed at bridging several different areas of logic, algebra and computation—the algebraic analysis of conditional statements in programming languages, the theory of factorisations of algebras, the theory of Boolean vector spaces, the investigation into generalisations of classical logic—most of which somehow revolve around the main concept that lies at the crossroads of the three disciplines: the notion of a Boolean algebra.

There is a thriving literature on abstract treatments of the if-then-else construct of computer science, starting with McCarthy’s seminal investigations (McCarthy 1963). On the algebraic side, one of the most influential approaches originated with the work of Bergman (1991). Bergman modelled the if-then-else by considering Boolean algebras acting on sets: if the Boolean algebra of actions is the 2-element algebra, one simply puts \(1( a,b) =a\) and \(0( a,b) =b\). In Salibra et al. (2013), on the other hand, some of the present authors took their cue from Dicker’s axiomatisation of Boolean algebras in the language with the if-then-else as primitive (Dicker 1963). Accordingly, this construct was treated as a proper algebraic operation \(q^{{\mathbf {A}}}\) on algebras \({\mathbf {A}}\) whose type contains, besides the ternary term q, two constants 0 and 1, and having the property that for every \(a,b\in A\), \(q^{{\mathbf {A}}}( 1^{{\mathbf {A}}},a,b) =a\) and \(q^{{\mathbf {A}}}( 0^{{\mathbf {A}}},a,b) =b\). Such algebras, called Church algebras in Salibra et al. (2013), will be termed here Church algebras of dimension 2.

The reason for this denomination is as follows. At the root of the most important results in the theory of Boolean algebras (including Stone’s representation theorem) there is the simple observation that every element \(e\ne 0,1\) of a Boolean algebra \({{\mathbf {B}}}\) decomposes \({{\mathbf {B}}}\) as a Cartesian product \([0,e]\times [e,1]\) of two nontrivial Boolean algebras. In the more general context of Church algebras of dimension 2, we say that an element e of a Church algebra \({\mathbf {A}}\) of dimension 2 is 2-central if \({\mathbf {A}}\) can be decomposed as the product \({\mathbf {A}}/\theta ( e,0) \times {\mathbf {A}}/\theta ( e,1) \), where \(\theta ( e,0) \) (\(\theta ( e,1) \)) is the smallest congruence on \({\mathbf {A}}\) that collapses e and 0 (e and 1). Church algebras of dimension 2 where every element is 2-central were called Boolean-like algebras in Salibra et al. (2013), since the variety of all such algebras in the type (q, 0, 1) is term-equivalent to the variety of Boolean algebras. In this paper, on the other hand, they will be called Boolean-like algebras of dimension 2. Against this backdrop, it is tempting to generalise the previous approach to algebras \({\mathbf {A}}\) having n designated elements \({{{\mathsf {e}}}}_1,\ldots ,{{{\mathsf {e}}}}_n\) (\(n\ge 2\)) and a \(n+1\)-ary operation q (a sort of “generalised if-then-else”) that induces a decomposition of \({\mathbf {A}}\) into n, rather than just 2, factors. These algebras will be called, naturally enough, Church algebras of dimension n (nCA), while algebras \({\mathbf {A}}\) all of whose elements induce a n-ary factorisation of this sort are given the name of Boolean-like algebras of dimension n (\(n{\mathrm {BA}}\)s). Free \({{\mathcal {V}}}\)-algebras (for \({{\mathcal {V}}}\) a variety), lambda algebras, semimodules over semirings–hence, in particular, Boolean vector spaces–give rise to Church algebras which, in general, have dimension greater than 2.

In Sect. 2 we go over the required preliminaries in universal algebra and algebraic logic. In Sect. 3 we introduce the definitions of an nCA and of an \(n{\mathrm {BA}}\) and provide examples of both concepts. Varieties of \(n{\mathrm {BA}}\)s share many remarkable properties with the variety of Boolean algebras. In Sect. 4, we show that any variety of \(n{\mathrm {BA}}\)s is generated by the \(n{\mathrm {BA}}\)s of finite cardinality n. In the pure case (i.e., when the type includes just the generalised if-then-else q and the n constants), the variety is generated by a unique algebra \({\mathbf {n}}\) of universe \(\{{{{\mathsf {e}}}}_1,\ldots ,{{{\mathsf {e}}}}_n\}\), so that any pure \(n{\mathrm {BA}}\) is, up to isomorphism, a subalgebra of \({\mathbf {n}}^I\), for a suitable set I. Another remarkable property of the 2-element Boolean algebra is the definability of all finite Boolean functions in terms e.g. of the connectives and, or, not. This property is inherited by the algebra \({\mathbf {n}}\): all finite functions on \(\{{{{\mathsf {e}}}}_1,\ldots ,{{{\mathsf {e}}}}_n\}\) are term-definable, so that the variety of pure \(n{\mathrm {BA}}\)s is primal. More generally, a variety of an arbitrary type with one generator is primal if and only if it is a variety of \(n{\mathrm {BA}}\)s.

The last two section of the papers are devoted to applications of these concepts to logic. Just like Boolean algebras are the algebraic counterpart of classical logic \({\mathrm {CL}}\), in Sect. 5 for every \(n\ge 2\) we define a logic \(n{\mathrm {CL}}\) whose algebraic counterpart are \(n{\mathrm {BA}}\)s. We show the complete symmetry (in a sense to be specified below) of the truth values \({{{\mathsf {e}}}}_1,\ldots ,{{{\mathsf {e}}}}_n\), supporting the idea that \(n{\mathrm {CL}}\) is the right generalisation of classical logic from dimension 2 to dimension n. In Sect. 6, we conservatively translate into \(n{\mathrm {CL}}\) any n-valued tabular logic with a single designated value. We also define a terminating and confluent term rewriting system to test the validity of formulas of \(n{\mathrm {CL}}\) by rewriting. By the universality of \(n{\mathrm {CL}}\), in order to check whether a formula \(\phi \) is valid in a n-valued tabular logic, it is enough to see whether the normal form \(\phi ^*\) of its \(n{\mathrm {CL}}\)-translation is the designated value of \(n{\mathrm {CL}}\). Our rewriting rules bear a strong resemblance to the equivalence transformation rules of multi-valued decision diagrams (Hett et al. 1997; Miller and Drechsler 2002). Our approach, moreover, generalises both Zantema and van de Pol’s work (Zantema and van de Pol 2001) on rewriting of binary decision diagrams and the work by Salibra et al. (2016) on rewriting terms of factor varieties with decomposition operators. We point out that in Salibra et al. (2016) tabular logics were translated in terms of decomposition operators, very much in the spirit of what we are doing here. Nevertheless, due to the lack of an underlying logic and to the absence of the q operator, those translations were ad hoc.

2 Preliminaries

The notation and terminology in this paper are pretty standard. For concepts, notations and results not covered hereafter, the reader is referred to Burris and Sankappanavar (1981), McKenzie et al. (1987) for universal algebra and to Salibra et al. (2013), Ledda et al. (2013), Bucciarelli et al. (2018) for nBAs.

2.1 Algebras

If \(\tau \) is an algebraic type, an algebra \({\mathbf {A}}\) of type \(\tau \) is called a \(\tau \)-algebra, or simply an algebra when \(\tau \) is clear from the context. An algebra is trivial if its carrier set is a singleton set.

Superscripts that mark the difference between operations and operation symbols will be dropped whenever the context is sufficient for a disambiguation.

\({\mathrm {Con}}({\mathbf {A}})\) is the lattice of all congruences on \({\mathbf {A}}\), whose bottom and top elements are, respectively, \(\Delta =\{(a,a):a\in A\}\) and \(\nabla =A\times A\). Given \(a,b\in A\), we write \(\theta (a,b)\) for the smallest congruence \(\theta \) such that \(( a,b) \in \theta \).

We say that an algebra \({\mathbf {A}}\) is: (i) subdirectly irreducible if the lattice \({\mathrm {Con}}({\mathbf {A}})\) has a unique atom; (ii) simple if \({\mathrm {Con}}({\mathbf {A}})=\{\Delta ,\nabla \}\); (iii) directly indecomposable if \({\mathbf {A}}\) is not isomorphic to a direct product of two nontrivial algebras.

A class \({\mathcal {V}}\) of \(\tau \)-algebras is a variety (equational class) if it is closed under subalgebras, direct products and homomorphic images. If \({\mathcal {K}}\) is a class of \(\tau \)-algebras, the variety \(V({\mathcal {K}})\) generated by \({\mathcal {K}}\) is the smallest variety including \({\mathcal {K}}\). If \({\mathcal {K}}=\{{{\mathbf {A}}}\}\) we write \(V({{\mathbf {A}}})\) for \(V(\{{{\mathbf {A}}}\})\).

Let \({{\mathcal {V}}}\) be a variety. We denote by \({{\mathbf {T}}}_{{\mathcal {V}}}(X)\) the free \({{\mathcal {V}}}\)-algebra over the set X of free generators. If \(\tau \) is an algebraic type, then \({{\mathbf {T}}}_\tau (X)\) denotes the absolutely free \(\tau \)-algebra over the set X of free generators.

Following (Blok and Pigozzi 1994), two elements ab of an algebra \({\mathbf {A}}\) are said to be residually distinct if they have distinct images in every non-trivial homomorphic image of \({\mathbf {A}}\).

We say that a variety \({\mathcal {V}}\) is n-pointed iff it has at least n nullary operations that are residually distinct in any nontrivial member of \({{\mathcal {V}}}\). Boolean algebras are the main example of a 2-pointed, or double-pointed, variety. A variety \({\mathcal {V}}\) whose type contains at least one nullary operation symbol c is c-regular if in any \({\mathbf {A}} \in {\mathcal {V}}\), no two different congruences share a congruence class of \(c^{{\mathbf {A}}}\).

2.2 Factor Congruences and Decomposition

Directly indecomposable algebras play an important role in the characterisation of the structure of a variety of algebras. For example, if the class of indecomposable algebras in a Church variety (see Sect. 3 and Salibra et al. 2013) is universal, then any algebra in the variety is a weak Boolean product of directly indecomposable algebras. In this section we recap the basic ingredients of factorisations: tuples of complementary factor congruences and decomposition operators (see McKenzie et al. 1987).

Definition 1

A sequence \((\phi _{1},\ldots ,\phi _n)\) of congruences on a \(\tau \)-algebra \({\mathbf {A}}\) is a n-tuple of complementary factor congruences exactly when:

  1. 1.

    \(\bigcap _{1\le i\le n}\phi _{i}=\Delta \);

  2. 2.

    \(\forall (a_1,\ldots ,a_n)\in A^n\), there is \(u\in A\) such that \(a_i\phi _{i}\,u\), for all \(1\le i\le n\).

The element u such that \(a_i\phi _{i}\,u\) for every i is unique by Definition 1(1).

If \((\phi _{1},\ldots ,\phi _n)\) is a n-tuple of complementary factor congruences on \({\mathbf {A}} \), then the function \(f:{\mathbf {A}}\rightarrow \prod \nolimits _{i=1}^n{\mathbf {A}}/\phi _{i}\), defined by \(f(a) =(a/\phi _{1},\ldots ,a/\phi _{n})\), is an isomorphism. Moreover, every direct decomposition of \({{\mathbf {A}}}\) in n factors univocally determines a n-tuple of complementary factor congruences.

Observe that, when \(n=2\), a pair \((\phi _{1},\phi _{2})\) of congruences is a pair of complementary factor congruences if and only if \(\phi _{1}\cap \phi _{2}=\Delta \) and \(\phi _{1}\circ \phi _{2}=\nabla \). The pair \((\Delta ,\nabla )\) corresponds to the product \({\mathbf {A}}\cong {\mathbf {A}}\times {\mathbf {1}}\), where \({\mathbf {1}}\) is a trivial algebra; obviously \({\mathbf {1}}\cong {\mathbf {A}}/\nabla \) and \({\mathbf {A}}\cong {\mathbf {A}}/\Delta \). A factor congruence is any congruence which belongs to a pair of complementary factor congruences. The set of factor congruences of \({{\mathbf {A}}}\) is not, in general, a sublattice of \({\mathrm {Con}}({\mathbf {A}})\). Notice that, if \((\phi _{1},\ldots ,\phi _n)\) is a n-tuple of complementary factor congruences, then \(\phi _i\) is a factor congruence for each \(1\le i\le n\), because the pair \((\phi _i, \bigcap _{j\ne i} \phi _j)\) is a pair of complementary factor congruences.

It is possible to characterise n-tuples of complementary factor congruences in terms of certain algebra homomorphisms called decomposition operators (see (McKenzie et al. 1987,Def. 4.32) for additional details).

Definition 2

A n-ary decomposition operator on a \(\tau \)-algebra \({\mathbf {A}}\) is a function \(f:A^{n}\rightarrow A\) satisfying the following conditions:

  1. D1

    \(f( x,x,\ldots ,x) =x\);

  2. D2

    \(f( f( x_{11},x_{12},\ldots ,x_{1n}),\ldots ,f(x_{n1},x_{n2},\ldots ,x_{nn}))=f(x_{11},\ldots ,x_{nn})\);

  3. D3

    f is an algebra homomorphism from \({\mathbf {A}}^n\) to \( {\mathbf {A}}\):

$$\begin{aligned} f(g(x_{11},\ldots ,x_{1k}),\ldots , g(x_{n1},\ldots ,x_{nk})) = g(f(x_{11},\ldots ,x_{n1}),\ldots , f(x_{1k},\ldots ,x_{nk})), \end{aligned}$$

for every \(g\in \tau \) of arity k.

There is a bijective correspondence between n-tuples of complementary factor congruences and n-ary decomposition operators, and thus, between n-ary decomposition operators and factorisations of an algebra in n factors.

Theorem 1

Any n-ary decomposition operator \(f:{\mathbf {A}}^{n}\rightarrow {\mathbf {A}}\) on an algebra \({\mathbf {A}}\) induces a n-tuple \(\left( \phi _{1},\ldots ,\phi _{n} \right) \) of complementary factor congruences, where each \(\phi _{i}\subseteq A\times A\) is defined by:

$$\begin{aligned} a\ \phi _{i}\ b\ \ \hbox {iff}\ \ f(a,\ldots ,a,b,a,\ldots ,a)=a\qquad (b\,\,at\, position\, i). \end{aligned}$$

Conversely, any n-tuple \(\left( \phi _{1},\ldots ,\phi _{n} \right) \) of complementary factor congruences induces a decomposition operator f on \({\mathbf {A}}\): \(f(a_1,\ldots ,a_n)=u\) iff \(a_{i}\,\phi _{i}\,u\) for all i.

2.3 Factor Elements

The notions of a decomposition operator and of a factorisation can sometimes be internalised: some elements of the algebra, the so called factor elements, can carry all the information encoded by a decomposition operator.

Let \({{\mathbf {A}}}\) be a \(\tau \)-algebra, where we distinguish a \((n+1)\)-ary term operation q.

Definition 3

We say that an element e of \({{\mathbf {A}}}\) is a factor element with respect to q if the n-ary operation \(f_e:A^n\rightarrow A\), defined by

$$\begin{aligned} f_e(a_1,\ldots ,a_n)= q^{{{\mathbf {A}}}}(e,a_1,\ldots ,a_n),\ \text {for all }a_i\in A, \end{aligned}$$

is a n-ary decomposition operator (that is, \(f_e\) satisfies identities (D1)-(D3) of Definition 2).

An element e of \({\mathbf {A}}\) is a factor element if and only if the tuple of relations \((\phi _1,\ldots ,\phi _n)\), defined by \(a\ \phi _{i}\ b\) iff \(q(e,a,\ldots ,a,b,a,\ldots ,a)=a\) (b at position i), is a n-tuple of complementary factor congruences of \({\mathbf {A}}\).

By (Cvetko-Vah and Salibra 2015, Proposition 3.4) the set of factor elements is closed under the operation q: if \(a,b_1,\ldots ,b_n\in A\) are factor elements, then \(q(a,b_1,\ldots ,b_n)\) is also a factor element.

Observe that in general:

  • Different factor elements may define the same tuple of complementary factor congruences;

  • There may exist n-tuples of complementary factor congruences that do not correspond to any factor element.

In Sect. 3 we describe a class of algebras, called Church algebras of dimension n, where the \((n+1)\)-ary operator q induces a bijective correspondence between a suitable subset of factor elements, the so-called n-central elements, and the set of all n-ary decomposition operators.

2.4 Logics

In logic the operation symbols of an algebraic type \(\tau \) are considered as logical connectives. Then the term algebra \({\mathbf {T}}_{\tau }( X)\) over the countable infinite set X of generators is also called the algebra of \(\tau \)-formulas. The elements \(x_0,x_1,\ldots \) of X are called propositional variables.

Definition 4

If \(\tau \) is an algebraic type whose algebra of \(\tau \)-formulas over X is \({\mathbf {T}}_{\tau }\left( X\right) \), a consequence relation on \(\tau \) is a relation \({\vdash }\subseteq \wp (T_{\tau }(X))\times T_{\tau }(X)\) obeying the following conditions for all \(\Gamma ,\Delta \subseteq T_{\tau }(X)\) and \(\varphi , \psi \in T_{\tau }(X)\):

  • Reflexivity: \(\Gamma \vdash \varphi \) whenever \(\varphi \in \Gamma \);

  • Monotonicity: if \(\Gamma \vdash \varphi \) and \(\Gamma \subseteq \Delta \), then \(\Delta \vdash \varphi \);

  • Cut: if \(\Gamma \vdash \varphi \) and \(\Delta \vdash \psi \) for all \(\psi \in \Gamma \), then \(\Delta \vdash \varphi \).

A consequence relation \(\vdash \) is said to be finitary if whenever \(\Gamma \vdash \varphi \), then \(\Delta \vdash \varphi \) for some finite \(\Delta \subseteq \Gamma \); it is said to be substitution-invariant if whenever \(\Gamma \vdash \varphi \), then \(\sigma (\Gamma )\vdash \sigma (\varphi )\) for any endomorphism \(\sigma \) of \({\mathbf {T}}_{\tau }( X)\).

Definition 5

A (finitary) logic of type \(\tau \) is a pair \( {\mathrm {L}}=\left( \tau ,\vdash _{{\mathrm {L}}}\right) \), where \(\tau \) is an algebraic type and \(\vdash _{{\mathrm {L}}}\) is a (finitary and) substitution-invariant consequence relation on \(\tau \).

Definition 6

Let \({\mathrm {L}}=(\tau ,\vdash _{\mathrm {L}})\) be a logic. A set \(\Gamma \) of \(\tau \)-formulas is called an \({\mathrm {L}}\)-theory if \(\Gamma \vdash _{{\mathrm {L}}} \varphi \) implies \(\varphi \in \Gamma \) for every \(\tau \)-formula \(\varphi \).

The set of \({\mathrm {L}}\)-theories is closed under arbitrary intersections and is the universe of a complete lattice, denoted by \(Th(\mathrm {L})\).

Definition 7

If \(\mathrm {L}=(\tau ,\vdash _{\mathrm {L}})\) is a logic, then two \(\tau \)-formulas \(\varphi \) and \(\psi \) are said to be logically \(\mathrm {L}\)-equivalent, written \(\varphi \equiv _{\mathrm {L}} \psi \), if \(\varphi \vdash _{\mathrm {L}} \psi \) and \(\psi \vdash _{\mathrm {L}} \varphi \).

Definition 8

If \(\tau \) is a type, a \(\tau \)-matrix (Blok and Pigozzi 1989) (or simply a matrix, when \(\tau \) is understood) is a pair \({\mathcal {A}}=( \mathbf {A},F) \), where \(\mathbf {A}\) is a \(\tau \)-algebra and \(F\subseteq A\). The elements in F are said to be designated. If \(F=\{ {\mathsf {t}}\}\) is a singleton, we write \(( \mathbf {A},{\mathsf {t}})\) for \(( \mathbf {A},\{ {\mathsf {t}}\})\).

A \(\tau \)-matrix \({\mathcal {A}}=( \mathbf {A},F)\) defines a logic \(\mathrm {L}_{\mathcal {A}}=(\tau ,\vdash _{\mathcal {A}})\) as follows: \( \Gamma \vdash _{\mathcal {A}} \phi \) if, for any homomorphism \(h:\mathbf {T}_{\tau }( X) \rightarrow \mathbf {A}\), if \(h(\psi )\in F\) for any \(\psi \in \Gamma \), then \(h(\phi )\in F\).

Logics of the form \(\mathrm {L}_{\mathcal {A}}=(\tau ,\vdash _{\mathcal {A}})\), where \({\mathcal {A}}=( \mathbf {A},F)\) is a matrix and \(\mathbf {A}\) is a finite \(\tau \)-algebra, are called tabular. Many well-known logics in the literature are tabular logics with the additional property that \(F=\{ {\mathsf {t}}\} \) is a singleton; in such case, \({\mathsf {t}}\) can be read as representing the value “true”. Some examples of tabular logics in the type \(\tau = \left( 2,2,1 \right) \) are given below.

  • Classical logic \(\mathrm {CL}=\mathrm {L}_{\left( \mathbf {2},\left\{ 1\right\} \right) }\), where \(\mathbf {2}\) is the 2-element Boolean algebra;

  • For any \(n\ge 2\), the n-valued Post logic \(\mathrm {P}_{n}=\mathrm {L}_{\left( \mathbf {P}_{n},\left\{ 1\right\} \right) }\), where \(\mathbf {P}_{n}\) is the expansion of the n-element chain \(\mathbf {C}_{n}=\left( \left\{ 0,\frac{1}{n-1}, \ldots ,\frac{ n-2}{n-1},1\right\} ,\min ,\max ,0,1\right) \) by the unary operation \(\lnot ^{\mathbf {P}_{n}}\) defined as follows:

    $$\begin{aligned} \lnot ^{\mathbf {P}_{n}}a=\left\{ \begin{array}{l} a\quad -\frac{1}{n-1}\text { if }a\ne 0\text {;} \\ 1\quad \text { if }a=0\text {.} \end{array} \right. \end{aligned}$$

If \(\mathrm {L}=(\tau ,\vdash _{\mathrm {L}})\) is a logic of type \(\tau \), any set \(D=\{\varphi _{i}(x)\approx \psi _{i}(x)\}_{i\in I}\) of \(\tau \)-equations in a single variable can also be regarded as a function which maps formulas in \(T_{\tau }(X)\) to sets of equations of the same type: the behaviour of this function, for any \(\gamma \in T_{\tau }(X) \), is given by the condition

$$\begin{aligned} D \left( \gamma \right) =\{\varphi _{i}(\gamma /x)\approx \psi _{i} (\gamma /x)\}_{i\in I}. \end{aligned}$$

This mapping is sometimes called a formula-equation translation.

A class \(\mathcal {K}\) of \(\tau \)-algebras is an algebraic semantics for \(\mathrm {L}\) (also of type \(\tau \)) if, for some formula-equation translation D, the following condition holds for all \(\Gamma \cup \{ \varphi \}\subseteq T_{\tau }(X)\):

$$\begin{aligned} \Gamma \vdash _{\mathrm {L}}\varphi \quad \text {iff }&\text {for every }\mathbf {A}\in \mathcal {K}\text { and every }\overrightarrow{a}\in A^{n}\text {, }\\&\text {if }D(\gamma )^{\mathbf {A}}(\overrightarrow{a})\text { for all }\gamma \in \Gamma \text {, then }D(\varphi )^{\mathbf {A}}(\overrightarrow{a} )\text {,} \end{aligned}$$

a condition which can be rewrittenFootnote 1 as

$$\begin{aligned} \Gamma \vdash _{\mathrm {L}}\varphi \quad \text {iff}\quad D(\Gamma )=\bigcup \{D(\gamma ):\gamma \in \Gamma \}\vdash _{Eq\left( \mathcal {K}\right) } D(\varphi )\text {.} \end{aligned}$$

If \(\mathcal {K}\) is given, we also say that the logic \(\mathrm {L}\) having the same type \(\tau \) as \(\mathcal {K}\), whose consequence relation \(\vdash _{\mathrm {L} }\) is defined as in the previous display, is the D-assertional logic of \(\mathcal {K}\). If D is the singleton \(\{ x \approx c \}\), for c a constant in \(\tau \), we say that L is the c-assertional logic of \(\mathcal {K}\).

Given an equation \(\varphi \approx \psi \) and a set of formulas in two variables \(E=\left\{ \gamma _{j}\left( x,y\right) \right\} _{j\in J}\), we use the abbreviation

$$\begin{aligned} E\left( \varphi ,\psi \right) =\left\{ \gamma _{j}\left( \varphi /x ,\psi /y \right) \right\} _{j\in J}\text {.} \end{aligned}$$

E will be also regarded as a function mapping equations to sets of formulas, and called an equation-formula translation.

A logic \(\mathrm {L}=(\tau ,\vdash _{\mathrm {L}})\) is said to be algebraisable with equivalent algebraic semantics \(\mathcal {K}\) (where \(\mathcal {K}\) is a class of \(\tau \)-algebras) iff there exist a formula-equation translation D, and an equation-formula translation E, such that the following conditions hold for any \(\varphi ,\psi \in T_{\tau }(X) \), for any \(\Gamma \subseteq T_{\tau }(X) \) and for any \(\Sigma \subseteq T_{\tau }(X) ^{2}\):

  1. AL1:

    \(\Gamma \vdash _{\mathrm {L}}\varphi \) iff \(D(\Gamma )\vdash _{Eq\left( \mathcal {K}\right) } D(\varphi )\);

  2. AL2:

    \(\Sigma \vdash _{Eq\left( \mathcal {K}\right) }\varphi \approx \psi \) iff \(E\left( \Sigma \right) \vdash _{\mathrm {L}} E\left( \varphi ,\psi \right) \);

  3. AL3:

    \(\varphi \dashv \vdash _{\mathrm {L}}E\left( D(\varphi )\right) \);

  4. AL4:

    \(\varphi \approx \psi \dashv \vdash _{Eq\left( \mathcal {K}\right) }D(E\left( \varphi ,\psi \right) )\).

The mappings D(x) and E(xy) are respectively called a system of defining equations and a system of equivalence formulas for \(\mathrm {L}\) and \(\mathcal {K}\). A logic \(\mathrm {L}\) is algebraisable (tout court) iff, for some \(\mathcal {K}\), it is algebraisable with equivalent algebraic semantics \(\mathcal {K}\). By virtue of (Blok and Pigozzi 1989, Corollary 2.11), at least in the finitary case, we may assume without loss of generality that \(\mathcal {K}\) is a quasivariety; in other words, \(\mathcal {K}\) is an equivalent quasivariety semantics for L.

In their article on assertionally equivalent quasivarieties (Blok and Raftery 2008), Blok and Raftery introduce a notion of D-class which relativises the usual notion of a congruence class to a given formula-equation translation D. If \(\mathbf {A}\) is a \(\tau \)-algebra, \(\theta \subseteq A^{2}\) and \(D=\left\{ \delta _{i}\left( x\right) \approx \epsilon _{i}\left( x\right) :i\le n\right\} \) is a formula-equation translation in the type \(\tau \), the D-class of \(\theta \) in \(\mathbf {A}\) — in symbols \(D^{\mathbf {A}}/\theta \) — is defined as

$$\begin{aligned} D^{\mathbf {A}}/\theta =\left\{ a\in \mathbf {A}:\left( \delta _{i} ^{\mathbf {A}}\left( a\right) ,\epsilon _{i}^{\mathbf {A}}\left( a\right) \right) \in \theta \text { for every }i\le n\right\} \text {.} \end{aligned}$$

Observe that for \(D=\{ x \approx c \}\), \(D^{\mathbf {A}}/\theta \) is simply the \(\theta \)-congruence class of \(c^{\mathbf {A}}\). This justifies the next generalisation of point regularity: a variety \(\mathcal {V}\) is D-regular if in any \(\mathbf {A} \in \mathcal {V}\), no two different congruences share a D-class. The following theorem holds (see Blok and Raftery 1999; Barbour and Raftery 2003; Blok and Raftery 2008):

Theorem 2

For \(\mathcal {V}\) a variety of type \(\tau \), the following are equivalent:

  1. 1.

    \(\mathcal {V}\) is D-regular;

  2. 2.

    The D-assertional logic of \(\mathcal {V}\) is algebraisable with \(\mathcal {V}\) as equivalent variety semantics.

  3. 3.

    There are binary \(\tau \)-formulas \(\varphi _{1}, \ldots ,\varphi _{n}\) such that for all \(i\le n\), \(x\approx y\dashv \vdash _{Eq\left( \mathcal {V}\right) }D(\varphi _{i}\left( x,y\right) )\).

The set U of binary \(\tau \)-formulas in the preceding theorem is said to witness D-regularity for \(\mathcal {V}\).

The D-assertional logic of a D-regular variety \(\mathcal {V}\), noted \(\mathcal {S} \left( \mathcal {V}, D \right) \), can be effectively axiomatised provided an axiomatisation of \(\mathcal {V}\) and a system of equivalence formulas for \(\mathcal {S} \left( \mathcal {V}, D \right) \) and \(\mathcal {V}\) are both known (Blok and Raftery 2008, Thm. 8.0.9):

Theorem 3

Let \(\mathcal {V}\) be a D-regular variety of type \(\tau \), and let \(E\left( x,y\right) \) be a system of equivalence formulas for \(\mathrm {L}=\mathcal {S} \left( \mathcal {V}, D \right) \) and \(\mathcal {V}\). Then \(\mathrm {L}\) is axiomatised by the following axioms and rules:

  1. A1

    \(\vdash _{\mathrm {L}}E\left( \varphi ,\varphi \right) \);

  2. A2

    \(\varphi ,E\left( \varphi ,\psi \right) \vdash _{\mathrm {L}}\psi \);

  3. A3

    \(E\left( \varphi ,\psi \right) \vdash _{\mathrm {L}}E\left( \psi ,\varphi \right) \);

  4. A4

    For each k-ary \(\tau \)-connective \(f^{k}\), \(\bigcup \nolimits _{i\le k}E\left( \varphi _{i},\psi _{i}\right) \vdash _{\mathrm {L}}E\left( f^{k}\left( \overrightarrow{\varphi }\right) ,f^{k}\left( \overrightarrow{\psi }\right) \right) \);

  5. A5

    \(\varphi \dashv \vdash _{\mathrm {L}}E\left( D\left( \varphi \right) \right) \);

  6. A6

    For each axiom \(\varphi \approx \psi \) of \(\mathcal {V}\),

    $$\begin{aligned} E\left( \varphi ,\psi \right) \text {.} \end{aligned}$$

Observe that, if \(D=\{ x \approx c \}\) and the set U witnessing c-regularity is also a singleton, then the set of equivalence formulas \(E\left( x,y\right) \) can be taken to be U.

2.5 Equipollent Logical Systems

Two logical systems are equipollent whenever there exist uniform translations between the two logical languages that induce an isomorphism on the corresponding theory lattices (the interested reader is referred to Caleiro and Gonçalves (2007), Gyuris (1999), Smiley (1962) for a comprehensive account).

Throughout the sequel, we fix a set \(\Xi = \{\xi _i\}_{i\in \omega }\) of metavariables.

Definition 9

(Caleiro and Gonçalves 2007, Definition 2.4) Given types \(\tau _1\) and \(\tau _2\), a type morphism \(h : \tau _1\rightarrow \tau _2\) is determined by a denumerable family of functions \(\{h_n : (\tau _1)^n \rightarrow T_{\tau _2}(\{\xi _1,\ldots ,\xi _n\})\}_{n\in \omega }\) and by a formula \(h^*(x)\in T_{\tau _2}(x)\), for every propositional variable \(x\in X\).

Given a type morphism \(h : \tau _1\rightarrow \tau _2\), we can define its extension \(h : T_{\tau _1}(X)\rightarrow T_{\tau _2}(X)\) inductively, as follows:

  1. 1.

    \(h(x)=h^*(x)\), for every propositional variable \(x\in X\);

  2. 2.

    \(h(c)=h_0(c)\), for every nullary operator \(c\in \tau ^0\);

  3. 3.

    \(h(f(\phi _1,\ldots ,\phi _n)) = h_n(f)(h(\phi _1)/\xi _1,\ldots ,h(\phi _n)/\xi _n)\) for every \(f\in \tau _1^n\) and every \(\phi _1,\ldots ,\phi _n\in T_{\tau _1}(X)\).

The formula \(h_n(f)(h(\phi _1)/\xi _1,\ldots ,h(\phi _n)/\xi _n)\) is obtained from \(h_n(f)\) by simultaneously replacing each occurrence of \(\xi _i\) in \(h_n(f)\) by \(h(\phi _i)\), for every \(1\le i\le n\).

Definition 10

(Caleiro and Gonçalves 2007, Definition 2.5, Proposition 4.3) Let \(\mathrm {L}_1 =(\tau _1, \vdash _1)\) and \(\mathrm {L}_2 =(\tau _2, \vdash _2)\) be logics.

  1. 1.

    A logical morphism \(h : \mathrm {L}_1\rightarrow \mathrm {L}_2\) is a type morphism \(h : \tau _1\rightarrow \tau _2\) such that

    $$\begin{aligned} \Gamma \vdash _1 \phi \Rightarrow h[\Gamma ]\vdash _2 h(\phi ), \end{aligned}$$

    for every \(\Gamma \subseteq T_{\tau _1}(X)\).

  2. 2.

    A logical morphism \(h : \mathrm {L}_1\rightarrow \mathrm {L}_2\) is called strong if

    $$\begin{aligned} \Gamma \vdash _1 \phi \Leftrightarrow h[\Gamma ]\vdash _2 h(\phi ), \end{aligned}$$

    for every \(\Gamma \subseteq T_{\tau _1}(X)\).

  3. 3.

    \(\mathrm {L}_1\) and \(\mathrm {L}_2\) are (strongly) equipollent if and only if there exist (strong) logical morphisms \(h : \mathrm {L}_1\rightarrow \mathrm {L}_2\) and \(g : \mathrm {L}_2\rightarrow \mathrm {L}_1\) such that the following two conditions hold, for every \(\phi \in T_{\tau _1}(X)\) and \(\psi \in T_{\tau _2}(X)\):

    $$\begin{aligned} \phi \equiv _{\mathrm {L}_1} g(h(\phi ));\qquad \psi \equiv _{\mathrm {L}_2}h(g(\psi )). \end{aligned}$$

Lemma 1

(Caleiro and Gonçalves 2007, Section 4) If \(\mathrm {L}_1\) and \(\mathrm {L}_2\) are equipollent logical systems, then the lattice \(Th(\mathrm {L}_1)\) of \(\mathrm {L}_1\)-theories is isomorphic to the lattice \(Th(\mathrm {L}_2)\) of \(\mathrm {L}_2\)-theories.

Definition 11

If \(\mathrm {L}_1=(\tau _1, \vdash _1)\) and \(\mathrm {L}_2=(\tau _2, \vdash _2)\) are logics, we say that \(\mathrm {L}_2\) is a conservative expansion of \(\mathrm {L}_1\) if there exists a strong logical morphism \(h:\mathrm {L}_1 \rightarrow \mathrm {L}_2\), whose expansion \(h : T_{\tau _1}(X)\rightarrow T_{\tau _2}(X)\) satisfies \(h(x)=x\), for every propositional variable \(x\in X\).

3 Church Algebras of Finite Dimension

In this section we introduce algebras having n designated elements \({{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\) (\(n\ge 2\)) and an operation q of arity \(n+1\) (a sort of “generalised if-then-else”) satisfying \(q({{\mathsf {e}}}_i,x_1,\ldots ,x_n)=x_i\). The operator q induces, through the so-called n-central elements, a decomposition of the algebra into n factors. These algebras will be called Church algebras of dimension n.

Definition 12

An algebra \(\mathbf {A}\) of type \(\tau \) is a Church algebra of dimension n (a \(n\mathrm {CA}\), for short) if there are term definable elements \({{\mathsf {e}}}_{1}^{\mathbf {A}},{{\mathsf {e}}}_{2}^{\mathbf {A}},\ldots ,{{\mathsf {e}}}_{n}^{\mathbf {A}}\in A\) and a term operation \(q^{\mathbf {A}}\) of arity \(n+1\) such that, for all \( b_{1},\ldots ,b_{n}\in A\) and \(1\le i\le n\), \(q^{\mathbf {A}}({{\mathsf {e}}}_{i}^{\mathbf { A}},b_{1},\ldots ,b_{n})=b_{i}\). A variety \(\mathcal {V}\) of type \(\tau \) is a variety of algebras of dimension n if every member of \(\mathcal {V}\) is a \(n\mathrm {CA}\) with respect to the same terms \(q,{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n}\).

If \(\mathbf {A}\) is a \(n\mathrm {CA}\), then \(\mathbf {A}_{0}=(A,q^{\mathbf {A}},{{\mathsf {e}}}^{\mathbf {A}}_{1},\ldots ,{{\mathsf {e}}}_{n}^{\mathbf {A}})\) is the pure reduct of \(\mathbf {A}\).

Church algebras of dimension 2 were introduced as Church algebras in Manzonetto and Salibra (2008) and studied in Salibra et al. (2013). Examples of Church algebras of dimension 2 are Boolean algebras (with \(q(x,y,z) =(x\wedge z)\vee (\lnot x\wedge y)\)) or rings with unit (with \(q( x,y,z) =xz+y-xy\)). Next, we list some relevant examples of Church algebras having dimension greater than 2.

Example 1

(Free algebras) Let \(\tau \) be a type and \(X=\{x_1,\ldots ,x_n\}\) be a finite set of variables. For all \({{\phi }}, { {\psi }}_{1}, \ldots , {{ {\psi }}}_{n}\) in the term algebra \(\mathbf {T}_{\tau }( X)\), we define:

$$\begin{aligned} q( {\phi }, {\psi }_{1},\ldots , {\psi }_{n}) = {\phi }\left[ {\psi }_{1}/x_{1},\ldots , {\psi }_{n}/x_{n}\right] \text {,} \end{aligned}$$

where \( {\phi }\left[ {\psi }_{1}/x_{1},\ldots , {\psi }_{n}/x_{n}\right] \) denotes the term obtained from \( {\phi }\) by replacing each occurrence of \(x_{i}\) by \( {\psi }_{i}\), for all i. If \(\mathcal {V}\) is any variety of algebras of type \(\tau \) and \({\mathbf {T}}_{\mathcal {V}}(X)\) is the free \({\mathcal {V}}\)-algebra over X, this operation is well-defined on equivalence classes of terms in \({\mathbf {T}}_{\mathcal {V}}(X)\) and turns \({\mathbf {T}}_{\mathcal {V}}(X)\) into a \(n\mathrm {CA}\), with respect to q and \(x_1,\ldots ,x_n\).

Example 2

(n-Sets) Let X be a set. A n-subset of X is a sequence \((Y_{1},\ldots ,Y_{n})\) of subsets \(Y_{i}\) of X. We denote by \(\mathrm {Set}_{n}(X)\) the family of all n-subsets of X. \(\mathrm {Set}_{n}(X)\) can be viewed as the universe of a Boolean vector space over the powerset \({\mathcal {P}}(X)\) with respect to the following operations:

$$\begin{aligned} (Y_{1},\ldots ,Y_{n})+(Z_{1},\ldots ,Z_{n})=(Y_{1}\cup Z_{1},\ldots ,Y_{n}\cup Z_{n}) \end{aligned}$$

and, for every \(Z\subseteq X\),

$$\begin{aligned} Z(Y_{1},\ldots ,Y_{n})=(Z\cap Y_{1},\ldots ,Z\cap Y_{n}). \end{aligned}$$

\(\mathrm {Set}_{n}(X)\) is freely generated by the n-sets \({{\mathsf {e}}}_{1}=(X,\emptyset ,\ldots ,\emptyset ),\ldots , {{\mathsf {e}}}_n=(\emptyset ,\ldots ,\emptyset ,X)\). Thus, an arbitrary n-set \((Y_{1},\ldots ,Y_{n})\) has the canonical representation \(Y_{1}{{\mathsf {e}}}_1+\cdots +Y_{n}{{\mathsf {e}}}_n\) as a vector. An explicit description of the q operator is as follows, for all \(\mathbf {y}^{i}= Y^i_{1}{{\mathsf {e}}}_1+\cdots +Y^i_{n}{{\mathsf {e}}}_n\):

$$\begin{aligned} q ( \mathbf {y}^0,\mathbf {y}^1,\ldots ,\mathbf {y}^n) =(\bigcup \limits _{i=1}^{n}Y^0_{i}\cap Y_{1}^{i},\ldots ,\bigcup \limits _{i=1}^{n}Y^0_{i}\cap Y_{n}^{i}). \end{aligned}$$

Congruences are notoriously irksome objects in algebra. Therefore, considerable advantage is gained whenever one can find more manageable concepts that can act in their stead — like normal subgroups in the variety of groups, or, more generally, ideals in any ideal-determined variety (Gumm and Ursini 1984). In Vaggione (1996), Vaggione introduced the notion of a central element to study algebras whose complementary factor congruences can be replaced by certain elements of their universes. If a neat description of such elements is available, one usually gets important insights into the structure theories of the algebras at issue. To list a few examples, central elements coincide with central idempotents in rings with unit, with complemented elements in \(FL_{ew}\)-algebras, which form the equivalent algebraic semantics of the full Lambek calculus with exchange and weakening, and with members of the centre in ortholattices. In Salibra et al. (2013), T. Kowalski and three of the present authors investigated central elements in Church algebras of dimension 2. Here, we generalise the idea to Church algebras of arbitrary finite dimension.

We omit the proof of the next characterisation of n-central elements, which follows closely the proof for the 2-dimensional case given in (Salibra et al. 2013, Proposition 3.6).

Theorem 4

If \(\mathbf {A}\) is a \(n\mathrm {CA}\) of type \(\tau \) and \(c\in A\), then the following conditions are equivalent:

  1. 1.

    c is a factor element (w.r.t. q) satisfying the identity \(q(c,{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n})=c\);

  2. 2.

    the sequence of congruences \((\theta (c,{{\mathsf {e}}}_{1}),\ldots ,\theta (c,{{\mathsf {e}}}_n))\) is a n-tuple of complementary factor congruences of \(\mathbf {A}\);

  3. 3.

    for all \(a_{1},\ldots ,a_{n}\in A\), \(q(c,a_{1},\ldots ,a_{n})\) is the unique element such that

    $$\begin{aligned} a_{i}\ \theta (c,{{\mathsf {e}}}_{i})\ q(c,a_{1},\ldots ,a_{n}), \end{aligned}$$

    for all \(1\le i\le n\);

  4. 4.

    The function \(f_{c}\), defined by \(f_{c}(a_{1},\ldots ,a_{n})=q(c,a_{1},\ldots ,a_{n})\) for all \(a_1,\ldots ,a_n\in A\), is a n-ary decomposition operator on \(\mathbf {A}\) such that \(f_{c}({{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n})=c.\)

Definition 13

If \(\mathbf {A}\) is a \(n\mathrm {CA}\), then \(c\in A\) is called n-central if it satisfies one of the equivalent conditions of Theorem 4. A n-central element c is nontrivial if \(c\notin \{{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n}\}\).

Every n-central element \(c\in A\) induces a decomposition of \(\mathbf {A}\) as a direct product of the algebras \(\mathbf {A}/\theta (c,{{\mathsf {e}}}_{i})\), for \(i\le n\). The following proposition characterises the algebraic structure of n-central elements.

Proposition 1

Let \(\mathbf {A}\) be a \(n\mathrm {CA}\). Then the set of all n-central elements of \(\mathbf {A}\) is a subalgebra of the pure reduct of \(\mathbf {A}\).

Proof

Let \(a,c_1,\ldots c_n\) be n-central elements. It is sufficient to prove that \(q(a,c_1,\ldots c_n)\) is also a n-central element, i.e., the function \(q(q(a,c_1,\ldots c_n),-,\ldots ,-)\) is a decomposition operator satisfying \(q(q(a,c_1,\ldots c_n),{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n)= q(a,c_1,\ldots c_n)\). \(\square \)

Hereafter, we denote by \(\mathbf {Ce}_{n}(\mathbf {A})\) the algebra \((\mathrm {Ce}_{n}(\mathbf {A}),q,{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n})\) of all n-central elements of a \(n\mathrm {CA}\) \(\mathbf {A}\).

4 Boolean-Like Algebras of Finite Dimension

Boolean algebras are Church algebras of dimension 2 all of whose elements are 2-central. It turns out that, among the n-dimensional Church algebras, those algebras all of whose elements are n-central inherit many of the remarkable properties that distinguish Boolean algebras. We now zoom in on such algebras, which will take centre stage in this section.

Definition 14

A \(n\mathrm {CA}\) \(\mathbf {A}\) is called a Boolean-like algebra of dimension n (\(n\mathrm {BA}\), for short) if every element of A is n-central.

The class of all \(n\mathrm {BA}\)s of type \(\tau \) is a variety axiomatised by the following identities:

\( (\mathbf {B0})\):

\(q({{\mathsf {e}}}_i,x_1,\ldots ,x_n) \approx x_i\) (\(i=1,\ldots ,n\)).

\( (\mathbf {B1})\):

\(q(y,x,\ldots ,x) \approx x\).

\( (\mathbf {B2})\):

\(q(y, q(y, x_{11},x_{12},\ldots ,x_{1n}),\ldots ,q(y,x_{n1},x_{n2},\ldots ,x_{nn}))\approx q(y,x_{11},\ldots ,x_{nn})\).

\( (\mathbf {B3})\):
$$\begin{aligned} \begin{aligned} q(y,f(x_{11},\ldots ,x_{1k}),\ldots , f(x_{n1},\ldots ,x_{nk})) \approx&\\ f(q(y, x_{11},\ldots ,x_{n1}),\ldots ,&q(y, x_{1k},\ldots ,x_{nk})), \end{aligned} \end{aligned}$$

for every \(f\in \tau \) of arity k.

\((\mathbf {B4})\):

\(q(y,{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n) \approx y\).

If \(\mathbf {A}\) is a \(n\mathrm {BA}\), then \(\mathbf {A}_{0}=(A,q^{\mathbf {A}},{{\mathsf {e}}}^{\mathbf {A}}_{1},\ldots ,{{\mathsf {e}}}_{n}^{\mathbf {A}})\) is the pure reduct of \(\mathbf {A}\). For all \(2\le n<\omega \), we henceforth let \(\nu _{n}\) be the type \((q,{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n})\) of pure nBAs.

In the following lemma we recall from (Bucciarelli and Salibra 2019, Lemma 3.8) that every nontrivial nBA has at least n elements.

Lemma 2

The constants \({{\mathsf {e}}}_i\) (\(1\le i\le n\)) are pairwise residually distinct in every nontrivial \(n\mathrm {BA}\).

By Proposition 1, the algebra \(\mathbf {Ce}_{n}(\mathbf {A})\) of all n-central elements of a \(n\mathrm {CA}\) \(\mathbf {A}\) is a canonical example of pure \(n\mathrm {BA}\).

Boolean-like algebras of dimension 2 were introduced in Salibra et al. (2013) with the name “Boolean-like algebras”. Inter alia, it was shown in that paper that the variety of pure Boolean-like algebras of dimension 2 is term-equivalent to the variety of Boolean algebras.

Example 3

The algebra \(\mathbf {n}=( \{ {\mathsf {e}}_{1},\ldots ,{\mathsf {e}}_{n}\} ,q^{\mathbf {n}},{\mathsf {e}}^\mathbf {n}_{1},\ldots ,{\mathsf {e}}^\mathbf {n}_{n})\), where

$$\begin{aligned} q^{\mathbf {n}}({\mathsf {e}}_{i},x_{1},\ldots ,x_{n}) =x_{i} \end{aligned}$$

for every \(i\le n\), is a pure \(n\mathrm {BA}\).

Example 4

(n-Partitions) Let X be a set. A n-partition of X is a n-subset \((Y_{1},\ldots ,Y_{n})\) of X such that \(\bigcup _{i=1}^{n}Y_{i}=X\) and \(Y_{i}\cap Y_{j}=\emptyset \) for all \(i\ne j\). The set of n-partitions of X is closed under the q-operator defined in Example 2 and determines the algebra of n-central elements of the Boolean vector space \(\mathrm {Set}_{n}(X)\) of all n-subsets of X. Notice that the algebra of n-partitions of X, denoted by \(\mathbf {Par}(X)\), is isomorphic to the \(n\mathrm {BA}\) \(\mathbf {n}^X\).

The structure theory of Boolean algebras is as good as it gets. The variety \(\mathcal {BA}\) of Boolean algebras is in particular semisimple as every \(\mathbf {A}\in \mathcal {BA}\) is subdirectly embeddable into a power of the 2-element Boolean algebra, which is the only directly indecomposable (hence, the only subdirectly irreducible and the only simple) member of \(\mathcal {BA}\). By and large, all these properties find some analogue in the structure theory of \(n\mathrm {BA}\)s. For a start, we show that all subdirectly irreducible \(n\mathrm {BA}\)s have the same finite cardinality.

Lemma 3

For an \(n\mathrm {BA}\) \(\mathbf {A}\), the following are equivalent:

  1. (i)

    \(\mathbf {A}\) is simple;

  2. (ii)

    \(\mathbf {A}\) is subdirectly irreducible;

  3. (iii)

    \(\mathbf {A}\) is directly indecomposable;

  4. (iv)

    \(|A|=n\).

Proof

We prove the nontrivial implications.

((iv) implies (i)) We show that every nBA \(\mathbf {A}\) with n elements is simple. If \(\theta \) is a congruence on \(\mathbf {A}\) such that \({{\mathsf {e}}}_{i}\theta {{\mathsf {e}}}_{j}\), for some \(i\ne j\), then

$$\begin{aligned} x=q({{\mathsf {e}}}_{i},\ldots ,x,\ldots ,y,\ldots )\theta q({{\mathsf {e}}}_{j},\ldots ,x,\ldots ,y,\ldots )=y \end{aligned}$$

for arbitrary xy. Then \(\mathbf {A}\) is a simple algebra.

((iii) implies (iv)) If \(|A|>n\), then there exists an \(a\in A\) such that \(a\ne {{\mathsf {e}}}_{i}\) for every \( i\le n\). Since a is a nontrivial n-central element of \(\mathbf {A}\), it gives rise to a decomposition of \(\mathbf {A}\) into \(n\ge 2\) factors. Then \( \mathbf {A}\) is directly decomposable. \(\square \)

As a direct consequence of the previous lemma, we get:

Theorem 5

Any variety \(\mathcal {V}\) of \(n\mathrm {BA}\)s is generated by the finite set \(\{\mathbf {A}\in \mathcal {V}:|A|=n\}\). In particular, the variety of pure \(n\mathrm {BA}\)s is generated by the algebra \(\mathbf {n}\).

Notice that, if a \(n\mathrm {BA}\) \(\mathbf {A}\) has a minimal subalgebra \(\mathbf {E}\) of cardinality n, then \({V}(\mathbf {A})={V}(\mathbf {E})\). However, we cannot assume that any two n-element algebras in an arbitrary variety \(\mathcal {V}\) of nBAs are isomorphic, for such algebras may have further operations over which we do not have any control.

The next corollary shows that, for any \(n\ge 2\), the \(n\mathrm {BA}\) \( \mathbf {n}\) plays a role analogous to the Boolean algebra \(\mathbf {2}\) of truth values.

Corollary 1

(i) Every \(n\mathrm {BA}\) \(\mathbf {A}\) is isomorphic to a subdirect product of \(\mathbf {B}_{1}^{I_{1}}\times \ldots \times \mathbf {B}_{k}^{I_{k}}\) for some sets \(I_{1},\ldots ,I_{k}\) and some \(n\mathrm {BA}\)s \(\mathbf {B}_{1},\ldots ,\mathbf {B}_{k}\) of cardinality n; (ii) Every pure \(n\mathrm {BA}\) \(\mathbf {A}\) is isomorphic to a subdirect power of \(\mathbf {n}^{I}\), for some set I.

Proof

(i) Apply Lemma 3, Theorem 5 and Birkhoff’s subdirect representation theorem to the variety generated by \(\mathbf {A}\). (ii) By (i) and by \(\mathbf {A}\in V({\mathbf {n}})\). \(\square \)

A subalgebra of the nBA \(\mathbf {Par}(X)\) of the n-partitions on a set X, defined in Example 4, is called a field of n-partitions on X. The Stone representation theorem for nBAs follows.

Corollary 2

Any pure \(\mathrm {nBA}\) is isomorphic to a field of n-partitions on a suitable set X.

One of the most remarkable properties of the 2-element Boolean algebra, called primality in universal algebra (Burris and Sankappanavar 1981, Section 7 in Chap. IV), is the definability of all finite Boolean functions in terms of a certain set of term operations, e.g. the connectives and, or, not. This property is inherited by nBAs. We prove that an algebra of cardinality n is primal if and only if it is a \(n\mathrm {BA}\), so that every variety generated by a n-element primal algebra is a variety of \(n\mathrm {BA}\)s.

Definition 15

Let \(\mathbf {A}\) be a nontrivial \(\tau \)-algebra. \(\mathbf {A}\) is primal if it is of finite cardinality and, for every function \(f:A^{n}\rightarrow A\) (\(n\ge 0\)), there is a \(\tau \)-formula \(\varphi (x_1,\ldots ,x_n)\) such that for all \(a_{1},\ldots ,a_{n}\in A\), \(f( a_{1},\ldots ,a_{n}) =\varphi ^{\mathbf {A}}(a_{1},\ldots ,a_{n})\). A variety \({\mathcal {V}}\) is primal if \({\mathcal {V}}= V({\mathbf {A}})\) for a primal algebra \({\mathbf {A}}\).

Definition 16

A \(\nu _n\)-formula is a head normal form (hnf, for short) if it is defined according to the following grammar: \(\varphi ,\varphi _i ::= {{\mathsf {e}}}_i\ |\ x\ |\ q(x,\varphi _1,\ldots ,\varphi _n)\), where x is an arbitrary variable. The occurrence of the variable x in the hnf \(\varphi \equiv q(x,\varphi _1,\ldots ,\varphi _n)\) is called head occurrence of x into \(\varphi \).

Lemma 4

Let \(\mathbf {A}\) be a finite \(n\mathrm {BA}\) of cardinality n. Then, for every function \(f:A^{k}\rightarrow A\), there exists a canonical hnf \(\varphi \) such that \(f=\varphi ^{\mathbf {A}}\).

Proof

Since \(\mathbf {A}\) is a \(n\mathrm {BA}\) of cardinality n, then \(A=\{{{\mathsf {e}}}^{\mathbf {A}}_{1},\ldots ,{{\mathsf {e}}}^{\mathbf {A}}_{n}\}\). We show by induction on k that every function \(f:A^{k}\rightarrow A\) is term-definable in \(\mathbf {A}\). If \(f:A\rightarrow A \) is a unary function, then we define \(f(x)=q^{\mathbf {A}}(x,f({{\mathsf {e}}}^{\mathbf {A}}_{1}),f({{\mathsf {e}}}^{\mathbf {A}}_{2}),\ldots\ldots ,f({{\mathsf {e}}}^{\mathbf {A}}_{n}))\). If \(f:A\times A^{k}\rightarrow A\) is a function of arity \(k+1\), then by induction hypothesis, for each \({{\mathsf {e}}}^{\mathbf {A}}_{i}\in A\), there exists a formula \(\varphi _{i}(x_{1},\ldots ,x_{k})\) such that \(f({{\mathsf {e}}}^{\mathbf {A}}_{i},a_{1},\ldots ,a_{k})=\varphi _{i}^{\mathbf {A}}(a_{1},\ldots ,a_{k})\) for all \(a_{j}\in A\). Then we have: \(f(a,b_{1},\ldots ,b_{k})=q^{\mathbf {A}}(a,\varphi _{1}^{\mathbf {A}}(b_{1},\ldots ,b_{k}),\ldots ,\varphi _{n}^{\mathbf {A}}(b_{1},\ldots ,b_{k}))\). \(\square \)

The following theorem is a trivial application of Lemma 4.

Theorem 6

Let \(\mathbf {A}\) be a finite \(\tau \)-algebra of cardinality n. Then \({\mathbf {A}}\) is primal if and only if it is a \(n\mathrm {BA}\).

It follows that, if \(\mathbf {A}\) is a primal algebra of cardinality n, then the variety generated by \(\mathbf {A}\) is a variety of \(n\mathrm {BA}\)s. Notice that varieties of nBAs generated by more than one algebra are not primal.

We would like to point out here that when an algebra \({\mathbf {A}}\) is primal, the choice of fundamental operations is a matter of taste and convenience (since any functionally complete set of operations would do the job), and hence is typically driven by applications.

Example 5

(The primal variety of n-valued Post algebras) An algebra \((A,\vee ,\wedge ,^{\prime },0,1)\) of type \(\left( 2,2,1,0,0\right) \) is a n-valued Post algebra if it satisfies every identity satisfied by the algebra \(\mathbf {P}_{n}=(P_{n},\vee ,\wedge ,^{\prime },0,1)\), where \(P_{n}\) is the chain \(0<n-1<n-2<\cdots<2<1\), and \(0^{\prime }=1\), \(1^{\prime } =2,\ldots ,(n-2)^{\prime }=n-1,(n-1)^{\prime }=0\). Writing \(x^{(k)}\) for the result of k successive applications of \(^{\prime }\) to x, every n-valued Post algebra is a \(n\mathrm {BA}\) with respect to

$$\begin{aligned} q(x,y_{0},\ldots ,y_{n-1})=\bigvee _{\begin{array}{c} i=0 \end{array}}^{n-1}y_{i}\wedge g(g(x,i),1), \end{aligned}$$

where

$$\begin{aligned} g(x,i)=[\bigwedge _{1\le j\le n-1}(\bigwedge _{1\le k\le n}x^{(k)}\vee i^{(k)})^{(j)}]^{\prime }= {\left\{ \begin{array}{ll} 0 &{} \text {if }x=i\\ 1 &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

is a term operation on \(\mathbf {P}_{n}\) for each \(0\le i\le n-1\).

For later use, the reader is reminded that the discriminator function on a set A is the ternary function

$$\begin{aligned} t \left( a,b,c \right) = {\left\{ \begin{array}{ll} c &{} \text {if } a = b; \\ a, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

A variety \(\mathcal {V}\) of type \(\tau \) is a discriminator variety if there is a ternary \(\tau \)-formula \(\varphi \left( x,y,z \right) \) that realises the discriminator function on any subdirectly irreducible member of \(\mathcal {V}\). Clearly, primal varieties are discriminator varieties.

5 The logics nCL

For every natural number \(n\ge 2\), the algebra \(\mathbf {n}\) naturally gives rise to a tabular logic \(n\mathrm {CL}_F=(\nu _n, \vdash _{(\mathbf {n},F)})\), for each \(\emptyset \ne F\subsetneq \{{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\}\). These logics have a unique connective q of arity \(n+1\) and generalise classical propositional logic \(\mathrm {CL}\). As a matter of fact, the logic \(2\mathrm {CL}_{{{\mathsf {e}}}_2}=(\nu _2, \vdash _{{{\mathsf {e}}}_2})\), where \(1={{\mathsf {e}}}_2\) and \(0={{\mathsf {e}}}_1\), is nothing else than \(\mathrm {CL} \) with a different choice of primitive connectives. For these reasons, for all \(2\le n<\omega \), the logic \(n\mathrm {CL}_F=(\nu _n, \vdash _{(\mathbf {n},F)})\) will be called classical logic of dimension n and designated elements F. In this and the next section we show:

  1. (i)

    The complete symmetry of the truth values \({{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\), supporting the idea that \(n\mathrm {CL}\) is the right generalisation of classical logic from dimension 2 to dimension n.

  2. (ii)

    The universality of \(n\mathrm {CL}\), by conservatively translating any n-valued tabular logic into it.

  3. (iii)

    The existence of a terminating and confluent term rewriting system (TRS, for short) to test the validity of \(\nu _n\)-formulas by rewriting. By the universality of \(n\mathrm {CL}\), in order to check whether a n-valued tabular logic satisfies a formula \(\phi \) it is enough to see whether the normal form of the translation \(\phi ^*\) is one of the designated values.

5.1 Equipollence

In this section we establish the complete symmetry of the truth values \({{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\), by showing that every permutation \(\sigma \) of the truth values determines, for every designated set F of truth values, a strong equipollence (see Caleiro and Gonçalves (2007)) between the tabular logic \(n\mathrm {CL}_F\) and the tabular logic \(n\mathrm {CL}_{\sigma F}\).

Let \({\mathbf {A}}\) be any algebra in the similarity type of \(n\mathrm {BA}\)s and \(\sigma ,\rho \) be permutations of \(1,\ldots ,n\). For any \(x\in A\), we define

$$\begin{aligned} x^{\sigma ^{\mathbf {A}}} = q^{\mathbf {A}}(x, {{\mathsf {e}}}^{\mathbf {A}}_{\sigma 1},\ldots ,{{\mathsf {e}}}^{\mathbf {A}}_{\sigma n}).\end{aligned}$$
(1)

If there is no ambiguity, we write \(x^{\sigma } = q(x, {{\mathsf {e}}}_{\sigma 1},\ldots ,{{\mathsf {e}}}_{\sigma n})\) for \(x^{\sigma ^{\mathbf {A}}} = q^{\mathbf {A}}(x, {{\mathsf {e}}}^{\mathbf {A}}_{\sigma 1},\ldots ,{{\mathsf {e}}}^{\mathbf {A}}_{\sigma n})\). We remark that \(({{\mathsf {e}}}_i)^\sigma =q({{\mathsf {e}}}_i, {{\mathsf {e}}}_{\sigma 1},\ldots ,{{\mathsf {e}}}_{\sigma n}) = {{\mathsf {e}}}_{\sigma i}\) in any \(n\mathrm {CA}\).

Lemma 5

Let \({\mathbf {A}}\) be a \(n\mathrm {BA}\). Then \({\mathbf {A}}\) satisfies the following conditions:

  1. (i)

    \((x^\sigma )^\rho = x^{\rho \circ \sigma }\);

  2. (ii)

    \(q(x,y_1,\ldots ,y_n)^\sigma = q(x,y_1^\sigma ,\ldots ,y_{n}^\sigma )\);

  3. (iii)

    \(q(x^\sigma ,y_1,\ldots ,y_n) = q(x,y_{\sigma 1},\ldots ,y_{\sigma n})\);

  4. (iv)

    The map \(x\mapsto x^\sigma \) is bijective with inverse map \(x\mapsto x^{\sigma ^{-1}}\).

Proof

$$\begin{aligned} \begin{array}{r lll} (x^\sigma )^\rho &{} =&{} q(q(x, {{\mathsf {e}}}_{\sigma 1},\ldots ,{{\mathsf {e}}}_{\sigma n}),{{\mathsf {e}}}_{\rho 1},\ldots ,{{\mathsf {e}}}_{\rho n})\\ &{}=&{} q(x, q({{\mathsf {e}}}_{\sigma 1}, {{\mathsf {e}}}_{\rho 1},\ldots ,{{\mathsf {e}}}_{\rho n}),\ldots ,q({{\mathsf {e}}}_{\sigma n}, {{\mathsf {e}}}_{\rho 1},\ldots ,{{\mathsf {e}}}_{\rho n}))&{} \text {by (B3)} \\ &{}=&{} q(x,{{\mathsf {e}}}_{\rho (\sigma 1)},\ldots ,{{\mathsf {e}}}_{\rho (\sigma n)})&{}\\ &{}=&{} x^{\rho \circ \sigma }.&{}\\ &{}&{}&{}\\ q(x, y_1,\ldots ,y_{n})^\sigma &{} =&{} q(q(x,y_1,\ldots ,y_{n}),{{\mathsf {e}}}_{\sigma 1},\ldots ,{{\mathsf {e}}}_{\sigma n})&{}\\ &{}=&{} q(x, y_1^\sigma ,\ldots , y_{n}^\sigma )&{}\text {by (B3)}\\ &{}&{}&{}\\ q(x^\sigma ,y_1,\ldots ,y_{n}) &{} =&{} q(q(x, {{\mathsf {e}}}_{\sigma 1},\ldots ,{{\mathsf {e}}}_{\sigma n}), y_1,\ldots ,y_{n}) &{}\\ &{} =&{} q(x, q({{\mathsf {e}}}_{\sigma 1}, y_1,\ldots ,y_{n}),\ldots ,q({{\mathsf {e}}}_{\sigma n}, y_1,\ldots ,y_{n}))&{} \text {by (B3)}\\ &{} =&{} q(x,y_{\sigma 1},\ldots ,y_{\sigma n}).&{}\\ &{}&{}&{}\\ (x^\sigma )^{\sigma ^{-1}} &{}=&{} x^{\sigma ^{-1}\circ \sigma }&{}\text {by (i)}\\ &{}=&{} x^{Id}= q(x,{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n)=x&{}\text {by (B4)} \end{array} \end{aligned}$$

\(\square \)

If \(\phi \) is a \(\nu _n\)-formula and \(\sigma \) is a permutation of \(1,\ldots ,n\), we define

$$\begin{aligned} \phi ^\sigma =q(\phi ,{{\mathsf {e}}}_{\sigma 1},\ldots , {{\mathsf {e}}}_{\sigma n}). \end{aligned}$$

We now restrict our attention to the algebra \({\mathbf {n}}\). If \(F\subseteq \{{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\}\) and \(\sigma \) is a permutation of \(1,\ldots ,n\), then we define

$$\begin{aligned} \sigma F = \{{{\mathsf {e}}}_{\sigma i}: {{\mathsf {e}}}_i\in F\}. \end{aligned}$$

Proposition 2

Let \(\sigma \) be a permutation and \(\emptyset \subsetneq F\subseteq \{{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\}\). Then the following conditions are equivalent:

  1. (i)

    \(\Gamma \vdash _{({\mathbf {n}}, F)}\phi \);

  2. (ii)

    \(\Gamma ^\sigma \vdash _{({\mathbf {n}}, \sigma F)}\phi ^\sigma \).

Proof

If \(g:\mathbf {T}_{\nu _n }(X) \rightarrow {\mathbf {n}}\) is a homomorphism, for every formula \(\psi \) we have: \(g(\psi ) = {{\mathsf {e}}}_i\) iff \(g(\psi ^\sigma ) =g(q(\psi ,{{\mathsf {e}}}_{\sigma 1},\ldots , {{\mathsf {e}}}_{\sigma n}))=q(g(\psi ),g({{\mathsf {e}}}_{\sigma 1}),\ldots , g({{\mathsf {e}}}_{\sigma n}))=q({{\mathsf {e}}}_i,{{\mathsf {e}}}_{\sigma 1},\ldots , {{\mathsf {e}}}_{\sigma n})={{\mathsf {e}}}_{\sigma i}\). \(\square \)

Example 6

Let \(\phi ,\psi \) be two formulas of classical logic CL and let \(\sigma \) be the permutation such that \(\sigma 1=2\) and \(\sigma 2=1\). Recalling that \({\mathsf {t}}={{\mathsf {e}}}_2\) and \({\mathsf {f}}={{\mathsf {e}}}_1\), we have \(\psi \vdash _{({\mathbf {2}}, {\mathsf {t}})}\phi \Leftrightarrow \psi ^\sigma \vdash _{({\mathbf {2}}, {\mathsf {f}})}\phi ^\sigma. \)

A permutation \(\sigma \) of \(1,\ldots ,n\) determines a type morphism \({\hat{\sigma }}: \nu _n\rightarrow \nu _n\) (see Definition 9) as follows:

$$\begin{aligned} {\hat{\sigma }}({{\mathsf {e}}}_k) = ({{\mathsf {e}}}_k)^\sigma \ (1\le k\le n) ;\quad {\hat{\sigma }}(x)=x^\sigma \ (x\in X);\quad {\hat{\sigma }}(q)=q((\xi _0)^{\sigma ^{-1}},\xi _1,\ldots ,\xi _n). \end{aligned}$$

We recall from Sect. 2.5 that, if \(q(\phi ,\psi _1,\ldots ,\psi _n)\) is a \(\nu _n\)-formula, then

$$\begin{aligned} {\hat{\sigma }}(q(\phi ,\psi _1,\ldots ,\psi _n))=q({\hat{\sigma }}(\phi )^{\sigma ^{-1}},{\hat{\sigma }}(\psi _1),\ldots ,{\hat{\sigma }}(\psi _n)). \end{aligned}$$

Lemma 6

Any \(n\mathrm {BA}\) satisfies the identity \({\hat{\sigma }}(\varphi ) = \varphi ^\sigma \).

Proof

The proof is by induction over the complexity of \(\varphi \). The basis is clear. We consider now the inductive step:

$$\begin{aligned} \begin{array}{llll} {\hat{\sigma }}(q(\phi ,\psi _1,\ldots ,\psi _n)) &{} = &{} q({\hat{\sigma }}(\phi )^{\sigma ^{-1}},{\hat{\sigma }}(\psi _1),\ldots ,{\hat{\sigma }}(\psi _n)) \\ &{} = &{} q((\phi ^\sigma )^{\sigma ^{-1}},\psi _1^\sigma ,\ldots ,\psi _n^\sigma )&{}\text {by induction} \\ &{} = &{} q(\phi ^{\sigma ^{-1}\circ \sigma },\psi _1^\sigma ,\ldots ,\psi _n^\sigma )&{}\text {by Lemma 5(i)} \\ &{} = &{} q(\phi ^{Id},\psi _1^\sigma ,\ldots ,\psi _n^\sigma )&{}\hbox { by}\ \sigma ^{-1}\circ \sigma = Id\\ &{} = &{} q(q(\phi ,{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n),\psi _1^\sigma ,\ldots ,\psi _n^\sigma )&{}\hbox { by definition of}\ \phi ^{Id}\\ &{} = &{} q(\phi ,\psi _1^\sigma ,\ldots ,\psi _n^\sigma )&{}\text {by (B4)} \\ &{}=&{} q(\phi ,\psi _1,\ldots ,\psi _n)^\sigma &{}\text {by Lemma 5(ii)} \end{array} \end{aligned}$$

\(\square \)

Lemma 7

Let FG be nonempty proper subsets of \(\{{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\}\) having the same cardinality and let \(\sigma \) be a permutation such that \(\sigma F=G\). Then the type morphism \({\hat{\sigma }}: \nu _n\rightarrow \nu _n\) is a strong logical morphism from \(n\mathrm {CL}_F=(\nu _n,\vdash _{({\mathbf {n}}, F)})\) into \(n\mathrm {CL}_{G}=(\nu _n,\vdash _{({\mathbf {n}}, G)})\).

Proof

By Lemma 6 and Proposition 2. \(\square \)

Proposition 3

Let FG be nonempty proper subsets of \(\{{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\}\) having the same cardinality. Then the tabular logics \(n\mathrm {CL}_F=(\nu _n,\vdash _{({\mathbf {n}}, F)})\) and \(n\mathrm {CL}_G=(\nu _n,\vdash _{({\mathbf {n}}, G)})\) are strongly equipollent.

Proof

Let \(\sigma \) be a permutation of \(1,\ldots ,n\) such that \(\sigma F=G\). Let \(\rho = \sigma ^{-1}\). Then \(\rho G = F\). By Lemma 7\({\hat{\sigma }}: n\mathrm {CL}_F\rightarrow n\mathrm {CL}_{G}\) and \(\hat{\rho }: n\mathrm {CL}_G\rightarrow n\mathrm {CL}_{F}\) are logical morphisms. It remains to prove that \(\phi \equiv _{n\mathrm {CL}_F} {\hat{\rho }}({\hat{\sigma }}(\phi ))\) and \(\phi \equiv _{n\mathrm {CL}_G}{\hat{\sigma }}({\hat{\rho }}(\phi ))\). The conclusion is trivial because \({\hat{\rho }}({\hat{\sigma }}(\phi ))=(\phi ^\sigma )^\rho =(\phi ^\sigma )^{\sigma ^{-1}} = \phi ^{Id}=\phi \) in every nBA. \(\square \)

Corollary 3

Under the assumptions of Proposition 3, the theory lattices of the logics \(n\mathrm {CL}_F\) and \(n\mathrm {CL}_G\) are isomorphic.

Definition 17

(Moraschini 2015, Definition 3.1) A finite non-trivial algebra \({\mathbf {A}}\) is everywhere strongly logifiable if the tabular logic determined by the matrix \(({\mathbf {A}}, F)\) is algebraisable, for every \(F\in {\mathcal {P}} (A)\setminus \{\emptyset , A\}\), with equivalent algebraic semantics the variety \({\mathcal {V}}({\mathbf {A}})\).

Proposition 4

  1. (i)

    The algebra \({\mathbf {n}}\) is everywhere strongly logifiable.

  2. (ii)

    For every nonempty proper subsets F of \(\{{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n \}\), the logic \(n\mathrm {CL}_F\) is algebraisable with equivalent algebraic semantics the variety \(n\mathrm {BA}\).

Proof

By (Moraschini 2015, Lemma 3.2) and the primality of \({\mathbf {n}}\). \(\square \)

5.2 A Hilbert calculus for the \(n\mathrm {CL}\) logics

In this short subsection we provide a Hilbert-style axiomatisation for the classical logics of dimension n with a single designated value \(e_{i}\). Basically, after observing that each variety \(V ( \mathbf {n} ) \) of pure nBAs is \(e_{i}\)-regular for all \(i\le n\), we apply Blok and Pigozzi’s algorithm (Theorem 3) to the axiomatisation of \(V ( \mathbf {n} ) \) given above immediately after Definition 14.

For \(\varphi ,\psi \in T_{\nu _n}\left( X\right) \), and for all \(i,j,k\le n\), we set:

  • \(\overline{e_{i}}\left[ e_{j}/k \right] =: e_{i},e_{i}, \ldots ,e_{j}, \ldots ,e_{i},e_{i} ( e_{j}\text { in }k\text {-th position);}\)

  • \(\varphi \leftrightarrow ^{i}\psi =:q\left( \varphi ,q\left( \psi ,\overline{e_{j}}\left[ e_{i}/1\right] \right) , \ldots ,q\left( \psi ,\overline{e_{j} }\left[ e_{i}/n\right] \right) \right) \).

Lemma 8

For all \(n<\omega \), and for all \(i\le n\), the variety \(V ( \mathbf {n} ) \) is \(e_{i}\)-regular and the formula \(\varphi \leftrightarrow ^{i}\psi \) witnesses \(e_{i}\)-regularity for \(V ( \mathbf {n} ) \).

Proof

By Theorem 6, \(V ( \mathbf {n} ) \) is a discriminator variety with discriminator formula

$$\begin{aligned} \varphi (x,y,z)=q(x,q(y,\overline{x}\left[ z/1\right] ), \ldots ,q(y,\overline{x}\left[ z/n\right] ))\text {.} \end{aligned}$$

Moreover, it is a double-pointed variety for every choice of \(e_{i}\) and \(e_{j}\). Then by (Salibra et al. 2013, Lemma 5.5) it is \(e_{i}\)-regular with witness formula

$$\begin{aligned} \psi \leftrightarrow ^{i,j} \chi = \varphi (\varphi (\psi ,\chi ,e_{i}),\varphi (\psi ,\chi ,e_{j}),e_{j}). \end{aligned}$$

\(\square \)

Theorem 7

Fixing \(j\ne i\), the logic \(n\mathrm {CL}_{ \{ e_{i} \} }\) is axiomatised by the following axioms and rules:

$$\begin{aligned} \begin{array} [c]{ll} A1 &{} \varphi \leftrightarrow ^{i,j}\varphi \\ A2 &{} q\left( \varphi ,e_{1}, \ldots ,e_{n}\right) \leftrightarrow ^{i,j}\varphi \\ A3 &{} q\left( \varphi ,\overrightarrow{\psi }\right) \leftrightarrow ^{i,j} \psi \\ A4 &{} \begin{array} [c]{l} q\left( \varphi ,q\left( \psi _{1},\chi _{11}, \ldots ,\chi _{1n}\right) , \ldots ,q\left( \psi _{n},\chi _{n1}, \ldots ,\chi _{nn}\right) \right) \\ \leftrightarrow ^{i,j}q\left( q\left( \varphi ,\psi _{1}, \ldots ,\psi _{n}\right) , \ldots ,q\left( \varphi ,\chi _{1n}, \ldots ,\chi _{nn}\right) \right) \end{array} \\ R1 &{} \varphi ,\varphi \leftrightarrow ^{i,j}\psi \vdash _{({\mathbf {n}}, \{ e_{i} \})}) \psi \\ R2 &{} \varphi \leftrightarrow ^{i,j}\psi \vdash _{({\mathbf {n}}, \{ e_{i} \})}) \psi \leftrightarrow ^{i,j}\varphi \\ R3 &{} \begin{array} [c]{l} \varphi _{1}\leftrightarrow ^{i,j}\psi _{1}, \ldots ,\varphi _{n+1}\leftrightarrow ^{i,j}\psi _{n+1}\\ \vdash _{({\mathbf {n}}, \{ e_{i} \})}) q\left( \varphi _{1}, \ldots ,\varphi _{n+1}\right) \leftrightarrow ^{i,j}q\left( \psi _{1}, \ldots ,\psi _{n+1}\right) \end{array} \\ R4 &{} \varphi \vdash _{({\mathbf {n}}, \{ e_{i} \})}) \varphi \leftrightarrow ^{i,j}e_{i}\\ R5 &{} \varphi \leftrightarrow ^{i,j}e_{i} \vdash _{({\mathbf {n}}, \{ e_{i} \})}) \varphi \end{array} \end{aligned}$$

Proof

By Theorem 2 and the remarks immediately following Theorem 3, the \(e_{i}\)-assertional logic \(\mathcal {S}\left( \mathcal {V}, \{ x \approx e_{i} \} \right) \) of a \(e_{i}\)-regular variety \(\mathcal {V}\), where \(e_{i}\)-regularity is witnessed by a single formula, is algebraisable with \(\mathcal {V}\) as equivalent variety semantics, and with a singleton set of equivalence formulas whose member is the formula witnessing \(e_{i} \)-regularity. The axioms A1-A4 and the rules R1-R5 result from applying the algorithm in Theorem 3 to the axiomatisation of \(V ( \mathbf {n} ) \) (implicitly) given above immediately after Definition 14. \(\square \)

6 Universality

The logics \(n\mathrm {CL}_F\) (\(F\subseteq \{{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\}\)) are universal in the sense that any n-valued tabular logic with k designated elements admits a faithful translation into \(n\mathrm {CL}_F\) with \(|F|=k\). This is not surprising, because \({\mathbf {n}}\) is a primal algebra. We notice here that, as a general rule, we could work just as well with the tabular logics \((\tau ,\vdash _{(\mathbf {P},F)})\) (\(F\subseteq P\)), where \(\mathbf {P}\) is a primal algebra of cardinality n.

Let \(\mathrm {L} = (\tau ,\vdash _{(\mathbf {A},F)})\) be a tabular logic with a set F of designated values such that \(\left| A\right| =n\) and \(0<|F|<n\). In what follows, we identify A with \(\{{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n}\}\).

We now define a type morphism \((-)^*:\tau \rightarrow \nu _n\), translating the \(\tau \)-formulas of L into \(\nu _n\)-formulas of \(n\mathrm {CL}\). We start with the logical connectives. If f is a k-ary connective of type \(\tau \), then \(f^{\mathbf {A}}:A^{k}\rightarrow A\) is a k-ary operation on \({\mathbf {A}}\). As the algebra \({\mathbf {A}}\) and the nBA \({\mathbf {n}}\) have the same universe, then \(f^{\mathbf {A}}\) can be considered as a function from \(\{{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n}\}^k\) to \(\{{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n}\}\). By Lemma 4 the function \(f^{\mathbf {A}}\) is term-definable through a hnf \(f^*(\xi _1,\ldots ,\xi _k)\) of type \(\nu _{n}\). The translation of the \(\tau \)-formulas into \(\nu _n\)-formulas is defined by induction as follows:

$$\begin{aligned} x^*=x;\quad {{\mathsf {e}}}_i^*={{\mathsf {e}}}_i;\quad f(\phi _1,\ldots ,\phi _k)^* = f^*(\phi _1^*/\xi _1,\ldots ,\phi _k^*/\xi _k). \end{aligned}$$

The formula \(f(\phi _1,\ldots ,\phi _k)^*\) is not in general a hnf (see Definition 16), because the substitution \(\phi _i^*/\xi _i\) may occur into a head occurrence of the metavariable \(\xi _i\).

The next theorem shows that the translation is sound and complete.

Theorem 8

Let \(\mathrm {L} = (\tau ,\vdash _{(\mathbf {A},F)})\) be a tabular logic such that \(\left| A\right| =n\). Then \(n\mathrm {CL}_F\) is a conservative expansion of \(\mathrm {L}\) and, for \(\tau \)-formulas \(\Gamma \cup \{\phi \}\), we have:

$$\begin{aligned} \Gamma \vdash _{(\mathbf {A}, F )} \phi \ \Leftrightarrow \ \Gamma ^* \vdash _{(\mathbf {n}, F )} \phi ^*. \end{aligned}$$

Example 7

The translation of the connectives of CL is as follows, where \(0={{\mathsf {e}}}_1\) and \(1={{\mathsf {e}}}_2\):

$$\begin{aligned} \vee ^\circ =q(x_1,x_2,1)\qquad \wedge ^\circ =q(x_1,0,x_2);\qquad \lnot ^\circ = q(x_1,1,0). \end{aligned}$$

Example 8

The translation of the connectives of Gödel Logic \({\mathcal {G}}_3\), Łukasiewicz Logic \(\mathcal {L}\)\(_3\), and Post Logic \({\mathcal {P}}_3\) is as follows:

  • \({\mathcal {G}}_3\), \(\mathcal {L}\)\(_3\), \({\mathcal {P}}_3\): \(\vee ^\circ =q(x,y,q(y,{{\mathsf {e}}}_2,{{\mathsf {e}}}_2,{{\mathsf {e}}}_3),{{\mathsf {e}}}_3)\)      \(\wedge ^\circ =q(x,{{\mathsf {e}}}_1,q(y,{{\mathsf {e}}}_1,{{\mathsf {e}}}_2,{{\mathsf {e}}}_2),y)\)

  • \({\mathcal {G}}_3\): \(\lnot ^\circ = q(x,{{\mathsf {e}}}_3,{{\mathsf {e}}}_1,{{\mathsf {e}}}_1)\);   \(\mathcal {L}\)\(_3\): \(\lnot ^\circ = q(x,{{\mathsf {e}}}_3,{{\mathsf {e}}}_2,{{\mathsf {e}}}_1)\);   \({\mathcal {P}}_3\): \(\lnot ^\circ = q(x,{{\mathsf {e}}}_3,{{\mathsf {e}}}_1,{{\mathsf {e}}}_2)\);

  • \({\mathcal {G}}_3\): \(\rightarrow ^\circ = q(x,{{\mathsf {e}}}_3,q(y,{{\mathsf {e}}}_1,{{\mathsf {e}}}_3,{{\mathsf {e}}}_3),y)\);      \(\mathcal {L}\)\(_3\): \(\rightarrow ^\circ = q(x,{{\mathsf {e}}}_3,q(y,{{\mathsf {e}}}_2,{{\mathsf {e}}}_3,{{\mathsf {e}}}_3),y)\).

6.1 Rewriting

In this subsection we show how to turn the equations axiomatising \(n\mathrm {BA}\) into rewriting rules. We introduce two terminating and confluent TRSs \(\rightarrowtail _\mathrm {hnf}\) and \(\rightarrowtail _\mathrm {full}\) on \(\nu _n\)-formulas. We will show that, for every \(1\le i\le n\),

$$\begin{aligned} \vdash _{({\mathbf {n}}, {{\mathsf {e}}}_i)} \phi \quad \text {iff}\quad \phi \rightarrowtail ^*_\mathrm {hnf} \mathrm {hnf}(\phi ) \rightarrowtail ^*_\mathrm {full} {{\mathsf {e}}}_i, \end{aligned}$$

where \(\mathrm {hnf}(\phi )\) is the canonical head normal form logically equivalent to \(\phi \) (see Definition 16 and Lemma 4).

The rewriting rules in this section are very tightly related to the equivalence transformation rules of multi-valued decision diagrams (see Hett et al. 1997; Miller and Drechsler 2002). The TRS \(\rightarrowtail _\mathrm {full}\) is a direct generalisation to the multiple case of Zantema and van de Pol binary rewriting system described in Zantema and van de Pol (2001), where the authors are seemingly unaware that their axiomatisation captures exactly binary decomposition operators.

The subsection is organised as follows: in Sect. 6.1.1 we prove that the TRS \(\rightarrowtail _\mathrm {hnf}\) is confluent and terminating. Then in Sect. 6.1.2 we describe the relationship between multiple-valued decision diagrams and nBAs. We conclude the article with Sect. 6.1.3, where the TRS \(\rightarrowtail _\mathrm {full}\) is presented, and its termination and confluence are stated.

6.1.1 The hnf of a formula

In this section we define a confluent and terminating rewriting system to get the canonical hnf of a formula.

We consider the variety \(\mathcal {H}\) of \(\nu _n\)-algebras axiomatised by the following identities:

  1. (A1)

    \(q({{\mathsf {e}}}_i,x_1,\ldots ,x_n) \approx x_i\);

  2. (A2)

    \(q(q(x,y_1,\ldots ,y_n),z_1,\ldots ,z_n) \approx q(x,q(y_1,z_1,\ldots ,z_n),\ldots , q(y_n,z_1,\ldots ,z_n))\).

Notice that (A1) is the axiom defining nCAs and (A2) is an instance of axiom (B3) defining n-central elements.

We define an algebra \(\mathbf {H}\) of type \(\nu _n\), having the set of hnfs as universe. The operation \(q^{\mathbf {H}}\) is defined by induction over the complexity of its first hnf argument.

For every hnfs \({\bar{\psi }}=\psi _1,\ldots ,\psi _n\):

$$\begin{aligned} \begin{array}{rl} &{} q^{{\mathbf {H}}}({{\mathsf {e}}}_i,{\bar{\psi }})=\psi _i \\ &{} q^{{\mathbf {H}}}(x,{\bar{\psi }})=q(x,{\bar{\psi }})\quad (x\in \mathrm {Var}) \\ &{} q^{{\mathbf {H}}}(q(x,u_1,\ldots ,u_n),{\bar{\psi }} )=q(x,q^{{\mathbf {H}}}(u_1,{\bar{\psi }}),\ldots , q^{{\mathbf {H}}}(u_n,{\bar{\psi }})). \end{array} \end{aligned}$$

A routine calculation shows that \(\mathbf {H}\) is isomorphic to the free algebra \({\mathbf {F}}_{\mathcal {H}}\) over a countable set Var of generators. We turn the identities axiomatising \({\mathcal {H}}\) into rewriting rules.

Definition 18

The rewriting rules \(\rightarrowtail _\mathrm {hnf}\) are:

(\(h_0\)):

\(q({{\mathsf {e}}}_i,x_1,\ldots ,x_n) \rightarrowtail _\mathrm {hnf} x_i\)

(\(h_1\)):

\(q(q(x,y_1\ldots ,y_n),z_1,\ldots ,z_n) \rightarrowtail _\mathrm {hnf}\) \(q(x,q(y_1,z_1,\ldots ,z_n),\ldots , q(y_n,z_1,\ldots ,z_n))\).

Theorem 9

The rewriting system \(\rightarrowtail _\mathrm {hnf}\) is terminating and confluent.

Proof

The left linear system \(\rightarrowtail _\mathrm {hnf}\) is confluent because all critical pairs are converging. Termination is obtained by applying the subterm criterion to the dependency pairs of \(\rightarrowtail _\mathrm {hnf}\) (see (Hirokawa and Middeldorp 2007, Section 2)). We have the following dependency pairs of rule \((h_1)\) \(l \rightarrowtail _\mathrm {hnf} r\): \(q^\#(q(x,{\bar{y}}),{\bar{z}}) \rightarrowtail q^\#(y_i,{\bar{z}})\), since \(q(y_i,{\bar{z}})\) is not a subformula of l, and \(q^\#(q(x,{\bar{y}}),{\bar{z}}) \rightarrowtail q(x,q(y_1,{\bar{z}}),\ldots , q(y_n,{\bar{z}}))\), since r is not a subformula of l. For the subterm criterion, we apply the simple projection in the first argument. This proof of termination of the TRS \(\rightarrowtail _\mathrm {hnf}\) is automatised by the tool

figure a

(see Korp et al. 2009). \(\square \)

The normal forms of \(\rightarrowtail _\mathrm {hnf}\) are the hnfs; we denote by \(\mathrm {hnf}(\phi )\) the normal form of \(\phi \).

6.1.2 nCL and Decision Diagrams

As we have observed, there are connections between the logics nCL and the theories of binary decision diagrams (BDD) and multi-valued decision diagrams (MDD). A decision diagram is an acyclic oriented graph that can be unfolded as a tree. Each branch node represents a choice between a number of alternatives and each leaf node represents a decision. As the operation q in the nBA \({\mathbf {n}}\) is a n-arguments choice operation, a decision tree with branching factor at most n, whose nodes are labelled only by variables, can be codified as a head normal form in the type of pure nBAs. As a matter of fact, a logical variable x labelling a node of a decision diagram is an operator, whose arity is the branching factor of the node. For example, the variable x in the diagram D below is a ternary operator:

figure b

This diagram is naturally represented by the head normal form:

$$\begin{aligned} \phi _D = q(x,q(y_1,\ldots ),q(y_2,\ldots ),q(y_3,\ldots )). \end{aligned}$$

In general, a branch of a n-branching decision tree D in k variables corresponds to a homomorphism from the formula algebra \({\mathbf {T}}_{\nu _n}(y_1,\ldots ,y_k)\) into \({\mathbf {n}}\). In an arbitrary nBA a n-branching variable x of a decision diagram becomes the decomposition operator \(q(x,-_1,\ldots ,-_n)\).

It is remarkable that several transformations on decision diagrams found in literature (Hett et al. 1997; Miller and Drechsler 2002) are instances of nBA axiomatisation.

The next example explains the relationship among CL, 2CL and BDDs.

Example 9

By Example 7 the formula \(\phi = x_1\vee (x_2\wedge x_3)\) is translated into 2CL as follows: \(\phi ^*= q(x_1,q(x_2,0,x_3),1)\) (where \(0={{\mathsf {e}}}_1\) and \(1={{\mathsf {e}}}_2\)).

CL

2CL

BDD

\(\phi = x_1\vee (x_2\wedge x_3)\)

\(\phi ^*= q(x_1,q(x_2,0,x_3),1)\)

Remark that the formula \(\phi ^*\) in the example above is a hnf, and this allows one to associate a BDD to it. In general, the translation of a formula is not in head normal form, as for instance \(((x_1\vee x_2)\wedge x_3)^*= q(q(x_1,x_2,1),0,x_3)\). Applying the TRS \(\rightarrowtail _\mathrm {hnf}\) to the formula \(q(q(x_1,x_2,1),0,x_3)\) we get an equivalent head normal form. Thus, we may associate univocally a decision diagram to any formula.

In the next example, we consider a non-binary case: the “all-different” constraint for ternary variables. To keep the example reasonably small, we consider the simple case of two variables.

Example 10

Let \({{\mathsf {e}}}_1,{{\mathsf {e}}}_2,{{\mathsf {e}}}_3\) be the truth values. We define \(1={{\mathsf {e}}}_3\) and \(0={{\mathsf {e}}}_1\).

3CL

MDD

\(q(x_1,q(x_2,0,1,1),q(x_2,1,0,1),q(x_2,1,1,0)\)

6.1.3 The normal form of a formula

We introduce a second TRS, which, restricted to hnfs, is terminating and confluent. First we define the variety \({\mathcal {W}}\) axiomatised over \({\mathcal {H}}\) (see Sect. 6.1.1) by the following identities:

(A3):

\(q(x,y,\ldots ,y) \approx y\);

(A4):

\(q(x,{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n) \approx x\);

(A5\(^i\)):

\(q(x,y_1,\ldots ,y_{i-1},q(x,z_1,\ldots ,z_n),y_{i+1},\ldots ,y_n) \approx \)

\(q(x,y_1,\ldots ,y_{i-1},z_i,y_{i+1},\ldots ,y_n)\);

(A6):

\(q(x, q(y, y^1_1,\ldots , y^1_n),\ldots , q(y, y^n_1,\ldots , y^n_n)) \approx \)

\(q(y, q(x, y^1_1,\ldots , y^n_1),\ldots , q(x, y^1_n, \ldots , y^n_n))\).

Lemma 9

\({\mathcal {W}} = n\mathrm {BA}\).

Proof

\((B3): q (q(c,x_{1} ,\ldots ,x_{n}),q(c,{\bar{y}}),\ldots ,q(c,{\bar{z}}))=_{\mathrm {A2}}\)

\(q(c,q(x_1,q(c,{\bar{y}}),\ldots ,q(c,{\bar{z}})),\ldots ,q(x_n,q(c,{\bar{y}}),\ldots ,q(c,{\bar{z}}))) =_{\mathrm {A6}}\)

\(q(c,q(c,q(x_1y_1\ldots z_1),\ldots ,q(x_1 y_n\ldots z_n)),\ldots ,\)

\(q(c,q(x_ny_1\ldots z_1),\ldots ,q(x_ny_n\cdots z_n)))=_{{ {A5^{i}}}}\)

\(q(c,q(x_1,y_1,\ldots ,z_1) ,\ldots ,q(x_n,y_n,\ldots ,z_n)). \) \(\square \)

By Lemma 9 the free algebra \({\mathbf {F}}_{n\mathrm {BA}}\) over a countable set Var of generators is isomorphic to the quotient \({\mathbf {F}}_{\mathcal {H}}/\theta \), where \(\theta \) is the fully invariant congruence generated by the axioms (A3)-(A6). The characterisation of \({\mathbf {F}}_{\mathcal {H}}\) given in Sect. 6.1 justifies the restriction to hnfs of the TRS defined below.

For all \(\nu _n\)-formulas \(\phi \) of \(n\mathrm {CL}\), each subformula of \(\mathrm {hnf}(\phi )\) of the form \(q(x, y_1,\ldots , y_n)\) is such that x is always a variable. It follows that the head occurrences of variables in \(\mathrm {hnf}(\phi )\) behave as constants. We consider a total order < on the set Var of variables: \(x_1< x_2< x_3 < \cdots \).

Definition 19

The following are the rewriting rules \(\rightarrowtail _\mathrm {full}\) acting on hnfs, where \(x,x'\) ranges over variables and \(y,y_i,z_j, {\bar{u}}\) over arbitrary hnfs:

(\(r_2\)):

\(q(x,y,\ldots ,y) \rightarrowtail y\);

(\(r_3\)):

\(q(x,{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n) \rightarrowtail x\);

(\(r^i_4\)):

\(q(x,y_1,\ldots ,y_{i-1},x ,y_{i+1},\ldots ,y_n) \rightarrowtail q(x,y_1,\ldots ,y_{i-1},{{\mathsf {e}}}_i ,y_{i+1},\ldots ,y_n)\);

(\(r_5^i\)):

\(q(x,y_1,\ldots ,y_{i-1},q(x,z_1,\ldots ,z_n),y_{i+1},\ldots ,y_n) \rightarrowtail \) \(q(x,y_1,\ldots ,y_{i-1},z_i,y_{i+1},\ldots ,y_n)\);

(\(r_6^i\)):

If \(x'< x\) then \( q(x, y_1,\ldots , y_{i-1}, q(x', z_1,\ldots , z_n), y_{i+1},\ldots ,y_n)\rightarrowtail \) \( q(x', q(x, y_1,\ldots , y_{i-1}, z_1, y_{i+1},\ldots ,y_n),\ldots ,q(x, y_1,\ldots , y_{i-1}, z_n, y_{i+1},\ldots ,y_n))\);

(\(r_7^i\)):

If \(x'< x\) then \(q(x,y_1,\ldots ,y_{i-1},x', y_{i+1},\ldots ,y_n)\rightarrowtail \)

\(q(x', q(x, y_1,\ldots ,y_{i-1},{{\mathsf {e}}}_1, y_{i+1},\ldots ,y_n),\ldots , q(x, y_1,\ldots ,y_{i-1},{{\mathsf {e}}}_n, y_{i+1},\ldots ,y_n))\).

Theorem 10

\(\rightarrowtail _\mathrm {full}\) restricted to hnfs is terminating and confluent.

Proof

The proof is an easy generalisation of the case \(n=2\) that can be found in Zantema and van de Pol (2001), Salibra et al. (2016). For the sake of completeness, the proof is given in the “Appendix”. \(\square \)

Corollary 4

A given n-valued tabular logic satisfies \(\vdash _{({\mathbf {A}},F)} \phi \) if and only if \(\phi ^* \rightarrowtail ^* {{\mathsf {e}}}_i\), with \({{\mathsf {e}}}_i\in F\).

7 Conclusions and future work

The focus of the present paper is on the logical, and partly on the computational, aspects of the project we illustrated in the introduction. A closer examination of its implications and potential for universal algebra and for the theory of Boolean vector spaces is deferred to future accounts of work that is currently in progress [23].

In particular, we intend to parlay the theory of n-central elements into an extension to arbitrary semirings of the technique of Boolean powers (semiring powers). We will show that: i) any pure nBA \({\mathbf {A}}\) can be represented as the nBA of n-central elements of a Boolean vector space; ii) any nBA in a variety of nBAs with one generator is isomorphic to a Boolean power of this generator. Foster’s theorem on primal varieties (Burris and Sankappanavar 1981, Thm. 7.4), according to which any member of a variety generated by a primal algebra is a Boolean power of the generator, will follow as a corollary.

Apart from Boolean algebras, many algebras investigated in classical mathematics, like rings with unit or ortholattices, have dimension 2. We succeeded in generalising Boolean algebras to n-dimensional Boolean-like algebras. It would be worthwhile to explore whether other classes of algebras also admit of meaningful n-dimensional counterparts.

On the logical side, we intend to develop further the metatheory of \(n\mathrm {CL}\), by providing sequent calculi for each of these logics.