Abstract
We introduce Boolean-like algebras of dimension n (\(n{\mathrm {BA}}\)s) having n constants \({{{\mathsf {e}}}}_1,\ldots ,{{{\mathsf {e}}}}_n\), and an \((n+1)\)-ary operation q (a “generalised if-then-else”) that induces a decomposition of the algebra into n factors through the so-called n-central elements. Varieties of \(n{\mathrm {BA}}\)s share many remarkable properties with the variety of Boolean algebras and with primal varieties. The \(n{\mathrm {BA}}\)s provide the algebraic framework for generalising the classical propositional calculus to the case of n–perfectly symmetric–truth-values. Every finite-valued tabular logic can be embedded into such a n-valued propositional logic, \(n{\mathrm {CL}}\), and this embedding preserves validity. We define a confluent and terminating first-order rewriting system for deciding validity in \(n{\mathrm {CL}}\), and, via the embeddings, in all the finite tabular logics.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
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 a, b 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.
\(\bigcap _{1\le i\le n}\phi _{i}=\Delta \);
-
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:
-
D1
\(f( x,x,\ldots ,x) =x\);
-
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})\);
-
D3
f is an algebra homomorphism from \({\mathbf {A}}^n\) to \( {\mathbf {A}}\):
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:
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
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
This map** 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)\):
a condition which can be rewrittenFootnote 1 as
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
E will be also regarded as a function map** 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}\):
-
AL1:
\(\Gamma \vdash _{\mathrm {L}}\varphi \) iff \(D(\Gamma )\vdash _{Eq\left( \mathcal {K}\right) } D(\varphi )\);
-
AL2:
\(\Sigma \vdash _{Eq\left( \mathcal {K}\right) }\varphi \approx \psi \) iff \(E\left( \Sigma \right) \vdash _{\mathrm {L}} E\left( \varphi ,\psi \right) \);
-
AL3:
\(\varphi \dashv \vdash _{\mathrm {L}}E\left( D(\varphi )\right) \);
-
AL4:
\(\varphi \approx \psi \dashv \vdash _{Eq\left( \mathcal {K}\right) }D(E\left( \varphi ,\psi \right) )\).
The map**s D(x) and E(x, y) 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
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.
\(\mathcal {V}\) is D-regular;
-
2.
The D-assertional logic of \(\mathcal {V}\) is algebraisable with \(\mathcal {V}\) as equivalent variety semantics.
-
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:
-
A1
\(\vdash _{\mathrm {L}}E\left( \varphi ,\varphi \right) \);
-
A2
\(\varphi ,E\left( \varphi ,\psi \right) \vdash _{\mathrm {L}}\psi \);
-
A3
\(E\left( \varphi ,\psi \right) \vdash _{\mathrm {L}}E\left( \psi ,\varphi \right) \);
-
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) \);
-
A5
\(\varphi \dashv \vdash _{\mathrm {L}}E\left( D\left( \varphi \right) \right) \);
-
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 _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.
\(h(x)=h^*(x)\), for every propositional variable \(x\in X\);
-
2.
\(h(c)=h_0(c)\), for every nullary operator \(c\in \tau ^0\);
-
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.
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.
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.
\(\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:
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:
and, for every \(Z\subseteq X\),
\(\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\):
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.
c is a factor element (w.r.t. q) satisfying the identity \(q(c,{{\mathsf {e}}}_{1},\ldots ,{{\mathsf {e}}}_{n})=c\);
-
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.
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.
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
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:
-
(i)
\(\mathbf {A}\) is simple;
-
(ii)
\(\mathbf {A}\) is subdirectly irreducible;
-
(iii)
\(\mathbf {A}\) is directly indecomposable;
-
(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
for arbitrary x, y. 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
where
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
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:
-
(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.
-
(ii)
The universality of \(n\mathrm {CL}\), by conservatively translating any n-valued tabular logic into it.
-
(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
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:
-
(i)
\((x^\sigma )^\rho = x^{\rho \circ \sigma }\);
-
(ii)
\(q(x,y_1,\ldots ,y_n)^\sigma = q(x,y_1^\sigma ,\ldots ,y_{n}^\sigma )\);
-
(iii)
\(q(x^\sigma ,y_1,\ldots ,y_n) = q(x,y_{\sigma 1},\ldots ,y_{\sigma n})\);
-
(iv)
The map \(x\mapsto x^\sigma \) is bijective with inverse map \(x\mapsto x^{\sigma ^{-1}}\).
Proof
\(\square \)
If \(\phi \) is a \(\nu _n\)-formula and \(\sigma \) is a permutation of \(1,\ldots ,n\), we define
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
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:
-
(i)
\(\Gamma \vdash _{({\mathbf {n}}, F)}\phi \);
-
(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:
We recall from Sect. 2.5 that, if \(q(\phi ,\psi _1,\ldots ,\psi _n)\) is a \(\nu _n\)-formula, then
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:
\(\square \)
Lemma 7
Let F, G 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 F, G 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
-
(i)
The algebra \({\mathbf {n}}\) is everywhere strongly logifiable.
-
(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
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
\(\square \)
Theorem 7
Fixing \(j\ne i\), the logic \(n\mathrm {CL}_{ \{ e_{i} \} }\) is axiomatised by the following axioms and rules:
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:
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:
Example 7
The translation of the connectives of CL is as follows, where \(0={{\mathsf {e}}}_1\) and \(1={{\mathsf {e}}}_2\):
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\),
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:
-
(A1)
\(q({{\mathsf {e}}}_i,x_1,\ldots ,x_n) \approx x_i\);
-
(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\):
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
(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:
This diagram is naturally represented by the head normal form:
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.
Notes
If \(\Gamma ,\Delta \) are sets of formulas, \(\Gamma \vdash _{\mathrm {L}}\Delta \) means \(\Gamma \vdash _{\mathrm {L} }\varphi \) for all \(\varphi \in \Delta \); if \(\Sigma ,\Sigma ^{\prime }\) are sets of equations, \(\Sigma \vdash _{Eq\left( \mathcal {K}\right) }\Sigma ^{\prime }\) means \(\Sigma \vdash _{Eq\left( \mathcal {K}\right) }\epsilon \) for all \(\epsilon \in \Sigma ^{\prime }\).
References
Barbour, G. D., & Raftery, J. G. (2003). Quasivarieties of logic, regularity conditions and parameterized algebraization. Studia Logica, 74, 99–152.
Bergman, G. M. (1991). Actions of Boolean rings on sets. Algebra Universalis, 28, 153–187.
Blok, W.J., & Pigozzi, D. (1989). Algebraizable Logics, Memories of the American Mathematical Society, vol 77, No 396.
Blok, W. J., & Pigozzi, D. (1994). On the structure of varieties with equationally definable principal congruences III. Algebra Universalis, 32, 545–608.
Blok, W. J., & Raftery, J. G. (1999). Ideals in quasivarieties of algebras. In X. Caicedo & C. H. Montenegro (Eds.), Models, algebras and proofs (pp. 167–186). New York: Algebras and Proofs.
Blok, W. J., & Raftery, J. G. (2008). Assertionally equivalent quasivarieties. Int. J. Algebra Comput., 18, 589–681.
Bucciarelli, A., Ledda, A., Paoli, F., & Salibra, A. (2018). Boolean-like algebras of finite dimension, ar**v:1806.06537.
Bucciarelli, A., & Salibra, A. (2019). On noncommutative generalisations of Boolean algebras. Art Discrete Appl. Math., 2(2), 1–35. https://doi.org/10.26493/2590-9770.1323.ceb.
Burris, S. N., & Sankappanavar, H. P. (1981). A Course in Universal Algebra. Berlin: Springer.
Caleiro, C., & Gonçalves, R. (2017). Equipollent logical systems. In J.-Y. Beziau (Ed.) Logica Universalis: Towards a general theory of logic (pp. 97–109), 2nd edn. Birkhäuser Verlag, Basel.
Cvetko-Vah, K., & Salibra, A. (2015). The connection of skew Boolean algebras and discriminator varieties to Church algebras. Algebra Universalis, 73, 369–390.
Dicker, R. M. (1963). A set of independent axioms for Boolean algebra. Proc. London Math. Soc., 3, 20–30.
Gumm, H. P., & Ursini, A. (1984). Ideals in universal algebra. Alg. Universalis, 19, 45–54.
Gyuris, V. (1999). Variations of Algebraizability, Ph.D. thesis, The University of Illinois at Chicago.
Hett, A., Drechsler, R., & Becker, B. (1997). Fast and efficient construction of BDDs by reordering based synthesis. European Design and Test Conference, ED & TC ’97 (pp. 168–175). Paris: Wiley.
Hirokawa, N., & Middeldorp, A. (2007). Tyrolean termination tool: techniques and features. Inf. Comput., 205, 474–511.
Korp, M., Sternagel, C., Zankl, H., & Middeldorp, A. (2009). The Tyrolean Termination Tool 2, http://cl-informatik.uibk.ac.at/software/ttt2/.
Ledda, A., Paoli, F., & Salibra, A. (2013). On Semi-Boolean-like algebras. Acta Univ. Palacki. Olomuc. Fac. Rer. Nat. Mathematica, 52(1), 101–120.
Manzonetto, G., & Salibra, A. (2016). From lambda calculus to universal algebra and back. In 33th international symposium on mathematical foundation of computer science (pp. 479–490), LNCS 5162.
Moraschini, T. (2015). On everywhere strongly logifiable algebras. Rep. Math. Logic, 50, 83–107.
McKenzie, R. N., McNulty, G. F., & Taylor, W. F. (1987). Algebras, Lattices, Varieties.
McCarthy, J. (1963). A basis for a mathematical theory of computation. In P. Braffort & D. Hirschberg (Eds.), Computer Programming and Formal Systems (pp. 33–70). Amsterdam: North-Holland.
Miller, D. M., & Drechsler, R. (2002). On the construction of multiple-valued decision diagrams. In Multiple-Valued Logic (pp. 245–253).
Salibra, A., Bucciarelli, A., Ledda, A., & Paoli, F. (xxxx). Classical logic with n truth values as a symmetric many-valued logic, Part 2, in preparation.
Salibra, A., Ledda, A., Paoli, F., & Kowalski, T. (2013). Boolean-like algebras. Algebra Universalis, 69(2), 113–138.
Salibra, A., Manzonetto, G., & Favro, G. (2016). Factor varieties and symbolic computation. In Thirty-first annual ACM/IEEE symposium on logic in computer science (pp. 739–748).
Smiley, T. (1962). The independence of connectives. J. Symb. Logic, 27, 426–436.
Vaggione, D. (1996). Varieties in which the Pierce stalks are directly indecomposable. J. Algebra, 184, 424–434.
Zantema, H., & van de Pol, J. (2001). A rewriting approach to binary decision diagrams. J. Logic Algebraic Program., 49, 61–86.
Acknowledgements
We thank Davide Fazio for the discussions on the topics of the present paper. The following funding sources are gratefully acknowledged: MIUR, within the projects PRIN 2017: “Logic and cognition. Theory, experiments, and applications”, CUP: 2013YP4N3, and PRIN 2017: “Theory and applications of resource sensitive logics”, Prot. 20173WKCM5, CUP: F74I19000720001; Regione Autonoma della Sardegna within the project “Per un’estensione semantica della Logica Computazionale Quantistica-Impatto teorico e ricadute implementative”, CUP: RASSR40341.
Funding
Open access funding provided by Università Ca' Foscari Venezia within the CRUI-CARE Agreement.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix
Appendix
In this appendix we prove Theorem 10. Let \(\Sigma \) be the type given by: \(\{c_i\}_{i\in N}\) and \({{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n\), nullary function symbols, and q, \((n+1)\)-ary function symbol. We write \(c_i < c_j\) if \(i < j\). The constants \(c_i\) represent the elements of Var. Throughout this Appendix, we use \(t,u,\ldots \) as metavariables for formulas.
Definition 20
The lexicographic path ordering on hnfs \(<_{lpo}\) is defined by \(t<_{lpo} u\) if:
- (\(b_1\)):
-
\(\exists i,j\) such that \(t={{\mathsf {e}}}_j\) and \(u=c_i\).
- (\(b_2\)):
-
\(\exists i<j\) such that \(t=c_i\) and \(u=c_j\).
- (\(s_1\)):
-
\(u=q(u_0,u_1, \ldots ,u_n)\) and \(\exists i\in \{0, \ldots ,n\}\) such that \(t\le _{lpo} u_i\), where \(t\le _{lpo} u_i\) stands for \(t <_{lpo} u_i\) or \(t=u_i\).
- (\(s_2\)):
-
\(t=q(t_0, t_1, \ldots ,t_n), u=q(u_0,u_1, \ldots ,u_n)\) and \(\exists i\in \{0, \ldots ,n\}\) such that \(\forall j\in \{0, \ldots ,i-1\}\ t_j=u_j\), \(t_i<_{lpo} u_i\) and \(\forall j\in \{i+1, \ldots ,n\} \ t_j<_{lpo} u\).
Lemma 10
For each rewriting rule \(t\rightarrowtail u\) of \({\mathcal {R}}_\mathrm {full}\) we have \(t>_{lpo} u\).
Proof
-
(\(r_2\)): \(q(c_j,y,\ldots ,y)>_{lpo} y\) by (\(s_1\)).
-
(\(r_3\)): \(q(c_j,{{\mathsf {e}}}_1,\ldots ,{{\mathsf {e}}}_n)>_{lpo} c_j\) by (\(s_1\)).
-
(\(r^i_4\)): \(q(c_j,y_1,\ldots ,y_{i-1},c_j ,y_{i+1},\ldots ,y_n) >_{lpo} q(c_j,y_1,\ldots ,y_{i-1},{{\mathsf {e}}}_i ,y_{i+1},\ldots ,y_n)\) by (\(s_2\)) and (\(b_1\)).
-
(\(r^i_5\)): \(q(c_j,y_1,\ldots ,y_{i-1},q(c_j,z_1,\ldots ,z_n),y_{i+1},\ldots ,y_n) >_{lpo} q(c_j,y_1,\ldots ,y_{i-1},z_i,y_{i+1},\ldots ,y_n)\) by (\(s_2\)) and (\(s_1\)).
-
(\(r^i_6\)): if \(c_k< c_j\) then \(q(c_j, y_1,\ldots , y_{i-1}, q(c_k, z_1,\ldots , z_n), y_{i+1},\ldots ,y_n) >_{lpo}\) \( q(c_k, q(c_j, y_1,\ldots , y_{i-1}, z_1, y_{i+1},\ldots ,y_n),\ldots ,q(c_j, y_1,\ldots , y_{i-1}, z_n, y_{i+1},\ldots ,y_n))\) by (\(s_2\)), (\(b_2\)) and (\(s_1\)).
-
(\(r^i_7\)): if \(c_k< c_j\) then \(q(c_j,y_1,\ldots ,y_{i-1},c_k, y_{i+1},\ldots ,y_n)>_{lpo}\) \(q(c_k, q(c_j, y_1,\ldots ,y_{i-1},{{\mathsf {e}}}_1, y_{i+1},\ldots ,y_n),\ldots , q(c_j, y_1,\ldots ,y_{i-1},{{\mathsf {e}}}_n, y_{i+1},\ldots ,y_n))\) by (\(s_2\)) and (\(b_1\)).
\(\square \)
Since the partial order on \(\Sigma \) given by (\(b_1\)) and (\(b_2\)) in Definition 20 is well-founded, the corresponding recursive path ordering \(<_{lpo}\) on hnfs is well-founded, too. Hence:
Theorem 11
The rewriting system \({\mathcal {R}}_\mathrm {full}\) is terminating.
The confluence of \({\mathcal {R}}_\mathrm {full}\) is proved by showing that two \({\mathcal {R}}_\mathrm {full}\) normal forms that are logically equivalent are actually equal.
Definition 21
Let \(C=\{c_n\}_{n\in \mathbb {N}}\). Given an environment \(\rho : C \rightarrow \mathbf {n}\) let us define the interpretation of the formula t with respect to \(\rho \), written \([\![{t}]\!]_{\rho }\in \mathbf {n}\), as follows:
-
\([\![{{{\mathsf {e}}}_i}]\!]_{\rho }={{\mathsf {e}}}_i\)
-
\([\![{c_i}]\!]_{\rho }=\rho (c_i)\)
-
\([\![{q(t,u_1, \ldots ,u_n)}]\!]_{\rho }= [\![{u_{i}}]\!]_{\rho }\) if \([\![{t}]\!]_{\rho }={{\mathsf {e}}}_i\).
The formulas t and u are logically equivalent, written \(t\simeq u\), if for all \(\rho \), \([\![{t}]\!]_{\rho }=[\![{u}]\!]_{\rho }\).
The following remark is trivial:
Remark 1
If \(c_i\) does not occur in the term t, and the environments \(\rho ,\rho '\) are such that for all \(j\not =i\) \(\rho (c_j)=\rho '(c_j)\), then \([\![{t}]\!]_{\rho }=[\![{t}]\!]_{\rho '}\).
As a matter of notation, for \(i\in {\mathbb {N}}\), \(1\le k\le n\) and an environment \(\rho \) let \(\rho _{i\leftarrow k}\) be the environment defined by
Definition 22
The size of \(\Sigma \)-terms is defined by
-
\(\#(c_i)=\#({{\mathsf {e}}}_j) =0\),
-
\(\#(q(u_0,u_1, \ldots ,u_n))=1+\#(u_0)+ \cdots +\#(u_n)\).
Lemma 11
If \(t=q(c_i,t_1, \ldots ,t_n)\) is a \({\mathcal {R}}_\mathrm {full}\) normal form, and if \(c_j\) occurs in \(t_k\), \(j\in {\mathbb {N}}\) and \(1\le k\le n\), then \(c_i< c_j\).
Proof
By induction on \(t_k\). If \(t_k=c_j\), then \(c_i< c_j\) since if \(c_i=c_j\) then the rule \(r^k_4\) applies to t, and if \(c_j< c_i\) then the rule \(r^k_7\) applies to t. Otherwise, \(t_k=q(c_l, u_1, \ldots ,u_n)\). By induction hypothesis we know that \(c_l\le c_j\). We also know that \(c_l\not =c_i\), otherwise rule \(r^k_5\) applies to t, and that \(c_l\not < c_i\), otherwise rule \(r^k_6\) applies to t. Hence \(c_i< c_l\) and we are done. \(\square \)
Lemma 12
Let t, u be \({\mathcal {R}}_\mathrm {full}\) normal forms:
If \(t\simeq u\) then \(t=u\).
-
If \(t=q(c_i,t_1, \ldots ,t_n)\) (resp. \(u=q(c_j,u_1, \ldots ,u_n)\)) then there exist \(1\le k,l\le n\) such that \({t_k} \not \simeq {t_l}\) (resp. \({u_k} \not \simeq {u_l}\) ) .
Proof
Let us call S(t, u) and T(t, u) the two statements of the lemma, whose proof is by mutual induction on \(\#(t)+ \#(u)\).
If \(\#(t)+ \#(u)=0\) then:
-
T(t, u): trivial.
-
S(t, u): t and u are either \(c_i\) or \({{\mathsf {e}}}_j\) for some i, j; it is easy to see that if \(t\not =u\) then \(t\not \simeq u\).
If \(\#(t)=0\) and \(\#(u) > 0\), say \(u=q(c_i,u_1, \ldots ,u_n)\):
-
T(t, u): if for all \(1\le i,j\le n\) we had \(u_i\simeq u_j\), then by the induction hypothesis \(S(u_i,u_j)\) we would get \(u_i=u_j\), and hence u would be a \((r_2)\)-redex.
-
S(t, u): We reason by cases on t: if \(t={{\mathsf {e}}}_j\), then \(t\simeq u\) iff for all i \(u_i\simeq {{\mathsf {e}}}_j\). By induction hypothesis \(S({{\mathsf {e}}}_j,u_i)\), we have that for all i \(u_i={{\mathsf {e}}}_j\), and hence u is a \((r_2)\)-redex, a contradiction. If \(t=c_i\), then \(t\simeq u\) iff for all i \(u_i\simeq {{\mathsf {e}}}_i\). By the induction hypothesis \(S({{\mathsf {e}}}_i,u_i)\), , we have for all i \(u_i={{\mathsf {e}}}_i\), and hence u is a \((r_3)\)-redex, a contradiction. If \(t=c_j\) for some \(j\not =i\), then let \(k,l, \rho \) given by the induction hypothesis T(t, u), such that \([\![{u_k}]\!]_{\rho }\not =[\![{u_l}]\!]_{\rho }\). Let us suppose w.l.o.g. that \([\![{u_k}]\!]_{\rho }\not =\rho (c_j)\), otherwise we pick l instead of k, and let \(\rho '=\rho _{i\leftarrow k}\). Using Lemma 11 and Fact 1 we get:
$$\begin{aligned}{}[\![{u}]\!]_{\rho '}= [\![{u_k}]\!]_{\rho '}=[\![{u_k}]\!]_{\rho }\not =\rho (c_j)=\rho '(c_j)= [\![{t}]\!]_{\rho '} \end{aligned}$$a contradiction, since \(u\simeq t\).
If \(\#(t)>0\) and \(\#(u) = 0\), we reason as above.
If \(\#(t)>0\) and \(\#(u) > 0\), say \(t=q(c_i,t_1, \ldots ,t_n)\) and \(u=q(c_j,u_1, \ldots ,u_n)\):
-
T(t, u): as above, if for all \(1\le i,j\le n\) we had \(u_i\simeq u_j\), then by induction hypothesis \(S(u_i,u_j)\) we would get \(u_i=u_j\), and hence u would be a \((r_2)\)-redex. Similarly for t.
-
S(t, u) we proceed by case analysis: if \(i=j\), we have that \(t\simeq u\) iff for all i, \(t_i\simeq u_i\). Then the induction hypothesis \(S(t_i,u_i)\) gives \(t_i=u_i\), and hence \(t=u\). If \(i\not = j\), then w.l.o.g. let us suppose that \(c_i< c_j\). By the induction hypothesis T(t, u), let \([\![{t_k}]\!]_{\rho }\not =[\![{t_l}]\!]_{\rho }\), and let us suppose, again w.l.o.g., that \([\![{u}]\!]_{\rho }\not = [\![{t_k}]\!]_{\rho }\) (otherwise we pick l instead of k). By using Lemma 11 and Fact 1 we get:
$$\begin{aligned}{}[\![{t}]\!]_{\rho _{i\leftarrow k}}= [\![{t_k}]\!]_{\rho _{i\leftarrow k}}= [\![{t_k}]\!]_{\rho }\not = [\![{u}]\!]_{\rho }=[\![{u}]\!]_{\rho _{i\leftarrow k}} \end{aligned}$$a contradiction, since \(u\simeq t\).
\(\square \)
Lemma 13
If \(t\rightarrowtail u\) in \({\mathcal {R}}_\mathrm {full}\), then \(t\simeq u\).
Theorem 12
The rewriting system \({\mathcal {R}}_\mathrm {full}\) is confluent.
Proof
If \(t\rightarrowtail ^* t_i\) for \(i=1,2\), let \(t_i'\) be the \({\mathcal {R}}_\mathrm {full}\) normal form of \(t_i\), that exists by Theorem 11. By Lemma 13\(t'_1\simeq t\simeq t'_2\), and we conclude by Lemma 12 that \(t'_1=t'_2\). \(\square \)
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Salibra, A., Bucciarelli, A., Ledda, A. et al. Classical Logic with n Truth Values as a Symmetric Many-Valued Logic. Found Sci 28, 115–142 (2023). https://doi.org/10.1007/s10699-020-09697-7
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10699-020-09697-7
Keywords
- Many-valued logics
- Classical logic with n truth values
- Boolean-like algebras
- Equipollence
- Rewriting systems