1 Introduction

This paper was motivated by Problems 1.1 and 1.2 below. In each problem the question is whether or not a result that is known for certain algebras can be lifted to congruences.

Problem 1.1

Let \(\mathbf {A}\) be a finite algebra (in a finite language). Given a congruence \(\alpha \) of \(\mathbf {A}\), is it decidable if \(\alpha \) is supernilpotent?

This question arises from the result that finite nilpotent Maltsev algebras are non-dualizable if they have some non-abelian supernilpotent congruence [3].

In the special case when \(\alpha \) is the total congruence of \(\mathbf {A}\), i.e., when the question is whether it is decidable if \(\mathbf {A}\) itself is supernilpotent, the answer to Problem 1.1 has been known to be YES by a combination of results from [1, 12, 15] (see Section 4), provided the variety generated by \(\mathbf {A}\) is assumed to omit type \(\mathbf {1}\).

Problem 1.2

Let \(\mathbf {A}\) be a finite algebra (in a finite language) such that \(\mathbf {A}\) has a cube term. If for every subdirectly irreducible section \(\mathbf {S}\) of \(\mathbf {A}\) the centralizer of the monolith of \(\mathbf {S}\) is supernilpotent, does there exist a polynomial time algorithm for solving the Subpower Membership Problem for \(\mathbf {A}\)?

In the special case when \(\mathbf {A}\) itself is supernilpotent (and, without loss of generality, has prime power order), the answer has been known to be YES by a result of [19].

Our goal in this paper is to use the composition of two known functors to create “algebras from congruences”, to study the resulting (functorial) construction, and show that it preserves many algebraic properties. Then we apply these results to prove that the answer to Problem 1.2 is YES, and the answer to Problem 1.1 is also YES provided the variety generated by \(\mathbf {A}\) omits type \(\mathbf {1}\). For finite algebras \(\mathbf {A}\) not satisfying this assumption, Problem 1.1 remains open even for the special case when \(\alpha \) is the total congruence of \(\mathbf {A}\).

To describe the idea of the construction we use, let us look at a single algebra \(\mathbf {A}\) and a congruence \(\alpha \) of \(\mathbf {A}\) with finitely many blocks. The first step of the construction yields a multisorted algebra in which the sorts are the \(\alpha \)-blocks, and the multisorted operations are the restrictions of the operations of \(\mathbf {A}\) to the sorts in all possible ways. The second step of the construction takes this multisorted algebra as its input, and yields a single-sorted algebra on the product of the sorts, where the operations are the diagonal operation of the product of the sorts and some totally defined operations that faithfully represent the operations of the multisorted algebra.

By restricting to pairs \((\mathbf {A},\alpha )\) where \(\alpha \) is the kernel of a homomorphism \(\mathbf {A}\rightarrow \mathbf {I}\) of \(\mathbf {A}\) into a fixed finite algebra \(\mathbf {I}\), the first step of the construction can be made into a functor \(\mathfrak {M}\) from a category of algebras over \(\mathbf {I}\) (cf. [17, Ch. II, Sec. 6]) into a category of multisorted algebras, while the second step of the construction can be made into a functor \(\mathfrak {P}\) from a category of multisorted algebras to a category of (single-sorted) algebras. We will introduce these functors in Section 2, and will prove that their composition \(\mathfrak {C}:=\mathfrak {P}\circ \mathfrak {M}\)—which is our construction of “algebras from congruences”—is a categorical equivalence, provided we restrict to the cases where the homomorphism \(\mathbf {A}\rightarrow \mathbf {I}\) is onto, that is, the sorts of the corresponding multisorted algebras are nonempty.

The functors \(\mathfrak {M}\) and \(\mathfrak {P}\) were introduced in the 1980’s by Novotný [23] and Gardner [10], respectively. A precursor of \(\mathfrak {P}\) appears in [2] (see also the last section of [11]). Somewhat dually to the functor \(\mathfrak {C}\), which maps algebras with quotient \(\mathbf {I}\) to algebras, Smith [25, Chapter 6] pursued a homological approach to describe extensions of \(\mathbf {I}\). Freese and McKenzie [9] used a variant of the construction provided by the functor \(\mathfrak {C}\) to associate modules (over appropriate rings) to abelian congruences of algebras in a congruence modular variety, which has played a prominent role in commutator theory for over three decades. The constructions afforded by the functors \(\mathfrak {M}\) and \(\mathfrak {P}\) were also applied by McKenzie and Valeriote [20] to uncover the structure of decidable, strongly abelian, locally finite varieties, and by Idziak [14] in his characterization of finitely decidable congruence modular varieties. In the 1990’s, VanderWerf [29] used a functor similar to \(\mathfrak {M}\) for his construction of a “derived algebra” (a multi-sorted algebra), a functor which is essentially the same as \(\mathfrak {P}\) for his construction called “consolidation”, and their composition \(\mathfrak {C}\), to generalize the Krohn–Rhodes wreath decomposition theory of finite transformation semigroups to arbitrary finite algebras. More recently, the functor \(\mathfrak {P}\) was applied by Mučka et al. [22] to find good sets of explicit defining identities and quasi-identities for the variety of single-sorted algebras equivalent to the class of all multisorted algebras of a given language where either all sorts are nonempty or all sorts are empty.

In most applications of the categorical equivalence \(\mathfrak {C}\), including those mentioned in the preceding paragraph, a central role is played by the algebraic properties preserved by \(\mathfrak {C}\). To answer the questions in Problems 1.1 and 1.2 we will use a wide array of these properties. Since many of these results have not been published in the literature in the generality we need them, we devote Section 3 to a survey of the algebraic properties of \(\mathfrak {C}\). To describe the properties we consider, it will be convenient to introduce a notation for the \(\mathfrak {C}\)-image of an algebra \(\mathbf {A}\) (over \(\mathbf {I}\)). In this section, we will use the informal notation \(\mathbf {A}^{\mathfrak {C}}\). (The precise definition of \(\mathfrak {C}\) and the notation that goes along with it, and is used outside this section, can be found in Corollary 2.9.)

For congruences, we prove in Section 3 that for every algebra \(\mathbf {A}\) and surjective homomorphism \(\mathbf {A}\rightarrow \mathbf {I}\) with kernel \(\alpha \), the functor \(\mathfrak {C}\) yields an isomorphism \(I_{\mathbf {A}}(0,\alpha )\rightarrow {{\,\mathrm{Con}\,}}(\mathbf {A^{\mathfrak {C}}})\) between the interval \(I_{\mathbf {A}}(0,\alpha ) = \{ \beta \in {{\,\mathrm{Con}\,}}(\mathbf {A}) : 0\le \beta \le \alpha \}\) of the congruence lattice of \(\mathbf {A}\) and the whole congruence lattice \({{\,\mathrm{Con}\,}}(\mathbf {A}^{\mathfrak {C}})\) of \(\mathbf {A}^{\mathfrak {C}}\) (see Corollary 3.4). Moreover, we show that this isomorphism preserves commutators and higher arity commutators (see Theorem 3.6). In particular, \(\alpha \) is a supernilpotent congruence of \(\mathbf {A}\) iff \(\mathbf {A}^{\mathfrak {C}}\) is a supernilpotent algebra, and the degrees of supernilpotence are the same. In addition, we establish that the functor \(\mathfrak {C}\) preserves common finiteness conditions. For example, \(\mathbf {A}\) is finite, finitely generated, finitely presented, or residually finite, respectively, iff \(\mathbf {A}^{\mathfrak {C}}\) is (see Theorem 3.1(4) and Corollaries 3.15, 3.5(3)). We also clarify the relationship between the clones of \(\mathbf {A}\) and \(\mathbf {A}^{\mathfrak {C}}\), by explicitly describing how one can obtain the clone of term operations and the clone of polynomial operations of \(\mathbf {A}^{\mathfrak {C}}\) from the corresponding clone of \(\mathbf {A}\) (see Corollaries 3.13(1) and 3.16). An important consequence of this relationship between the clones of term operations of \(\mathbf {A}\) and \(\mathbf {A}^{\mathfrak {C}}\) is that the variety generated by \(\mathbf {A}^{\mathfrak {C}}\) satisfies all idempotent Maltsev conditions that hold in the variety generated by \(\mathbf {A}\) (cf. Corollary 3.14). Finally, we use the relationship between the clones of polynomial operations of \(\mathbf {A}\) and \(\mathbf {A}^{\mathfrak {C}}\) to prove that for finite \(\mathbf {A}\), the tame congruence theoretic types of covering pairs are preserved by the isomorphism \(I_{\mathbf {A}}(0,\alpha )\rightarrow {{\,\mathrm{Con}\,}}(\mathbf {A^{\mathfrak {C}}})\) mentioned above (see Theorem 3.18). Variants or particular cases of these results appear in the applications of \(\mathfrak {C}\) in [9, 20, 29] mentioned above (see, e.g., [9, Theorem 9.9], [20, Chapter 11], [29, Lemmas 2.24, 5.2]).

Sections 4 and 5 answer Problem 1.1 (for varieties omitting type 1) and Problem 1.2, respectively, in the affirmative. In Section 4 (Theorem 4.2), for finite algebras in a variety omitting type 1, we give a characterization for a congruence \(\alpha \) to be supernilpotent, which immediately proves that supernilpotence is decidable. Recently, essentially the same characterization of supernilpotent congruences (in congruence modular varieties) has also been observed and used in algorithms for circuit satisfiability problems by Idziak, Kawałek and Kraczkowski [13]. In Section 5 the theorems we prove apply to finite sets of finite algebras—not just single finite algebras. First we show that the subpower membership problem for a finite set of finite algebras with a cube term is polynomial time reducible to its subproblem where the algebras are subdirectly irreducible and have central monoliths (see Theorem 5.7(3)). From this we derive a common generalization of the main results of [7] and [19] (see Theorem 5.9), which answers Problem 1.2.

2 Three equivalent categories

Throughout this paper \(\mathcal {F}\) will denote an algebraic language. So, for each symbol \(f\in \mathcal {F}\) there is an associated natural number, \(\mathrm{ar}(f)\ge 0\), the arity of f, which indicates that in every \(\mathcal {F}\)-algebra \(\mathbf {A}=(A;\mathcal {F})\) each symbol f is interpreted as an \(\mathrm{ar}(f)\)-ary operation \(f^{\mathbf {A}}:A^{\mathrm{ar}(f)}\rightarrow A\). To simplify notation, we will usually drop the superscript \(\mathbf {A}\) from the operations \(f^{\mathbf {A}}\). If \(\mathcal {F}\) contains no nullary symbols, we will allow the universe A of an \(\mathcal {F}\)-algebra to be empty.

Analogously, \(\mathcal {G}\) will always denote a multisorted algebraic language. There is an associated nonempty set, J, indexing the sorts, and for each symbol \(g\in \mathcal {G}\) there is an associated natural number \(\mathrm{ar}(g)\ge 0\), the arity of g, and an associated pair \((\mathbf {j},j')\), where \(\mathbf {j}=(j_1,\dots ,j_{\mathrm{ar}(g)})\in J^{\mathrm{ar}(g)}\) is the sequence of input sorts of g and \(j'\in J\) is the output sort of g. These data indicate that in every multisorted \(\mathcal {G}\)-algebra \(\mathbf {M}=\bigl ((M^{(j)})_{j\in J};\mathcal {G}\bigr )\) each symbol g is interpreted as a multisorted operation \(g^{\mathbf {M}}:M^{(j_1)}\times \dots \times M^{(j_{\mathrm{ar}(g)})}\rightarrow M^{(j')}\). To simplify notation, we will usually drop the superscript \(\mathbf {M}\) from the multisorted operations \(g^{\mathbf {M}}\). For each \(j'\in J\), if \(\mathcal {G}\) contains no nullary symbol with output sort \(j'\), we will allow the universe \(M^{(j')}\) of a multisorted \(\mathcal {G}\)-algebra to be empty.

Next we introduce several categories.

Definition 2.1

  1. (1)

    \(\mathsf{Alg}(\mathcal {F})\) will denote the category of all \(\mathcal {F}\)-algebras; that is, the objects are all \(\mathcal {F}\)-algebras, and the morphisms are all homomorphisms between \(\mathcal {F}\)-algebras.

  2. (2)

    Given a nonempty \(\mathcal {F}\)-algebra \(\mathbf {I}=(I;\mathcal {F})\), the category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\) of all \(\mathcal {F}\)-algebras over \(\mathbf {I}\) is defined (cf. [17, Ch. II, Sec. 6]) to be the category in which

    • the objects are all pairs \((\mathbf {A},\chi )\) where \(\mathbf {A}\) is an \(\mathcal {F}\)-algebra and \(\chi \) is a homomorphism \(\mathbf {A}\rightarrow \mathbf {I}\) of \(\mathcal {F}\)-algebras, while

    • a morphism between two such objects \((\mathbf {A},\chi )\) and \((\mathbf {B},\xi )\) is a homomorphism \(\psi :\mathbf {A}\rightarrow \mathbf {B}\) of \(\mathcal {F}\)-algebras such that \(\chi =\xi \circ \psi \).

  3. (3)

    \(\mathsf{MSAlg}(\mathcal {G})\) will denote the category of all multisorted \(\mathcal {G}\)-algebras; that is, the objects are all multisorted \(\mathcal {G}\)-algebras, and the morphisms are all homomorphisms between multisorted \(\mathcal {G}\)-algebras.

    Recall that a homomorphism \(\zeta :\mathbf {M}\rightarrow \mathbf {N}\) between multisorted \(\mathcal {G}\)-algebras \(\mathbf {M}=\bigl ((M^{(j)})_{j\in J};\mathcal {G}\bigr )\) and \(\mathbf {N}=\bigl ((N^{(j)})_{j\in J};\mathcal {G}\bigr )\) is a J-tuple \(\zeta =(\zeta ^{(j)})_{j\in J}\) of functions \(\zeta ^{(j)}:M^{(j)}\rightarrow N^{(j)}\) such that \(\zeta \) preserves all multisorted operations \(g\in \mathcal {G}\).

The next statement introduces a functor \(\mathfrak {M}:\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\rightarrow \mathsf{MSAlg}(\mathcal {G})\) for an appropriately defined multisorted language \(\mathcal {G}\), which is analogous to a functor considered in [23].

Proposition 2.2

Given an algebraic language \(\mathcal {F}\) and a nonempty \(\mathcal {F}\)-algebra \(\mathbf {I}=(I,\mathcal {F})\), let \(\mathcal {F}_{\mathbf {I}}\) be the multisorted language \(\mathcal {F}_{\mathbf {I}}\) defined as follows:

  • the sorts are indexed by the set I, and

  • the operation symbols of the multisorted language \(\mathcal {F}_{\mathbf {I}}\) are all symbols

    $$\begin{aligned}&f_{{\mathbf {i}}}\ \ \text {with } f\in \mathcal {F} \text { and } {\mathbf {i}}\in I^{\mathrm{ar}(f)},\\&\ \ \text { where } \mathrm{ar}(f_{{\mathbf {i}}})=\mathrm{ar}(f),\ \ {\mathbf {i}}\text { is the sequence of input sorts,}\\&\text {and } f({\mathbf {i}}) \text {(computed in } \mathbf {I}\text {) is the output sort.} \end{aligned}$$

The following functions define a functor \(\mathfrak {M}:\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\rightarrow \mathsf{MSAlg}(\mathcal {F}_{\mathbf {I}})\):

  • \(\mathfrak {M}\) assigns to every object \((\mathbf {A},\chi )\) of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\) the multisorted algebra

    $$\begin{aligned} \mathfrak {M}(\mathbf {A},\chi ):=\bigl ((\chi ^{-1}(i))_{i\in I};\mathcal {F}_{\mathbf {I}}\bigr ) \end{aligned}$$

    where the sorts are the congruence classes of the kernel of \(\chi \) (indexed by \(\chi )\), and for each \(f\in \mathcal {F}\) and for every tuple \({\mathbf {i}}=(i_1,\dots ,i_{\mathrm{ar}(f)})\in I^{\mathrm{ar}(f)}\), the operation \(f_{{\mathbf {i}}}\) is the restriction of the operation f of \(\mathbf {A}\) to the set \(\chi ^{-1}(i_1)\times \dots \times \chi ^{-1}(i_{\mathrm{ar}(f)})\).

  • \(\mathfrak {M}\) assigns to every morphism \(\psi :(\mathbf {A},\chi )\rightarrow (\mathbf {B},\xi )\) of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\) the multisorted homomorphism

    $$\begin{aligned} \mathfrak {M}(\psi ):=\bigl (\psi ^{(i)}\bigr )_{i\in I}:\mathfrak {M}(\mathbf {A},\chi )\rightarrow \mathfrak {M}(\mathbf {B},\xi ) \end{aligned}$$

    where for each \(i\in I\), \(\psi ^{(i)}\) is the restriction of \(\psi \) to \(\chi ^{-1}(i)\), which is a function \(\chi ^{-1}(i)\rightarrow \xi ^{-1}(i)\).

Definition 2.3

  1. (1)

    Given a nonempty \(\mathcal {F}\)-algebra \(\mathbf {I}=(I;\mathcal {F})\), \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) will be our notation for the full subcategory of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\), which consists of all objects \((\mathbf {A},\chi )\) such that \(\chi \) is onto.

  2. (2)

    \(\mathsf{MSAlg}^\Box (\mathcal {G})\) will denote the full subcategory of \(\mathsf{MSAlg}(\mathcal {G})\), which consists of all multisorted \(\mathcal {G}\)-algebras \(\mathbf {M}=\bigl ((M^{(j)})_{j\in J};\mathcal {G}\bigr )\) whose sorts \(M^{(j)}\) (\(j\in J\)) are pairwise disjoint.

  3. (3)

    \(\mathsf{MSAlg}^+(\mathcal {G})\) will stand for the full subcategory of \(\mathsf{MSAlg}(\mathcal {G})\), which consists of all multisorted \(\mathcal {G}\)-algebras \(\mathbf {M}=\bigl ((M^{(j)})_{j\in J};\mathcal {G}\bigr )\) whose sorts \(M^{(j)}\) (\(j\in J\)) are all nonempty.

  4. (4)

    Finally, \(\mathsf{MSAlg}^\boxplus (\mathcal {G})\) will be our notation for the full subcategory of the category \(\mathsf{MSAlg}(\mathcal {G})\) whose objects are the multisorted \(\mathcal {G}\)-algebras that belong to both \(\mathsf{MSAlg}^\Box (\mathcal {G})\) and \(\mathsf{MSAlg}^+(\mathcal {G})\).

figure a

Theorem 2.4

For any algebraic language \(\mathcal {F}\) and any nonempty \(\mathcal {F}\)-algebra \(\mathbf {I}=(I,\mathcal {F})\), the category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\) of \(\mathcal {F}\)-algebras over \(\mathbf {I}\) is equivalent to the category \(\mathsf{MSAlg}(\mathcal {F}_{\mathbf {I}})\) of multisorted \(\mathcal {F}_{\mathbf {I}}\)-algebras. The full subcategories \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) and \(\mathsf{MSAlg}^+(\mathcal {F}_{\mathbf {I}})\) of these categories are also equivalent.

In more detail, we have the following.

  1. (1)

    The functor \(\mathfrak {M}\) described in Proposition 2.2 maps onto the full subcategory \(\mathsf{MSAlg}^\Box (\mathcal {F}_{\mathbf {I}})\) of \(\mathsf{MSAlg}(\mathcal {F}_{\mathbf {I}})\), and yields (by changing the target category) an isomorphism

    $$\begin{aligned} \mathfrak {M}:\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\rightarrow \mathsf{MSAlg}^\Box (\mathcal {F}_{\mathbf {I}}). \end{aligned}$$
  2. (2)

    \(\mathfrak {M}\) restricts to an isomorphism between the full subcategory \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\) and the full subcategory \(\mathsf{MSAlg}^\boxplus (\mathcal {F}_{\mathbf {I}})\) of \(\mathsf{MSAlg}^\Box (\mathcal {F}_{\mathbf {I}})\).

Proof

First we prove statement (1) by showing that the functor

$$\begin{aligned} \mathfrak {M}^{-1}:\mathsf{MSAlg}^\Box (\mathcal {F}_{\mathbf {I}})\rightarrow \bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\end{aligned}$$

defined below is an inverse of \(\mathfrak {M}\):

  • \(\mathfrak {M}^{-1}\) assigns to every multisorted \(\mathcal {F}_{\mathbf {I}}\)-algebra \(\mathbf {M}=\bigl ((M^{(i)})_{i\in I};\mathcal {F}_{\mathbf {I}}\bigr )\) in \(\mathsf{MSAlg}^\Box (\mathcal {F}_{\mathbf {I}})\) the pair

    $$\begin{aligned} \mathfrak {M}^{-1}(\mathbf {M}):= \left( \Bigl (\bigcup _{i\in I}M^{(i)};\mathcal {F}\Bigr ),\chi \right) \end{aligned}$$

    where for each symbol \(f\in \mathcal {F}\), the operation f of the \(\mathcal {F}\)-algebra \(\mathbf {A}=\bigl (\bigcup _{i\in I}M^{(i)};\mathcal {F}\bigr )\) is the union of the multisorted operations \(f_{\mathbf {i}}\) for all \(\mathbf {i}\in I^{\mathrm{ar}(f)}\), and the homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\) sends each element \(a\in \bigcup _{i\in I}M^{(i)}\) to the unique \(i\in I\) with \(a\in M^{(i)}\).

  • \(\mathfrak {M}^{-1}\) assigns to every homomorphism \(\zeta =(\zeta ^{(i)})_{i\in I}:\mathbf {M}\rightarrow \mathbf {N}\) the morphism

    $$\begin{aligned} \mathfrak {M}^{-1}(\zeta ):=\bigcup _{i\in I}\zeta ^{(i)}:\mathfrak {M}^{-1}(\mathbf {M}) \rightarrow \mathfrak {M}^{-1}(\mathbf {N}) \end{aligned}$$

    in \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\).

Let \(\mathbf {M}=\bigl ((M^{(i)})_{i\in I};\mathcal {F}_{\mathbf {I}}\bigr )\) be a multisorted \(\mathcal {F}_{\mathbf {I}}\)-algebra in \(\mathsf{MSAlg}^\Box (\mathcal {F}_{\mathbf {I}})\), and let \(J:=\{j\in I:M^{(j)}\not =\emptyset \}\). Notice first that J is a subuniverse of \(\mathbf {I}\); indeed, if \(f\in \mathcal {F}\) and \(\mathbf {i}=(i_1,\dots ,i_{\mathrm{ar}(f)})\in J^{\mathrm{ar}(f)}\), then \(\mathbf {M}\) has an operation \(f_{\mathbf {i}}\) with nonempty domain \(M^{(i_1)}\times \dots \times M^{(i_{\mathrm{ar}(f)})}\) and with codomain \(M^{(f(\mathbf {i}))}\), so \(M^{(f(\mathbf {i}))}\) must be nonempty, i.e., \(f(\mathbf {i})\in J\). It follows also that for every tuple \(\mathbf {i}\in I^{\mathrm{ar}{f}}{\setminus } J^{\mathrm{ar}{f}}\), the multisorted operation \(f_{\mathbf {i}}\) of \(\mathbf {M}\) is the empty function. Thus, the algebra \(\mathbf {A}=\bigl (\bigcup _{i\in I}M^{(i)};\mathcal {F}\bigr )\) in \(\mathfrak {M}^{-1}(\mathbf {M})\) described above is indeed an \(\mathcal {F}\)-algebra, and \(\chi :\mathbf {A}\rightarrow \mathbf {I}\) is indeed an \(\mathcal {F}\)-algebra homomorphism. Thus, the object function of \(\mathfrak {M}^{-1}\) is well-defined.

To check the analogous statement for morphisms, let \(\zeta =(\zeta ^{(i)})_{i\in I}:\mathbf {M}\rightarrow \mathbf {N}\) be a homomorphism in \(\mathsf{MSAlg}(\mathcal {F}_{\mathbf {I}})\), let \(\mathfrak {M}^{-1}(\mathbf {M})=(\mathbf {A},\chi )\) and \(\mathfrak {M}^{-1}(\mathbf {N})=(\mathbf {B},\xi )\). It is clear from the definitions of \(\mathbf {A}\) and \(\mathbf {B}\) that \(\bigcup _{i\in I}\zeta ^{(i)}\) is a homomorphism \(\mathbf {A}\rightarrow \mathbf {B}\). We also have \(\xi \circ \bigcup _{i\in I}\zeta ^{(i)}=\chi \), for the following reason: for every \(a\in A\) there is a unique \(i\in I\) with \(a\in M^{(i)}\), so \(\chi (a)=i\) and \(M^{(i)}\not =\emptyset \); since \(\zeta ^{(i)}:M^{(i)}\rightarrow N^{(i)}\), we also have \(N^{(i)}\not =\emptyset \), whence \((\xi \circ \bigcup _{i\in I}\zeta ^{(i)})(a)=\xi (\zeta ^{(i)}(a))=i\). This shows that \(\mathfrak {M}^{-1}(\zeta )=\bigcup _{i\in I}\zeta ^{(i)}\) is indeed a morphism \(\mathfrak {M}^{-1}(\mathbf {M})\rightarrow \mathfrak {M}^{-1}(\mathbf {N})\) in \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\).

To complete the proof of statement (1), one can easily verify from the definitions that \(\mathfrak {M}^{-1}\) is a functor such that \(\mathfrak {M}\circ \mathfrak {M}^{-1}\) is the identity functor on \(\mathsf{MSAlg}(\mathcal {F}_{\mathbf {I}})\) and \(\mathfrak {M}^{-1}\circ \mathfrak {M}\) is the identity functor on \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\).

Statement (2) follows immediately from statement (1).

Finally, the first statement of the theorem about the equivalence of the categories \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\) and \(\mathsf{MSAlg}(\mathcal {F}_{\mathbf {I}})\) follows from the isomorphism of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downarrow }\,\mathbf {I}\bigr )\) and \(\mathsf{MSAlg}^\Box (\mathcal {F}_{\mathbf {I}})\) established in (1), and the fact that every multisorted algebra is isomorphic to one in which the sorts are pairwise disjoint. \(\square \)

Next we discuss a variant of the main result of [10].

Proposition 2.5

Given a multisorted algebraic language \(\mathcal {G}\) with no nullary symbols and finitely many sorts indexed by the set \([m]:=\{1,\dots ,m\}\) \((m>0)\), let \(\widehat{\mathcal {G}}\) be the algebraic language whose symbols are

  • \(\mathtt{d}\) with \(\mathrm{ar}(\mathtt{d})=m\), and

  • \(\widehat{g}\) with \(\mathrm{ar}(\widehat{g})=\mathrm{ar}(g)\) for all \(g\in G\).

The following functions define a functor \(\mathfrak {P}:\mathsf{MSAlg}(\mathcal {G})\rightarrow \mathsf{Alg}(\widehat{\mathcal {G}})\):

  • \(\mathfrak {P}\) assigns to every multisorted \(\mathcal {G}\)-algebra \(\mathbf {M}=\bigl ((M^{(i)})_{i\in [m]};\mathcal {G}\bigr )\) the \(\widehat{\mathcal {G}}\)-algebra

    $$\begin{aligned} \mathfrak {P}(\mathbf {M}):=(M^{(1)}\times \dots \times M^{(m)};\widehat{\mathcal {G}}) \end{aligned}$$

    where

    • \(\mathtt{d}\) is the diagonal operation on the product set \(M^{(1)}\times \dots \times M^{(m)}\); that is, for any tuples \((a_{j}^{(i)})_{i\in [m]}\in \prod _{i\in [m]}M^{(i)}\) \((j\in [m])\),

      $$\begin{aligned} \mathtt{d}\bigl ((a_{1}^{(i)})_{i\in [m]},\dots ,(a_{m}^{(i)})_{i\in [m]}\bigr ) =(a_{1}^{(1)},\dots ,a_{m}^{(m)}), \end{aligned}$$
      (2.1)

      and

    • for every \(g\in \mathcal {G}\), if the input and output sorts are \({\mathbf {i}}=(i_1,\dots ,i_k)\in [m]^k\) and \(i'\in [m]\) (so, \(\mathrm{ar}(g)=k)\), then the k-ary operation \(\widehat{g}\) is the following: for any input tuples \((a_{j}^{(i)})_{i\in [m]}\in \prod _{i\in [m]}M^{(i)}\) \((j\in [k])\),

      $$\begin{aligned}&\widehat{g} \bigl ((a_{1}^{(i)})_{i\in [m]},\dots ,(a_{k}^{(i)})_{i\in [m]}\bigr )\nonumber \\&\quad =\bigl (a_{1}^{(1)},\dots ,a_{1}^{(i'-1)}, g(a_{1}^{(i_1)},\dots ,a_{k}^{(i_k)}), a_{1}^{(i'+1)},\dots ,a_{1}^{(m)}\bigl ). \end{aligned}$$
      (2.2)
  • \(\mathfrak {P}\) assigns to every morphism \(\zeta =(\zeta ^{(i)})_{i\in [m]}:\mathbf {M}\rightarrow \mathbf {N}\) in \(\mathsf{MSAlg}(\mathcal {G})\), where each \(\zeta ^{(i)}\) \((i\in [m])\) is a function \(M^{(i)}\rightarrow N^{(i)}\), the morphism

    $$\begin{aligned} \mathfrak {P}(\zeta ):=\zeta ^{(1)}\times \dots \times \zeta ^{(m)}:\mathfrak {P}(\mathbf {M})\rightarrow \mathfrak {P}(\mathbf {N}) \end{aligned}$$

    in \(\mathsf{Alg}(\widehat{\mathcal {G}})\), which is a function \(M^{(1)}\times \dots \times M^{(m)}\rightarrow N^{(1)}\times \dots \times N^{(m)}\).

As it is remarked in [10], for a fixed \(\mathcal {G}\), the class of all isomorphic copies of algebras of the form \(\mathfrak {P}(\mathbf {M})\), as described in Proposition 2.5, is a variety \(\mathcal {D}(\widehat{\mathcal {G}})\) (including the empty algebra); \(\mathcal {D}(\widehat{\mathcal {G}})\) is defined by the following identities:

$$\begin{aligned}&\displaystyle \mathtt{d}(x,\dots ,x) =x, \end{aligned}$$
(2.3)
$$\begin{aligned}&\displaystyle \mathtt{d}\bigl (\mathtt{d}(x_{11},\dots ,x_{1m}),\mathtt{d}(x_{21},\dots ,x_{2m}), \dots ,\mathtt{d}(x_{m1},\dots ,x_{mm})\bigr ) {}=\mathtt{d}(x_{11},\dots ,x_{mm}),\nonumber \\ \end{aligned}$$
(2.4)

and for every symbol \(g\in \mathcal {G}\) with input and output sorts \(\mathbf {i}=(i_1,\dots ,i_k)\in [m]^k\) and \(i'\in [m]\) (so, \(\mathrm{ar}(g)=\mathrm{ar}(\widehat{g})=k\)),

$$\begin{aligned} \mathtt{d}_{i'}\bigl (\widehat{g}(x_1,\dots ,x_k),y\bigr )&{}=\mathtt{d}_{i'}\bigl (\widehat{g}\bigl (\mathtt{d}_{i_1}(x_1,z_1),\dots ,\mathtt{d}_{i_k}(x_k,z_k)\bigr ),y\bigr ), \end{aligned}$$
(2.5)
$$\begin{aligned} \mathtt{d}_j\bigl (\widehat{g}(x_1,\dots ,x_k),y\bigr )&{}=\mathtt{d}_j(x_1,y)\quad \text {for all } j\in [m]{\setminus }\{i'\}, \end{aligned}$$
(2.6)

where \(\mathtt{d}_\ell (x,y)\) is an abbreviation for \(\mathtt{d}(y,\dots ,y,x,y,\dots ,y)\) with x in the \(\ell \)th position.

Briefly, the statement that every algebra \(\mathbf {A}=(A;\widehat{\mathcal {G}})\) in \(\mathcal {D}(\widehat{\mathcal {G}})\) is isomorphic to an algebra of the form \(\mathfrak {P}(\mathbf {M})\) can be proved as follows. The identities (2.3) and (2.4) imply that for each \(\ell \in [m]\) there exists an equivalence relation \(\equiv _\ell \) on A such that for any \(a,b\in A\) we have

$$\begin{aligned} a\equiv _\ell b\quad \text {iff}\quad a=\mathtt{d}_\ell (b,a)\quad \text {iff}\quad \mathtt{d}_\ell (a,c)=\mathtt{d}_\ell (b,c)\ \text {for all } c\in A. \end{aligned}$$

Moreover, \({\equiv }_1,\dots ,{\equiv }_m\) yield a product decomposition \(A\rightarrow A/{\equiv }_1\times \dots \times A/{\equiv _m}\) so that for each \(\ell \in [m]\) and \(a\in A\) the elements of A with the same \(\ell \)th coordinate as a are exactly the elements of the form \(\mathtt{d}_\ell (a,c)\) (\(c\in A\)). Thus, the identities (2.5) and (2.6) express that for any elements \(a_1,\dots ,a_k\in A\), the \(i'\)th coordinate of \(\widehat{g}(a_1,\dots ,a_k)\) depends only on the coordinates \(i_1,\dots ,i_k\) of \(a_1,\dots ,a_k\), respectively, while for \(j\in [m]{\setminus }\{i'\}\), the jth coordinate of \(\widehat{g}(a_1,\dots ,a_k)\) is the jth coordinate of \(a_1\).

Definition 2.6

  1. (1)

    \(\mathsf{DAlg}(\widehat{\mathcal {G}})\) will denote the full subcategory of \(\mathsf{Alg}(\widehat{\mathcal {G}})\) whose objects are the \(\widehat{\mathcal {G}}\)-algebras of the form \(\mathfrak {P}(\mathbf {M})\) for some multisorted \(\mathcal {G}\)-algebra \(\mathbf {M}\).

  2. (2)

    We will use the notation \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\) for the full subcategory of \(\mathsf{DAlg}(\widehat{\mathcal {G}})\) obtained by omitting the empty algebra; that is, the objects of \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\) are exactly the algebras \(\mathfrak {P}(\mathbf {M})\) for which the sorts of \(\mathbf {M}\) are all nonempty.

  3. (3)

    \(\mathsf{DAlg}^\boxplus (\widehat{\mathcal {G}})\) will be our notation for the full subcategory of \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\) consisting of those algebras \(\mathfrak {P}(\mathbf {M})\) where the sorts of \(\mathbf {M}\) are pairwise disjoint.

  4. (4)

    \(\mathcal {D}^+(\widehat{\mathcal {G}})\) will denote the full subcategory of \(\mathsf{Alg}(\widehat{\mathcal {G}})\) whose objects are the nonempty members of the variety \(\mathcal {D}(\widehat{\mathcal {G}})\).

figure b

Clearly, \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\) is a full subcategory of \(\mathcal {D}^+(\widehat{\mathcal {G}})\).

Theorem 2.7

For any multisorted algebraic language \(\mathcal {G}\) with no nullary symbols and finitely many sorts, the category \(\mathsf{MSAlg}^+(\mathcal {G})\) of multisorted \(\mathcal {G}\)-algebras is equivalent to the category \(\mathcal {D}^+(\widehat{\mathcal {G}})\) of \(\widehat{\mathcal {G}}\)-algebras.

In more detail, we have the following.

  1. (1)

    The functor \(\mathfrak {P}\) described in Proposition 2.5 maps the full subcategory \(\mathsf{MSAlg}^+(\mathcal {G})\) of \(\mathsf{MSAlg}(\mathcal {G})\) into the full subcategory \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\) of \(\mathsf{Alg}(\widehat{\mathcal {G}})\), and yields (by changing the domain and target categories) an isomorphism

    $$\begin{aligned} \mathfrak {P}:\mathsf{MSAlg}^+(\mathcal {G})\rightarrow \mathsf{DAlg}^+(\widehat{\mathcal {G}}). \end{aligned}$$
  2. (2)

    \(\mathfrak {P}\) restricts to an isomorphism between the full subcategory \(\mathsf{MSAlg}^\boxplus (\mathcal {G})\) of \(\mathsf{MSAlg}^+(\mathcal {G})\) and the full subcategory \(\mathsf{DAlg}^\boxplus (\widehat{\mathcal {G}})\) of \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\).

Proof

As in the proof of Theorem 2.4, the crucial statement is (1), because (2) is an immediate consequence of (1), while the first statement of the theorem on the equivalence of the categories \(\mathsf{MSAlg}^+(\mathcal {G})\) and \(\mathcal {D}^+(\widehat{\mathcal {G}})\) follows from (1) and the fact that every algebra in \(\mathcal {D}^+(\widehat{\mathcal {G}})\) is isomorphic to one in \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\).

To verify statement (1) it suffices to check that

  1. (i)

    the object function of \(\mathfrak {P}\) is a bijection between the class of objects of \(\mathsf{MSAlg}^+(\mathcal {G})\) and the class of objects of \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\),

  2. (ii)

    the morphism function of \(\mathfrak {P}\) is a bijection between the set of homomorphisms \(\mathbf {M}\rightarrow \mathbf {N}\) in \(\mathsf{MSAlg}^+(\mathcal {G})\) and the set of homomorphisms \(\mathfrak {P}(\mathbf {M})\rightarrow \mathfrak {P}(\mathbf {N})\) in \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\) for all objects \(\mathbf {M},\mathbf {N}\) in \(\mathsf{MSAlg}^+(\mathcal {G})\), and

  3. (iii)

    the inverses of these object and morphism functions yield a functor \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\rightarrow \mathsf{MSAlg}^+(\mathcal {G})\).

For (i), the object function of \(\mathfrak {P}\) is surjective by the definition of the category \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\), and it is injective, because for any multisorted \(\mathcal {G}\)-algebra \(\mathbf {M}\), the \(\widehat{\mathcal {G}}\)-algebra \(\mathfrak {P}(\mathbf {M})\) uniquely determines \(\mathbf {M}\). Indeed, since the underlying set \(M^{(1)}\times \dots \times M^{(m)}\) of \(\mathfrak {P}(\mathbf {M})\) is nonempty, this product set determines the sorts \(M^{(1)},\dots ,M^{(m)}\) of \(\mathbf {M}\), and for every \(g\in \mathcal {G}\), the operation \(\widehat{g}\) of \(\mathfrak {P}(\mathbf {M})\) determines the operation g of \(\mathbf {M}\).

For (ii), let us fix two objects \(\mathbf {M},\mathbf {N}\) in \(\mathsf{MSAlg}^+(\mathcal {G})\). It follows easily from the definition \(\zeta =(\zeta ^{(i)})_{i\in [m]}\mapsto \mathfrak {P}(\zeta ) =\zeta ^{(1)}\times \dots \times \zeta ^{(m)}\) of the morphism function of \(\mathfrak {P}\) that homomorphisms \(\mathbf {M}\rightarrow \mathbf {N}\) are mapped into homomorphisms \(\mathfrak {P}(\mathbf {M})\rightarrow \mathfrak {P}(\mathbf {N})\) injectively. To see that the morphism function is also surjective, notice that the diagonal operation \(\mathtt{d}\) of the algebras in \(\mathsf{DAlg}^+(\widehat{\mathcal {G}})\) forces every homomorphism \(\mathfrak {P}(\mathbf {M})\rightarrow \mathfrak {P}(\mathbf {N})\) to be of the form \(\sigma ^{(1)}\times \dots \times \sigma ^{(m)}\) for some functions \(\sigma ^{(i)}:M^{(i)}\rightarrow N^{(i)}\). So, since such a homomorphism also preserves the operations \(\widehat{g}\) (\(g\in \mathcal {G}\)), it follows that \((\sigma ^{(i)})_{i\in [m]}\) must be a homomorphism \(\mathbf {M}\rightarrow \mathbf {N}\).

The last statement, (iii), follows immediately from the definitions of the object and morphism functions of \(\mathfrak {P}\), completing the proof. \(\square \)

Later on in the paper, when we use the definitions of the operations of the algebra \(\mathfrak {P}(\mathbf {M})\) (see Proposition 2.5) it will be convenient to think of the elements of \(\prod _{i\in [m]} M^{(i)}\) as column vectors of length m, and k-tuples of elements of \(\prod _{i\in [m]} M^{(i)}\) as \(m\times k\) matrices whose columns are in \(\prod _{i\in [m]} M^{(i)}\). Accordingly, we will introduce the following convention: for an \(m\times k\) matrix \(\mathbf {a}=(a_{j}^{(i)})_{i\in [m],j\in [k]}\in \bigl (\prod _{i\in [m]} M^{(i)}\bigr )^k\), we will denote the jth column \((a_{j}^{(i)})_{i\in [m]}\) of \(\mathbf {a}\) by \(\mathbf {a}_{j}\), and the ith row \((a_{j}^{(i)})_{j\in [k]}\) of \(\mathbf {a}\) by \(\mathbf {a}^{(i)}\). Thus, the definitions of the operations of \(\mathfrak {P}(\mathbf {M})\) in (2.1) and (2.2) can be rewritten as follows:

  • for every \(m\times m\) matrix \(\mathbf {a}=(a_{j}^{(i)})_{i\in [m],j\in [m]}\in \bigl (\prod _{i\in [m]} M^{(i)}\bigr )^m\),

    figure c
  • for every symbol \(g\in \mathcal {G}\) with input and output sorts \(\mathbf {i}=(i_1,\dots ,i_k)\in [m]^k\) and \(i'\in [m]\) (and hence of arity k), and for every \(m\times k\) matrix \(\mathbf {a}=(a_{j}^{(i)})_{i\in [m],j\in [k]}\in \bigl (\prod _{i\in [m]} M^{(i)}\bigr )^k\),

    figure d

Remark 2.8

This description of the operations of \(\mathcal {D}^+(\widehat{\mathcal {G}})\) generalizes to all terms, and yields an alternative view of (and proof for) Theorem 2.7. The description is as follows:

For any positive integer k, there is a bijection \(\displaystyle T(\mathbf {x})\mapsto \begin{bmatrix} t^{(1)}(\mathbf {x})\\ \vdots \\ t^{(m)}(\mathbf {x}) \end{bmatrix}\) between

  • the k-ary terms T of \(\mathcal {D}^+(\widehat{\mathcal {G}})\) (modulo the identities in \(\mathcal {D}^+(\widehat{\mathcal {G}})\))and

  • the m-tuples \(t^{(1)},\dots ,t^{(m)}\) of mk -ary \(\mathcal {G}\) -terms such that the input sort of each \(t^{(i)}\) \((i\in [m])\) is the \(m\times k\) matrix with jth row \([j\ \dots \ j]\) for each \(j\in [m]\), while the output sort is i

such that the following equality holds in the algebra \(\mathbf {P}:=\mathfrak {P}(\mathbf {M})\) for each object \(\mathbf {M}=\bigl ((M^{(i)})_{i\in [m]},\mathcal {G}\bigr )\in \mathsf{MSAlg}^+(\mathcal {G})\):

$$\begin{aligned} T(\mathbf {a})= \begin{bmatrix} t^{(1)}(\mathbf {a})\\ \vdots \\ t^{(m)}(\mathbf {a}) \end{bmatrix} \quad \text {for every } m\times k\text { matrix } \mathbf {a}\in \Bigl (\prod _{i\in [m]}M^{(i)}\Bigr )^k=P^k, \end{aligned}$$

where T is applied to the k columns of \(\mathbf {a}\), and \(t^{(1)},\dots ,t^{(m)}\) are applied to the mk entries of \(\mathbf {a}\).

It is clear from the definitions of the operations in \(\mathcal {D}^+(\widehat{\mathcal {G}})\) that terms of height \(\le 1\) have the form described in the statement, and an easy induction on the complexity of terms yields the same result for arbitrary terms T. For the converse, one can prove first, again by induction on the complexity of terms, that every \(\mathcal {G}\)-term with output sort i occurs as the ith coordinate term \(t^{(i)}\) of some term T of \(\mathcal {D}^+(\widehat{\mathcal {G}})\), and then use the diagonal operation \(\mathtt{d}\) to construct a single term T as claimed for every sequence \(t^{(1)},\dots ,t^{(m)}\) of \(\mathcal {G}\)-terms satisfying the requirements in the statement above.

This paper will focus on the composition of the functors \(\mathfrak {M}\) and \(\mathfrak {P}\). For further reference we now summarize the consequences of Theorems 2.4 and 2.7 that we will need.

Corollary 2.9

For any algebraic language \(\mathcal {F}\) with no nullary symbols and for any finite \(\mathcal {F}\)-algebra \(\mathbf {I}=([m];\mathcal {F})\), the category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) of \(\mathcal {F}\)-algebras is equivalent to the category \(\mathcal {D}^+(\widehat{\mathcal {F}_{\mathbf {I}}})\).

In more detail, the functor \(\mathfrak {P}\circ \mathfrak {M}\) yields an isomorphism

$$\begin{aligned} \mathfrak {C}:\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\rightarrow \mathsf{DAlg}^\boxplus (\widehat{\mathcal {F}_{\mathbf {I}}}) \end{aligned}$$

between \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) and the full subcategory \(\mathsf{DAlg}^\boxplus (\widehat{\mathcal {F}_{\mathbf {I}}})\) of \(\mathcal {D}^+(\widehat{\mathcal {F}_{\mathbf {I}}})\) with object and morphism functions defined as follows:

  • \(\mathfrak {C}\) assigns to every object \((\mathbf {A},\chi )\) in \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) the algebra

    $$\begin{aligned} \mathfrak {C}(\mathbf {A},\chi ):= \bigl (D^{(1)}\times \dots \times D^{(m)};\widehat{\mathcal {F}}_{\mathbf {I}}\bigr ) \end{aligned}$$

    in \(\mathsf{DAlg}^\boxplus (\widehat{\mathcal {F}}_{\mathbf {I}})\) where

    • \(\prod _{i\in [m]} D^{(i)}\) is the product of the congruence classes \(D^{(i)}:=\chi ^{-1}(i)\) of the kernel of \(\chi \),

    • \(\mathtt{d}\) is the diagonal operation on \(\prod _{i\in [m]} D^{(i)}\), that is, for every \(m\times m\) matrix \(\mathbf {a}=(a_{j}^{(i)})_{i\in [m],j\in [m]}\in \bigl (\prod _{i\in [m]} D^{(i)}\bigr )^m\),

      $$\begin{aligned} \mathtt{d}(\mathbf {a})=\text {diagonal of } \mathbf {a}, \end{aligned}$$

      and

    • for each \(f\in \mathcal {F}\) (say k-ary), \(\mathbf {i}=(i_1,\dots ,i_k)\in [m]^k\), and for every \(m\times k\) matrix \(\mathbf {a}=(a_{j}^{(i)})_{i\in [m],j\in [k]}\in \bigl (\prod _{i\in [m]} D^{(i)}\bigr )^k\),

      $$\begin{aligned}&\widehat{f}_{{\mathbf {i}}}(\mathbf {a})\ \text {is obtained from } \mathbf {a}_{1} \text { by replacing the } f({\mathbf {i}})\text { th entry}\\&\qquad \qquad \text {with } f(a_{1}^{(i_1)},\dots ,a_{k}^{(i_k)}),\text { where } f({\mathbf {i}})\text { is evaluated in } \mathbf {I}. \end{aligned}$$
  • \(\mathfrak {C}\) assigns to every morphism \(\psi :(\mathbf {A},\chi )\rightarrow (\mathbf {B},\xi )\) in \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) the homomorphism

    $$\begin{aligned} \mathfrak {C}(\psi ):=\psi ^{(1)}\times \dots \times \psi ^{(m)}:\mathfrak {C}(\mathbf {A},\chi )\rightarrow \mathfrak {C}(\mathbf {B},\xi ) \end{aligned}$$

    of \(\widehat{\mathcal {F}_{\mathbf {I}}}\)-algebras, where for each \(i\in [m]\), \(\psi ^{(i)}:\chi ^{-1}(i)\rightarrow \xi ^{-1}(i)\) is the restriction of \(\psi \) to \(\chi ^{-1}(i)\), and \(\psi ^{(1)}\times \dots \times \psi ^{(m)}\) is the induced function

    $$\begin{aligned} \chi ^{-1}(1)\times \dots \times \chi ^{-1}(m)\rightarrow \xi ^{-1}(1)\times \dots \times \xi ^{-1}(m). \end{aligned}$$

Note that it is necessary to assume that the algebra \(\mathbf {I}\) is finite if we want to obtain a finitary diagonal operation \(\mathtt{d}\). The assumption that the language \(\mathcal {F}\) has no nullary symbols is also unavoidable, unless we are willing to lose nullary symbols during the construction \((\mathbf {A},\chi )\mapsto \mathfrak {C}(\mathbf {A},\chi )\). Indeed, if an algebra \(\mathfrak {C}(\mathbf {A},\chi )\) had a nullary operation symbol, and hence a corresponding unary constant term operation, then by the description of the term operations of \(\mathfrak {C}(\mathbf {A},\chi )\) in Corollary 3.13(1), the algebra \(\mathbf {A}\) should have constant term operations \(t^{(i)}\) (and hence their nullary counterparts) with values in every kernel class \(\chi ^{-1}(i)\) (\(i\in [m]\)) of the homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\).

This restriction on the language \(\mathcal {F}\) does not affect the applicability of the functor \(\mathfrak {C}\). Indeed, if \(\mathcal {F}\) is any language with at least one nullary symbol, then letting \(\mathcal {F}'\) be the algebraic language obtained from \(\mathcal {F}\) by replacing each nullary symbol \(c\in F\) by a unary symbol \(c'\) we get a functor

$$\begin{aligned} ':\mathsf{Alg}(\mathcal {F})\rightarrow \mathsf{Alg}(\mathcal {F}') \end{aligned}$$
  • by assigning to every \(\mathcal {F}\)-algebra \(\mathbf {A}=(A;\mathcal {F})\) (necessarily nonempty) the algebra \(\mathbf {A}'=(A,\mathcal {F}')\) obtained from \(\mathbf {A}\) by defining \(c'\) to be the unary constant operation on A with value c for every nullary symbol \(c\in \mathcal {F}\), and by keeping all other operations unchanged; and

  • by assigning to every homomorphism \(\varphi :\mathbf {A}\rightarrow \mathbf {B}\) of \(\mathcal {F}\)-algebras the same function \(\varphi ':=\varphi \), which is a homomorphism \(\mathbf {A}'\rightarrow \mathbf {B}'\) of \(\mathcal {F}'\)-algebras.

Clearly, this is an isomorphism between \(\mathsf{Alg}(\mathcal {F})\) and a full subcategory of \(\mathsf{Alg}(\mathcal {F}')\). Given a finite \(\mathcal {F}\)-algebra \(\mathbf {I}=([m];\mathcal {F})\), this isomorphism induces a functor

$$\begin{aligned} \mathfrak {I}:\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\rightarrow \bigl (\mathsf{Alg}(\mathcal {F}')\,{\downdownarrows }\,\mathbf {I}'\bigr ) \end{aligned}$$

which is an isomorphism between \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) and a full subcategory of \(\bigl (\mathsf{Alg}(\mathcal {F}')\,{\downdownarrows }\,\mathbf {I}'\bigr )\). This can now be composed with the isomorphism from Corollary 2.9 with domain category \(\bigl (\mathsf{Alg}(\mathcal {F}')\,{\downdownarrows }\,\mathbf {I}'\bigr )\).

Remark 2.10

For every algebraic language \(\mathcal {F}\) with no nullary symbols and for any finite \(\mathcal {F}\)-algebra \(\mathbf {I}=([m];\mathcal {F})\), the description (stated without proof in Remark 2.8) for the terms of the variety \(\mathcal {D}^+(\widehat{\mathcal {F}_{\mathbf {I}}})\) via \(\mathcal {F}_{\mathbf {I}}\)-terms easily yields a description of the terms of \(\mathcal {D}^+(\widehat{\mathcal {F}_{\mathbf {I}}})\) via \(\mathcal {F}\)-terms and \(\mathbf {I}\). In Section 3 we give a proof for this result, but instead of using computations with terms, we derive the result from Corollary 2.9 via examining the relationship between free algebras in \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) and in \(\mathsf{Alg}(\mathcal {F})\) (see Corollary 3.11).

3 Algebraic properties of the functor \(\mathfrak {C}\)

Throughout this section, \(\mathcal {F}\) will be an algebraic language with no nullary symbols, and \(\mathbf {I}=([m];\mathcal {F})\) will be a finite \(\mathcal {F}\)-algebra (\(m>0\)). The functor \(\mathfrak {C}\) (see Corollary 2.9) describes a construction which produces from every \(\mathcal {F}\)-algebra \(\mathbf {A}\) with a fixed homomorphism \(\chi \) onto \(\mathbf {I}\) a new algebra \(\mathfrak {C}(\mathbf {A},\chi )\) in the language \(\widehat{\mathcal {F}}_{\mathbf {I}}\). Our goal in this section is to demonstrate that this construction preserves a lot of important algebraic properties. As discussed in the Introduction, variants and special cases of many of these preservation results have appeared in the literature, but often not in the generality that we need in Sections 4 and 5. Therefore we decided to include this section to survey a wide range of algebraic properties preserved by the functor \(\mathfrak {C}\), most of which will be used in the proofs of the main results of the paper in Sections 4 and 5.

Our survey will start with preservation theorems for subalgebras of products (see Theorem 3.1) and compatible relations, including endomorphisms and automorphisms (see Corollaries 3.2, 3.3). Of particular interest are the preservation results on congruences (see Corollary 3.4), commutator properties (see Theorem 3.6), and tame congruence theoretic types (see Theorem 3.18). We will also describe how the clone of term (resp., polynomial) operations changes when we pass from \(\mathbf {A}\) (paired with \(\chi \)) to \(\mathfrak {C}(\mathbf {A},\chi )\) (see Corollaries 3.13(1) and 3.16). The description of term operations will imply, for example, that under this construction, the satisfaction of idempotent Maltsev conditions by the generated varieties is also preserved (see Corollary 3.14). Finiteness properties of algebras and clones preserved by \(\mathfrak {C}\) will also be considered (see, e.g., Theorem 3.1(4) and Corollaries 3.5(3), 3.12, 3.15).

3.1 Subalgebras of products and compatible relations

In the category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\), the subobjects of an object \((\mathbf {A},\chi )\) are (up to isomorphism) the objects \((\mathbf {B},\xi )\) such that \(B\subseteq A\) and the inclusion map \(B\rightarrow A\) is a morphism \((\mathbf {B},\xi )\rightarrow (\mathbf {A,\chi })\); equivalently, the subobjects of \((\mathbf {A},\chi )\) are (up to isomorphism) the pairs \((\mathbf {B},\xi )\) where \(\mathbf {B}\) is a subalgebra of \(\mathbf {A}\) and \(\xi =\chi |_{\mathbf {I}}:\mathbf {B}\rightarrow \mathbf {I}\) is onto (i.e., B has a nonempty intersection with \(\chi ^{-1}(i)\) for all \(i\in [m]\)).

The category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) has products for all nonempty families of objects. Namely, if \((\mathbf {A}_{j},\chi _{j})\) (\(j\in J\), \(J\not =\emptyset \)) is an indexed family of objects in \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\), then their product in \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) is their pullback in \(\mathsf{Alg}(\mathcal {F})\), one representative of which is the fibered product \(\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_{j}\) together with the induced homomorphism \(\chi \) defined as follows:

where \(D_{j}^{(i)}=\chi ^{-1}_{j}(i)\) for all \(i\in [m]\), \(j\in J\), and

where the image \(\chi _{j}(a_{j})\) is independent of the choice of \(j\in J\).

Theorem 3.1

Let \((\mathbf {A}_{j},\chi _{j})\) \((j\in J)\) be arbitrary objects of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\), let \(\mathbf {C}_j:=\mathfrak {C}(\mathbf {A}_{j},\chi _{j})\) \((j\in J)\), and for any \(i\in [m]\) let \(D^{(i)}:=\prod _{l\in J}\chi _{l}^{-1}(i)\).

  • (1) \(\mathfrak {C}\bigl (\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_{j},\chi \bigr )=\prod _{j\in J}\mathbf {C}_j\), and the mapping

    $$\begin{aligned} B\mapsto B^\mathfrak {C}&{}:= \left\{ \begin{pmatrix} \begin{bmatrix} b_{j}^{(1)}\\ \vdots \\ b_{j}^{(m)} \end{bmatrix} \end{pmatrix}_{ j\in J}\in \prod _{j\in J}C_j: (b_{j}^{(i)})_{j\in J}\in B\cap D^{(i)}\ \text {for all } i\in [m] \right\} \\&{} = \prod _{i\in [m]}(B\cap D^{(i)}) \quad \text {(up to a rearrangement of coordinates)} \end{aligned}$$

    is an isomorphism between

    • \(\diamond \) the ordered set of all subuniverses B of the algebra \(\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_{j}\) with the property that \(B\cap D^{(i)}\not =\emptyset \) for every \(i\in [m]\), and

    • \(\diamond \) the ordered set of all nonempty subuniverses of the algebra \(\prod _{j\in J}\mathbf {C}_j\).

  • (2) This mapping  \(^\mathfrak {C}\) preserves all intersections of subuniverses and all coordinate manipulations on subuniverses (namely: permutation and duplication of coordinates, and projection of subuniverses onto subsets of coordinates). In more detail, for intersection and for projection this means that if \(R_{\ell }\) \((\ell \in L)\) and R are subuniverses of \(\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_j\) in the domain of  \({}^\mathfrak {C}\) and \(K\subseteq J\), then

    $$\begin{aligned} \Bigl (\bigcap _{\ell \in L} R_{\ell }\Bigr )^\mathfrak {C}=\bigcap _{\ell \in L}R_{\ell }^\mathfrak {C}\quad \text {and}\quad \bigl (R|_K\bigr )^\mathfrak {C}=R^\mathfrak {C}|_K, \end{aligned}$$

    respectively, where \(=\) means that if the left hand side is defined, then so is the right hand side and the equality holds.

  • (3) For arbitrary choice of elements \(d^{(i)}=(d_{j}^{(i)})_{j\in J}\in D^{(i)}\) \((i\in [m])\), the function

    has the following property: If \(\mathbf {B}\) is a subalgebra of \(\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_{j}\) such that \(d^{(i)}\in B\cap D^{(i)}\) for every \(i\in [m]\), then for every set \(G\subseteq B\) that generates \(\mathbf {B}\), the set \(\widetilde{G}:=\{\widetilde{b}:b\in G\}\) generates \(\mathbf {B}^\mathfrak {C}\).

  • (4) Consequently, for every subalgebra \(\mathbf {B}\) of \(\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_{j}\) such that \(B\cap D^{(i)}\not =\emptyset \) for every \(i\in [m]\), \(\mathbf {B}\) is finitely generated if and only if \(\mathbf {B}^\mathfrak {C}\) is finitely generated.

The elements \(d^{(i)}\) (\(i\in [m]\)) used in the definition of the function \(\widetilde{\,}\) in part (3) of the theorem above will be referred to as padding elements.

Proof of Theorem 3.1

Statements (1)–(2) follow by combining our description of subobjects and products in the category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) (see the first two paragraphs of this subsection) with the following properties of the functor \(\mathfrak {C}\) (see Corollary 2.9): (i) \(\mathfrak {C}\) is an isomorphism between the category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) and its image category \(\mathfrak {C}\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\), (ii) \(\mathfrak {C}\) sends the product object \(\Bigl (\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_{j},\chi \bigr )\) to the product algebra \(\prod _{j\in J}\mathfrak {C}(\mathbf {A}_j,\chi _j)=\prod _{j\in J}\mathbf {C}_j\), and (iii) \(\mathfrak {C}\) sends the subobjects \((\mathbf {B},\chi |_\mathbf {B})\) of an object \((\mathbf {A},\chi )\) to the subalgebras \(\mathbf {B}^\mathfrak {C}:=\mathfrak {C}(\mathbf {B},\chi |_\mathbf {B})\) of \(\mathfrak {C}(\mathbf {A},\chi )\).

For the proof of statement (3) assume G generates \(\mathbf {B}\), and let \(\mathbf {T}\) denote the subalgebra of \(\prod _{j\in J}\mathbf {C}_j\) generated by the set \(\widetilde{G}\). Since \(\mathbf {T}\) is nonempty (as \(\mathbf {B}\), and hence G are nonempty), statement (1) implies that \(\mathbf {T}=\mathbf {S}^\mathfrak {C}\) for some subalgebra \(\mathbf {S}\) of \(\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}_{j}\) such that \(S\cap D^{(i)}\not =\emptyset \) for every \(i\in [m]\). Our goal is to show that \(\mathbf {T}=\mathbf {B}^\mathfrak {C}\), or equivalently, \(\mathbf {S}^\mathfrak {C}=\mathbf {B}^\mathfrak {C}\).

Since \(G\subseteq B\), it follows from the description of the elements of \(\mathbf {B}^\mathfrak {C}\) that \(\widetilde{G}\subseteq B^\mathfrak {C}\). Therefore, \(\mathbf {S}^\mathfrak {C}=\mathbf {T}\) is a subalgebra of \(\mathbf {B}^\mathfrak {C}\). To prove that \(\mathbf {B}^\mathfrak {C}\) is a subalgebra of \(\mathbf {S}^\mathfrak {C}\), it suffices to establish that \(\mathbf {B}\) is a subalgebra of \(\mathbf {S}\). Since \(\widetilde{G}\subseteq \mathbf {S}^\mathfrak {C}\), the description of the elements of \(\mathbf {S}^\mathfrak {C}\) implies that \(G\cup \{d^{(i)}:i\in [m]\}\subseteq S\). Hence the algebra \(\mathbf {B}\) generated by G is a subalgebra of \(\mathbf {S}\).

In statement (4), the implication that if \(\mathbf {B}\) is finitely generated, then so is \(\mathbf {B}^\mathfrak {C}\) follows from the statement in part (3). Since in that statement G is finite if and only if \(\widetilde{G}\) is finite if and only if \(G\cup \{d^{(i)}:i\in [m]\}\) is finite, the converse follows by using that \(\mathfrak {C}\) is an isomorphism \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\rightarrow \mathfrak {C}\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\). \(\square \)

An important special case of Theorem 3.1 is when all objects \((\mathbf {A}_j,\chi _j)\) (\(j\in J\)) are the same, say \((\mathbf {A},\chi )\). Then the algebra \(\prod ^{\downdownarrows \mathbf {I}}_{j\in J}\mathbf {A}\) depends only on \(\mathbf {A}\) and \(\alpha =\ker (\chi )\), and will be denoted by \(\mathbf {A}^J[\alpha ]\). The underlying set is

$$\begin{aligned} A^J[\alpha ]:=\{(a_{j})_{j\in J}:a_{j}\,\alpha \,a_{\ell } \text { for all } j,\ell \in J\}. \end{aligned}$$

In particular, \(A^2[\alpha ]\) is nothing else than \(\alpha \).

Recall that for an algebra \(\mathbf {A}\) the subuniverses of \(\mathbf {A}^n\) are often called n-ary compatible relations of \(\mathbf {A}\). An n-ary compatible relation of \(\mathbf {A}\), and the corresponding algebra, is said to be reflexive if it contains all constant n-tuples \((a,\dots ,a)\) (\(a\in A\)). The map \(^\mathfrak {C}\) described in Theorem 3.1(1) is particularly well-behaved for reflexive compatible relations of \(\mathbf {A}\) that are contained in \(\mathbf {A}^n[\alpha ]\), as the following corollary shows.

Corollary 3.2

Let \(\mathbf {A}\) be an \(\mathcal {F}\)-algebra with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\). Let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\) and \(\alpha :=\ker (\chi )\).

  • (1) For every positive integer n, the mapping

    $$\begin{aligned} B \mapsto B^\mathfrak {C}= \left\{ \begin{pmatrix} \begin{bmatrix} a_{1}^{(1)}\\ \vdots \\ a_{1}^{(m)} \end{bmatrix},\dots , \begin{bmatrix} a_{n}^{(1)}\\ \vdots \\ a_{n}^{(m)} \end{bmatrix} \end{pmatrix}\in \mathbf {C}^n: \begin{array}{r} \\ (a_{1}^{(i)},\dots ,a_{n}^{(i)})\in B\\ \text {for all } i\in [m] \\ \end{array} \right\} \end{aligned}$$

    is an isomorphism between

    • \(\diamond \) the lattice of all n-ary reflexive compatible relation of \(\mathbf {A}\) that are contained in \(A^n[\alpha ]\), and

    • \(\diamond \) the lattice of all n-ary reflexive compatible relations of \(\mathbf {C}\).

  • (2) This mapping \(^\mathfrak {C}\) between reflexive relations (applied over all arities \(n\ge 1)\) also preserves the following relational clone operations: intersection of relations of the same arity, composition, and coordinate manipulations (permutation, identification, and duplication of coordinates, and projection of relations to a subset of coordinates). Moreover, \(^\mathfrak {C}\) preserves product in the respective categories; that is, if for any reflexive compatible relations \(R\subseteq A^k[\alpha ]\) and \(S\subseteq A^n[\alpha ]\) we define \(R\times _\alpha S:=(R\times S)\cap A^{k+n}[\alpha ]\), then

    $$\begin{aligned} (R\times _\alpha S)^\mathfrak {C}=R^\mathfrak {C}\times S^\mathfrak {C}. \end{aligned}$$

Proof

Statement (1) follows immediately from Theorem 3.1(1) and the fact that for any n-ary reflexive relation B of \(\mathbf {A}\) with \(B\subseteq A^n[\alpha ]\) the property that “\(B\cap \bigl (\chi ^{-1}(i)\bigr )^n\not =\emptyset \) for every \(i\in [m]\)” holds automatically, since \(B\cap \bigl (\chi ^{-1}(i)\bigr )^n\) contains all constant tuples \((a,\dots ,a)\) with \(a\in \chi ^{-1}(i)\). Statement (2) is a straightforward consequence of statement (1). \(\square \)

Recall that by Corollary 2.9, every homomorphism from \(\mathfrak {C}(\mathbf {A},\chi )\) to \(\mathfrak {C}(\mathbf {B},\xi )\) is of the form \(\mathfrak {C}(\psi )\) for some homomorphism \(\psi :\mathbf {A}\rightarrow \mathbf {B}\) with \(\chi = \xi \circ \psi \). By identifying endomorphisms \(\psi \) of \(\mathbf {A}\) with their graphs \(\{ (a,\psi (a)) : a\in A\}\), which form subuniverses of \(\mathbf {A}^2\), the map \(^\mathfrak {C}\) described in Theorem 3.1(1) also yields the following correspondence.

Corollary 3.3

Let \(\mathbf {A}\) be an \(\mathcal {F}\)-algebra with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\). Let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\) and \(\alpha :=\ker (\chi )\). The mapping

$$\begin{aligned} \psi \mapsto \psi ^\mathfrak {C}= \left\{ \begin{pmatrix} \begin{bmatrix} a^{(1)}\\ \vdots \\ a^{(m)} \end{bmatrix}, \begin{bmatrix} \psi (a^{(1)})\\ \vdots \\ \psi (a^{(m)}) \end{bmatrix} \end{pmatrix}\in \mathbf {C}^2: a^{(i)}\in \chi ^{-1}(i)\ \text {for all } i\in [m] \right\} \end{aligned}$$

is an isomorphism between

  • \(\diamond \) the monoid of all endomorphisms (the group of all automorphisms) \(\psi \) of \(\mathbf {A}\) such that the graph of \(\psi \) is contained in \(\alpha \), and

  • \(\diamond \) the endomorphism monoid (the automorphism group) of \(\mathbf {C}\).

3.2 Congruences and commutator properties

Results of the previous subsection specialize to congruences as follows.

Corollary 3.4

Let \(\mathbf {A}\) be an \(\mathcal {F}\)-algebra with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\), and let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\), \(\alpha :=\ker (\chi )\).

  1. (1)

    The mapping

    $$\begin{aligned} \beta \mapsto \beta ^\mathfrak {C}= \left\{ \begin{pmatrix} \begin{bmatrix} a_{1}^{(1)}\\ \vdots \\ a_{1}^{(m)} \end{bmatrix}, \begin{bmatrix} a_{2}^{(1)}\\ \vdots \\ a_{2}^{(m)} \end{bmatrix} \end{pmatrix}\in \mathbf {C}^2: (a_{1}^{(i)},a_{2}^{(i)})\in \beta \ \text {for all } i\in [m] \right\} \end{aligned}$$

    is an isomorphism between the interval \(I(0,\alpha )\) of the congruence lattice of \(\mathbf {A}\) and the congruence lattice of \(\mathbf {C}\).

  2. (2)

    The mapping \({}^\mathfrak {C}\) preserves meet (= intersection) and join of congruences, and k-permutability of congruences for every \(k\ge 2\); that is, for arbitrary congruences \(\beta _j\in I(0,\alpha )\) \((j\in J)\) and \(\beta ,\gamma \in I(0,\alpha )\) of \(\mathbf {A}\),

    $$\begin{aligned} \Bigl (\bigcap _{j\in J}\beta _j\Bigr )^\mathfrak {C}=\bigcap _{j\in J}\beta _j^\mathfrak {C}, \qquad \Bigl (\bigvee _{j\in J}\beta _j\Bigr )^\mathfrak {C}=\bigvee _{j\in J}\beta _j^\mathfrak {C}, \end{aligned}$$

    and

    $$\begin{aligned} \beta \circ _k\gamma =\gamma \circ _k\beta \ \ \Longleftrightarrow \ \ \beta ^\mathfrak {C}\circ _k\gamma ^\mathfrak {C}=\gamma ^\mathfrak {C}\circ _k\beta ^\mathfrak {C}. \end{aligned}$$
  3. (3)

    For every \(\beta \in I(0,\alpha )\), \(\beta \) is a finitely generated congruence of \(\mathbf {A}\) if and only if \(\beta ^\mathfrak {C}\) is a finitely generated congruence of \(\mathbf {C}\).

Proof

Items (1)–(2) are immediate consequences of Corollary 3.2. Item (3) follows from (2) and the fact that finitely generated congruences are exactly the compact elements in the congruence lattice. \(\square \)

The description of the functor \(\mathfrak {C}\) in Corollary 2.9, together with the description of the mapping \({}^\mathfrak {C}\) it induces on congruences, implies that quotient algebras are also preserved by \(\mathfrak {C}\) in the following sense.

Corollary 3.5

Let \(\mathbf {A}\) be an \(\mathcal {F}\)-algebra with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\), and let \(\alpha :=\ker (\chi )\).

  1. (1)

    For every congruence \(\beta \in I(0,\alpha )\) of \(\mathbf {A}\),

    $$\begin{aligned} \mathfrak {C}(\mathbf {A}/\beta ,\chi /\beta )\cong \mathfrak {C}(\mathbf {A},\chi )/\beta ^\mathfrak {C}, \end{aligned}$$

    where \(\chi /\beta :\mathbf {A}/\beta \rightarrow \mathbf {I}\) is the unique homomorphism that is obtained by factoring \(\chi :\mathbf {A}\rightarrow \mathbf {I}\) through the natural homomorphism \(\mathbf {A}\rightarrow \mathbf {A}/\beta \).

  2. (2)

    In particular, for every congruence \(\beta \in I(0,\alpha )\) of \(\mathbf {A}\), \(\mathbf {A}/\beta \) is finite if and only if \(\mathfrak {C}(\mathbf {A},\chi )/\beta ^\mathfrak {C}\) is finite. Consequently, \(\mathbf {A}\) is residually finite if and only if \(\mathfrak {C}(\mathbf {A},\chi )\) is residually finite.

Recall (see, e.g., [1, 5, 21]) that for any algebra \(\mathbf {A}\), the k-ary commutator is a k-ary operation \([{-},\dots ,{-}]\) on the congruence lattice of \(\mathbf {A}\), and for any choice of \(\beta _1,\dots ,\beta _k\in {{\,\mathrm{Con}\,}}(\mathbf {A})\), the definition of the commutator \([\beta _1,\dots ,\beta _k]\) uses a specific subalgebra \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) of \(\mathbf {A}^{{\mathbf{2}}^k}\), called the algebra of \((\beta _1,\dots ,\beta _k)\)-matrices. It is useful to think of the elements of \(A^{\mathbf {2}^k}\) as functions \(f:{\mathbf {2}}^k\rightarrow A\) labeling the vertices of the k-dimensional cube \(\mathbf {2}^k=\{0,1\}^k\). For each \(j\in [k]\), \(\mathbf {2}^k\) has two ‘faces’ of codimension 1 perpendicular to the jth direction: \(F_j(0)\) and \(F_j(1)\), where \(F_j(u)\) is the set of all elements of \(\mathbf {2}^k\) with jth coordinate u (\(u\in \mathbf {2}\)). The algebra \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) of \((\beta _1,\dots ,\beta _k)\)-matrices is generated by all labelings of the vertices of the k-dimensional cube that are constant on the faces \(F_j(0)\) and \(F_j(1)\) for some \(j\in [k]\), and have the property that the two values they assume are \(\beta _j\)-related. We introduce some notation to describe this generating set. For any \(j\in [k]\) and \(a_0\,\beta _j\,a_1\), let \(g_j[a_0,a_1]\) denote the labeling \(g:\mathbf {2}^k\rightarrow A\) such that for each \(u\in \mathbf {2}\) we have that \(g|_{F_j(u)}\) is constant with value \(a_u\). So, the standard generating set for \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) is

$$\begin{aligned} G=\bigcup _{j\in [k]} G_j \quad \text {where}\quad G_j:=\{g_j[a_0,a_1]:a_0\,\beta _j\,a_1\} \ \ \text {for all } j\in [k]. \end{aligned}$$
(3.1)

The commutator \([\beta _1,\dots ,\beta _k]\) is defined to be the least congruence \(\gamma \) of \(\mathbf {A}\) with the following property:

  • \((*)\) whenever f is an element of \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) such that \(f(\varepsilon 0)\,\gamma \,f(\varepsilon 1)\) for all \(\varepsilon \in \mathbf {2}^{k-1}{\setminus }\{1\dots 1\}\), then we also have that \(f(1\dots 10)\,\gamma \,f(1\dots 11)\).

Note that condition \((*)\) holds for \(\gamma =\beta _k\), because every labeling f in G—and hence also every labeling f in \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\)—satisfies \(f(\varepsilon 0)\,\beta _k\,f(\varepsilon 1)\) for all \(\varepsilon \in \mathbf {2}^{k-1}\). Therefore, \([\beta _1,\dots ,\beta _k]\le \beta _k\).

Theorem 3.6

Let \(\mathbf {A}\) be an \(\mathcal {F}\)-algebra with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\), and let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\), \(\alpha :=\ker (\chi )\). The isomorphism \({}^\mathfrak {C}\) between the interval \(I(0,\alpha )\) of the congruence lattice of \(\mathbf {A}\) and the congruence lattice of \(\mathbf {C}\) (see Corollary 3.4(1)) preserves higher commutators of congruences; that is, for any integer \(k\ge 2\) and for arbitrary congruences \(\beta _1,\dots ,\beta _k\in I(0,\alpha )\) of \(\mathbf {A}\),

$$\begin{aligned} {[}\beta _1,\dots ,\beta _k]^\mathfrak {C}=[\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C}]. \end{aligned}$$
(3.2)

Proof

We start by examining the effect of the mapping \({}^\mathfrak {C}\) from Corollary 3.2 to the algebra of \((\beta _1,\dots ,\beta _k)\)-matrices for congruences \(\beta _1,\dots ,\beta _k\) below \(\alpha \).

Claim 3.7

Under the same assumptions on \(\mathbf {A}\), \(\chi \), and \(\beta _1,\dots ,\beta _k\) as in Theorem 3.6,

$$\begin{aligned} \bigl (\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\bigr )^\mathfrak {C}= \mathbf {M}_{\mathbf {C}}(\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C}). \end{aligned}$$
(3.3)

Proof of Claim 3.7

The algebra \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) of \((\beta _1,\dots ,\beta _k)\)-matrices in \(\mathbf {A}\) is generated by the set G indicated in (3.1). Analogously, the standard generating set for the algebra \(\mathbf {M}_{\mathbf {C}}(\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C})\) of \((\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C})\)-matrices in \(\mathbf {C}\) is the set

$$\begin{aligned} H=\bigcup _{j\in [k]} H_j \quad \text {where}\quad H_j:=\{h_j[c_0,c_1]:c_0\,\beta _j^\mathfrak {C}\,c_1\} \ \ \text {for all } j\in [k], \end{aligned}$$
(3.4)

where for any elements \(c_0,c_1\in C\) with \(c_0\,\beta _j^\mathfrak {C}\,c_1\), \(h_j[c_0,c_1]\) denotes the labeling \(h:\mathbf {2}^k\rightarrow C\) of the vertices of the k-dimensional cube with elements of \(\mathbf {C}\) in such a way that for each \(u\in \mathbf {2}\), \(h|_{F_j(u)}\) is constant with value \(c_u\).

The left hand side of (3.3) is defined since \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) is a subalgebra of \(\mathbf {A}^{\mathbf {2}^k}[\alpha ]=\prod ^{\downdownarrows \mathbf {I}}_{\varepsilon \in \mathbf {2}^k}\mathbf {A}\), because the assumption \(\beta _1,\dots ,\beta _k\le \alpha \) ensures that \(G\subseteq A^{\mathbf {2}^k}[\alpha ]\). Moreover, \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) is reflexive, since G contains all constant labelings \(\mathbf {2}^k\rightarrow A\). Choose and fix one constant labeling \(g_1[d^{(i)},d^{(i)}]\,(=\dots =g_k[d^{(i)},d^{(i)}])\) with value \(d^{(i)}\,(\in \chi ^{-1}(i))\) from each set \(D^{(i)}\) (\(i\in [m]\)). By Theorem 3.1(3), the algebra \(\bigl (\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\bigr )^\mathfrak {C}\) is generated by the set

$$\begin{aligned} \widetilde{G}=\bigcup _{j\in [k]} \widetilde{G}_j \quad \text {where}\quad \widetilde{G}_j:=\{h_j[\widetilde{a}_0,\widetilde{a}_1]:a_0\,\beta _j\,a_1\} \ \ \text {for all } j\in [k], \end{aligned}$$
(3.5)

as the image of each labeling \(g_j[a_0,a_1]\in G\) under the function \(\widetilde{\,}:\mathbf {A}^\mathbf{{2}^k}\rightarrow \mathbf {C}^\mathbf{{2}^k}\) with padding elements \(g_1[d^{(i)},d^{(i)}]\) (\(i\in [m]\)) is the labeling \(h_j[\widetilde{a}_0,\widetilde{a}_1]\), where \(\widetilde{a}_0,\widetilde{a}_1\) are obtained from \(a_0,a_1\) by applying the function \(\widetilde{\,}:\mathbf {A}\rightarrow \mathbf {C}\) with padding elements \(d^{(i)}\) (\(i\in [m]\)). Since \(\widetilde{G}\subseteq H\), the inclusion \(\subseteq \) in (3.3) follows. For the reverse inclusion notice that \(\mathbf {M}_{\mathbf {C}}(\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C})\) is a reflexive subalgebra of \(\mathbf {C}^{\mathbf {2}^k}\), hence by Corollary 3.2(1), it is equal to \(\mathbf {B}^\mathfrak {C}\) for some reflexive subalgebra \(\mathbf {B}\) of \(\mathbf {A}^{\mathbf {2}^k}[\alpha ]\). Thus, \(\mathbf {B}^\mathfrak {C}\) is the least reflexive subalgebra of \(\mathbf {C}^{\mathbf {2}^k}\) which contains all generators \(h_j[c_0,c_1]\in H\) of \(\mathbf {M}_{\mathbf {C}}(\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C})\) from (3.4); so \(j\in [k]\) and

$$\begin{aligned}&c_0=\begin{bmatrix}c_0^{(1)}\\ \vdots \\ c_0^{(m)}\end{bmatrix},\ \ c_1=\begin{bmatrix}c_1^{(1)}\\ \vdots \\ c_1^{(m)}\end{bmatrix}\\&\quad \text {where}\ \ c_0^{(i)}\,\beta _j\,c_1^{(i)} \ \ \text {and}\ \ c_0^{(i)},c_1^{(i)}\in \chi ^{-1}(i) \ \ \text {for each } i\in [m]. \end{aligned}$$

It follows from Corollary 3.2(1) that \(\mathbf {B}\) is the least reflexive subalgebra of \(\mathbf {A}^{\mathbf {2}^k}[\alpha ]\) which contains the projections of these generators to all coordinates \(i\in [m]\), which are the functions

$$\begin{aligned} g_j[c_0^{(i)},c_1^{(i)}] \ \ \text {with}\ \ c_0^{(i)}\,\beta _j\,c_1^{(i)}\ \ \text {and}\ \ c_0^{(i)},c_1^{(i)}\in \chi ^{-1}(i). \end{aligned}$$

Since all these functions belong to G, and \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) is reflexive, we conclude that \(\mathbf {B}\) is a subalgebra of \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\). By applying \({}^\mathfrak {C}\) we get the inclusion \(\supseteq \) in (3.3). This completes the proof of (3.3). \(\square \)

Now we are ready to prove (3.2). Since our assumption \(\beta _1,\dots ,\beta _k\in I(0,\alpha )\) implies that \([\beta _1,\dots ,\beta _k]\le \beta _k\le \alpha \), the commutator \([\beta _1,\dots ,\beta _k]\) is the least congruence \(\gamma \) of \(\mathbf {A}\) in the interval \(I(0,\alpha )\) which satisfies condition \((*)\).

So, let \(\gamma \) be a congruence of \(\mathbf {A}\) with \(\gamma \le \alpha \). Condition \((*)\) in the definition of \([\beta _1,\dots ,\beta _k]\) can be expressed by relational clone operations as follows:

$$\begin{aligned} \mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)&\,\cap (\gamma \times _\alpha \dots \times _\alpha \gamma \times _\alpha A^2[\alpha ]) \\&\quad \subseteq \gamma \times _\alpha \dots \times _\alpha \gamma \times _\alpha \gamma \quad \text {(with } 2^{k-1}\text { factors)} \end{aligned}$$

provided the coordinates in \(\mathbf {2}^k\) are listed so that \(\varepsilon 0\) and \(\varepsilon 1\) are consecutive for every \(\varepsilon \in \mathbf {2}^{k-1}\), and the last two coordinates are \(1\dots 10\) and \(1\dots 11\). All three compatible relations involved in this condition are reflexive and are contained in \(A^{\mathbf {2}^k}[\alpha ]\). Therefore, by Corollary 3.2(2), condition \((*)\) holds for \(\gamma \) and \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) if and only if the analogous condition holds for \(\gamma ^\mathfrak {C}\) and \(\bigl (\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\bigr )^\mathfrak {C}=\mathbf {M}_{\mathbf {C}}(\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C})\). Consequently, \(\gamma \in I(0,\alpha )\) is the least congruence of \(\mathbf {A}\) satisfying \((*)\) for \(\mathbf {M}_{\mathbf {A}}(\beta _1,\dots ,\beta _k)\) if and only if \(\gamma ^\mathfrak {C}\) is the least congruence of \(\mathbf {C}\) satisfying the analogous condition for \(\mathbf {M}_{\mathbf {C}}(\beta _1^\mathfrak {C},\dots ,\beta _k^\mathfrak {C})\). By the definition of the k-ary commutator, and by our remark in the preceding paragraph, this proves the desired equality (3.2). \(\square \)

For any algebra \(\mathbf {A}\) and congruence \(\beta \) of \(\mathbf {A}\), there is a largest congruence \(\rho \) of \(\mathbf {A}\) such that \([\rho ,\beta ]=0\). This congruence is called the centralizer of \(\beta \), and is denoted by \((0:\beta )\). Theorem 3.6, combined with this definition, immediately implies the following fact.

Corollary 3.8

Let \(\mathbf {A}\) be an \(\mathcal {F}\)-algebra with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\), and let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\), \(\alpha :=\ker (\chi )\). The isomorphism \({}^\mathfrak {C}\) between the interval \(I(0,\alpha )\) of the congruence lattice of \(\mathbf {A}\) and the congruence lattice of \(\mathbf {C}\) (see Corollary 3.4(1)) preserves centralizers in the following sense: for any congruence \(\beta \in I(0,\alpha )\) of \(\mathbf {A}\) we have that

$$\begin{aligned} ((0:\beta ) \wedge \alpha )^\mathfrak {C}=(0:\beta ^\mathfrak {C}). \end{aligned}$$

3.3 Varieties, clones, and Maltsev conditions

In this subsection let \({\mathcal {V}}\) be any variety of (nonempty) \(\mathcal {F}\)-algebras, and let \(\mathbf {I}=([m],\mathcal {F})\) (\(m>0\)) be a finite algebra in \({\mathcal {V}}\). We will use the notation \(\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\) for the full subcategory of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) consisting of those objects \((\mathbf {A},\chi )\) for which \(\mathbf {A}\in {\mathcal {V}}\).

The discussions following Proposition 2.5 and Corollary 2.9 imply that if \({\mathcal {V}}\) is the variety of all (nonempty) \(\mathcal {F}\)-algebras, then the class of all isomorphic copies of \(\widehat{\mathcal {F}}_{\mathbf {I}}\)-algebras in the range \(\mathfrak {C}\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )=\mathfrak {C}\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )=\mathsf{DAlg}^\boxplus (\widehat{\mathcal {F}_{\mathbf {I}}})\) of the functor \(\mathfrak {C}:\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\rightarrow \mathsf{DAlg}^\boxplus (\widehat{\mathcal {F}_{\mathbf {I}}})\) is the variety \(\mathcal {D}^+(\widehat{\mathcal {F}_{\mathbf {I}}})\) of \(\widehat{\mathcal {F}_{\mathbf {I}}}\)-algebras. We can combine earlier results of this subsection to obtain an analogous conclusion for all subvarieties \({\mathcal {V}}\) of the variety of all \(\mathcal {F}\)-algebras.

Corollary 3.9

If \({\mathcal {V}}\) is a variety of \(\mathcal {F}\)-algebras and \(\mathbf {I}=([m],\mathcal {F})\) \((m>0)\) is a finite algebra in \({\mathcal {V}}\), then the class

$$\begin{aligned} {\mathcal {V}}^\mathfrak {C}:=\mathbb {I}\,\mathfrak {C}\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\end{aligned}$$

of all isomorphic copies of algebras in \(\mathfrak {C}\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\) is a variety of \(\widehat{\mathcal {F}}_{\mathbf {I}}\)-algebras.

Proof

The fact that \({\mathcal {V}}^\mathfrak {C}\) is closed under taking products and subalgebras follows from the discussion preceding Theorem 3.1 and from the first paragraph of the proof of that theorem. To show that \({\mathcal {V}}^\mathfrak {C}\) is closed under taking quotients, consider an algebra \(\mathbf {C}\) in \({\mathcal {V}}^\mathfrak {C}\) and a congruence \(\gamma \) of \(\mathbf {C}\). Since \(\mathbf {C}\) is isomorphic to an algebra of the form \(\mathfrak {C}(\mathbf {A},\chi )\) for some \(\mathbf {A}\in {\mathcal {V}}\) and some onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\), we may assume without loss of generality that \(\mathbf {C}\) is actually equal to \(\mathfrak {C}(\mathbf {A},\chi )\). By Corollary 3.4, \(\gamma =\beta ^\mathfrak {C}\) for a unique congruence \(\beta \) of \(\mathbf {A}\) such that \(\beta \le \ker (\chi )\). Now Corollary 3.5 shows that \(\mathbf {C}/\beta ^\mathfrak {C}\cong \mathfrak {C}(\mathbf {A}/\beta ,\chi /\beta )\in {\mathcal {V}}^\mathfrak {C}\), completing the proof. \(\square \)

In the next theorem we exhibit a relationship between free algebras \(\mathbf {F}_{{\mathcal {V}}^\mathfrak {C}}(X)\) in the variety \({\mathcal {V}}^\mathfrak {C}\) and free algebras in \({\mathcal {V}}\). The following notation will be useful. For any set X we define \({\mathbf {X}}^\flat \) to be the set \(X\times [m]\), but we will use the notation \(x^{(i)}\) for its element (xi) for every \(x\in X\) and \(i\in [m]\). Furthermore, we define

$$\begin{aligned} {\mathbf {x}}&:=\begin{bmatrix} x^{(1)}\\ \vdots \\ x^{(m)} \end{bmatrix} \ \text {for each } x\in X,\text { and}\\ {\mathbf {X}}&:=\{{\mathbf {x}}:x\in X\}. \end{aligned}$$

Theorem 3.10

Let \({\mathcal {V}}\) be a variety of \(\mathcal {F}\)-algebras, let \(\mathbf {I}=([m];\mathcal {F})\) \((m>0)\) be a finite algebra in \({\mathcal {V}}\), and let \({\mathcal {V}}^\mathfrak {C}\) be the corresponding variety of \(\widehat{\mathcal {F}}_{\mathbf {I}}\)-algebras defined in Corollary 3.9. For any non-empty set X we have that

$$\begin{aligned} \mathbf {F}_{{\mathcal {V}}^\mathfrak {C}}(X) \cong \mathfrak {C}\bigl ( \mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ),\xi \bigr ) \end{aligned}$$
(3.6)

where \(\xi \) is the unique homomorphism \(\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ) \rightarrow \mathbf {I}\) in \({\mathcal {V}}\) that extends the set map \({\mathbf {X}}^\flat \rightarrow [m],\ x^{(i)} \mapsto i\).

Proof

Let \(\mathbf {F} := \mathfrak {C}\bigl ( \mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ),\xi \bigr )\). It follows from the definitions of \(\mathfrak {C}\) and \({\mathbf {X}}\) that \({\mathbf {X}}\subseteq F\). Since \(X\rightarrow {\mathbf {X}}\), \(x\mapsto {\mathbf {x}}\), is a bijection, to prove (3.6) it suffices to show that \(\mathbf {F}\) is a free algebra in \({\mathcal {V}}^\mathfrak {C}\) with free generating set \({\mathbf {X}}\).

To this end let \(\mathbf {C}\in {\mathcal {V}}^\mathfrak {C}\). Then \(\mathbf {C}\) is isomorphic to \(\mathfrak {C}(\mathbf {A},\chi )\) for some \(\mathbf {A}\) in \({\mathcal {V}}\) and some onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\). Without loss of generality assume \(\mathbf {C}=\mathfrak {C}(\mathbf {A},\chi )\), and consider an arbitrary set map \(G:{\mathbf {X}} \rightarrow C = \prod _{i\in [m]} \chi ^{-1}(i)\). Our goal is to show that G extends to a unique homomorphism \(\mathbf {F}\rightarrow \mathbf {C}\).

Note first that there exists a (unique) set map \(g:{\mathbf {X}}^\flat \rightarrow A\) such that

$$\begin{aligned} G({\mathbf {x}}) = \begin{bmatrix} g(x^{(1)}) \\ \vdots \\ g(x^{(m)}) \end{bmatrix} \text { and } g(x^{(i)})\in \chi ^{-1}(i) \text { for all } x\in X \text { and } i\in [m]. \end{aligned}$$

Thus, \(g:{\mathbf {X}}^\flat \rightarrow A\) extends uniquely to a homomorphism \(\psi :\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )\rightarrow \mathbf {A}\). Moreover, \(\psi \) satisfies the equality \(\chi \circ \psi = \xi \), because it follows from our definitions that

$$\begin{aligned} \chi (\psi (x^{(i)})) = \chi (g(x^{(i)})) = i = \xi (x^{(i)}) \text { for all } x^{(i)} \in {\mathbf {X}}^\flat . \end{aligned}$$

Hence \(\psi \) is a morphism \(\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ),\xi \bigr )\rightarrow (\mathbf {A},\chi )\) in \(\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\). Thus \(\mathfrak {C}(\psi )\) is a homomorphism \(\mathbf {F}\rightarrow \mathbf {C}\) by Corollary 2.9. By its construction, \(\mathfrak {C}(\psi )\) extends G.

To show that this extension is unique, consider any homomorphism \(\Phi :\mathbf {F} \rightarrow \mathbf {C}\) that extends G. By Corollary 2.9, \(\Phi =\mathfrak {C}(\varphi )\) for some morphism \(\varphi :\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ),\xi \bigr )\rightarrow (\mathbf {A},\chi )\) in \(\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\). It follows that \(\varphi \) extends g. Hence \(\varphi = \psi \) since \(\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )\) is free in \({\mathcal {V}}\) with free generating set \({\mathbf {X}}^\flat \). Thus \(\Phi ={}\mathfrak {C}(\varphi )=\mathfrak {C}(\psi )\). This concludes the proof of the theorem. \(\square \)

Recall from [28] that the clone of a variety \({\mathcal {W}}\) is the multisorted algebra with sorts indexed by positive integers k, the kth sort being the set of all k-ary terms of \({\mathcal {W}}\) (i.e., all terms in the language of \({\mathcal {W}}\) in the first k variables \(v_1,\dots ,v_k\), modulo the identities true in \({\mathcal {W}}\)), and the operations are superpositions of terms and nullary operations naming the variables in each sort. Since for every positive integer k, the k-ary terms of \({\mathcal {W}}\) are in one-to-one correspondence with the elements of the free algebra \(\mathbf {F}_{{\mathcal {W}}}(X)\) for a k-element set X, the isomorphism (3.6) in Theorem 3.10 yields a description for the clone of the variety \({\mathcal {V}}^\mathfrak {C}\) in terms of the clone of \({\mathcal {V}}\).

We state this description in Corollary 3.11 below. We will use the matrix notation introduced in our discussion following Theorem 2.5. Furthermore, \({\mathbf {e}}_{m\times k}\) will denote the \(m\times k\) matrix in which the ith row is \([i\ i\ . . .\ i]\) for every \(i\in [m]\).

Corollary 3.11

Let \({\mathcal {V}}\), \(\mathbf {I}\), and \({\mathcal {V}}^\mathfrak {C}\) be the same as in Theorem 3.10. For any positive integer k, there is a bijection \(\displaystyle T(\mathbf {x})\mapsto \begin{bmatrix} t^{(1)}(\mathbf {x})\\ \vdots \\ t^{(m)}(\mathbf {x}) \end{bmatrix} \) between

  • the k-ary terms T of \({\mathcal {V}}^\mathfrak {C}\) and

  • the m-tuples \(t^{(1)},\dots ,t^{(m)}\) of mk-ary terms of \({\mathcal {V}}\) satisfying

    $$\begin{aligned} t^{(i)}({\mathbf {e}}_{m\times k})=i\text { in } \mathbf {I}\text { for all } i\in [m] \end{aligned}$$
    (3.7)

so that the following equality holds in the algebra \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\) for each \(\mathbf {A}\in {\mathcal {V}}\) with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\):

$$\begin{aligned} T(\mathbf {a})= \begin{bmatrix} t^{(1)}(\mathbf {a})\\ \vdots \\ t^{(m)}(\mathbf {a}) \end{bmatrix} \ \text {for every } m\times k\text { matrix } \mathbf {a}\in \Bigl (\prod _{i\in [m]}\chi ^{-1}(i)\Bigr )^k=C^k, \end{aligned}$$
(3.8)

where T is applied to the k columns of \(\mathbf {a}\), and \(t^{(1)},\dots ,t^{(m)}\) are applied to the mk entries of \(\mathbf {a}\).

For every k-ary term T of \({\mathcal {V}}^\mathfrak {C}\), the mk-ary terms \(t^{(i)}\) (\(i\in [m]\)) of \({\mathcal {V}}\) satisfying conditions (3.7) and (3.8) above will be referred to as the coordinate terms of T.

Corollary 3.12

Let \({\mathcal {V}}\), \(\mathbf {I}\), and \({\mathcal {V}}^\mathfrak {C}\) be the same as in Theorem 3.10. If the clone of \({\mathcal {V}}\) is finitely generated, then so is the clone of \({\mathcal {V}}^\mathfrak {C}\).

Proof

If the clone of \({\mathcal {V}}\) is finitely generated, then \({\mathcal {V}}\) is equivalent to its reduct \({\mathcal {V}}^\circ \) to a finite sublanguage \(\mathcal {F}^\circ \) of \(\mathcal {F}\). Clearly, the reduct \(\mathbf {I}^\circ =([m];\mathcal {F}^\circ )\) of \(\mathbf {I}\) belongs to \({\mathcal {V}}^\circ \), and the variety \(({\mathcal {V}}^\circ )^\mathfrak {C}= \mathbb {I}\,\bigl ({\mathcal {V}}^\circ \,{\downdownarrows }\,\mathbf {I}^\circ \bigr )\) has a finite language, \(\widehat{\mathcal {F}^\circ }_{\mathbf {I}^\circ }\). Since \({\mathcal {V}}\) and \({\mathcal {V}}^\circ \) are equivalent varieties, i.e., they have the same terms, and any m-tuple \(t^{(1)},\dots ,t^{(m)}\) of mk-ary terms among them satisfies condition (3.7) for \(\mathbf {I}\) if and only if it does so for \(\mathbf {I}^\circ \), Corollary 3.11 shows that \({\mathcal {V}}^\mathfrak {C}\) and \(({\mathcal {V}}^\circ )^\mathfrak {C}\) are equivalent varieties. As the latter variety has a finite language, their clones are finitely generated. \(\square \)

Corollaries 3.11 and 3.12 carry over easily from varieties to single algebras.

Corollary 3.13

Let \((\mathbf {A},\chi )\) be an object of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\), and let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\).

  1. (1)

    A function \(T:C^k\rightarrow C\) (where \(C=\prod _{i\in [m]}\chi ^{-1}(i)\)) is a k-ary term operation of \(\mathbf {C}\) if and only if \(\mathbf {A}\) has mk-ary term operations \(t^{(1)},\dots ,t^{(m)}\) satisfying condition (3.7) such that (3.8) holds.

  2. (2)

    If the clone of \(\mathbf {A}\) is finitely generated, then so is the clone of \(\mathbf {C}\).

Corollary 3.11 also allows us to transfer idempotent terms from \({\mathcal {V}}\) to \({\mathcal {V}}^\mathfrak {C}\).

Corollary 3.14

Let \({\mathcal {V}}\), \(\mathbf {I}\), and \({\mathcal {V}}^\mathfrak {C}\) be the same as in Theorem 3.10.

  1. (1)

    The map

    $$\begin{aligned} t(x_1,\dots ,x_k)\mapsto \breve{t}({\mathbf {x}}_1,\dots ,{\mathbf {x}}_k):= \begin{bmatrix} t(x_{1}^{(1)},\dots ,x_{k}^{(1)})\\ \vdots \\ t(x_{1}^{(m)},\dots ,x_{k}^{(m)}) \end{bmatrix}, \end{aligned}$$

    which assigns to every k-ary idempotent term \(t(x_1,\dots ,x_k)\) of \({\mathcal {V}}\) the k-ary idempotent term \(\breve{t}({\mathbf {x}}_1,\dots ,{\mathbf {x}}_k)\) of \({\mathcal {V}}^\mathfrak {C}\) with coordinate terms \(t(x_{1}^{(i)},\dots , x_{k}^{(i)})\) \((i\in [m])\), is a clone homomorphism of the clone of all idempotent terms of \({\mathcal {V}}\) into the clone of all idempotent terms of \({\mathcal {V}}^\mathfrak {C}\).

  2. (2)

    Hence, \({\mathcal {V}}^\mathfrak {C}\) satisfies every idempotent Maltsev condition that holds in \({\mathcal {V}}\).

Proof

Since t is an idempotent term, i.e., the identity \(t(x,\dots ,x)\approx x\) holds in \({\mathcal {V}}\), the coordinate terms \(t(x_{1}^{(i)},\dots ,x_{k}^{(i)})\) satisfy \(t(i,\dots ,i) = i\) for every \(i\in [m]\). Thus the coordinate terms \(t(x_{1}^{(i)},\dots ,x_{k}^{(i)})\) satisfy condition (3.7). It follows from Corollary 3.11 that \({\mathcal {V}}^\mathfrak {C}\) has a term \(\breve{t}\) with these terms as coordinate terms.

Clearly, \(\breve{t}\) is an idempotent term of \({\mathcal {V}}^\mathfrak {C}\). It is also straightforward to check that the map \(t\mapsto \breve{t}\) is a clone homomorphism. This proves statement (1).

For (2), recall that a strong Maltsev condition is a primitive positive sentence in the language of clones, while a Maltsev condition is a disjunction of a weakening infinite sequence of strong Maltsev conditions. Since the satisfaction of conditions of this form is preserved under homomorphisms, we get from part (1) that \({\mathcal {V}}^\mathfrak {C}\) satisfies every idempotent Maltsev condition that holds in \({\mathcal {V}}\). \(\square \)

We conclude this subsection by recording some finiteness properties of varieties preserved by \(\mathfrak {C}\).

Corollary 3.15

Let \({\mathcal {V}}\), \(\mathbf {I}\), and \({\mathcal {V}}^\mathfrak {C}\) be the same as in Theorem 3.10.

  1. (1)

    \({\mathcal {V}}\) is locally finite if and only if \({\mathcal {V}}^\mathfrak {C}\) is locally finite.

  2. (2)

    For every algebra \(\mathbf {A}\in {\mathcal {V}}\) with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\) we have that \(\mathbf {A}\) is finitely presented in \({\mathcal {V}}\) if and only if the algebra \(\mathfrak {C}(\mathbf {A},\chi )\) is finitely presented in \({\mathcal {V}}^\mathfrak {C}\).

Proof

We will use the notation introduced in the paragraph preceding Theorem 3.10.

Statement (1) will follow if we prove that for every finite set X,

$$\begin{aligned} |\mathbf {F}_{{\mathcal {V}}^\mathfrak {C}}(X)|&\le |\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )|^m, \quad \text {and}\\ |\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )|&\le m|\mathbf {F}_{{\mathcal {V}}^\mathfrak {C}}(X)|, \end{aligned}$$

where \(|{\mathbf {X}}^\flat |=m|X|\). The first inequality is an immediate consequence of the isomorphism in (3.6). For the second inequality, combine (3.6) with the observation that every element of \(\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )\) belongs to \(\xi ^{-1}(i)\) for some \(i\in [m]\).

To prove (2), let \(\mathbf {A}\) be an algebra in \({\mathcal {V}}\) with an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\). By the definition of \({\mathcal {V}}^\mathfrak {C}\) (see Corollary 3.9), we have \(\mathfrak {C}(\mathbf {A},\chi )\in {\mathcal {V}}^\mathfrak {C}\). Assume first that \(\mathfrak {C}(\mathbf {A},\chi )\) is finitely presented in \({\mathcal {V}}^\mathfrak {C}\), that is, for some finite set X, \(\mathfrak {C}(\mathbf {A},\chi )\) is a quotient of \(\mathbf {F}_{{\mathcal {V}}^\mathfrak {C}}(X)\) by a finitely generated congruence. By Theorem 3.10 and Corollary 3.4, this is equivalent to the condition that

$$\begin{aligned} \mathfrak {C}(\mathbf {A},\chi ) \cong \mathfrak {C}\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ),\xi \bigr )/\beta ^\mathfrak {C}\end{aligned}$$

for some finite set X and some finitely generated congruence \(\beta \le \ker (\xi )\) of \(\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )\). By Corollary 3.5, the last displayed isomorphism can be rewritten as follows:

$$\begin{aligned} \mathfrak {C}(\mathbf {A},\chi ) \cong \mathfrak {C}\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )/\beta , \xi /\beta \bigr ). \end{aligned}$$

Since \(\mathfrak {C}\) is an isomorphism between the category \(\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\) and its image in \({\mathcal {V}}^\mathfrak {C}\) (see Corollaries 2.9 and 3.9), it follows that \(\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )/\beta \cong \mathbf {A}\). Hence, \(\mathbf {A}\) is finitely presented in \({\mathcal {V}}\).

Conversely assume that \(\mathbf {A}\in {\mathcal {V}}\) is finitely presented in \({\mathcal {V}}\). That is, we have a finite set X and an onto homomorphism \(h:\mathbf {F}_{{\mathcal {V}}}(X) \rightarrow \mathbf {A}\) such that \(\ker (h)\) is a finitely generated congruence of \(\mathbf {F}_{{\mathcal {V}}}(X)\). For each \(i\in [m]\) fix some element \(d^{(i)}\in \chi ^{-1}(i)\,(\subseteq A)\). Let \(h'\) denote the unique homomorphism \(h':\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ) \rightarrow \mathbf {A}\) that extends the set map \({\mathbf {X}}^\flat \rightarrow A\) defined by

$$\begin{aligned} h'(x^{(i)}) = {\left\{ \begin{array}{ll} h(x) &{} \text {if } h(x)\in \chi ^{-1}(i), \\ d^{(i)} &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$

Since \(h=h'\circ \iota \) holds for the injection \(\iota :X\rightarrow {\mathbf {X}}^\flat \), \(x\mapsto x^{\chi (h(x))}\), it follows that, up to the isomorphism of \(\mathbf {F}_{{\mathcal {V}}}(X)\) and \(\mathbf {F}_{{\mathcal {V}}}\bigl (\iota (X)\bigr )\) induced by \(\iota \), h and the restriction of \(h'\) to \(\mathbf {F}_{{\mathcal {V}}}\bigl (\iota (X)\bigr )\) are the same homomorphisms onto \(\mathbf {A}\). Hence, \(\mathbf {F}_{{\mathcal {V}}}(X)/\ker (h)\cong \mathbf {A}\cong \mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )/\ker (h')\). Since \(\ker (h)\) is finitely generated and \({\mathbf {X}}^\flat \) is finite, we get that \(\beta := \ker (h')\) is a finitely generated congruence of \(\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )\) and \(\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )/\beta \cong \mathbf {A}\) is finitely presented.

For \(\xi := \chi \circ h'\), Theorem 3.10 implies that \(\mathbf {F}_{{\mathcal {V}}^\mathfrak {C}}(X)\cong \mathfrak {C}\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ),\xi \bigr )\) is a finitely generated free algebra in \({\mathcal {V}}^\mathfrak {C}\). Since \(\beta \le \ker (\xi )\), Corollary 3.4 yields that \(\beta ^\mathfrak {C}\) is a finitely generated congruence of \(\mathfrak {C}\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ),\xi \bigr )\). Now, Corollary 3.5 yields the leftmost \(\cong \) below

$$\begin{aligned} \mathfrak {C}\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat ), \xi \bigr )/\beta ^\mathfrak {C}\cong \mathfrak {C}\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )/\beta , \xi /\beta \bigr ) \cong \mathfrak {C}(\mathbf {A},\chi ), \end{aligned}$$

while the rightmost \(\cong \) follows from the fact that \(\bigl (\mathbf {F}_{{\mathcal {V}}}({\mathbf {X}}^\flat )/\beta , \xi /\beta \bigr )\) and \((\mathbf {A},\chi )\) are isomorphic objects in \(\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\), mediated by the onto homomorphism \(h'\) with kernel \(\beta \). This proves that \(\mathfrak {C}(\mathbf {A},\chi )\) is a finitely presented algebra in \({\mathcal {V}}^\mathfrak {C}\). \(\square \)

3.4 Polynomial operations and TCT types

For any object \((\mathbf {A},\chi )\) of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\), we have a description for the term operations of the algebra \(\mathfrak {C}(\mathbf {A},\chi )\) via term operations of \(\mathbf {A}\) in Corollary 3.13(1). The next corollary presents an analogous description for the polynomial operations of \(\mathfrak {C}(\mathbf {A},\chi )\).

Corollary 3.16

Let \((\mathbf {A},\chi )\) be an object of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\), and let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\). A function \(P:C^k\rightarrow C\) (where \(C=\prod _{i\in [m]}\chi ^{-1}(i))\) is a k-ary polynomial operation of \(\mathbf {C}\) if and only if \(\mathbf {A}\) has mk-ary polynomial operations \(p^{(1)},\dots ,p^{(m)}\) such that for every \(m\times k\) matrix \(\mathbf {a}\in \bigl (\prod _{i\in [m]} \chi ^{-1}(i)\bigr )^k=C^k\),

$$\begin{aligned} p^{(i)}(\mathbf {a})\in \chi ^{-1}(i)\ \ \text {for every } i\in [m],\quad \text { and}\quad P(\mathbf {a})= \begin{bmatrix} p^{(1)}(\mathbf {a})\\ \vdots \\ p^{(m)}(\mathbf {a}) \end{bmatrix}. \end{aligned}$$
(3.9)

Proof

We want to deduce this statement from Corollary 3.13(1) by using the fact that for every algebra \(\mathbf {U}\) the polynomial operations of \(\mathbf {U}\) are the term operations of the constant expansion of \(\mathbf {U}\). In keeping with our convention of excluding nullary symbols, we define the constant expansion of an algebra \(\mathbf {U}=(U;\mathcal {L})\) to be the algebra \(\mathbf {U}^\mathsf {c}=(U;\mathcal {L}\cup \{\mathsf {c}_u:u\in U\})\) where each \(\mathsf {c}_u\) is a unary symbol, and is interpreted as the unary constant operation on U with value u.

Now let \((\mathbf {A},\chi )\) satisfy the assumptions of Corollary 3.16, and let \(\mathbf {A}^\mathsf {c}\) be the constant expansion of \(\mathbf {A}\). The language of \(\mathbf {A}^\mathsf {c}\) is \(\mathcal {F}^\mathsf {c}=\mathcal {F}\cup \{\mathsf {c}_a:a\in A\}\). Since \(\chi \) is an onto homomorphism \(\mathbf {A}\rightarrow \mathbf {I}\), we can expand \(\mathbf {I}\) to get an \(\mathcal {F}^\mathsf {c}\)-algebra \(\mathbf {I}^\mathsf {c}=([m],\mathcal {F}^\mathsf {c})\) by interpreting each symbol \(\mathsf {c}_a\) (\(a\in A\)) as the unary constant function with value \(\chi (a)\) on [m]. Thus, \(\chi \) is an onto homomorphism \(\mathbf {A}^\mathsf {c}\rightarrow \mathbf {I}^\mathsf {c}\), and \((\mathbf {A}^\mathsf {c},\chi )\) is an object of the category \(\bigl (\mathsf{Alg}(\mathcal {F}^\mathsf {c})\,{\downdownarrows }\,\mathbf {I}^\mathsf {c}\bigr )\). By applying the functors \(\mathfrak {C}\) with domain categories \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) and \(\bigl (\mathsf{Alg}(\mathcal {F}^\mathsf {c})\,{\downdownarrows }\,\mathbf {I}^\mathsf {c}\bigr )\) to the objects \((\mathbf {A},\chi )\) and \((\mathbf {A}^\mathsf {c},\chi )\), respectively, we get the \(\widehat{\mathcal {F}}_{\mathbf {I}}\)-algebra \(\mathfrak {C}(\mathbf {A},\chi )\) and the \(\widehat{\mathcal {F}^\mathsf {c}}_{\mathbf {I}^\mathsf {c}}\)-algebra \(\mathfrak {C}(\mathbf {A}^\mathsf {c},\chi )\).

Claim 3.17

The clone of term operations of \(\mathfrak {C}(\mathbf {A}^\mathsf {c},\chi )\) coincides with the clone of term operations of the constant expansion of \(\mathfrak {C}(\mathbf {A},\chi )\).

Proof of Claim 3.17

The set \(C:=\prod _{i\in [m]}\chi ^{-1}(i)\) is the universe of all three algebras that play a role in the claim: \(\mathfrak {C}(\mathbf {A},\chi )\), \(\mathfrak {C}(\mathbf {A}^\mathsf {c},\chi )\), and the constant expansion of \(\mathfrak {C}(\mathbf {A},\chi )\). It also follows from the definition of the functor \(\mathfrak {C}\) that \(\mathfrak {C}(\mathbf {A}^\mathsf {c},\chi )\) is obtained from \(\mathfrak {C}(\mathbf {A},\chi )\) by adding the unary operations \(\widehat{(\mathsf {c}_a)}_i\) (\(a\in A\), \(i\in [m]\)), while the constant expansion of \(\mathfrak {C}(\mathbf {A},\chi )\) is obtained from \(\mathfrak {C}(\mathbf {A},\chi )\) by adding the unary constant operations \(\mathsf {c}_{{\mathbf {c}}}\) (\({\mathbf {c}}\in C\)). Therefore, to prove the claim it suffices to show that

  1. (1)

    every operation \(\widehat{(\mathsf {c}_a)}_i\) (\(a\in A\), \(i\in [m]\)) is a term operation of the constant expansion of \(\mathfrak {C}(\mathbf {A},\chi )\), and

  2. (2)

    every unary constant operation \(\mathsf {c}_{{\mathbf {c}}}\) (\({\mathbf {c}}\in C\)) is a term operation of \(\mathfrak {C}(\mathbf {A}^\mathsf {c},\chi )\).

(1) follows by observing that if \(a\in \chi ^{-1}(i')\) and \({\mathbf {c}}\) is an element of \(C=\prod _{\ell \in [m]}\chi ^{-1}(\ell )\) with \(i'\)th coordinate a, then for each \(i\in [m]\) we have that

For (2), notice that if \({\mathbf {c}}=(c_1,\dots ,c_m)\in \prod _{i\in [m]}\chi ^{-1}(i)=C\), then the unary operation \(\mathsf {c}_{{\mathbf {c}}}\) is the composition (in any order) of the unary operations \(\widehat{(\mathsf {c}_{c_1})}_1,\dots , \widehat{(\mathsf {c}_{c_m})}_m\). \(\square \)

To summarize, we have that the clone of polynomial operations of \(\mathfrak {C}(\mathbf {A},\chi )\) is the clone of term operations of \(\mathfrak {C}(\mathbf {A}^\mathsf {c},\chi )\), while the clone of polynomial operations of \(\mathbf {A}\) is the clone of term operations of \(\mathbf {A}^\mathsf {c}\). Therefore, if we apply Corollary 3.13(1) to the object \((\mathbf {A}^\mathsf {c},\chi )\) of the category \(\bigl (\mathsf{Alg}(\mathcal {F}^\mathsf {c})\,{\downdownarrows }\,\mathbf {I}^\mathsf {c}\bigr )\), we get the conclusion of Corollary 3.16. \(\square \)

For the basic concepts and notation of tame congruence theory we refer the reader to [12]. If for a covering pair \(\delta \prec \theta \) of congruences in some finite algebra \(\mathbf {A}\) we have that \({{\,\mathrm{typ}\,}}_{\mathbf {A}}(\delta ,\theta )=\mathbf{2}\), and hence the minimal algebras \(\mathbf {A}|_N/\delta |_N\) associated to all \(\langle \delta ,\theta \rangle \)-traces N are weakly isomorphic one-dimensional vector spaces over a finite field, we will refer to the characteristic of this field as the characteristic of \(\langle \delta ,\theta \rangle \). In particular, if \(\theta \) is an atom in the congruence lattice of \(\mathbf {A}\), then the characteristic of the prime quotient \(\langle 0,\theta \rangle \) will also be called the characteristic of \(\theta \).

For non-indexed algebras \(\mathbf {V}\) and \(\mathbf {W}\) given by their universes V, W and their clones, a weak isomorphism \(h:\mathbf {V}\rightarrow \mathbf {W}\) is a bijection \(h:V\rightarrow W\) with the property that the isomorphism induced by h between the clones of all operations on V and W maps the clone of \(\mathbf {V}\) onto the clone of \(\mathbf {W}\). Here, the isomorphism induced by h between the clones of all operations on V and W is the map \(f\mapsto {}^hf:=h\circ f\circ h^{-1}\), that is, for every operation f on V (say, f is k-ary),

$$\begin{aligned} h\bigl (f(v_1,\dots ,v_k)\bigr )={}^hf\bigl (h(v_1),\dots ,h(v_k)\bigr ) \quad \text {for all } v_1,\dots ,v_k\in V. \end{aligned}$$

Theorem 3.18

Let \(\mathcal {F}\) be an algebraic language, and let \(\mathbf {I}=([m];\mathcal {F})\) and \(\mathbf {A}\) be finite \(\mathcal {F}\)-algebras. If \((\mathbf {A},\chi )\) is an object of \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\) with \(\alpha :=\ker (\chi )\), then for any covering pair \(\delta \prec \theta \) of congruences of \(\mathbf {A}\) in the interval \(I(0,\alpha )\) and for every \(\langle \delta ,\theta \rangle \)-trace N of \(\mathbf {A}\) there exist a \(\langle \delta ^\mathfrak {C},\theta ^\mathfrak {C}\rangle \)-trace \(\check{N}\) of \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\) and a weak isomorphism \(\mathbf {A}|_N\rightarrow \mathbf {C}|_{\check{N}}\) between the induced algebras which maps \(\delta |_N\) to \(\delta ^\mathfrak {C}|_{\check{N}}\). Consequently,

$$\begin{aligned} {{\,\mathrm{typ}\,}}_{\mathbf {A}}(\delta ,\theta )={{\,\mathrm{typ}\,}}_{\mathbf {C}}(\delta ^\mathfrak {C},\theta ^\mathfrak {C}); \end{aligned}$$

moreover, if \({{\,\mathrm{typ}\,}}_{\mathbf {A}}(\delta ,\theta )={{\,\mathrm{typ}\,}}_{\mathbf {C}}(\delta ^\mathfrak {C},\theta ^\mathfrak {C})=\mathbf{2}\), then the prime quotients \(\langle \delta ,\theta \rangle \) and \(\langle \delta ^\mathfrak {C},\theta ^\mathfrak {C}\rangle \) have the same prime characteristic.

Proof

We will use the notation \(D^{(i)}:=\chi ^{-1}(i)\) (\(i\in [m]\)) for the equivalence classes of \(\alpha \). So, \(C:=\prod _{i\in [m]}D^{(i)}\) is the underlying set of the algebra \(\mathbf {C}=\mathfrak {C}(\mathbf {A},\chi )\).

Let \(\delta \prec \theta \,(\le \alpha )\) be congruences in \(\mathbf {A}\), and let N be a \(\langle \delta ,\theta \rangle \)-trace of \(\mathbf {A}\). Then there exist a unary polynomial operation \(e=e^2\) of \(\mathbf {A}\) such that \(U:=e(A)\) is a \(\langle \delta ,\theta \rangle \)-minimal set of \(\mathbf {A}\), and \(N=U\cap (a/\theta )\) for some \(a\in U\). Furthermore, \(\theta |_N\) is the full relation on N and \(\delta |_N\subsetneq \theta |_N\).

Since \(\theta \le \alpha \), N lies in a single \(\alpha \)-class; without loss of generality we may assume that \(N\subseteq D^{(1)}\). Now we choose and fix elements \(c^{(2)}\in D^{(2)},\dots ,c^{(m)}\in D^{(m)}\) from the remaining \(\alpha \)-classes. For \(2\le i\le m\) let \(q^{(i)}\) denote the unary constant polynomial operation of \(\mathbf {A}\) with value \(c^{(i)}\), while for \(i=1\) let \(q^{(1)}:=e\). Notice that \(e(D^{(1)})\subseteq D^{(1)}\), because \(D^{(1)}=a/\alpha \) and \(e(a)=a\) (as \(a\in N\subseteq U=e(A)\)). Therefore, it follows from Corollary 3.16 that the function \(\check{e}:C\rightarrow C\) defined by

$$\begin{aligned} \check{e}({\mathbf {a}}):=\begin{bmatrix} q^{(1)}(a^{(1)})\\ q^{(2)}(a^{(2)})\\ \vdots \\ q^{(m)}(a^{(m)}) \end{bmatrix} =\begin{bmatrix} e(a^{(1)})\\ c^{(2)}\\ \vdots \\ c^{(m)} \end{bmatrix} \quad \text {for all}\quad {\mathbf {a}}=\begin{bmatrix} a^{(1)}\\ a^{(2)}\\ \vdots \\ a^{(m)} \end{bmatrix}\in C \end{aligned}$$

is a polynomial operation of \(\mathbf {C}\). Clearly, \(\check{e}=\check{e}^2\), and for the set \(\check{U}:=\check{e}(C)\) we have that

$$\begin{aligned} \check{U}=e(D^{(1)})\times \{c^{(2)}\}\times \dots \times \{c^{(m)}\} =(U\cap D^{(1)})\times \{c^{(2)}\}\times \dots \times \{c^{(m)}\}. \end{aligned}$$

For each \(u\in U\cap D^{(1)}\) let \(\check{u}:=(u,c^{(2)},\dots ,c^{(m)})\); thus, we have a bijection \(U\cap D^{(1)}\rightarrow \check{U}\), \(u\mapsto \check{u}\). Restricting this mapping to the set \(N\,(\subseteq U\cap D^{(1)})\) we obtain a bijection

$$\begin{aligned} N\rightarrow \check{N}:=N\times \{c^{(2)}\}\times \dots \times \{c^{(m)}\}, \quad u\mapsto \check{u}. \end{aligned}$$

It follows from Corollary 3.4(1) that \(\delta ^\mathfrak {C}|_{\check{N}}\subsetneq \theta ^\mathfrak {C}|_{\check{N}}\) and \(\check{N}=\check{U}\cap (\check{a}/\theta ^\mathfrak {C})\) (so \(\theta ^\mathfrak {C}|_{\check{N}}\) is the full relation on \(\check{N}\)). To establish that \(\check{N}\) is a \(\langle \delta ^\mathfrak {C},\theta ^\mathfrak {C}\rangle \)-trace of \(\mathbf {C}\) it remains to show that \(\check{U}\) is a \(\langle \delta ^\mathfrak {C},\theta ^\mathfrak {C}\rangle \)-minimal set of \(\mathbf {C}\).

Assume not, and let \(\check{V}:=V\times \{c^{(2)}\}\times \dots \times \{c^{(m)}\}\) be a proper subset of \(\check{U}\) which is \(\langle \delta ^\mathfrak {C},\theta ^\mathfrak {C}\rangle \)-minimal in \(\mathbf {C}\). Then there exists a unary polynomial g of \(\mathbf {C}\) such that

$$\begin{aligned} \check{V}=g(C),\quad g=g^2,\quad \text {and}\quad \delta ^\mathfrak {C}|_{\check{V}}\subsetneq \theta ^\mathfrak {C}|_{\check{V}}. \end{aligned}$$
(3.10)

Hence, by Corollary 3.4(1), \(\delta |_{V}\subsetneq \theta |_{V}\) where \(V\subsetneq U\cap D^{(1)}\). Since both g and \(\check{e}\) fix every element of \(V\,(\subseteq \check{U})\), so will the unary polynomial \(g\circ \check{e}\). Therefore, by replacing g with \(g\circ \check{e}\), we may assume from now on that, in addition to (3.10), g also satisfies \(g=g\circ \check{e}\). Let \(g^{(1)}\) denote the m-ary polynomial operation of \(\mathbf {A}\) that is the first coordinate function of g according to Corollary 3.16, and define a unary polynomial operation f of \(\mathbf {A}\) by \(f(x):=g^{(1)}\bigl (e(x),c^{(2)},\dots ,c^{(m)}\bigr )\). Then,

$$\begin{aligned} g({\mathbf {a}})= & {} (g\circ \check{e})({\mathbf {a}}) =g\left( \begin{bmatrix} e(a^{(1)})\\ c^{(2)}\\ \vdots \\ c^{(m)} \end{bmatrix} \right) = \begin{bmatrix} g^{(1)}\bigl (e(a^{(1)}),c^{(2)},\dots ,c^{(m)}\bigr )\\ c^{(2)}\\ \vdots \\ c^{(m)} \end{bmatrix} \\= & {} \begin{bmatrix} f(a^{(1)})\\ c^{(2)}\\ \vdots \\ c^{(m)} \end{bmatrix} \quad \text {for all}\quad {\mathbf {a}}=\begin{bmatrix} a^{(1)}\\ a^{(2)}\\ \vdots \\ a^{(m)} \end{bmatrix}\in C. \end{aligned}$$

The first property of g in (3.10) implies that \(f(U\cap D^{(1)})=V\), while the second one implies that \(f|_{U\cap D^{(1)}}=(f|_{U\cap D^{(1)}})^2\). Hence, f fixes all elements of V. Since by the definition of f we have \(f=f\circ e\), it follows that \(\ker (e)\subseteq \ker (f)\subseteq \ker (e\circ f)\). The elements of \(U\cap D^{(1)}\) are in distinct kernel classes of e, because e fixes all elements of U. However, some elements of \(U\cap D^{(1)}\) are in the same kernel class of \(e\circ f\), because \((e\circ f)(U\cap D^{(1)})=e(V)=V\subsetneq U\cap D^{(1)}\). Hence, \(\ker (e)\subsetneq \ker (e\circ f)\), and therefore \(U=e(A)\supsetneq (e\circ f)(A)\). Combining the facts that \(\delta |_V\subsetneq \theta |_V\) and \(e\circ f\) fixes every element of V we also get that \(\theta |_V\subseteq (e\circ f)(\theta )\), and hence \((e\circ f)(\theta )\not \subseteq \delta \). The existence of a unary polynomial \(e\circ f\) of \(\mathbf {A}\) with these properties contradicts our initial assumption that U is a \(\langle \delta ,\theta \rangle \)-minimal set of \(\mathbf {A}\). This contradiction shows that \(\check{U}\) is a \(\langle \delta ^\mathfrak {C},\theta ^\mathfrak {C}\rangle \)-minimal set of \(\mathbf {C}\), and \(\check{N}\) is \(\langle \delta ^\mathfrak {C},\theta ^\mathfrak {C}\rangle \)-trace of \(\mathbf {C}\).

Now we will prove that the induced algebras \(\mathbf {A}|_N\) and \(\mathbf {C}|_{\check{N}}\) are weakly isomorphic. Let P be a k-ary polynomial operation of \(\mathbf {C}\) such that \(P(\check{N}^k)\subseteq \check{N}\). If we write P in the form described in Corollary 3.16, where the coordinate polynomials of P are the mk-ary polynomial operations \(p^{(1)},\dots ,p^{(m)}\) of \(\mathbf {A}\), then we get that for \(2\le i\le m\), \(p^{(i)}\) must be constant with value \(c^{(i)}\) for all allowable inputs. Thus, we may assume without loss of generality that \(p^{(2)},\dots ,p^{(m)}\) are these constant polynomials. For \(i=1\), the assumption \(P(\check{N}^k)\subseteq \check{N}\) forces that the first coordinate function of P assigns to any tuple \((\check{u}_{1},\dots ,\check{u}_{k})\in \check{N}^k\) the element \(p^{(1)}(\check{u}_{1},\dots ,\check{u}_{k})\in \check{N}\). By the fact that the second through mth coordinates of \(\check{u}_{1},\dots ,\check{u}_{k}\) are \(c^{(2)},\dots ,c^{(m)}\), we have the equality \(p^{(1)}(\check{u}_{1},\dots ,\check{u}_{k})=p(u_{1},\dots ,u_{k})\) for all \(\check{u}_{1},\dots ,\check{u}_{k}\in \check{N}\) if we denote by p the k-ary polynomial of \(\mathbf {A}\) obtained from \(p^{(1)}\) by replacing appropriate variables by \(c^{(2)},\dots ,c^{(m)}\). This shows that if P is a k-ary polynomial operation of \(\mathbf {C}\) such that \(P(\check{N}^k)\subseteq \check{N}\), then \(\mathbf {A}\) has a k-ary polynomial operation p such that \(p(N^k)\subseteq N\) and

$$\begin{aligned} P|_{\check{N}}(\check{u}_{1},\dots ,\check{u}_{k})= P|_{\check{N}}\left( \begin{bmatrix} u_{1}\\ c^{(2)}\\ \vdots \\ c^{(m)}\end{bmatrix},\dots , \begin{bmatrix} u_{k}\\ c^{(2)}\\ \vdots \\ c^{(m)}\end{bmatrix} \right) =\begin{bmatrix} p|_N(u_{1},\dots ,u_{k})\\ c^{(2)}\\ \vdots \\ c^{(m)}. \end{bmatrix} \end{aligned}$$

or equivalently,

$$\begin{aligned} P|_{\check{N}}(\check{u}_{1},\dots ,\check{u}_{k}) =\bigl (p|_N(u_{1},\dots ,u_{k})\bigr )\check{\,} \qquad \text {for all } u_{1},\dots u_{k}\in N. \end{aligned}$$
(3.11)

Conversely, if p is a k-ary polynomial operation of \(\mathbf {A}\) satisfying \(p(N^k)\subseteq N\), then the polynomial operation P of \(\mathbf {C}\) whose coordinate functions are p and the unary constant polynomials with values \(c^{(2)},\dots ,c^{(m)}\) satisfies these equalities. It is clear from (3.11) that each one of the induced operations \(p|_N\) and \(P|_{\check{N}}\) uniquely determines the another; namely, \(P|_{\check{N}}\) is the image of \(p|_N\) under the isomorphism between the clones of operations on N and \(\check{N}\) induced by the bijection \(N\rightarrow \check{N}\), \(u\mapsto \check{u}\). Hence, this bijection is a weak isomorphism \(\mathbf {A}|_N\rightarrow \mathbf {C}|_{\check{N}}\). Moreover, by Corollary 3.4(1), it maps \(\delta |_N\) to \(\delta ^\mathfrak {C}|_{\check{N}}\), which completes the proof of the first statement of Theorem 3.18.

The second statement now follows easily from the facts that \({{\,\mathrm{typ}\,}}(\delta ,\theta )\) is the type of the minimal algebra \(\mathbf {A}|_N/\delta |_N\), \({{\,\mathrm{typ}\,}}(\delta ^\mathfrak {C},\theta ^\mathfrak {C})\) is the type of the minimal algebra \(\mathbf {C}|_{\check{N}}/\delta ^\mathfrak {C}|_{\check{N}}\), we have a weak isomorphism \(\mathbf {A}|_N/\delta |_N\rightarrow \mathbf {C}|_{\check{N}}/\delta ^\mathfrak {C}|_{\check{N}}\) induced by the weak isomorphism \(\mathbf {A}|_N\rightarrow \mathbf {C}|_{\check{N}}\) mapping \(\delta |_N\) to \(\delta ^\mathfrak {C}|_{\check{N}}\) obtained above, and weakly isomorphic minimal algebras have the same type; moreover, if that type is \(\mathbf{2}\), then they also have the same prime characteristic. \(\square \)

4 Supernilpotent congruences

A congruence \(\alpha \) of an algebra \(\mathbf {A}\) is called k-supernilpotent if

$$\begin{aligned} {[}\,\underbrace{\alpha ,\dots ,\alpha }_{k+1 \alpha '\mathrm{s}}\,]=0, \end{aligned}$$

and \(\alpha \) is called supernilpotent if it is k-supernilpotent for some \(k\ge 1\). An algebra \(\mathbf {A}\) is called k-supernilpotent or supernilpotent if its congruence 1 has the property.

It is well known (see e.g. [1, p. 370]) and easy to check that for every \(k\ge 1\) the 4-element algebra \((\mathbb {Z}_4;+,2x_1\dots x_k)\) (\(k\ge 2\)) is k-supernilpotent, but not \((k-1)\)-supernilpotent. Therefore, even for finite algebras of a fixed size, there is no a priori bound on the arity of the higher commutator \([1,\dots ,1]\) to be checked if one wants to determine whether the algebra is supernilpotent. Hence, it is not clear from the definition whether supernilpotence is a decidable property for congruences of finite algebras.

Under mild assumptions on a finite algebra in a finite language, a combination of basic facts from tame congruence theory (see [12]) and results from [15] and [1] yields the following characterization of supernilpotence, which implies that supernilpotence for these algebras is decidable.

Theorem 4.1

[1, 12, 15]. Let \(\mathbf {A}\) be a finite algebra in a finite language such that the variety \({\mathcal {V}}(\mathbf {A})\) generated by \(\mathbf {A}\) omits type 1. Then \(\mathbf {A}\) is supernilpotent if and only if \(\mathbf {A}\) factors as a direct product of nilpotent algebras of prime power order.

In more detail, the three results on finite algebras \(\mathbf {A}\), which combine to yield the characterization in Theorem 4.1, are as follows:

  1. (I)

    If \({\mathcal {V}}(\mathbf {A})\) omits type 1 and \(\mathbf {A}\) is supernilpotent or nilpotent, then \({\mathcal {V}}(\mathbf {A})\) is congruence permutable (i.e., \(\mathbf {A}\) has a Maltsev term).

    Indeed, since \(\mathbf {A}\) is supernilpotent or nilpotent, \(\mathbf {A}\) cannot have any 2-snags, and hence is solvable by [12, Thm. 7.2]. Furthermore, all algebras in \({\mathcal {V}}(\mathbf {A})\) are locally solvable by [12, Cor. 7.6]. Hence \({\mathcal {V}}(\mathbf {A})\) omits types 3, 4, 5 by [12, Thm. 7.11(2)]. Since \({\mathcal {V}}(\mathbf {A})\) also omits type 1, \({\mathcal {V}}(\mathbf {A})\) is congruence permutable (i.e., \(\mathbf {A}\) has a Maltsev term) by [12, Thm. 7.11(3)].

  1. (II)

    If \(\mathbf {A}\) is nilpotent in a finite language and \({\mathcal {V}}(\mathbf {A})\) is congruence modular, then the following conditions on \(\mathbf {A}\) are equivalent:

    1. (a)

      \(\mathbf {A}\) factors as a direct product of nilpotent algebras of prime power order;

    2. (b)

      \(\mathbf {A}\) has a finite bound on the arities of nontrivial commutator terms;

    3. (c)

      \(\mathbf {A}\) has a finite bound on the arities of nontrivial commutator polynomials.

    The equivalence of (a) and (b) was proved in [15, Thm. 3.14]. Since condition (a) is clearly invariant under expanding \(\mathbf {A}\) by all constants, condition (c) is also equivalent to (a).

  1. (III)

    Assume \({\mathcal {V}}(\mathbf {A})\) is congruence permutable.

    1. (1)

      If \(\mathbf {A}\) is supernilpotent, then \(\mathbf {A}\) is nilpotent [1, Cor. 6.15].

    2. (2)

      Moreover \(\mathbf {A}\) is supernilpotent if and only if \(\mathbf {A}\) has a finite bound on the arities of nontrivial commutator polynomials [1, Lm. 7.5].

Our goal in this section is to use the techniques developed in Sections 2 and 3 to lift the characterization of supernilpotence in Theorem 4.1 from algebras to congruences as follows.

Theorem 4.2

Let \(\mathbf {A}\) be a finite algebra in a finite language such that \({\mathcal {V}}(\mathbf {A})\) omits type 1. For any congruence \(\alpha \) of \(\mathbf {A}\) the following conditions are equivalent:

  1. (a)

    \(\alpha \) is supernilpotent.

  2. (b)

    either \(\alpha =0\), or else \(\alpha \) is nilpotent, and \(\mathbf {A}\) has congruences \(\beta _1,\dots ,\beta _\ell \le \alpha \) (for some \(\ell >0\)) such that

    1. (1)

      \(\beta _1\wedge \dots \wedge \beta _\ell = 0\),

    2. (2)

      \((\beta _1\wedge \dots \wedge \beta _{i-1})\circ \beta _i = \alpha \) for every \(i\in [\ell ]\), \(i>1\), and

    3. (3)

      for each \(i\in [\ell ]\) there exists a prime \(p_i\) such that every block of \(\alpha /\beta _i\) in \(\mathbf {A}/\beta _i\) has size a power of \(p_i\).

Proof

Suppose \(\mathbf {A}\) satisfies the assumptions of the theorem, let \(\mathcal {F}\) denote the (finite) language of \(\mathbf {A}\), and let \({\mathcal {V}}:={\mathcal {V}}(\mathbf {A})\). Let us consider any congruence \(\alpha \) of \(\mathbf {A}\). The statement of the theorem is trivial if \(\alpha =0\), therefore we will assume from now on that \(\alpha >0\). Let us choose and fix an algebra \(\mathbf {I}=([m];\mathcal {F})\) isomorphic to the (finite) algebra \(\mathbf {A}/\alpha \), and let us fix an onto homomorphism \(\chi :\mathbf {A}\rightarrow \mathbf {I}\). Thus, \((\mathbf {A},\chi )\) is an object of the category \(\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\).

Now let \(\mathbf {C}:=\mathfrak {C}(\mathbf {A},\chi )\). Clearly, \(\mathbf {C}\) is a finite algebra in a finite language, \(\widehat{\mathcal {F}}_{\mathbf {I}}\), which belongs to the variety \({\mathcal {V}}^\mathfrak {C}\) consisting of all isomorphic copies of algebras in the category \(\mathfrak {C}\bigl ({\mathcal {V}}\,{\downdownarrows }\,\mathbf {I}\bigr )\) (cf. Corollary 3.9). Clearly, \({\mathcal {V}}(\mathbf {C})\) is a subvariety of \({\mathcal {V}}^\mathfrak {C}\). Since \({\mathcal {V}}\) omits type 1, and omitting type 1 is characterized, for locally finite varieties, by an idempotent Maltsev condition (see [12, Thm. 9.6]), Corollary 3.14(2) implies that \({\mathcal {V}}(\mathbf {C})\) also satisfies this Maltsev condition, and therefore \({\mathcal {V}}(\mathbf {C})\) omits type 1. In summary, our discussion in this paragraph shows that \(\mathbf {C}\) satisfies the assumptions of Theorem 4.1.

Let us return to the congruence \(\alpha \) of \(\mathbf {A}\). By Corollary 3.4(1), its image under \(\mathfrak {C}\) is the congruence \(\alpha ^\mathfrak {C}=1\) of \(\mathbf {C}\), and by Theorem 3.6, \(\alpha \) is a supernilpotent congruence of \(\mathbf {A}\) if and only if 1 is a supernilpotent congruence of \(\mathbf {C}\), that is, if and only if the algebra \(\mathbf {C}\) is supernilpotent. By Theorem 4.1, the latter condition holds if and only if \(\mathbf {C}\) factors as a direct product of nilpotent algebras of prime power order; that is, \(\mathbf {C}\) is nilpotent and \(\mathbf {C}\) factors as a direct product of algebras of prime power order. Using congruences this condition can be expressed as follows:

  • (b)\(^*\) the congruence 1 of \(\mathbf {C}\) is nilpotent, and \(\mathbf {C}\) has congruences \(\gamma _1,\dots ,\gamma _\ell \) (for some \(\ell >0\)) such that

    • (1) \(\gamma _1\wedge \dots \wedge \gamma _\ell = 0\),

    • (2) \((\gamma _1\wedge \dots \wedge \gamma _{i-1})\circ \gamma _i = 1\) for every \(i\in [\ell ]\), \(i>1\), and

    • (3) for each \(i\in [\ell ]\) there exists a prime \(p_i\) such that the algebra \(\mathbf {C}/\gamma _i\) has size a power of \(p_i\).

Condition (2) here is equivalent to requiring that the natural homomorphism \(\nu _i:\mathbf {C}\rightarrow (\mathbf {C}/\gamma _1)\times \dots \times (\mathbf {C}/\gamma _i)\) with kernel \(\gamma _1\wedge \dots \wedge \gamma _i\) is surjective for every \(i\in [\ell ]\), \(i>1\). Hence, (1)–(2) hold iff \(\nu _\ell \) yields an isomorphism \(\mathbf {C}\cong (\mathbf {C}/\gamma _1)\times \dots \times (\mathbf {C}/\gamma _\ell )\).

By Theorem 3.6, \(1=\alpha ^\mathfrak {C}\) is a nilpotent congruence of \(\mathbf {C}\) if and only if \(\alpha \) is a nilpotent congruence of \(\mathbf {A}\). Furthermore, using the bijection \({}^\mathfrak {C}\) from Corollary 3.4 between the interval \(I(0,\alpha )\) of the congruence lattice of \(\mathbf {A}\) and the congruence lattice of \(\mathbf {C}\), which also preserves \(\wedge \) and \(\circ \), we can write each \(\gamma _i\) as \(\gamma _i=\beta _i^\mathfrak {C}\) for a unique \(\beta _i\in I(0,\alpha )\), and we see that the existence of \(\gamma _1,\dots ,\gamma _\ell \) with properties (1)–(3) is equivalent to the existence of \(\beta _1,\dots ,\beta _\ell \in I(0,\alpha )\) such that conditions (1)–(3) in (b) hold. For translating condition (3) in (b)\(^*\) to condition (3) in (b) we also use the fact that the underlying set of each \(\mathbf {C}/\beta _i^\mathfrak {C}\) is the product of the blocks of the congruence \(\alpha /\beta _i\) of \(\mathbf {A}/\beta _i\). \(\square \)

5 The subpower membership problem

Let \({\mathcal {K}}\) be a finite set of finite algebras in a finite language. The Subpower Membership Problem for \({\mathcal {K}}\) is the following combinatorial decision problem:

  • \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\)

  • Input: \(a_1,\dots ,a_k,b\in \mathbf {A}_1\times \dots \times \mathbf {A}_n\) with \(\mathbf {A_1},\dots ,\mathbf {A}_n\in {\mathcal {K}}\).

  • Question: Is b a member of the subalgebra of \(\mathbf {A}_1\times \dots \times \mathbf {A}_n\) generated by the set \(\{a_1,\dots ,a_k\}\)?

For background and recent results on the subpower membership problem, see [6, 7, 19, 24, 26, 27].

In this section we will assume that the set \({\mathcal {K}}\) of algebras fixed for the Subpower Membership Problem satisfies the following condition for some integer \(\mathsf {d}\ge 2\):

$$\begin{aligned}&{\mathcal {V}}\text { is a variety in a finite language } \mathcal {F}\text { with a } \mathsf {d}\text {-cube term, and}\nonumber \\&\qquad \qquad {\mathcal {K}}\text { is a finite set of finite algebras in } {\mathcal {V}}. \end{aligned}$$
(5.1)

For the definition of a \(\mathsf {d}\)-cube term, the reader is referred to [4, 16]. Note also that every variety with a cube term is congruence modular by [4, Thm. 4.2] (for an easy proof, see [8]), therefore we may use concepts and results from the theory of the modular commutator (see [9]).

It was proved in [7, Thm. 6.4] that under assumption (5.1) on \({\mathcal {K}}\), \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}}) \in \mathsf {P}\) provided \({\mathcal {K}}\) generates a residually small variety. This was done by reducing the general problem \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) to a ‘well-structured’ subproblem.

In this section we will employ the techniques developed in Sections 2 and 3 to further reduce this subproblem of \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\), and use this reduction to extend the result of [7, Thm. 6.4] on \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\in \mathsf {P}\) mentioned above to a wider family of sets \({\mathcal {K}}\).

Our starting point for the new reduction will be the reduction proved in [7], therefore we need to recall the relevant concepts and results from [7].

Definition 5.1

([7, Def. 6.2]). Let \(a_1,\dots ,a_k,b\in \mathbf {A}_1\times \dots \times \mathbf {A}_n\) (\(\mathbf {A}_1,\dots ,\mathbf {A}_n\in {\mathcal {K}}\)) be an input for \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) where \(a_r=(a_{r1},\dots ,a_{rn})\) (\(r\in [k]\)) and \(b=(b_1,\dots ,b_n)\). We call this input \(\mathsf {d}\)-coherent if the following conditions are satisfied:

  1. (i)

    \(n\ge \max \{\mathsf {d},3\}\);

  2. (ii)

    \(\mathbf {A}_1,\dots ,\mathbf {A}_n\) are similar subdirectly irreducible algebras, and each \(\mathbf {A}_\ell \) has abelian monolith \(\mu _\ell \); let \(\rho _\ell \) denote the centralizer of \(\mu _\ell \);

  3. (iii)

    for all \(I\subseteq [n]\) with \(|I|<\max \{\mathsf {d},3\}\), the subalgebra of \(\prod _{i\in I}\mathbf {A}_i\) generated by \(\{a_1|_I,\dots ,a_k|_I\}\) is a subdirect subalgebra of \(\prod _{i\in I}\mathbf {A}_i\), and \(b|_I\) is a member of this subalgebra;

  4. (iv)

    for all \(i,j\in [n]\), the subalgebra of \(\mathbf {A}_i/\rho _i\times \mathbf {A}_j/\rho _j\) generated by

    $$\begin{aligned} \{(a_{1i}/\rho _i,a_{1j}/\rho _j),\dots ,(a_{ki}/\rho _i,a_{kj}/\rho _j)\} \end{aligned}$$

    is the graph of an isomorphism \(\mathbf {A}_i/\rho _i\rightarrow \mathbf {A}_j/\rho _j\).

It is easy to see that \(\mathsf {d}\)-coherence for inputs of \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) can be checked in polynomial time.

Definition 5.2

([7, Def. 6.3]). We define \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-coh}}}\,}}({\mathcal {K}})\) to be the restriction of \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) to \(\mathsf {d}\)-coherent inputs.

Theorem 5.3

([7, Thm. 6.4]). If \({\mathcal {V}}\) is a variety in a finite language with a \(\mathsf {d}\)-cube term, then the decision problems \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) and \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-coh}}}\,}}(\mathbb {H}\mathbb {S}{\mathcal {K}})\) are polynomial time equivalent for every finite family \({\mathcal {K}}\) of finite algebras in \({\mathcal {V}}\).

Now we are ready to define our new reduction for \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\).

Definition 5.4

An input \(a_1,\dots ,a_k,b\in \mathbf {A}_1\times \dots \times \mathbf {A}_n\) (\(\mathbf {A}_1,\dots ,\mathbf {A}_n\in {\mathcal {K}}\)) for \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) will be called \(\mathsf {d}\)-central if it satisfies conditions (i) and (iii) in Definition 5.1 and the following new condition:

(ii)\('\):

\(\mathbf {A}_1,\dots ,\mathbf {A}_n\) are subdirectly irreducible algebras such that the monolith \(\mu _\ell \) of each \(\mathbf {A}_\ell \) is a central congruence of \(\mathbf {A}_\ell \) (i.e., \([1,\mu _\ell ]=0\), hence in particular, \(\mu _\ell \) is abelian), and the monoliths \(\mu _1,\dots ,\mu _n\) have the same prime characteristic.

As before, it is clear that \(\mathsf {d}\)-centrality for inputs of \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) can be checked in polynomial time.

Definition 5.5

We define \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}})\) to be the restriction of \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) to \(\mathsf {d}\)-central inputs.

Our reduction theorem will reduce the solution of \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) to the solution of \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star )\) for several new sets \({\mathcal {K}}^\star \) of algebras constructed from \({\mathcal {K}}\), which are defined as follows.

Definition 5.6

Given \({\mathcal {K}}\) as in (5.1), let \(\overline{\overline{{\mathcal {K}}}}\) denote the set of all subdirectly irreducible algebras \(\mathbf {S}\) in \(\mathbb {H}\mathbb {S}{\mathcal {K}}\) whose monolith \(\mu _{\mathbf {S}}\) is abelian. Recall that similarity of subdirectly irreducible algebras is an equivalence relation on \(\overline{\overline{{\mathcal {K}}}}\), so let \(\overline{{\mathcal {K}}}_1,\dots ,\overline{{\mathcal {K}}}_q\) denote its equivalence classes. For each \(\ell \in [q]\), let \(\mathbf {I}_\ell =([m_\ell ],\mathcal {F})\) be a fixed algebra that is isomorphic to \(\mathbf {S}/(0:\mu _{\mathbf {S}})\) for all \(\mathbf {S}\in \overline{{\mathcal {K}}}_\ell \), and let

$$\begin{aligned} {\mathcal {K}}^\star _\ell := \{\mathfrak {C}(\mathbf {S},\chi ):\mathbf {S}\in \overline{{\mathcal {K}}}_\ell , \chi \text { is an onto homomorphism } \mathbf {S}\rightarrow \mathbf {I}_\ell \\ \text { with kernel } (0:\mu _{\mathbf {S}})\}, \end{aligned}$$

where \(\mathfrak {C}\) is the functor with domain category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}_\ell \bigr )\).

Theorem 5.7

Let \({\mathcal {V}}\) be a variety in a finite language \(\mathcal {F}\) with a \(\mathsf {d}\)-cube term. For any finite set \({\mathcal {K}}\) of finite algebras in \({\mathcal {V}}\), the sets \({\mathcal {K}}^\star _1,\dots ,{\mathcal {K}}^\star _q\) of algebras have the following properties:

  1. (1)

    Each \({\mathcal {K}}^\star _\ell \) \((\ell \in [q])\) is a finite set of finite algebras in a variety in a finite language with a \(\mathsf {d}\)-cube term.

  2. (2)

    Each \({\mathcal {K}}^\star _\ell \) \((\ell \in [q])\) is a set of subdirectly irreducible algebras whose monoliths are central and have the same prime characteristic.

  3. (3)

    \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) is polynomial time reducible to the problems \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star _\ell )\) \((\ell \in [q])\), and the sets \({\mathcal {K}}^\star _\ell \) \((\ell \in [q])\) of algebras can be computed from \({\mathcal {K}}\) in constant time.

Proof

We will use all notation introduced in Definition 5.6. For the proofs of statements (1) and (2) we fix an \(\ell \in [q]\).

To prove (1), let \({\mathcal {W}}_\ell \) denote the subvariety of \({\mathcal {V}}\) generated by \(\overline{{\mathcal {K}}}_\ell \). Since

$$\begin{aligned} \{(\mathbf {S},\chi ):\mathbf {S}\in \overline{{\mathcal {K}}}_\ell , \ \chi \text { is an onto homomorphism } \mathbf {S}\rightarrow \mathbf {I}_\ell \text { with kernel } (0:\mu _{\mathbf {S}})\}\nonumber \\ \end{aligned}$$
(5.2)

is a finite set of objects in \(\bigl ({\mathcal {W}}_\ell \,{\downdownarrows }\,\mathbf {I}_\ell \bigr )\) with all \(\mathbf {S}\in \overline{{\mathcal {K}}}_\ell \) finite, it follows from Corollary 3.9 that \({\mathcal {K}}^\star _\ell \) is a finite set of finite algebras in the variety \({\mathcal {W}}_\ell ^{\mathfrak {C}}\) (whose language \(\widehat{\mathcal {F}}_{\mathbf {I}_\ell }\) is finite). Since \({\mathcal {V}}\) has a \(\mathsf {d}\)-cube term, so does its subvariety \({\mathcal {W}}_\ell \). The existence of a \(\mathsf {d}\)-cube term is a strong idempotent Maltsev condition, therefore the variety \({\mathcal {W}}_\ell ^{\mathfrak {C}}\) also has a \(\mathsf {d}\)-cube term by Corollary 3.14.

For statement (2), let \(\mathbf {C}:=\mathfrak {C}(\mathbf {S},\chi )\) be any algebra in \({\mathcal {K}}^\star _\ell \). Here \((\mathbf {S},\chi )\) is a member of the set in (5.2), so \(\mathbf {S}\) is subdirectly irreducible with abelian monolith \(\mu _{\mathbf {S}}\), and for the centralizer \(\alpha _{\mathbf {S}}=(0:\mu _{\mathbf {S}})\,(\ge \mu _{\mathbf {S}})\) we have that \(\alpha _{\mathbf {S}}=\ker (\chi )\). The map \(^{\mathfrak {C}}\) described in Corollary 3.4 is an isomorphism between the interval \(I(0,\alpha _{\mathbf {S}})\) in the congruence lattice of \(\mathbf {S}\) and the congruence lattice of \(\mathbf {C}\). Therefore, \(\mathbf {C}\) is subdirectly irreducible with monolith \(\mu _{\mathbf {S}}^{\mathfrak {C}}\). Moreover, by Corollary 3.8, we have that \((0:\mu _{\mathbf {S}}^{\mathfrak {C}})=(0:\mu _{\mathbf {S}})^{\mathfrak {C}}=\alpha ^{\mathfrak {C}}=1\), so the monolith \(\mu _{\mathbf {S}}^{\mathfrak {C}}\) of \(\mathbf {C}\) is central. Since \(\mathbf {S}\in {\mathcal {V}}\) and \({\mathcal {V}}\) is congruence modular, Theorem 3.18 and the fact that \(\mu _{\mathbf {S}}\) is abelian imply that \({{\,\mathrm{typ}\,}}_{\mathbf {C}}(0,\mu _{\mathbf {S}}^{\mathfrak {C}})={{\,\mathrm{typ}\,}}_{\mathbf {S}}(0,\mu _{\mathbf {S}})=\mathbf{2}\), and the congruences \(\mu _{\mathbf {S}}^{\mathfrak {C}}\) and \(\mu _{\mathbf {S}}\) — i.e., the prime quotients \(\langle 0,\mu _{\mathbf {S}}^{\mathfrak {C}}\rangle \) and \(\langle 0,\mu _{\mathbf {S}}\rangle \) — have the same prime characteristic. Since all algebras \(\mathbf {S}\) in (5.2) are similar, and hence by the definition or by the characterization of similarity in [9, Def. 10.6, Thm. 10.8] they have the same characteristic, we conclude that the monoliths of all members of \({\mathcal {K}}^\star _\ell \) have the same prime characteristic.

In statement (3) it is clear that the sets \({\mathcal {K}}^\star _\ell \) \((\ell \in [q])\) of algebras can be computed from \({\mathcal {K}}\) in constant time. We need to argue that \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\) is polynomial time reducible to the problems \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star _\ell )\) (\(\ell \in [q]\)). In view of Theorem 5.3, it suffices to show that \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-coh}}}\,}}(\mathbb {H}\mathbb {S}{\mathcal {K}})\) is polynomial time reducible to the problems \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star _\ell )\) (\(\ell \in [q]\)). We will prove this by describing how to assign to every input \(a_1,\dots ,a_k,b\) for \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-coh}}}\,}}(\mathbb {H}\mathbb {S}{\mathcal {K}})\) a number \(\ell \in [q]\) and an input \(\widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\) for \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star _\ell )\) in such a way that

  • the answer to the input \(a_1,\dots ,a_k,b\) is ‘yes’ if and only if the answer to the input \(\widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\) is ‘yes’, and

  • \(\widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\) can be computed from \(a_1,\dots ,a_k,b\) in polynomial time.

Let \(a_1,\dots ,a_k,b\in \prod _{j\in [n]}\mathbf {A}_j\) (\(\mathbf {A}_1,\dots ,\mathbf {A}_n\in \mathbb {H}\mathbb {S}{\mathcal {K}}\)) be an input for \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-coh}}}\,}}(\mathbb {H}\mathbb {S}{\mathcal {K}})\). Then this is a \(\mathsf {d}\)-coherent input for \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\), that is, conditions (i)–(iv) from Definition 5.1 hold. In particular, (ii) implies that there is a unique \(\ell \in [q]\) such that \(\mathbf {A}_1,\dots ,\mathbf {A}_n\in \overline{{\mathcal {K}}}_\ell \). This \(\ell \) can be found in constant time. Now let us fix \(\mathbf {I}:=\mathbf {I}_\ell \) as described in Definition 5.6, choose an isomorphism \(\varphi _1:\mathbf {A}_1/\rho _1\rightarrow \mathbf {I}\), and for \(2\le j\le n\) define the isomorphisms \(\varphi _j:\mathbf {A}_j/\rho _j\rightarrow \mathbf {I}\) by \(\varphi _j:=\varphi _1\circ \iota _{j,1}\) where \(\iota _{j,1}\) is the isomorphism \(\mathbf {A}_j/\rho _j\rightarrow \mathbf {A}_1/\rho _1\) from condition (iv) in Definition 5.1. For each \(j\in [n]\) let \(\chi _j:\mathbf {A}_j\rightarrow \mathbf {I}\) be defined by \(\chi _j:=\varphi _j\circ \nu _j\) where \(\nu _j:\mathbf {A}_j\rightarrow \mathbf {A}_j/\rho _j\) is the natural homomorphism. So, \(\ker (\chi _j)=\rho _j=(0:\mu _j)\) for every \(j\in [n]\). Clearly, the algebra \(\mathbf {I}\) and each isomorphism \(\iota _{j,1}\) can be computed in constant time, so the homomorphisms \(\chi _j\) (\(j\in [n]\)) can be computed in O(n) time.

Let \(\mathbf {B}\) and \(\mathbf {B}^+\) denote the subalgebras of \(\prod _{j\in [n]}\mathbf {A}_j\) generated by the sets \(\{a_1,\dots ,a_k\}\) and \(\{a_1,\dots ,a_k,b\}\), respectively. Using the homomorphisms \(\chi _j\) \((j\in [n])\) we can express condition (iv) as follows: \(\mathbf {B}\) is a subalgebra of the algebra \(\prod ^{\downdownarrows \mathbf {I}}_{j\in [n]}\mathbf {A}_j\), where \((\prod ^{\downdownarrows \mathbf {I}}_{j\in [n]}\mathbf {A}_j;\chi )\) with \(\chi \) defined by \((x_1,\dots ,x_n)\mapsto \chi _1(x_1)=\dots =\chi _n(x_n)\), is the product of the objects \((\mathbf {A}_j,\chi _j)\) (\(j\in [n]\)) in the category \(\bigl (\mathsf{Alg}(\mathcal {F})\,{\downdownarrows }\,\mathbf {I}\bigr )\). Condition (iii) of Definition 5.1 implies that \(\mathbf {B}\) and \(\mathbf {B}^+\) are both subdirect subalgebras of \(\prod _{j\in [n]}\mathbf {A}_j\), moreover, the requirements on b in this condition ensure that \(\mathbf {B}^+\) is a subalgebra of \(\prod ^{\downdownarrows \mathbf {I}}_{j\in [n]}\mathbf {A}_j\) as well. Therefore, the map \(\chi \) restricts to \(\mathbf {B}\) and \(\mathbf {B}^+\) as onto homomorphisms \(\chi |_{\mathbf {B}}:\mathbf {B}\rightarrow \mathbf {I}\) and \(\chi |_{\mathbf {B}^+}:\mathbf {B}^+\rightarrow \mathbf {I}\). The kernel classes of these homomorphisms are the sets \(B\cap D^{(i)}\) and \(B^+\cap D^{(i)}\) (\(i\in [m]\)), respectively, where \(D^{(i)}=\prod _{j\in [n]}\chi ^{-1}_{j}(i)\). Hence, \(B^+\cap D^{(i)}\supseteq B\cap D^{(i)}\not =\emptyset \) for every \(i\in [m]\).

We can compute representatives \(d^{(i)}\in B\cap D^{(i)}\) for each \(i\in [m]\) by generating all elements of \(\mathbf {B}/\ker (\chi |_{\mathbf {B}})\cong \mathbf {I}\) using \(\chi (a_1),\dots ,\chi (a_k)\) (at most m distinct elements), and replicating the same computation using at most m of the generators \(a_1,\dots ,a_k\) instead, one from each set \(\{a_1,\dots ,a_k\}\cap \chi ^{-1}\bigl (\chi (a_r)\bigr )\) (\(r\in [k]\)). This requires O(kn) time.

Now let \(\mathbf {C}_j:=\mathfrak {C}(\mathbf {A}_j,\chi _j)\) for every \(j\in [n]\), and let \(\mathbf {B}^{\mathfrak {C}}\) and \((\mathbf {B}^+)^{\mathfrak {C}}\) be the subalgebras of \(\prod _{j\in [n]}\mathbf {C}_j\) obtained from \(\mathbf {B}\) and \(\mathbf {B}^+\) by applying the map \({}^{\mathfrak {C}}\) described in Theorem 3.1(1). Furthermore, let \(\widetilde{\,}:\prod ^{\downdownarrows \mathbf {I}}_{j\in [n]}A_j\rightarrow \prod _{j\in [n]} C_j\) be the function defined in Theorem 3.1(3), using the elements \(d^{(i)}\) (\(i\in [m]\)) from the preceding paragraph as padding elements. Let \(\widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\) be the elements of \((B^+)^{\mathfrak {C}}\) obtained from the given input elements \(a_1,\dots ,a_k,b\) by applying this function. Clearly, \(\widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\) can be computed from \(a_1,\dots ,a_k,b\) and \(d^{(1)},\dots ,d^{(m)}\) in \(O\bigl (kn\bigr )\) time.

Since \(\{a_1,\dots ,a_k\}\) generates \(\mathbf {B}\), and \(\{a_1,\dots ,a_k,b\}\) generates \(\mathbf {B}^+\), Theorem 3.1(3), together with the fact \(d^{(1)},\dots ,d^{(m)}\in B\subseteq B^+\), implies that

$$\begin{aligned} \begin{matrix} \{\widetilde{a}_1,\dots ,\widetilde{a}_k\}\text { is a generating set for } \mathbf {B}^{\mathfrak {C}}, \text { and}\\ \{\widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\}\text { is a generating set for } (\mathbf {B}^+)^{\mathfrak {C}}. \end{matrix} \end{aligned}$$
(5.3)

Now we want to show that

$$\begin{aligned} \widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\in \mathbf {C}_1\times \dots \times \mathbf {C}_n \ (\mathbf {C}_1,\dots ,\mathbf {C}_n\in {\mathcal {K}}^\star _\ell ) \end{aligned}$$
(5.4)

is a correct input for \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star _\ell )\), that is, \(\widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\) is a \(\mathsf {d}\)-central input for \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}}^\star _\ell )\). We need to check that conditions (i), (ii)\('\), and (iii) from Definition 5.4 hold for the new input (5.4), that is, they hold for \(\widetilde{a}_r\) (\(r\in [k]\)), \(\widetilde{b}\), \(\mathbf {C}_j\) (\(j\in [n]\)), and \({\mathcal {K}}^\star _\ell \) in place of \(a_r\) (\(r\in [k]\)), b, \(\mathbf {A}_j\) (\(j\in [n]\)), and \({\mathcal {K}}\). Note first that our general assumption (5.1) (suppressed in Definition 5.4) holds for \({\mathcal {K}}^\star _\ell \) by Theorem 5.7(1). Condition (i) from Definition 5.4 holds for the new input (5.4), because it is identical to condition (i) of \(\mathsf {d}\)-coherence for the original input \(a_1,\dots ,a_k,b\). Condition (ii)\('\) from Definition 5.4 holds for (5.4) by Theorem 5.7(2), since \(\mathbf {C}_1,\dots ,\mathbf {C}_n\in {\mathcal {K}}^\star _\ell \). To check condition (iii) from Definition 5.4 for the new input (5.4), let \(I\subseteq [n]\) be such that \(|I|<\max \{\mathsf {d},3\}\). In view of (5.3), the subalgebra of \(\prod _{j\in I}\mathbf {C}_j\) generated by \(\{\widetilde{a}_1|_I,\dots ,\widetilde{a}_k|_I\}\) is \(\mathbf {B}^{\mathfrak {C}}|_I\), while the subalgebra of \(\prod _{j\in I}\mathbf {C}_j\) generated by \(\{\widetilde{a}_1|_I,\dots ,\widetilde{a}_k|_I,\widetilde{b}|_I\}\) is \((\mathbf {B}^+)^{\mathfrak {C}}|_I\). Therefore, condition (iii) from Definition 5.4 for (5.4) and for the chosen I is equivalent to saying that \(\mathbf {B}^{\mathfrak {C}}|_I\) projects to each coordinate \(j\in I\) to be \(\mathbf {C}_j\), and \((\mathbf {B}^+)^{\mathfrak {C}}|_I=\mathbf {B}^{\mathfrak {C}}|_I\). To prove that \(\mathbf {B}^{\mathfrak {C}}|_I\) and \((\mathbf {B}^+)^{\mathfrak {C}}|_I\) meet these conditions, notice that our assumption that the original input \(a_1,\dots ,a_k,b\) is \(\mathsf {d}\)-coherent, implies that the analogous conditions hold for \(\mathbf {B}|_I\), \(\mathbf {B}^+|_I\), and \(\mathbf {A}_j\) \((j\in I)\). Consequently, they also hold if we pass to their images under the map \({}^{\mathfrak {C}}\) described in Theorem 3.1(1). Thus, \((\mathbf {B}|_I)^{\mathfrak {C}}\) projects to each coordinate \(j\in I\) to be \(\mathbf {C}_j\), and \((\mathbf {B}^+|_I)^{\mathfrak {C}}=(\mathbf {B}|_I)^{\mathfrak {C}}\). According to Theorem 3.1(2), projection onto a set of coordinates is preserved by \(^{\mathfrak {C}}\), therefore these conditions hold with the order of \(|_I\) and \(^{\mathfrak {C}}\) switched. This proves (iii) from Definition 5.4 for the new input (5.4), and hence finishes the proof that the input (5.4) is \(\mathsf {d}\)-central.

Finally, using again (5.3), we get that

$$\begin{aligned} \text {the an}&\text {swer of } {{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star _\ell )\text { to the input } \widetilde{a}_1,\dots ,\widetilde{a}_k,\widetilde{b}\text { is `yes'}\\&\Leftrightarrow \quad \widetilde{b}\in \mathbf {B}^{\mathfrak {C}} \quad \Leftrightarrow \quad (\mathbf {B}^+)^{\mathfrak {C}}=\mathbf {B}^{\mathfrak {C}}\quad {\mathop {\Leftrightarrow }\limits ^{\text {Thm}~3.1}}\quad (\mathbf {B}^+)=\mathbf {B} \quad \Leftrightarrow \quad b\in \mathbf {B}\\&\Leftrightarrow \quad \text {the answer of } {{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-coh}}}\,}}(\mathbb {H}\mathbb {S}{\mathcal {K}}) \text { to the input } a_1,\dots ,a_k,b\text { is `yes'}. \end{aligned}$$

The crucial step is \({\mathop {\Leftrightarrow }\limits ^{\text {Thm}~3.1}}\), where we use the bijective property of the map \({}^{\mathfrak {C}}\) in Theorem 3.1(1). The proof of Theorem 5.7 is complete. \(\square \)

Corollary 5.8

The following conditions are equivalent:

  1. (a)

    \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\in \mathsf {P}\) for every finite set \({\mathcal {K}}\) of finite algebras in a variety in a finite language with a \(\mathsf {d}\)-cube term.

  2. (b)

    \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}})\in \mathsf {P}\) for every finite set \({\mathcal {K}}\) of finite algebras in a variety in a finite language with a \(\mathsf {d}\)-cube term.

Theorem 5.9

Let \({\mathcal {V}}\) be a variety in a finite language \(\mathcal {F}\) with a \(\mathsf {d}\)-cube term. If \({\mathcal {K}}\) is a finite set of finite algebras in \({\mathcal {V}}\) such that

\((\ddagger )\):

for every subdirectly irreducible algebra \(\mathbf {S}\in \mathbb {H}\mathbb {S}{\mathcal {K}}\) with abelian monolith \(\mu _{\mathbf {S}}\) the centralizer of \(\mu _{\mathbf {S}}\) is supernilpotent,

then \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}})\in \mathsf {P}\).

The result of [7, Thm. 6.4] mentioned earlier is a special case of Theorem 5.9; it is obtained from this theorem by replacing the word ‘supernilpotent’ in condition \((\ddagger )\) by the word ‘abelian’. Indeed, the strengthening of condition \((\ddagger )\) where ‘supernilpotent’ is replaced by ‘abelian’ is equivalent to the condition that \({\mathcal {K}}\) generates a residually small variety, and hence \({\mathcal {V}}\) can be chosen to be residually small (see. e.g., [7, Cor. 2.4] and the discussion preceding it).

Finite algebras with a Maltsev term that satisfy a slightly weaker condition than \((\ddagger )\), namely that in every subdirectly irreducible homomorphic image the monolith has supernilpotent centralizer, already appeared in [18] where a relational description of their polynomial clones was given.

Proof of Theorem 5.9

We will use the notation introduced in Definition 5.6. By Theorem 5.7(3), it suffices to show that under the assumptions of Theorem 5.9 we have \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star _\ell )\in \mathsf {P}\) for every \(\ell \in [q]\). Let \(\ell \in [q]\) be fixed for the rest of the proof. For notational convenience, we will drop the subscript \(\ell \); that is, we will write \(\overline{{\mathcal {K}}}\) for \(\overline{{\mathcal {K}}}_\ell \), \(\mathbf {I}=([m];\mathcal {F})\) for \(\mathbf {I}_\ell =([m_\ell ];\mathcal {F})\), and \({\mathcal {K}}^\star \) for \({\mathcal {K}}^\star _\ell \). Furthermore, let \(\mathbf {K}:=\prod {\mathcal {K}}^\star \) be the product of all members of \({\mathcal {K}}^\star \). Clearly, the variety \({\mathcal {V}}(\mathbf {K})\) it generates coincides with the variety generated by \({\mathcal {K}}^\star \).

We know from Theorem 5.7(1) that \({\mathcal {K}}^\star \) is a finite set of finite algebras in a variety in a finite language (namely, \(\widehat{\mathcal {F}}_{\mathbf {I}}\)) with a \(\mathsf {d}\)-cube term. Therefore, \(\mathbf {K}\) is a finite algebra, the variety \({\mathcal {V}}(\mathbf {K})\) has a \(\mathsf {d}\)-cube term, and hence is congruence modular.

In the proof of Theorem 5.7(2) we saw that for every algebra \(\mathbf {C}=\mathfrak {C}(\mathbf {S},\chi )\) in \({\mathcal {K}}^\star \),

  • \(\mathbf {C}\) is subdirectly irreducible with monolith \(\mu _{\mathbf {S}}^{\mathfrak {C}}\), where \(\mu _{\mathbf {S}}\) is the monolith of \(\mathbf {S}\), and

  • \(1=\alpha _{\mathbf {S}}^{\mathfrak {C}}\) centralizes \(\mu _{\mathbf {S}}^{\mathfrak {C}}\), where \(\alpha _{\mathbf {S}}=(0:\mu _{\mathbf {S}})\).

Now, our additional assumption \((\ddagger )\) implies that \(\alpha _{\mathbf {S}}\) is a supernilpotent congruence of \(\mathbf {S}\). Hence, by Theorem 3.6, \(1=\alpha _{\mathbf {S}}^{\mathfrak {C}}\) is a supernilpotent congruence of \(\mathbf {C}\). Thus, all algebras in \({\mathcal {K}}^\star \) are supernilpotent. Since they are also subdirectly irreducible, Theorem 4.1 implies that they are nilpotent algebras of prime power order. By Theorem 5.7(2) we also have that the algebras in \({\mathcal {K}}^\star \) have the same prime characteristic. It follows that the cardinality of every algebra in \({\mathcal {K}}^\star \) is a power of the same prime. Hence, the product of these algebras, \(\mathbf {K}\), is also nilpotent of prime power order. Statement (I) following Theorem 4.1 also implies that \(\mathbf {K}\) has a Maltsev term.

Now we can use [19, Thm. 1.2] to conclude that \({{\,\mathrm{{SMP}}\,}}(\{\mathbf {K}\})\in \mathsf {P}\). Clearly, \({{\,\mathrm{{SMP}}\,}}(\{\mathbf {K}\})\) is polynomial time reducible to \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}}^\star )\), since every computation for \({{\,\mathrm{{SMP}}\,}}(\{\mathbf {K}\})\) can be viewed as a computation for \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}}^\star )\). Conversely, \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}}^\star )\) is also polynomial time reducible to \({{\,\mathrm{{SMP}}\,}}(\{\mathbf {K}\})\) for the following reason: by [7, Thm. 4.11], if \({\mathcal {L}}\) is a finite set of finite algebras in a variety in a finite language with a cube term, then \({{\,\mathrm{{SMP}}\,}}({\mathcal {L}})\) and \({{\,\mathrm{{SMP}}\,}}(\mathbb {H}\mathbb {S}{\mathcal {L}})\) are polynomial time equivalent. This theorem applies to \({\mathcal {L}}=\{\mathbf {K}\}\), so since \({\mathcal {K}}^\star \subseteq \mathbb {H}\mathbb {S}\{\mathbf {K}\}\), we get that \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}}^\star )\) is a subproblem of \({{\,\mathrm{{SMP}}\,}}(\mathbb {H}\mathbb {S}\{\mathbf {K}\})\), which is polynomial time equivalent to \({{\,\mathrm{{SMP}}\,}}(\{\mathbf {K}\})\). This proves that \({{\,\mathrm{{SMP}}\,}}({\mathcal {K}}^\star )\in \mathsf {P}\). It follows that for its subproblem we also have \({{\,\mathrm{{{\,\mathrm{{SMP}}\,}}_{\mathsf {d}\text {-centr}}}\,}}({\mathcal {K}}^\star )\in \mathsf {P}\), which completes the proof of Theorem 5.9. \(\square \)