1 Introduction

In the famous “wonderland paper” by L. Barto, J. Opršal and M. Pinsker (the first version appeared in 2015), a new algebraic notion saw the light of day: the reflection of an algebra (applicable also to a single function) [3, Definition 4.1]. This notion was introduced for the primary purpose of investigating the computational complexity of constraint satisfaction problems (CSPs).

From the algebraic point of view, reflections generalize at the same time both subalgebras and homomorphic images; however, they no longer preserve arbitrary identities but only so-called h1-identities, nowadays also known as minor identities. Furthermore, for the operations of an algebra, instead of clones, a weaker notion had to be considered where composition of functions is no longer required: the so-called minions (also called minor-closed classes or clonoids [1, 5, 9, 11]). The well-known Galois connection \({{\,\mathrm{Pol}\,}}\)\({{\,\mathrm{Inv}\,}}\) (for clones and relational clones, induced by the property of preservation of a relation by a function) does not work well for describing these minions as Galois closures. It turned out that the Galois theory introduced by Pippenger [9] for minor-closed sets of functions provides the right tool for minions: instead of (invariant) relations one has to consider pairs of relations.

Already Pippenger dealt with functions \(f :A^n \rightarrow B\) between two sets (an approach which was later also used for so-called promise constraint satisfaction problems, PCSPs [2, 4]). Therefore it was natural to ask if and how all these notions work for multisorted algebras (i.e., algebras with several base sets) in general, in order to provide a systematic algebraic treatment of everything that pertains or might pertain to reflections. This was done in [7] where Birkhoff-like theorems were established for multisorted algebras and minor identities, and in [8] where the Galois connection \({{\,\mathrm{Pol}\,}}\)\({{\,\mathrm{Inv}\,}}\) is generalized to the multisorted case, yielding \({{\,\mathrm{mPol}\,}}\)\({{\,\mathrm{mInv}\,}}\) with minions as Galois closed sets.

In the present paper we use results from [7] and [8] in order to treat one of the main results of the wonderland paper, namely, the characterization of the \({{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}\)-closure (see [3, Theorem 1.3] and also [2, Corollary 9.5]), also for multisorted algebras. In particular, we ask how this \({{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}\)-closure can be characterized from the relational point of view (i.e., by constructions on invariant relation pairs of minions). To this end, we introduce reflections (and coreflections) also for relation pairs (see Section 3), and these new concepts turn out to provide a suitable tool for enlightening reflections from the relational point of view.

The paper is organized as follows. In Section 2, we review basic concepts and well-known results related to multisorted operations and algebras, minors, reflections, and relation pairs that will be needed in the subsequent sections. In Section 3, we define reflections and coreflections as well as liftings and flattenings of relation pairs and establish a few auxiliary results.

The main results are given in Section 4. At first, we define the operators \({{\,\mathrm{\mathsf {E}}\,}}\), \({{\,\mathrm{\mathsf {R}}\,}}\), \({{\,\mathrm{\mathsf {P}}\,}}\) (extensions, reflections, direct powers) and for each of them we show how they can be characterized via invariant relation pairs (Propositions 4.4, 4.6, 4.7). Combining the above, we then characterize the \({{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}\)-closure in Theorem 4.12. We would like to underline that this result is of interest on its own right if one wants to consider only algebras of a fixed type. Finally, with Theorem 4.13 we put forward the multisorted counterpart of the wonderland theorem [3, Theorem 1.3] (see also [2, Corollary 9.5]); this also includes the characterization via relational constructions (cf. Theorem 4.13(b)(ii)).

We would like to mention at this point that usual (one-sorted) algebras as well as clones are special cases of multisorted algebras and special cases of minions, respectively. Therefore all results of this paper can be (re)interpreted and used for the classical case, too. It is possible to characterize clones C as minions with special properties for its invariant relation pairs \({{\,\mathrm{mInv}\,}}C\) (and \({{\,\mathrm{Inv}\,}}C\) can be defined from \({{\,\mathrm{mInv}\,}}C\)). This is, however, not in the main focus of the current paper and therefore will not be considered and proved here.

2 Preliminaries

2.1 Multisorted operations

We start by briefly recalling basic concepts in the theory of multisorted sets and multisorted operations. We follow the presentation of [7, 8], which is largely based on the terminology used in the book by Wechler [12], and we refer the reader to those publications for precise definitions, further details, and explanations not given here.

We denote by \(\mathbb {N}\) and \(\mathbb {N}_{+}\) the set of nonnegative integers and the set of positive integers, respectively. For \(n \in \mathbb {N}\), let \([{n}] := \{1, \dots , n\}\).

We write W(S) for the set of all words over a set S; this includes the empty word \(\varepsilon \). We denote by \(|{w}|\) the length of a word \(w \in W(S)\) and by \(|{{w}}|_{s}\) the number of occurrences of a letter \(s \in S\) in w.

Let S be a set of elements called sorts. An S-indexed family of sets is called an S-sorted set. Let \(A = (A_s)_{s \in S}\) and \(B = (B_s)_{s \in S}\) be S-sorted sets. We say that A is an (S-sorted) subset of B and we write \(A \subseteq B\) if \(A_s \subseteq B_s\) for all \(s \in S\). The union, intersection, and direct product of S-sorted sets A and B, as well as powers of A are defined componentwise: \(A \cup B := (A_s \cup B_s)_{s \in S}\), \(A \cap B := (A_s \cap B_s)_{s \in S}\), and \(A \times B := (A_s \times B_s)_{s \in S}\), \(A^k := (A_s^k)_{s \in S}\) for any \(k \in \mathbb {N}\). Let \({S}_{A} := \{\, s \in S \mid A_s \ne \emptyset \,\}\) be the set of essential sorts of A.

For a word \(w = s_1 s_2 \dots s_n \in W(S)\), let \(A_w := A_{s_1} \times A_{s_2} \times \dots \times A_{s_n}\). Note that \(A_\varepsilon = \{\emptyset \}\). A pair \((w,s) \in W(S) \times S\) is called a declaration over S. A declaration (ws) with \(w = s_1 \dots s_n\) is reasonable in A if \(A_s = \emptyset \) implies \(A_{s_i} = \emptyset \) for some i, or, equivalently, if \(A_w \ne \emptyset \) implies \(A_s \ne \emptyset \). Note that the declaration \((\varepsilon ,s)\) is reasonable in A if and only if \(A_s \ne \emptyset \).

Any function of the form \(f :A_w \rightarrow A_s\) is called an S-sorted operation on A; the pair (ws) is necessarily a reasonable declaration in A. The pair (ws) is called the declaration of f, the word w is called the arity of f, and the element s is called the (output) sort of f. The elements of S occurring in the word w are called the input sorts of f. We denote the declaration and arity of f by \({{\,\mathrm{dec}\,}}(f)\) and \({{\,\mathrm{ar}\,}}(f)\), respectively.

We denote the set of all S-sorted operations of declaration (ws) on A by \({{\,\mathrm{Op}\,}}^{(w,s)}(A)\). Let \({{\,\mathrm{Op}\,}}(A)\) be the set of all S-sorted operations on A, i.e.,

$$\begin{aligned} {{\,\mathrm{Op}\,}}(A) := \bigcup \left\{ \, {{\,\mathrm{Op}\,}}^{(w,s)}(A) \mid (w,s) \in W(S) \times S \,\right\} . \end{aligned}$$

An \(S-\)sorted-mapping f from A to B, denoted by \(f :A \rightarrow B\), is a family \((f_s)_{s \in S}\) of maps \(f_s :A_s \rightarrow B_s\).

2.2 Minors, reflections, powers

Definition 2.1

Given an S-sorted operation \(f :A_w \rightarrow A_s\) with \(w = s_1 \dots s_n\), a word \(u = u_1 \dots u_m \in W(S)\) such that \(\{s_1, \dots , s_n\} \subseteq \{u_1, \dots , u_m\}\) and a map \(\sigma :[{n}] \rightarrow [{m}]\) satisfying \(s_i = u_{\sigma (i)}\) for all \(i \in [{n}]\) (sort compatibility), define the function \(f^u_\sigma :A_u \rightarrow A_s\) of declaration (us) by the rule \(f^u_\sigma (\mathbf {a}) := f(\mathbf {a} \sigma )\), for all \(\mathbf {a} \in A_u\), i.e.,

$$\begin{aligned} f^u_\sigma \left( a_1, \dots , a_m\right) := f\left( a_{\sigma (1)}, \dots , a_{\sigma (n)}\right) \end{aligned}$$

for all \(a_i \in A_{u_i}\) (\(1 \le i \le m\)). Such a function \(f^u_\sigma \) is called a minor of f. A set \(F \subseteq {{\,\mathrm{Op}\,}}(A)\) is minor-closed or a (multisorted) minion if it contains all minors of its members. For \(F \subseteq {{\,\mathrm{Op}\,}}(A)\), we denote by \(\langle {F}\rangle \) the minion generated by F, i.e., the smallest minion containing F.

Definition 2.2

Let A and B be S-sorted sets. A reflection of A into B is a pair \((h,h')\) of \({S}_{B}\)-sorted mappings \(h = (h_s)_{s \in {S}_{B}}\), \(h' = (h'_s)_{s \in {S}_{B}}\), \(h_s :B_s \rightarrow A_s\), \(h'_s :A_s \rightarrow B_s\). Reflections of A into B exist if and only if \({S}_{B} \subseteq {S}_{A}\).

Assume that \({S}_{B} \subseteq {S}_{A}\) and \((h,h')\) is a reflection of A into B. If \((w,s) \in W(S) \times S\) is a declaration that is reasonable in both A and B and \(f :A_w \rightarrow A_s\), then we can define the \((h,h')\)-reflection of f as the map \(f_{(h,h')} :B_w \rightarrow B_s\) that is the empty map if \(B_w = \emptyset \) and is otherwise given by the rule

$$\begin{aligned} f_{(h,h')}\left( b_1, \dots , b_n\right) := h'_s \left( f \left( h_{s_1} \left( b_1 \right) , \dots , h_{s_n} \left( b_n \right) \right) \right) \end{aligned}$$

for all \((b_1, \dots , b_n) \in B_w\), which we may write briefly as

$$\begin{aligned} f_{(h,h')}\left( \mathbf {b}\right) = h'_s\left( f\left( h_w(\mathbf {b})\right) \right) \end{aligned}$$

for \(\mathbf {b} = (b_1, \dots , b_n) \in B_w\). We say that an S-sorted operation g is a reflection of f if g is an \((h,h')\)-reflection of f for some reflection \((h,h')\).

Let \(F \subseteq {{\,\mathrm{Op}\,}}(A)\). If \({{\,\mathrm{dec}\,}}(f)\) is reasonable in B for all \(f \in F\), then the \((h,h')\)-reflection of F is defined as \(F_{(h,h')} := \{\, f_{(h,h')} \mid f \in F \,\}\). Sets of operations of the form \(F_{(h,h')}\) for some reflection \((h,h')\) are called reflections of F.

Definition 2.3

Let \(f \in {{\,\mathrm{Op}\,}}(A)\) and I an arbitrary index set. Define \(f^{\otimes I} \in {{\,\mathrm{Op}\,}}(A^I)\) by componentwise application of f to indexed families, i.e., for all \((a^j_i)_{i \in I} \in A^I\) (\(1 \le j \le n\)),

$$\begin{aligned} f^{\otimes I}\left( \left( a^1_i\right) _{i \in I}, \dots , \left( a^n_i\right) _{i \in I}\right) := \left( f\left( a^1_i, a^2_i, \dots , a^n_i\right) \right) _{i \in I}. \end{aligned}$$

We refer to \(f^{\otimes I}\) as a direct power of f. For \(F \subseteq {{\,\mathrm{Op}\,}}(A)\), let \(F^{\otimes I} := \{\, f^{\otimes I} \mid f \in F \,\}\). If the index set I is finite, then \(f^{\otimes I}\) is called a finite direct power of f. Whenever \(I = [{k}]\) for some \(k \in \mathbb {N}\), we may write simply \(f^{\otimes k}\) and \(F^{\otimes k}\) for \(f^{\otimes [{k}]}\) and \(F^{\otimes [{k}]}\).

The following two propositions show that reflections and direct powers of minions are minions.

Proposition 2.4

[8, Proposition 5.2] Let A and B be S-sorted sets. Let \(F \subseteq {{\,\mathrm{Op}\,}}(A)\), and let \((h,h')\) be a reflection of A into B such that \(F_{(h,h')}\) is defined. If F is a minion, then \(F_{(h,h')}\) is a minion.

Proposition 2.5

Let A be an S-sorted set, and let \(F \subseteq {{\,\mathrm{Op}\,}}(A)\) be a minion. Then for any \(k \in \mathbb {N}\), \(F^{\otimes k}\) is a minion.

Proof

Let \(g \in F^{\otimes k}\) with \({{\,\mathrm{dec}\,}}(g) = (w,s)\), \(w = s_1 \dots s_n\). Then \(g = f^{\otimes k}\) for some \(f \in F\) with \({{\,\mathrm{dec}\,}}(f) = (w,s)\). It is straightforward to verify that for all \(u = u_1 \dots u_m \in W(S)\) and \(\sigma :[{n}] \rightarrow [{m}]\) such that \(f_\sigma ^u\) is defined, it holds that \((f^{\otimes k})^u_\sigma = (f^u_\sigma )^{\otimes k}\). Thus \(F^{\otimes k}\) is minor-closed if F is minor-closed. \(\square \)

2.3 Multisorted algebras and identities

A (multisorted similarity) type is a triple \(\tau = (S, \Sigma , {{\,\mathrm{dec}\,}})\), where S is a set of sorts, \(\Sigma \) is a set of function symbols, and \({{\,\mathrm{dec}\,}}:\Sigma \rightarrow W(S) \times S\) is a mapping. If \(f \in \Sigma \) and \({{\,\mathrm{dec}\,}}(f) = (w,s)\), we say that f has arity w and sort s. A (multisorted) algebra of type \(\tau \) is a system \(\mathbf {A} = (A; \Sigma ^\mathbf {A})\), where A is an S-sorted set, called the carrier (or the universe) of \(\mathbf {A}\), and \(\Sigma ^\mathbf {A} = (f^\mathbf {A})_{f \in \Sigma }\) is a family of S-sorted operations on A, each \(f^\mathbf {A}\) of declaration \({{\,\mathrm{dec}\,}}(f)\). Denote by \({{\,\mathrm{Alg}\,}}(\tau )\) the class of all multisorted algebras of type \(\tau \).

Homomorphisms, subalgebras, and direct products of multisorted algebras are defined in the expected way. Let \(\mathbf {A} = (A, \Sigma ^\mathbf {A})\) and \(\mathbf {B} = (B, \Sigma ^\mathbf {B})\) be multisorted algebras of type \(\tau = (S, \Sigma , {{\,\mathrm{dec}\,}})\). For a reflection \((h,h')\) of A into B, the algebra \(\mathbf {B}\) is called the \((h,h')\)-reflection of \(\mathbf {A}\) if \(f^\mathbf {B} = (f^\mathbf {A})_{(h,h')}\) for all \(f \in \Sigma \). The algebra \(\mathbf {B}\) is a reflection of \(\mathbf {A}\) if \(\mathbf {B}\) is an \((h,h')\)-reflection of \(\mathbf {A}\) for some reflection \((h,h')\) of A into B.

Let \(\mathcal {K}\) be a class of multisorted algebras of a fixed type. Denote by \({{\,\mathrm{\mathsf {S}}\,}}\mathcal {K}\), \({{\,\mathrm{\mathsf {H}}\,}}\mathcal {K}\), \({{\,\mathrm{\mathsf {P}}\,}}\mathcal {K}\), and \({{\,\mathrm{\mathsf {R}}\,}}\mathcal {K}\) the class of all subalgebras, homomorphic images, direct products, and reflections of members of \(\mathcal {K}\), respectively.

Terms can be defined in the setting of multisorted algebras much in the same way as in the classical one-sorted case. One has to be a bit more careful in defining identities. In contrast to the one-sorted case, it is not sufficient to define an identity to be a pair of terms; one also has to specify the variables that are to be valuated when one decides whether an identity holds in an algebra. With this in mind, the definition of a multisorted algebra satisfying an identity can be laid out in the expected way. For further details, see [7, Section 3].

We consider terms of type \(\tau = (S, \Sigma , {{\,\mathrm{dec}\,}})\) over the standard set of variables \(X = (X_s)_{s \in S}\) with \(X_s := \{\, x^s_i \mid i \in \mathbb {N}_{+} \,\}\). A term is called a minor term (also known as a term of height 1) if it contains exactly one occurrence of a function symbol. Thus a minor term is of the form \(f \sigma (1) \dots \sigma (n)\) where \(f \in \Sigma \) with \({{\,\mathrm{dec}\,}}(f) = (w, s)\), \(w = s_1 \dots s_n\), and \(\sigma :[{n}] \rightarrow X\) is a map satisfying \(\sigma (i) \in X_{s_i}\) for all \(i \in [{n}]\); this term will be denoted by \(f_\sigma \). A word \(u = u_1 \dots u_m \in W(S)\) is a feasible arity for \(f_\sigma \) if for every \(i \in [{n}]\) it holds that if \(\sigma (i) = x^{s_i}_j\) then \(|{{u}}|_{s_i} \ge j\). If u is a feasible arity for \(f_\sigma \), then we can define the term operation of arity u induced by \(f_\sigma \) on \(\mathbf {A}\), denoted by \((f_\sigma ^u)^\mathbf {A}\) and defined by \((f_\sigma ^u)^\mathbf {A} :A_u \rightarrow A_s\), \((f_\sigma ^u)^\mathbf {A}(a_1, \dots , a_m) := f^\mathbf {A}(a_{\nu (1)}, \dots , a_{\nu (n)})\), where \(\nu (i) = \ell \) if and only if \(\sigma (i) = x^{s_i}_j\) and \(\ell \) is the position of the j-th occurrence of \(s_i\) in u.

Example 2.6

In order to illustrate the notions introduced above, consider the multisorted similarity type \(\tau = (S, \Sigma , {{{\,\mathrm{dec}\,}}})\), where \(S = \{1,2,3\}\), \(\Sigma = \{f\}\), \({{\,\mathrm{dec}\,}}(f) = (12321,2)\). Then \(f x^1_3 x^2_2 x^3_4 x^2_2 x^1_2\) is a minor term of type \(\tau \) over the standard set X of variables. We can write this term as \(f_\sigma \) with \(\sigma :[{5}] \rightarrow X\), \(1 \mapsto x^1_3\), \(2 \mapsto x^2_2\), \(3 \mapsto x^3_4\), \(4 \mapsto x^2_2\), \(5 \mapsto x^1_2\). The word \(u = 333221333221333221 \in W(S)\) is a feasible arity for \(f_\sigma \) (because u has at least 3 occurrences of 1, at least 2 occurrences of 2, at least 4 occurrences of 3, and so on). Given an algebra \(\mathbf {A} = (A; \Sigma ^\mathbf {A})\) of type \(\tau \) (that is, \(\Sigma ^\mathbf {A} = \{f^\mathbf {A}\}\) and \(f^\mathbf {A}\) is an operation of declaration (12321, 2) on A), the term \(f_\sigma \) induces the term operation \((f_\sigma ^u)^\mathbf {A}\) of arity u on \(\mathbf {A}\), defined by the rule \((f_\sigma ^u)^\mathbf {A}(a_1, a_2, \dots , a_{18}) := f^\mathbf {A}(a_{18}, a_5, a_7, a_5, a_{12})\) (because the 3rd occurrence of 1 lies at the 18th position in u, the 2nd occurrence of 2 at the 5th position, and so on).

An identity is a triple \((S', t_1, t_2)\), usually written as \(t_1 \approx _{S'} t_2\), where \(t_1\) and \(t_2\) are terms of type \(\tau \) over X and \(S' \subseteq S\) such that the sorts of the variables occurring in the two terms belong to the set \(S'\). An algebra \(\mathbf {A}\) satisfies the identity \(t_1 \approx _{S'} t_2\) if the terms \(t_1\) and \(t_2\) have the same (output) sort and take the same value under every valuation of variables from \(X_s\) in \(A_s\), \(s \in S'\). A minor identity is an identity where the two terms are minor terms. An algebra \(\mathbf {A}\) satisfies a minor identity \(f_\sigma \approx _{S'} g_\pi \) if and only if for any (equivalently, for one) \(u = u_1 \dots u_m \in W(S)\) with \(\{u_1, \dots , u_m\} = S'\) that is a feasible arity for both \(f_\sigma \) and \(g_\pi \) it holds that \((f^\mathbf {A})_\sigma ^u = (g^\mathbf {A})_\pi ^u\).

The satisfaction relation induces a Galois connection between multisorted algebras and minor identities. For a class \(\mathcal {K}\) of algebras, let \({{\,\mathrm{mId}\,}}\mathcal {K}\) be the set of all minor identities satisfied by every algebra in \(\mathcal {K}\), and for a class \(\mathcal {J}\) of minor identities, let \({{\,\mathrm{Mod}\,}}\mathcal {J}\) be the class of all algebras satisfying every identity in \(\mathcal {J}\). This Galois connection was investigated in [7], where it was shown that the Galois closed classes of multisorted algebras (minor-equational classes) are precisely the reflection-closed varieties.

Theorem 2.7

[7, Theorem 5.2]. Let \(\mathcal {K}\) be a class of multisorted algebras of a fixed type. Then \({{\,\mathrm{Mod}\,}}{{\,\mathrm{mId}\,}}\mathcal {K} = \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {K}\).

2.4 Relation pairs

Let A be an S-sorted set and \(m \in \mathbb {N}\). An m-ary S-sorted relation on A is a family \(R = (R_s)_{s \in S}\) where \(R_s \subseteq A_s^m\) for every \(s \in S\). (Note that for \(m > 0\), the only m-ary relation on the empty set is \(\emptyset \), and that there are precisely two 0-ary relations on any set: \(\emptyset \) and \(\{\emptyset \}\).) An m-ary S-sorted relation pair of A is a pair \((R,R')\) where R and \(R'\) are m-ary S-sorted relations on A. Denote by \({{\,\mathrm{Relp}\,}}^{(m)}\) the set of all m-ary S-sorted relation pairs on A and by \({{\,\mathrm{Relp}\,}}(A)\) the set of all S-sorted relation pairs on A, i.e.,

$$\begin{aligned} {{\,\mathrm{Relp}\,}}(A) := \bigcup _{m \in \mathbb {N}} {{\,\mathrm{Relp}\,}}^{(m)}(A). \end{aligned}$$

Let \(f :A_w \rightarrow A_s\) with \(w := s_1 \dots s_n\), and let \((R,R')\) be an m-ary S-sorted relation pair on A. The operation f preserves the relation pair \((R,R')\) (or f is a polymorphism of \((R,R')\), or \((R,R')\) is an invariant relation pair of f), denoted by \(f \vartriangleright (R,R')\), if for all \((a_{1i}, a_{2i}, \dots , a_{mi}) \in R_{s_i}\) (\(i = 1, \dots , n\)), it holds that

$$\begin{aligned} \left( f\left( a_{11}, a_{12}, \dots , a_{1n}\right) , f\left( a_{21}, a_{22}, \dots , a_{2n}\right) , \dots , f\left( a_{m1}, a_{m2}, \dots , a_{mn}\right) \right) \in R'_s. \end{aligned}$$

The preservation relation \(\vartriangleright \) induces a Galois connection between S-sorted operations and S-sorted relation pairs on A, consisting of the maps \({{\,\mathrm{mPol}\,}}:\mathcal {P}({{\,\mathrm{Relp}\,}}(A)) \rightarrow \mathcal {P}({{\,\mathrm{Op}\,}}(A))\) and \({{\,\mathrm{mInv}\,}}:\mathcal {P}({{\,\mathrm{Op}\,}}(A)) \rightarrow \mathcal {P}({{\,\mathrm{Relp}\,}}(A))\) given by

$$\begin{aligned} {{\,\mathrm{mPol}\,}}(Q)&:= \left\{ \, f \in {{\,\mathrm{Op}\,}}(A) \mid \forall (R,R') \in Q :f \vartriangleright (R,R') \,\right\} , \\ {{\,\mathrm{mInv}\,}}(F)&:= \left\{ \, (R,R') \in {{\,\mathrm{Relp}\,}}(A) \mid \forall f \in F :f \vartriangleright (R,R') \,\right\} , \end{aligned}$$

for any \(F \subseteq {{\,\mathrm{Op}\,}}(A)\) and \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\).

The closed sets of operations and relation pairs with respect to this Galois connection were described in [8] as the minor-closed classes of operations (i.e., minions) and the so-called minor-closed classes of relation pairs, respectively.

Analogues of the “elementary operations” \(\zeta \), \(\tau \), \({{\,\mathrm{pr}\,}}\), \(\times \), and \(\wedge \) on relations (see [6, Section II.2.3], [10, Subsections 1.1.7 and 1.1.9]) can be defined for S-sorted relation pairs (see [8, pp. 70–71]) by applying each operation componentwise and in parallel in each sort. A relation pair \((R,R')\) is a relaxation of \((\tilde{R}, \tilde{R}')\) if \(R \subseteq \tilde{R}\) and \(R' \supseteq \tilde{R}'\). For an arbitrary equivalence relation \(\varrho \) on \([{m}]\), let \(\delta ^m_\varrho := (\delta ^m_{\varrho ,s})_{s \in S}\), where

$$\begin{aligned} \delta ^m_{\varrho ,s} := \left\{ \, \left( a_1, \dots , a_m\right) \in A^m_s \mid (i,j) \in \varrho \implies a_i = a_j \,\right\} . \end{aligned}$$

Relation pairs of the form \((\delta ^m_\varrho , \delta ^m_\varrho )\) are called diagonal relation pairs. A set \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\) of relation pairs is minor-closed if it contains the diagonal relation pairs and is closed under the elementary operations \(\zeta \), \(\tau \), \({{\,\mathrm{pr}\,}}\), \(\times \), \(\wedge \), relaxations, and arbitrary intersections. For \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\), we denote by \([{Q}]\) the minor-closure of Q, i.e., the smallest minor-closed set of relation pairs on A that contains Q.

Theorem 2.8

[8, Theorems 4.10, 4.16]. Let \(A := (A_s)_{s \in S}\) be an S-sorted set, and assume that the sets \(A_s\) are all finite.

  1. (i)

    Let \(F \subseteq {{\,\mathrm{Op}\,}}(A)\). Then \(F = {{\,\mathrm{mPol}\,}}Q\) for some \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\) if and only if F is a minion. Consequently, \(\langle {F}\rangle = {{\,\mathrm{mPol}\,}}{{\,\mathrm{mInv}\,}}F\) for any \(F \subseteq {{\,\mathrm{Op}\,}}(A)\).

  2. (ii)

    Let \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\). Then \(Q = {{\,\mathrm{mInv}\,}}F\) for some \(F \subseteq {{\,\mathrm{Op}\,}}(A)\) if and only if Q is minor-closed. Consequently, \([{Q}] = {{\,\mathrm{mInv}\,}}{{\,\mathrm{mPol}\,}}Q\) for any \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\).

3 Reflection, coreflection, lifting, and flattening of relation pairs

As explained in the introduction, our main goal is to formulate a multisorted analogue of the wonderland theorem [3, Theorem 1.3] (see also [2, Corollary 9.5]). A part of this theorem concerns whether a relational structure can be obtained from another by special relational constructions; this condition is referred to as pp-constructibility (see [3, Definition 3.4, Corollary 3.10] and also [2, Definition 4.9]).

In this section, we will introduce a few constructions on multisorted relation pairs: reflection, coreflection, lifting, and flattening. We will later (in Theorem 4.13) see that these new concepts—in particular, coreflection and flattening—may serve as building blocks for an analogue or generalization of pp-constructibility (see Remark 4.15 for details).

3.1 Reflection and coreflection

In this subsection, we introduce a pair of new concepts that forms a counterpart to reflections of operations: reflections and coreflections of relation pairs. These prove to be useful for describing reflections of minions in terms of invariant relation pairs.

Definition 3.1

Let A and B be S-sorted sets, and let \((h,h')\) be a reflection of A into B. Let \((R,R')\) be an S-sorted relation pair on A. The \((h,h')\)-reflection of \((R,R')\) is the S-sorted relation pair \((R,R')_{(h,h')}\) on B given by \((R,R')_{(h,h')} := (h^{-1}(R), h'(R'))\), where \(h^{-1}(R) := (T_s)_{s \in S}\) and \(h'(R') := (T'_s)_{s \in S}\) with

$$\begin{aligned} T_s := {\left\{ \begin{array}{ll} h_s^{-1}\left( R_s\right) , &{} \text {if}\, B_s \ne \emptyset , \\ \emptyset , &{} \text {if}\, B_s = \emptyset , \end{array}\right. } \qquad \quad T'_s := {\left\{ \begin{array}{ll} h'_s\left( R'_s\right) , &{} \text {if}\, B_s \ne \emptyset , \\ \emptyset , &{} \text {if}\, B_s = \emptyset , \end{array}\right. } \end{aligned}$$

and

$$\begin{aligned} h_s^{-1}(R_s)&:= \{\, (a_1, \dots , a_m) \in B_s^m \mid (h_s(a_1), \dots , h_s(a_m)) \in R_s \,\}, \\ h'_s(R'_s)&:= \{\, (h'_s(a_1), \dots , h'_s(a_m)) \mid (a_1, \dots , a_m) \in R'_s \,\}. \end{aligned}$$

Let \((T,T')\) be an S-sorted relation pair on B. The \((h,h')\)-coreflection of \((T,T')\) is the S-sorted relation pair \((T,T')^{(h,h')}\) on A given by \((T,T')^{(h,h')}\) \(:=(h(T), h'^{-1}(T'))\), where \(h(T) := (R_s)_{s \in S}\) and \(h'^{-1}(T') := (R'_s)_{s \in S}\) with

$$\begin{aligned} R_s := {\left\{ \begin{array}{ll} h_s\left( T_s\right) , &{} \text {if}\, B_s \ne \emptyset , \\ \emptyset , &{} \text {if}\, B_s = \emptyset , \end{array}\right. } \qquad \quad R'_s := {\left\{ \begin{array}{ll} {h'_s}^{-1}\left( T'_s\right) , &{} \text {if}\, B_s \ne \emptyset , \\ \emptyset , &{} \text {if}\, B_s = \emptyset . \end{array}\right. } \end{aligned}$$

Let \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\) be a set of relation pairs on A. The \((h,h')\)-reflection of Q is the set \(Q_{(h,h')} := \{\, (R,R')_{(h,h')} \mid (R,R') \in Q \,\}\) of relation pairs on B. We define \((h,h')\)-coreflections of sets of relation pairs analogously. A relation pair (a set of relation pairs) is called a reflection (a coreflection) of another relation pair (set of relation pairs) if the former is the \((h,h')\)-reflection (\((h,h')\)-coreflection) of the latter for some reflection \((h,h')\).

Proposition 3.2

[8, Proposition 5.4]. Let A and B be S-sorted sets, \((R,R') \in {{\,\mathrm{Relp}\,}}(A)\), \((T,T') \in {{\,\mathrm{Relp}\,}}(B)\), and let \((h,h')\) be a reflection of A into B. Let \(f \in {{\,\mathrm{Op}\,}}(A)\), and assume that \({{\,\mathrm{dec}\,}}(f)\) is reasonable in B. Then the following statements hold.

  1. (i)

    If \(f \vartriangleright (R,R')\) then \(f_{(h,h')} \vartriangleright (R,R')_{(h,h')}\).

  2. (ii)

    If \(f_{(h,h')} \vartriangleright (T,T')\) then \(f \vartriangleright (T,T')^{(h,h')}\).

  3. (iii)

    If \(F \subseteq {{\,\mathrm{Op}\,}}(A)\) and \({{\,\mathrm{dec}\,}}(f)\) is reasonable in B for all \(f \in F\), then

    $$\begin{aligned} {{\,\mathrm{mInv}\,}}F_{(h,h')} = \left\{ \, (T,T') \in {{\,\mathrm{Relp}\,}}(B) \mid (T,T')^{(h,h')} \in {{\,\mathrm{mInv}\,}}F \,\right\} . \end{aligned}$$

The last statement can be written in alternative form. For a set \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\) of relation pairs, denote by \({{\,\mathrm{Relax}\,}}(Q)\) the set of all relaxations of members of Q.

Proposition 3.3

Let A and B be S-sorted sets, let \(F \subseteq {{\,\mathrm{Op}\,}}(A)\) and assume that \({{\,\mathrm{dec}\,}}(f)\) is reasonable in B for all \(f \in F\), and let \((h,h')\) be a reflection of A into B. Then \({{\,\mathrm{mInv}\,}}F_{(h,h')} = {{\,\mathrm{Relax}\,}}(({{\,\mathrm{mInv}\,}}F)_{(h,h')})\).

Proof

Let \((T,T') \in {{\,\mathrm{mInv}\,}}F_{(h,h')}\). By Proposition 3.2(iii), \((h(T),h'^{-1}(T')) \in {{\,\mathrm{mInv}\,}}F\), so \((h^{-1}(h(T)), h'(h'^{-1}(T'))) \in ({{\,\mathrm{mInv}\,}}F)_{(h,h')}\). Since \(T \subseteq h^{-1}(h(T))\) and \(T' \supseteq h'(h'^{-1}(T'))\), \((T,T')\) is a relaxation of \((h^{-1}(h(T)), h'(h'^{-1}(T')))\); hence \((T,T') \in {{\,\mathrm{Relax}\,}}(({{\,\mathrm{mInv}\,}}F)_{(h,h')})\).

For the converse inclusion, let \((T,T') \in {{\,\mathrm{Relax}\,}}(({{\,\mathrm{mInv}\,}}F)_{(h,h')})\). Then there exists \((\tilde{T},\tilde{T}') \in ({{\,\mathrm{mInv}\,}}F)_{(h,h')}\) such that \(T \subseteq \tilde{T}\), \(T' \supseteq \tilde{T}'\), and \((\tilde{T},\tilde{T}') = (R,R')_{(h,h')} = (h^{-1}(R), h'(R))\) for some \((R,R') \in {{\,\mathrm{mInv}\,}}F\). Thus \(f \vartriangleright (R,R')\) for all \(f \in F\). By Proposition 3.2(i), \(f_{(h,h')} \vartriangleright (h^{-1}(R),h'(R))\) for every \(f \in F\), so \((\tilde{T},\tilde{T}') \in {{\,\mathrm{mInv}\,}}F_{(h,h')}\). By Theorem 2.8(ii), \({{\,\mathrm{mInv}\,}}F_{(h,h')}\) is minor-closed and hence contains all relaxations of its members; therefore \((T,T') \in {{\,\mathrm{mInv}\,}}F_{(h,h')}\).

\(\square \)

Lemma 3.4

For any \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\), we have \({{\,\mathrm{mPol}\,}}Q = {{\,\mathrm{mPol}\,}}{{\,\mathrm{Relax}\,}}Q\).

Proof

Since \(Q \subseteq {{\,\mathrm{Relax}\,}}Q\), we have \({{\,\mathrm{mPol}\,}}{{\,\mathrm{Relax}\,}}Q \subseteq {{\,\mathrm{mPol}\,}}Q\) by the basic properties of Galois connections. In order to prove the converse inclusion \({{\,\mathrm{mPol}\,}}Q \subseteq {{\,\mathrm{mPol}\,}}{{\,\mathrm{Relax}\,}}Q\), let \(f \in {{\,\mathrm{mPol}\,}}Q\), and let \((R,R') \in {{\,\mathrm{Relax}\,}}Q\). Then \((R,R')\) is a relaxation of some \((T,T') \in Q\). Since \(R \subseteq T\) and \(T' \subseteq R'\) and \(f \vartriangleright (T,T')\), it is clear that \(f \vartriangleright (R,R')\). Therefore \(f \in {{\,\mathrm{mPol}\,}}{{\,\mathrm{Relax}\,}}Q\). \(\square \)

3.2 Lifting and flattening

We now define another pair of useful concepts, two maps that provide translations between relation pairs defined on a multisorted set A and ones defined on a finite power of A: lifting and flattening.

Definition 3.5

The sets \(A^{nk}\) and \((A^k)^n\) are obviously in a one-to-one correspondence via the lifting map and its inverse, the flattening map , defined by

The lifting and flattening maps induce maps between the power sets \(\mathcal {P}(A^{nk})\) and \(\mathcal {P}((A^k)^n)\) in the natural way: for any \(\varrho \subseteq A^{nk}\) and \(\sigma \subseteq (A^k)^n\), define and . For relation pairs of suitable arities, we write and . For a set \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\) of relation pairs of arbitrary arities, define

and for \(T \subseteq {{\,\mathrm{Relp}\,}}(A^k)\), define

Lemma 3.6

  1. (i)

    For any \((R,R') \in {{\,\mathrm{Relp}\,}}(A)\) with arity divisible by k and for any \((T,T') \in {{\,\mathrm{Relp}\,}}(A^k)\), we have and .

  2. (ii)

    For any \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\), .

  3. (iii)

    For any \(f \in {{\,\mathrm{Op}\,}}(A)\) and \((T,T') \in {{\,\mathrm{Relp}\,}}(A^k)\), we have \(f^{\otimes k} \vartriangleright (T,T')\) if and only if .

  4. (iv)

    For any \(\mathcal {M} \subseteq {{\,\mathrm{Op}\,}}(A)\) and \((T,T') \in {{\,\mathrm{Relp}\,}}(A^k)\), \((T,T') \in {{\,\mathrm{mInv}\,}}\mathcal {M}^{\otimes k}\) if and only if .

  5. (v)

    For any \(\mathcal {M} \subseteq {{\,\mathrm{Op}\,}}(A)\), .

Proof

(i) Obvious.

(ii) Let \(\varrho \in [{Q}]\) be m-ary. Then \(\underbrace{\varrho \times \dots \times \varrho }_k\) is a km-ary member of \([{Q}]\). By (i), ; hence , so we have . The converse inclusion holds because

hence .

(iii) Assume f is n-ary and \((T,T')\) is m-ary. Since \(f^{\otimes k}\) is defined as the coordinatewise application of f to k-tuples in \(A^k\), it is easy to see that for any \(\mathbf {a}^i \in (A^k)^m\) (\(i = 1, \dots , n\)), we have .

Assume first that \(f^{\otimes k} \vartriangleright (T,T')\), and let ; then it holds that for some \(\mathbf {a}^i \in T\) (\(i = 1, \dots , n\)). Since \(f^{\otimes k} \vartriangleright (T,T')\), we have \(f^{\otimes k}(\mathbf {a}^1, \dots , \mathbf {a}^n) \in T'\). Consequently . Therefore .

Assume now that , and let \(\mathbf {a}^1, \dots , \mathbf {a}^n \in T\). Then we have , so . Therefore \(f^{\otimes k}(\mathbf {a}^1, \dots , \mathbf {a}^n) \in T'\); hence \(f^{\otimes k} \vartriangleright (T,T')\).

(iv) Follows immediately from part (iii).

(v) The following logical equivalences hold by parts (i) and (iv) and by the fact that the arity of is a multiple of k:

\(\square \)

Lemma 3.7

For any \(Q \subseteq {{\,\mathrm{Relp}\,}}(A^k)\), .

Proof

Clearly , so the inclusion holds. For the converse inclusion , it suffices to show that . For this, we need to prove the following: if \((R,R'), (T,T') \in [{Q}]\) such that , then also , , , , are in ; if \((R_i,R'_i) \in [{Q}]\) such that for \(i \in I\), then also ; if \((R,R') \in [{Q}]\) such that and \((T,T')\) is a relaxation of \((R,R')\), then also ; and for any diagonal relation pair \((\delta _\varrho ^m, \delta _\varrho ^m)\) on \(A^k\), we have . Most of this is routine verification, and for illustration we only provide a detailed proof of .

So, assume \((R,R') \in [{Q}]\) is m-ary and . We have

which is a result of a permutation of the rows of , which can be obtained from by a suitable application of the operations \(\zeta \) and \(\tau \). An analogous statement with the same permutation of rows holds for . Consequently, .

As for the other statements, it is straightforward to verify that

if \((T,T')\) is a relaxation of \((R,R')\) then is a relaxation of ; and where \(\varrho '\) is the equivalence relation on the set \(\{1, \dots , km\}\) given by \(i \mathrel {\varrho '} j\) if and only if \(\lceil i / k \rceil \mathrel {\varrho } \lceil j / k \rceil \) and \(i \equiv j \pmod {k}\) (\(\lceil x \rceil \) stands for the least integer greater than or equal to x). Therefore our desired conclusion follows. \(\square \)

4 Results

Equipped with the tools introduced in the previous sections, we are now ready to develop our main results. Note that if \(A := (A_s)_{s \in S}\) is an S-sorted set in which the components \(A_s\) are all finite, then \([{Q_A}] = {{\,\mathrm{mInv}\,}}{{\,\mathrm{mPol}\,}}Q_A\) by Theorem 2.8. We will build our theory under this finiteness assumption.

Definition 4.1

Let A and B be S-sorted sets, and let \(\mathcal {M}_1 \subseteq {{\,\mathrm{Op}\,}}(A)\) and \(\mathcal {M}_2 \subseteq {{\,\mathrm{Op}\,}}(B)\) be minions. A mapping \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}_2\) is a minion homomorphism if for every \(f \in \mathcal {M}_1\), \({{\,\mathrm{dec}\,}}(f) = {{\,\mathrm{dec}\,}}(\lambda f)\), and for every minor \(f^u_\sigma \), we have \((\lambda f)^u_\sigma = \lambda (f^u_\sigma )\).

Definition 4.2

Let \(\mathcal {M}_1, \mathcal {M}_2 \subseteq {{\,\mathrm{Op}\,}}(A)\). We say that \(\mathcal {M}_2\) is an extension of \(\mathcal {M}_1\) if \(\mathcal {M}_1 \subseteq \mathcal {M}_2\).

Definition 4.3

We define the operators \({{\,\mathrm{\mathsf {E}}\,}}\), \({{\,\mathrm{\mathsf {R}}\,}}\), \({{\,\mathrm{\mathsf {P}}\,}}\), \({{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}\) as follows. Let \(F \subseteq {{\,\mathrm{Op}\,}}(A)\) for some S-sorted set A, and let \(\mathcal {F}\) be a collection of sets of operations on some S-sorted set. Let \({{\,\mathrm{\mathsf {P}}\,}}F\) be the set of all direct powers of F, and let \({{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}F\) be the set of all finite direct powers of F, i.e., \({{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}F := \{\, F^{\otimes k} \mid k \in \mathbb {N}\,\}\). Let \({{\,\mathrm{\mathsf {R}}\,}}\mathcal {F}\) be the set of all reflections of members of \(\mathcal {F}\). Let \({{\,\mathrm{\mathsf {E}}\,}}\mathcal {F}\) be the set of all extensions of members of \(\mathcal {F}\).

We can express the operators \({{\,\mathrm{\mathsf {R}}\,}}\) and \({{\,\mathrm{\mathsf {P}}\,}}\) in a more algebraic way as follows. Given a set \(\mathcal {M} \subseteq {{\,\mathrm{Op}\,}}(A)\), we can view \(\mathcal {M}\) as an S-sorted algebra \(\mathbf {A}_\mathcal {M}\) whose carrier is A and fundamental operations are the members of \(\mathcal {M}\), more precisely, as the algebra \(\mathbf {A}_\mathcal {M} = (A; (f^{\mathbf {A}_\mathcal {M}})_{f \in \mathcal {M}})\) of type \(\tau = (S, \mathcal {M}, {{\,\mathrm{dec}\,}}_\mathcal {M})\) with \({{\,\mathrm{dec}\,}}_\mathcal {M} :\mathcal {M} \rightarrow W(S) \times S\), \(f \mapsto {{\,\mathrm{dec}\,}}(f)\), and \(f^{\mathbf {A}_\mathcal {M}} = f\) for every \(f \in \mathcal {M}\). On the other hand, given an S-sorted algebra \(\mathbf {A} = (A; (f^\mathbf {A})_{f \in I})\), let us denote by \(F_\mathbf {A}\) the set of fundamental operations of \(\mathbf {A}\), i.e., \(F_\mathbf {A} := \{\, f^\mathbf {A} \mid f \in I \,\}\). Obviously \(F_{\mathbf {A}_\mathcal {M}} = \mathcal {M}\) for any \(\mathcal {M} \subseteq {{\,\mathrm{Op}\,}}(A)\), but the algebras \(\mathbf {A}_{F_\mathbf {A}}\) and \(\mathbf {A}\) are not generally the same.

With the above notation, we have \(F' \in {{\,\mathrm{\mathsf {P}}\,}}F\) if and only if there is some set I such that \(F' = F_{(\mathbf {A}_F)^I}\). We have \(F' \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {F}\) if and only if \(F' = F_{(\mathbf {A}_F)_{(h,h')}}\) for some \(F \in \mathcal {F}\) and for some reflection \((h,h')\).

Recall that a reflection \((h,h')\) of A into B is a pair of maps \(h = (h_s)_{s \in S_B}\), \(h' = (h'_s)_{s \in S_B}\), \(h_s :B_s \rightarrow A_s\), \(h'_s :A_s \rightarrow B_s\) for all \(s \in S_B\), i.e., for all \(s \in S\) such that \(B_s \ne \emptyset \) (see Definition 2.2).

Proposition 4.4

Let A and B be S-sorted sets, and assume that the components \(A_s\) and \(B_s\) are all finite. Let \(\mathcal {M}_1 := {{\,\mathrm{mPol}\,}}Q_A\) and \(\mathcal {M}_2 := {{\,\mathrm{mPol}\,}}Q_B\) for \(Q_A \subseteq {{\,\mathrm{Relp}\,}}(A)\) and \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\). Then the following conditions are equivalent.

  1. (I)

    \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {E}}\,}}\mathcal {M}_1\).

  2. (II)

    \(Q_B \subseteq [{Q_A}]\).

Proof

The condition \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {E}}\,}}\mathcal {M}_1\) is equivalent to \(\mathcal {M}_1 \subseteq \mathcal {M}_2\). Since the operators of a Galois connection are order-reversing, the latter condition is equivalent to \(Q_B \subseteq [{Q_B}] = {{\,\mathrm{mInv}\,}}\mathcal {M}_2 \subseteq {{\,\mathrm{mInv}\,}}\mathcal {M}_1 = [{Q_A}]\). \(\square \)

Lemma 4.5

Let \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\), and let \((h,h')\) be a reflection of A into B. Then \(Q_B \subseteq {{\,\mathrm{mInv}\,}}({{\,\mathrm{mPol}\,}}Q_B^{(h,h')})_{(h,h')}\).

Proof

The inclusion \(Q_B^{(h,h')} \subseteq {{\,\mathrm{mInv}\,}}{{\,\mathrm{mPol}\,}}Q_B^{(h,h')}\) obviously holds by the basic properties of Galois connections. Proposition 3.2(iii) implies \(Q_B \subseteq \) \({{\,\mathrm{mInv}\,}}({{\,\mathrm{mPol}\,}}Q_B^{(h,h')})_{(h,h')}\). \(\square \)

Proposition 4.6

Let A and B be S-sorted sets, and assume that the components \(A_s\) and \(B_s\) are all finite. Let \(\mathcal {M}_1 := {{\,\mathrm{mPol}\,}}Q_A\) and \(\mathcal {M}_2 := {{\,\mathrm{mPol}\,}}Q_B\) for \(Q_A \subseteq {{\,\mathrm{Relp}\,}}(A)\) and \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\). The following conditions are equivalent.

  1. (I)

    \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {M}_1\).

  2. (II)

    There exists a reflection \((h,h')\) of A into B such that

    1. (i)

      \(Q_B^{(h,h')} \subseteq [{Q_A}]\) and

    2. (ii)

      \([{Q_A}]_{(h,h')} \subseteq [{Q_B}]\).

Proof

(I) \(\Rightarrow \) (II): Assume that \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {M}_1\). Then there exists a reflection \((h,h')\) of A into B such that \(\mathcal {M}_2 = (\mathcal {M}_1)_{(h,h')}\). By Theorem 2.8(ii) and Proposition 3.2(iii), we have

$$\begin{aligned}{}[{Q_B}] = {{\,\mathrm{mInv}\,}}\mathcal {M}_2 = {{\,\mathrm{mInv}\,}}\left( \mathcal {M}_1\right) _{(h,h')} = \left\{ (T,T') \mid (T,T')^{(h,h')} \in {{\,\mathrm{mInv}\,}}\mathcal {M}_1 \,\right\} , \end{aligned}$$

which implies

$$\begin{aligned} Q_B^{(h,h')} \subseteq [{Q_B}]^{(h,h')} \subseteq {{\,\mathrm{mInv}\,}}\mathcal {M}_1 = [{Q_A}]. \end{aligned}$$

Furthermore, by Proposition 3.3,

$$\begin{aligned}{}[{Q_B}]&= {{\,\mathrm{mInv}\,}}\left( \mathcal {M}_1\right) _{(h,h')} = {{\,\mathrm{Relax}\,}}({{\,\mathrm{mInv}\,}}\mathcal {M}_1)_{(h,h')}\\&= {{\,\mathrm{Relax}\,}}\left( [{Q_A}]_{(h,h')}\right) \supseteq [{Q_A}]_{(h,h')}. \end{aligned}$$

(II) \(\Rightarrow \) (I): Assume that there exist a reflection \((h,h')\) of A into B such that \(Q_B^{(h,h')} \subseteq [{Q_A}]\) and \([{Q_A}]_{(h,h')} \subseteq [{Q_B}]\). Then

$$\begin{aligned} \mathcal {M}_2&= {{\,\mathrm{mPol}\,}}Q_B = {{\,\mathrm{mPol}\,}}[{Q_B}] \subseteq {{\,\mathrm{mPol}\,}}[{Q_A}]_{(h,h')} = {{\,\mathrm{mPol}\,}}{{\,\mathrm{Relax}\,}}[{Q_A}]_{(h,h')}\\&= {{\,\mathrm{mPol}\,}}{{\,\mathrm{mInv}\,}}\left( \mathcal {M}_1\right) _{(h,h')} = \left( \mathcal {M}_1\right) _{(h,h')}, \end{aligned}$$

where we have applied Proposition 2.4, Theorem 2.8, Proposition 3.3, and Lemma 3.4, as well as basic properties of Galois connections together with the inclusion \([{Q_A}]_{(h,h')} \subseteq [{Q_B}]\).

Conversely, from the inclusion \(Q_B^{(h,h')} \subseteq [{Q_A}]\) we get

$$\begin{aligned} {{\,\mathrm{mPol}\,}}Q_B^{(h,h')} \supseteq {{\,\mathrm{mPol}\,}}[{Q_A}] = {{\,\mathrm{mPol}\,}}Q_A = \mathcal {M}_1, \end{aligned}$$

which implies

$$\begin{aligned} \left( {{\,\mathrm{mPol}\,}}Q_B^{(h,h')}\right) _{(h,h')} \supseteq \left( \mathcal {M}_1\right) _{(h,h')}. \end{aligned}$$

Thus by Lemma 4.5 and basic properties of Galois connections,

$$\begin{aligned} Q_B \subseteq {{\,\mathrm{mInv}\,}}\left( {{\,\mathrm{mPol}\,}}Q_B^{(h,h')}\right) _{(h,h')} \subseteq {{\,\mathrm{mInv}\,}}\left( \mathcal {M}_1\right) _{(h,h')}, \end{aligned}$$

and, consequently,

$$\begin{aligned} \mathcal {M}_2 = {{\,\mathrm{mPol}\,}}Q_B \supseteq {{\,\mathrm{mPol}\,}}{{\,\mathrm{mInv}\,}}\left( \mathcal {M}_1\right) _{(h,h')} = \left( \mathcal {M}_1\right) _{(h,h')}. \end{aligned}$$

We conclude that \(\mathcal {M}_2 = (\mathcal {M}_1)_{(h,h')}\); hence \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {M}_1\). \(\square \)

Proposition 4.7

Let A and B be S-sorted sets, and assume that the components \(A_s\) and \(B_s\) are all finite. Let \(\mathcal {M}_1 := {{\,\mathrm{mPol}\,}}Q_A\) and \(\mathcal {M}_2 := {{\,\mathrm{mPol}\,}}Q_B\) for \(Q_A \subseteq {{\,\mathrm{Relp}\,}}(A)\) and \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\). Then the following conditions are equivalent.

  1. (I)

    \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}\mathcal {M}_1\).

  2. (II)

    There exists an integer \(k \in \mathbb {N}_{+}\) such that \(B = A^k\) and \(\sharp _{k}{[{Q_A}]} = [{Q_B}]\).

Moreover, these conditions imply the following:

  1. (III)

    There exists an integer \(k \in \mathbb {N}_{+}\) such that \(B = A^k\) and .

Proof

(I) \(\Rightarrow \) (II): Assume \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}\mathcal {M}_1\). Then there exists an integer \(k \in \mathbb {N}_{+}\) such that \(\mathcal {M}_2 = \mathcal {M}_1^{\otimes k}\); hence \(B = A^k\). By Lemma 3.6(v) we have

$$\begin{aligned}{}[{Q_B}]&= {{\,\mathrm{mInv}\,}}{{\,\mathrm{mPol}\,}}Q_B = {{\,\mathrm{mInv}\,}}\mathcal {M}_2 = {{\,\mathrm{mInv}\,}}\mathcal {M}_1^{\otimes k}\\&= \sharp _{k}{\left( {{\,\mathrm{mInv}\,}}\mathcal {M}_1\right) } = \sharp _{k}{\left( {{\,\mathrm{mInv}\,}}{{\,\mathrm{mPol}\,}}Q_A\right) } = \sharp _{k}{[{Q_A}]}. \end{aligned}$$

(II) \(\Rightarrow \) (I): Assume there exists an integer \(k \in \mathbb {N}_{+}\) such that \(B = A^k\) and \(\sharp _{k}{[{Q_A}]} = [{Q_B}]\). By Lemma 3.6(v), we have

$$\begin{aligned} {{\,\mathrm{mInv}\,}}\mathcal {M}_2&= {{\,\mathrm{mInv}\,}}{{\,\mathrm{mPol}\,}}Q_B = [{Q_B}] = \sharp _{k}{[{Q_A}]}\\&= \sharp _{k}{\left( {{\,\mathrm{mInv}\,}}{{\,\mathrm{mPol}\,}}Q_A\right) } = \sharp _{k}{\left( {{\,\mathrm{mInv}\,}}\mathcal {M}_1\right) } = {{\,\mathrm{mInv}\,}}\mathcal {M}_1^{\otimes k}. \end{aligned}$$

Consequently, \(\mathcal {M}_2 = {{\,\mathrm{mPol}\,}}{{\,\mathrm{mInv}\,}}\mathcal {M}_2 = {{\,\mathrm{mPol}\,}}{{\,\mathrm{mInv}\,}}\mathcal {M}_1^{\otimes k} = \mathcal {M}_1^{\otimes k}\), i.e., \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}\mathcal {M}_1\).

(III) \(\Rightarrow \) (I): By Lemmas 3.6(ii) and 3.7 we have . \(\square \)

Lemma 4.8

For any set \(Q \subseteq {{\,\mathrm{Relp}\,}}(A)\) and for any reflection \((h,h')\) of A into B it holds that \((Q_{(h,h')})^{(h,h')} \subseteq {{\,\mathrm{Relax}\,}}Q \subseteq [{Q}]\).

Proof

An element \((T,T') \in (Q_{(h,h')})^{(h,h')}\) is of the form \(((R,R')_{(h,h')})^{(h,h')}\) for some \((R,R') \in Q\). Since \(T = h(h^{-1}(R)) \subseteq R\) and \(T' = h'^{-1}(h'(R')) \supseteq R'\), \((T,T')\) is a relaxation of \((R,R')\), so \((T,T') \in {{\,\mathrm{Relax}\,}}Q \subseteq [{Q}]\). \(\square \)

Proposition 4.9

Let A and B be S-sorted sets, and assume that the components \(A_s\) and \(B_s\) are all finite. Let \(\mathcal {M}_1 := {{\,\mathrm{mPol}\,}}Q_A\) and \(\mathcal {M}_2 := {{\,\mathrm{mPol}\,}}Q_B\) for \(Q_A \subseteq {{\,\mathrm{Relp}\,}}(A)\) and \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\). The following conditions are equivalent.

  1. (I)

    \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}} \mathcal {M}_1\).

  2. (II)

    There exists a reflection \((h,h')\) of A into B such that \(Q_B^{(h,h')} \subseteq [{Q_A}]\).

Proof

(I) \(\Rightarrow \) (II): Assume \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}} \mathcal {M}_1\). Then there exists a minion \(\mathcal {M}'_2\) such that \(\mathcal {M}'_2 \subseteq \mathcal {M}_2\) and \(\mathcal {M}'_2 \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {M}_1\). Let \(Q_{B'} := {{\,\mathrm{mInv}\,}}\mathcal {M}'_2\); obviously \(\mathcal {M}'_2 = {{\,\mathrm{mPol}\,}}Q_{B'}\). By Proposition 4.6, there exists a reflection \((h,h')\) of A into B such that \(Q_{B'}^{(h,h')} \subseteq [{Q_A}]\). Since \(\mathcal {M}'_2 \subseteq \mathcal {M}_2\), we have \(Q_B \subseteq {{\,\mathrm{mInv}\,}}\mathcal {M}_2 \subseteq {{\,\mathrm{mInv}\,}}\mathcal {M}'_2 = Q_{B'}\). By taking \((h,h')\)-coreflections, we obtain \(Q_B^{(h,h')} \subseteq Q_{B'}^{(h,h')} \subseteq [{Q_A}]\).

(II) \(\Rightarrow \) (I): Assume there exists a reflection \((h,h')\) of A into B such that \(Q_B^{(h,h')} \subseteq [{Q_A}]\). Let \(Q_{B'} := Q_B \cup [{Q_A}]_{(h,h')}\) and \(\mathcal {M}'_2 := {{\,\mathrm{mPol}\,}}Q_{B'}\). Since \(Q_B \subseteq Q_{B'}\) by definition, we have \(\mathcal {M}'_2 = {{\,\mathrm{mPol}\,}}Q_{B'} \subseteq {{\,\mathrm{mPol}\,}}Q_B = \mathcal {M}_2\), so \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {E}}\,}}\mathcal {M}'_2\). It remains to show that \(\mathcal {M}'_2 \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {M}_1\). For this, it suffices to show that \(Q_A\) and \(Q_{B'}\), together with the reflection \((h,h')\), satisfy the conditions of Proposition 4.6(II). Condition (i) holds because \(Q_{B'}^{(h,h')} = Q_B^{(h,h')} \cup ([{Q_A}]_{(h,h')})^{(h,h')} \subseteq [{Q_A}] \cup [{Q_A}] = [{Q_A}]\) by Lemma 4.8. Condition (ii) holds because \([{Q_A}]_{(h,h')} \subseteq Q_{B'}\) by definition, so \([{Q_A}]_{(h,h')} \subseteq [{Q_{B'}}]\). \(\square \)

Remark 4.10

From this point on, we have to make the small technical assumption that the S-sorted sets A and B satisfy \(S_B \subseteq S_A\). This is due to the fact that reflections of A into B exist if and only if \(S_B \subseteq S_A\) (see Definition 2.2) but minion homomorphisms may exist between minions on A and B regardless of the essential sorts. For example, consider \(S = \{1\}\), \(A = \{0, 1, 2\}\), \(B = \emptyset \); hence \(S_A = \{1\} = S\), \(S_B = \emptyset \). Let \(\mathcal {M}_1 := \{\, c_2^{(n)} \mid n \in \mathbb {N}_{+} \,\} \subseteq {{\,\mathrm{Op}\,}}(A)\) (constant operations of all arities taking value 2), \(\mathcal {M}_2 := \{\, \emptyset ^{(n)} \mid n \in \mathbb {N}_{+} \,\} \subseteq {{\,\mathrm{Op}\,}}(B)\) (empty functions of all arities). The sets \(\mathcal {M}_1\) and \(\mathcal {M}_2\) are minions, and the maps \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}_2\), \(c_2^{(n)} \mapsto \emptyset ^{(n)}\), and \(\mu :\mathcal {M}_2 \rightarrow \mathcal {M}_1\), \(\emptyset ^{(n)} \mapsto c_2^{(n)}\), are minion homomorphisms.

Lemma 4.11

Let A and B be S-sorted sets such that \(S_B \subseteq S_A\). Let \(\mathcal {M}_1 \subseteq {{\,\mathrm{Op}\,}}(A)\) and \(\mathcal {M}_2 \subseteq {{\,\mathrm{Op}\,}}(B)\) be minions, There exists a surjective minion homomorphism of \(\mathcal {M}_1\) onto \(\mathcal {M}_2\) if and only if there exists an algebra \(\mathbf {B} \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathbf {A}_{\mathcal {M}_1}\) with \(F_\mathbf {B} = \mathcal {M}_2\).

Proof

For notational simplicity, write \(\mathbf {A} := \mathbf {A}_{\mathcal {M}_1}\). Assume first that the map \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}_2\) is a surjective minion homomorphism. Let \(\mathbf {B} = (B, (f^\mathbf {B})_{f \in \mathcal {M}_1})\) be the algebra of the same type as \(\mathbf {A}_{\mathcal {M}_1}\) with fundamental operations \(f^\mathbf {B} = \lambda f\) for every \(f \in \mathcal {M}_1\). By definition, \(F_\mathbf {B} = \mathcal {M}_2\). It remains to show that \(\mathbf {B} \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathbf {A}\), which is equivalent to \(\mathbf {B} \in {{\,\mathrm{Mod}\,}}{{\,\mathrm{mId}\,}}\mathbf {A}\) by Theorem 2.7. Let \(f_\sigma \approx _{S'} g_\pi \) be a minor identity satisfied by \(\mathbf {A}\). This means that for any \(u \in W(S)\) with \({{\,\mathrm{Im}\,}}u = S'\) that is a feasible arity for both \(f_\sigma \) and \(g_\pi \), we have \((f^\mathbf {A})_\sigma ^u = (g^\mathbf {A})_\pi ^u\). Since \(\lambda \) is a minion homomorphism, \((f^\mathbf {B})_\sigma ^u = (\lambda f^\mathbf {A})_\sigma ^u = \lambda ((f^\mathbf {A})_\sigma ^u) = \lambda ((g^\mathbf {A})_\pi ^u) = (\lambda g^\mathbf {A})_\pi ^u = (g^\mathbf {B})_\pi ^u\). Hence \(\mathbf {B}\) satisfies \(f_\sigma \approx _{S'} g_\pi \). We conclude that \(\mathbf {B}\) satisfies every identity satisfied by \(\mathbf {A}\), that is, \(\mathbf {B} \in {{\,\mathrm{Mod}\,}}{{\,\mathrm{mId}\,}}\mathbf {A}\).

Assume now that there exists an algebra \(\mathbf {B} \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathbf {A} = {{\,\mathrm{Mod}\,}}{{\,\mathrm{mId}\,}}\mathbf {A}\) such that \(F_\mathbf {B} = \mathcal {M}_2\). Define the map \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}_2\) by the rule \(f \mapsto f^\mathbf {B}\) for all \(f \in \mathcal {M}_1\). The map \(\lambda \) is surjective onto \(F_\mathbf {B} = \mathcal {M}_2\) by definition. We claim that \(\lambda \) is a minion homomorphism. We have \({{\,\mathrm{dec}\,}}(f) = {{\,\mathrm{dec}\,}}(\lambda f)\) for all \(f \in \mathcal {M}_1\) by definition. Let now \(f \in \mathcal {M}_1\), and let \(u = u_1 \dots u_m\) and \(\sigma \) be such that the minor \(f_\sigma ^u\) is defined. Then \(f_\sigma ^u \in \mathcal {M}_1\) and \(f = f^\mathbf {A}\) and \((f^\mathbf {A})_\sigma ^u = f_\sigma ^u = ((f_\sigma ^u)^\mathbf {A})_\iota ^u\), where \(\iota :[{m}] \rightarrow S\), \(i \mapsto u_i\), so \(\mathbf {A}\) clearly satisfies the identity \(f_\sigma \approx _{S'} (f_\sigma ^u)_\iota \), where \(S'\) is the union of the sets of input sorts of f and \(f^u_\sigma \). By our assumption, also \(\mathbf {B}\) satisfies this identity, so \((f^\mathbf {B})_\sigma ^u = ((f_\sigma ^u)^\mathbf {B})_\iota ^u\). Hence \((\lambda f)_\sigma ^u = (\lambda f^\mathbf {A})_\sigma ^u = (f^\mathbf {B})_\sigma ^u = ((f_\sigma ^u)^\mathbf {B})_\iota ^u = (f_\sigma ^u)^\mathbf {B} = \lambda ((f_\sigma ^u)^\mathbf {A}) = \lambda (f_\sigma ^u)\), and we conclude that \(\lambda \) is a surjective minion homomorphism. \(\square \)

Theorem 4.12

Let A and B be S-sorted sets such that \(S_B \subseteq S_A\). Let \(\mathcal {M}_1 := {{\,\mathrm{mPol}\,}}Q_A\) and \(\mathcal {M}_2 := {{\,\mathrm{mPol}\,}}Q_B\) for \(Q_A \subseteq {{\,\mathrm{Relp}\,}}(A)\) and \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\).

  1. (a)

    The following conditions are equivalent.

    1. (i)

      \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\).

    2. (ii)

      There exists a surjective minion homomorphism \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}_2\).

  2. (b)

    Assume that the components \(A_s\) and \(B_s\) of A and B are all finite. Then the following conditions are equivalent.

    1. (i)

      \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}}} \mathcal {M}_1\).

    2. (ii)

      There exist an integer \(k \in \mathbb {N}_+\) and a reflection \((h,h')\) of \(A^k\) into B such that

      1. (1)

        and

      2. (2)

        .

Proof

(a) This is Lemma 4.11.

(b) (i) \(\Rightarrow \) (ii): Assume \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}}} \mathcal {M}_1\). Then there exists \(\mathcal {M}'_1 \in {{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}\mathcal {M}_1\) such that \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {M}'_1\). By Proposition 4.7, there exists \(k \in \mathbb {N}_{+}\) such that \(\mathcal {M}'_1 = {{\,\mathrm{mPol}\,}}Q_{A^k}\) for some \(Q_{A^k} \subseteq {{\,\mathrm{Relp}\,}}(A^k)\) satisfying \(\sharp _{k}{[{Q_A}]} = [{Q_{A^k}}]\); this together with Lemma 3.6(ii) implies . By Proposition 4.6, there exists a reflection \((h,h')\) of \(A^k\) into B such that \(Q_B^{(h,h')} \subseteq [{Q_{A^k}}]\) and \([{Q_{A^k}}]_{(h,h')} \subseteq [{Q_B}]\). Putting these equalities and inclusions together, we get

(ii) \(\Rightarrow \) (i): Assume that there exist an integer \(k \in \mathbb {N}_+\) and a reflection \((h,h')\) of \(A^k\) into B such that and . Let . By Lemma 3.6(v) we have , so \(Q_{A^k}\) is minor-closed by Theorem 2.8, i.e., \([{Q_{A^k}}] = Q_{A^k}\). By Proposition 2.5, \(\mathcal {M}_1^{\otimes k}\) is a minion, so \(\mathcal {M}_1^{\otimes k} = {{\,\mathrm{mPol}\,}}{{\,\mathrm{mInv}\,}}\mathcal {M}_1^{\otimes } = {{\,\mathrm{mPol}\,}}Q_{A^k}\). By the above equalities and inclusions and Lemma 3.6(i) we have

Now Proposition 4.6 yields \(\mathcal {M}_2 \in {{\,\mathrm{\mathsf {R}}\,}}\mathcal {M}_1^{\otimes k} \subseteq \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}}} \mathcal {M}_1\). \(\square \)

As announced in the introduction, the following theorem can be considered as the multisorted analogue of the wonderland theorem [3, Theorem 1.3] (see also [2, Corollary 9.5]).

Theorem 4.13

Let A and B be S-sorted sets such that \(S_B \subseteq S_A\). Let \(\mathcal {M}_1 := {{\,\mathrm{mPol}\,}}Q_A\) and \(\mathcal {M}_2 := {{\,\mathrm{mPol}\,}}Q_B\) for \(Q_A \subseteq {{\,\mathrm{Relp}\,}}(A)\) and \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\).

  1. (a)

    The following conditions are equivalent.

    1. (i)

      \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\).

    2. (ii)

      There exists a minion homomorphism \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}_2\).

  2. (b)

    Assume that the components \(A_s\) and \(B_s\) of A and B are all finite. Then the following conditions are equivalent.

    1. (i)

      \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}}} \mathcal {M}_1\).

    2. (ii)

      There exist an integer \(k \in \mathbb {N}_+\) and a reflection \((h,h')\) of \(A^k\) into B such that .

Proof

(a) Assume \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\). Then there exists \(\mathcal {M}'_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\) such that \(\mathcal {M}'_2 \subseteq \mathcal {M}_2\). By Lemma 4.11, there exists a surjective minion homomorphism \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}'_2\). By extending the codomain of \(\lambda \), we get a minion homomorphism from \(\mathcal {M}_1\) to \(\mathcal {M}_2\).

Assume now that \(\lambda :\mathcal {M}_1 \rightarrow \mathcal {M}_2\) is a minion homomorphism. Let \(\mathcal {M}'_2 := {{\,\mathrm{Im}\,}}\lambda \). Now \(\lambda \) is clearly a surjective minion homomorphism of \(\mathcal {M}_1\) into \(\mathcal {M}'_2\), so by Lemma 4.11, \(\mathcal {M}'_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\). Since \(\mathcal {M}'_2 \subseteq \mathcal {M}_2\), we have \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\).

(b) (i) \(\Rightarrow \) (ii): Assume \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}}} \mathcal {M}_1\). Then there exists \(k \in \mathbb {N}\) such that \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}} \mathcal {M}_1^{\otimes k}\). By Proposition 4.7, we have \(\mathcal {M}_1^{\otimes k} = {{\,\mathrm{mPol}\,}}Q_{A^k}\) for \(Q_{A^k} := \sharp _{k}{[{Q_A}]}\); moreover . By Proposition 4.9, there exists a reflection \((h,h')\) of \(A^k\) into B such that \(Q_B^{(h,h')} \subseteq [{Q_{A^k}}]\). Consequently, .

(ii) \(\Rightarrow \) (i): Assume \(k \in \mathbb {N}_+\) and \((h,h')\) is a reflection of \(A^k\) into B satisfying ; we have \(Q_{A^k} = \sharp _{k}{({{\,\mathrm{mInv}\,}}\mathcal {M}_1)} = {{\,\mathrm{mInv}\,}}\mathcal {M}_1^{\otimes k}\) by Lemma 3.6(v), so \([{Q_{A^k}}] = Q_{A^k}\). Then , from which it follows by Proposition 4.9 that \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}} \mathcal {M}_1^{\otimes k} \subseteq \mathop {{{{\,\mathrm{\mathsf {E}}\,}}}{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}}} \mathcal {M}_1\). \(\square \)

Under the additional hypothesis that there are only a finite number of sorts, the four conditions of Theorem 4.12 become equivalent, and so do those of Theorem 4.13. This is a consequence of the following result.

Proposition 4.14

Let A and B be S-sorted sets. Assume that \(S_{B}\) is finite, all components \(A_s\) and \(B_s\) (\(s \in S_{B}\)) are finite, and \(S_B \subseteq S_A\). Let \(\mathcal {M}_1 \subseteq {{\,\mathrm{Op}\,}}(A)\) and \(\mathcal {M}_2 \subseteq {{\,\mathrm{Op}\,}}(B)\) be arbitrary sets of operations, not necessarily minions. Then the following conditions are equivalent.

  1. (i)

    \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}_\mathrm {fin}}\,}}}} \mathcal {M}_1\),

  2. (ii)

    \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\).

Proof

(i) \(\Rightarrow \) (ii): Trivial.

(ii) \(\Rightarrow \) (i): Assume that \(\mathcal {M}_2 \in \mathop {{{{\,\mathrm{\mathsf {R}}\,}}}{{{\,\mathrm{\mathsf {P}}\,}}}} \mathcal {M}_1\) is a reflection of an infinite power of \(\mathcal {M}_1\). Then there exists a reflection \((h,h')\) from \(A^{K}\) (for some infinite set K) to B such that \(\mathcal {M}_2 = (\mathcal {M}_1^{K})_{(h,h')}\). We are going to construct a finite subset \(k \subseteq K\) and a reflection \((\tilde{h},\tilde{h}')\) from \(A^k\) to B such that \((f^{\otimes k})_{(\tilde{h},\tilde{h}')} = (f^{\otimes K})_{(h,h')}\) for each \(f \in \mathcal {M}_{1}\); therefore \(\mathcal {M}_2 = (\mathcal {M}_1^{\otimes K})_{(h,h')} = (\mathcal {M}_1^{\otimes k})_{(\tilde{h},\tilde{h}')}\), which will finish the proof. We recall the following notation. For \(f \in \mathcal {M}_1\) with \({{\,\mathrm{dec}\,}}(f) = (w,s)\), \(w = s_1 \dots s_n\), a multisorted map \(\bar{h} = (\bar{h}_{s})_{s \in S} :B \rightarrow C\), and \(\mathbf {b}:= (b_1, \dots , b_n) \in B_w = B_{s_1} \times \dots \times B_{s_n}\), let \(\bar{h}_{w}(\mathbf {b}) := (\bar{h}_{s_1}(b_1), \dots , \bar{h}_{s_n}(b_n))\). For \(\alpha = (a_j)_{j \in K} \in A_s^K\) let \({{\,\mathrm{pr}\,}}_j(\alpha ) := a_j\), \(j \in K\), and let \({{\,\mathrm{pr}\,}}_k(\alpha ) := (a_j)_{j \in k}\) be the projection (restriction) onto the coordinates in k.

Now we define \(\tilde{h} := {{{\,\mathrm{pr}\,}}_k} \circ h\), i.e., \(\tilde{h}_s(b) := {{\,\mathrm{pr}\,}}_k(h_s(b))\) for \(b \in B_s\), \(s \in S_B\). The subset k will be chosen below in such a way that it satisfies

$$\begin{aligned} f^{\otimes k}(\tilde{h}_w(\mathbf {b})) = g^{\otimes k}\left( \tilde{h}_v(\mathbf {c})\right) \implies f^{\otimes K}\left( h_w(\mathbf {b})\right) = g^{\otimes K}\left( h_v(\mathbf {c})\right) \end{aligned}$$
(4.1)

for all \(f, g \in \mathcal {M}_1\) with \({{\,\mathrm{dec}\,}}(f) = (w,s)\), \({{\,\mathrm{dec}\,}}(g) = (v,s)\) and all \(\mathbf {b}\in B_w\), \(\mathbf {c}\in B_v\). Note that \(f^{\otimes k}(\tilde{h}_w(\mathbf {b})) = {{\,\mathrm{pr}\,}}_k(f^{\otimes K}(h_w(\mathbf {b})))\).

We define the multisorted map \(\tilde{h}' = (\tilde{h}'_s)_{s \in S_B} :A^k \rightarrow B\) as follows:

$$\begin{aligned} \tilde{h}'_s(\xi )&:= {\left\{ \begin{array}{ll} h'_s\left( f^{\otimes K}\left( h_w(\mathbf {b})\right) \right) &{} \text {if}\, \xi = f^{\otimes k}\left( \tilde{h}_w(\mathbf {b})\right) \,\text { for some}\, f \in \mathcal {M}_1 \\ &{} \text {with}\, {{\,\mathrm{dec}\,}}(f) = (w,s) \text {and}\, \mathbf {b}\in B_w, \\ \gamma _s &{} \text {otherwise,} \end{array}\right. } \end{aligned}$$
(4.2)

where \(\gamma _s\) is an arbitrary fixed element of \(B_s\), \(s \in S_B\).

Because of the property (4.1), \(\tilde{h}'\) is well defined. We therefore have

$$\begin{aligned} \left( f^{\otimes k}\right) _{\left( \tilde{h},\tilde{h}'\right) }(\mathbf {b}) = \tilde{h}'_s\left( f^{\otimes k}\left( \tilde{h}_w(\mathbf {b})\right) \right) {\mathop {=}\limits ^{(4.2)}} h'_{s}\left( f^{\otimes K}\left( h_w(\mathbf {b})\right) \right) = \left( f^{\otimes K}\right) _{(h,h')}(\mathbf {b}), \end{aligned}$$

i.e., \((f^{\otimes k})_{(\tilde{h},\tilde{h}')} = (f^{\otimes K})_{(h,h')}\), which finishes the proof as mentioned above.

It remains to find a subset \(k \subseteq K\) with property (4.1).

Assume without loss of generality that \(S_B = \{1, \dots , p\}\) for some \(p \in \mathbb {N}_{+}\) and \(B_i = \{d_{i1}, d_{i2}, \dots , d_{i n_i}\}\) for each \(i \in S_B\). So

$$\begin{aligned} \mathbf {d}:= \left( d_{11}, \dots , d_{1 n_1}, \dots , d_{p1}, \dots , d_{p n_p}\right) \end{aligned}$$

is a tuple of length \(\ell := \sum _{i=1}^{p} n_{i}\) containing all elements of B. For any \((w,s) = (s_1 \dots s_n, i) \in W(S_B) \times S_B\) and \(\mathbf {b}= (b_1, \dots , b_n) \in B_w = B_{s_1} \times \dots \times B_{s_n}\), define the mapping \(\sigma \mathbf {b}:[{n}] \rightarrow \{\, (i,j) \mid i \in S_B,\, j \in [{n_i}] \,\}\) by the rule \(i \mapsto (s_i, j)\) if and only if \(b_i = d_{s_i j}\).

Then for any \(f \in \mathcal {M}_1\) with \({{\,\mathrm{dec}\,}}(f) = (w,s)\) and any \(\bar{h} :B \rightarrow A^L\) (we need here only \(L = k\) or \(L = K\), and \(\bar{h} = \tilde{h}\) or \(\bar{h} = h\), resp.) we have

$$\begin{aligned} f^{\otimes L}\left( \bar{h}_{w}(\mathbf {b})\right) = f^{\otimes L}_{\sigma \mathbf {b}}\left( \bar{h}_u(\mathbf {d})\right) \qquad \text {for}\, \mathbf {b}\in B_w. \end{aligned}$$
(4.3)

Here \(f^{\otimes L}_{\sigma \mathbf {b}}\) denotes the minor \((f^{\otimes L})_{\sigma \mathbf {b}}^u\) where the arity u is \(1 \dots 1 \dots p \dots p\) (each sort i appears \(n_{i}\) times). With the definition of a minor (Definition 2.1), (4.3) can be checked easily. Note that \({{\,\mathrm{pr}\,}}_{j}(h_u(\mathbf {d})) \in A_u = A_1 \times \dots \times A_1 \times \dots \times A_p \times \dots \times A_p\) (each \(A_i\) appears \(n_i\) times), i.e., there exist at most \(|{A_u}| = |{A_1^{n_1} \times \dots \times A_p^{n_p}}|\) different \(\ell \)-tuples \({{\,\mathrm{pr}\,}}_j(h_u(\mathbf {d}))\), \(j \in K\), where, in particular, \(|{A_u}|\) is finite since all \(A_i\), \(B_i\), and \(S_B\) are finite. Therefore one can choose a finite subset \(k \subseteq K\) (with \(|{k}| \le |{A_u}|\)) such that for all \(j \in K\) there exists an \(i \in k\) such that \({{\,\mathrm{pr}\,}}_j(h_u(\mathbf {d})) = {{\,\mathrm{pr}\,}}_i(h_u(\mathbf {d}))\), the latter being \({{\,\mathrm{pr}\,}}_i(\tilde{h}_u(\mathbf {d}))\). Hence any \(f^{\otimes K}_{\sigma \mathbf {b}}(h_u(\mathbf {d}))\) is uniquely determined by its projection onto k, i.e., by \(f^{\otimes k}_{\sigma \mathbf {b}}(\tilde{h}_u(\mathbf {d}))\). Consequently, (4.1) follows immediately from (4.3). \(\square \)

Remark 4.15

A comparison of the wonderland theorem [3, Theorem 1.3] with our Theorem 4.13 suggests the following generalization of the notion of pp-constructibility in the multisorted setting. For relational structures \(Q_A \subseteq {{\,\mathrm{Relp}\,}}(A)\) and \(Q_B \subseteq {{\,\mathrm{Relp}\,}}(B)\), we say that \(Q_A\) mc-constructs \(Q_B\), or that \(Q_B\) is mc-constructible from \(Q_A\), if there exist an integer \(k \in \mathbb {N}_+\) and a reflection \((h,h')\) of \(A^k\) into B such that . (The “mc” in “mc-constructible” connotes “minor-closed”.) Thus, condition (ii) in Theorem 4.13(b) asserts that \(Q_B\) is mc-constructible from \(Q_A\).