1 Introduction

In the 1970 s Charles Conley [3] proposed a homotopical invariant of an isolated invariant set, called after him the Conley index, which proved to be a very useful tool in the qualitative study of flows. The construction of the Conley index is based on a technical concept of index pair. For a given isolated invariant set there are many different index pairs, but they share some common information. To extract the information some equivalence between index pairs is needed. In Conley’s original construction the equivalence is a homotopy equivalence constructed along the trajectories of the flow. In fact, the original Conley index, as pointed out by Conley [3, Sect. 5.3], is a connected simple system, that is, a small category with exactly one morphism between any two objects. This feature of the index leads to the study of functoriality in the Conley theory [13, 16].

In the case of dynamical systems with discrete time, homotopies along trajectories do not make sense. Therefore, a different equivalence is needed to define the Conley index. In 1988 Robin and Salamon [23] noticed that the index map associated with every index pair contains information helpful in overcoming the lack of homotopies and used shape theory to extract information independent of the choice of index pair. In [20], in an algebraic setting of graded modules, the Leray reduction of the index map was used to construct the Conley index and in [21] a functorial framework for such a construction was proposed. But, it was Andrzej Szymczak [26] who indicated in 1995 that all these functorial constructions factorize through a functor from \({\text {End}}({\mathcal {E}})\), the category of endomorphism over an arbitrary category \({\mathcal {E}}\), to its Szymczak category \(\text {Szym}({\mathcal {E}})\).

In 2000 Franks and Richeson [6] observed that the isomorphism classes in the Szymczak category are equivalence classes of shift equivalence, a concept introduced in the study of dynamical systems by Williams [29] in 1970.

Proposition

( [6, Proposition 8.1]) Suppose that \((X,f), (X',f')\in {\text {End}}({\mathcal {E}})\). Then (Xf) and \((X',f')\) are isomorphic in the Szymczak category if and only if they are shift equivalent.

This observation provides a conceptually simpler definition of the Conley index. The advantage of the definition based on the Szymczak functor, formally equivalent to Franks and Richeson definition, is its functoriality. Functoriality, in particular, is needed to prove that the Conley index is a connected simple system also in the case of dynamical systems with discrete time [10]. Also, the definition based on the Szymczak functor better explains the generality of the approach. This is because the Szymczak functor is an instance of a general construction in category theory known as localization or calculus of fractions [7]. Roughly speaking, localization is a universal functor which sends a certain family of morphisms to isomorphisms. The Szymczak functor localizes endomorphisms in \({\text {End}}({\mathcal {E}})\) by sending them into isomorphisms in \(\text {Szym}({\mathcal {E}})\). The universality implies that any other functor used to construct the Conley index factorizes through the Szymczak functor.

The universality ensures generality but it does not guarantee computability. In particular, although the Szymczak functor provides the most general form of the Conley index, index constructions based on some other functors like the shape functor, the inverse/direct limit functor or the Leray functor are often more convenient in practice. As one may expect, the same problem is visible in the shift equivalence formulation. Although the definition of shift equivalence is elementary, it does not tell us how to decide in practice whether the shift equivalence classes of two endomorphisms are the same or different. The challenges related to shift equivalence in the context of the computation of the homological Conley index of a discrete dynamical system generated by a continuous map are discussed in a recent paper by Mischaikow and Weibel [17]. In particular, they point out that the problem is decidable for the category of finitely generated abelian groups and efficiently algorithmizable for the category of finite-dimensional vector spaces.

In the rigorous algorithmic computations of the Conley index [2, 22, 27] there is an additional challenge. Such computations, based on interval arithmetic [19], lead to multivalued dynamical systems and, in consequence, to categories whose morphisms are not maps but relations. The same happens in the study of sampled dynamical systems constructed directly from data and acting on finite topological spaces [4, 5]. So far, the only method to deal with multivalued maps in the context of the Szymczak functor and shift equivalence is to assume that they have acyclic values, because such maps induce single-valued maps in homology. Acyclicity may be achieved by enlarging the values. Unfortunately, this is often at the expense of possible overestimation resulting in no interesting outcome. Although the acyclity condition may be slightly relaxed [8], it is natural to ask what may be achieved in terms of shift equivalence and the Szymczak category when the class of morphisms is enhanced by allowing for multivalued maps or relations. Such an enhancement is still a category, therefore, shift equivalence and the Szymczak functor are well defined. But, are they nontrivial? If so, is it possible to algorithmically differentiate between shift equivalence classes? In the study of the homological Conley index for multivalued dynamics the category of linear or additive binary relations [15, Chapter II, Sect. 6] is of particular interest.

In this paper we take a look at the category \(\text {Set}_\textrm{f}\) of finite sets and maps, \(\text {Rel}_\textrm{f}\) of finite sets and relations, and \(\text {LRel}_\textrm{f}\) of finite-dimensional vector spaces over a fixed finite field and linear relations. We show that the Szymczak functor and shift equivalence for these categories are nontrivial. We do so by providing a computable invariant for shift equivalence classes in \(\text {Set}_\textrm{f}\) and \(\text {Rel}_\textrm{f}\). We consider this paper as a stimulating first step toward a Conley index theory for multivalued dynamics without the restrictive acyclicity condition.

The organization of the paper is as follows. In Sect. 2 we review the main ideas and results of the paper. In Sect. 3 we recall the Szymczak construction. In Sect. 4 we present a description of shift equivalence classes in the \(\text {Set}_\textrm{f}\) category. Preliminary results on \(\text {Rel}_\textrm{f}\) are presented in Sect. 5. In Sect. 6 we analyze some relations induced by an arbitrary relation. We introduce the canonical form and present the main results in Sect. 7. Finally, in Sect. 8 we propose an invariant of shift equivalence class for \(\text {Rel}_\textrm{f}\), classifying graphs, and make a comment about its applications to \(\text {LRel}_\textrm{f}\) in Sect. 9.

2 Main Results

As we pointed out in the introduction, rigorous numerical computations in dynamics are based on interval arithmetic. This means, in particular, that a map \(f:X\rightarrow X\) may only be estimated in the form of a multivalued map \(F:X\multimap X\) such that \(f(x)\in F(x)\) for \(x\in X\). Formally speaking, a multivalued map F is a binary relation \(F\subseteq X\times X\). Under suitable assumptions one can use F to compute \(f_*\), the map induced by f in homology. For this end one takes the projections

$$\begin{aligned} p:F\rightarrow X,\ (x,y)\mapsto x, \quad \quad q:F\rightarrow X,\ (x,y)\mapsto y. \end{aligned}$$

If the preimages of p are acyclic, that is if F(x) is acyclic for \(x\in X\), then \(p_*\) is an isomorphism by the Vietoris–Begle Theorem [28] and one can prove [18] that \(f_*=q_*p_*^{-1}\). In the context of computational Conley theory this is the way one obtains the homological index map whose shift equivalence class is the Conley index. If p is not acyclic, then \(p_*\) cannot be inverted as a homomorphism. However, since every map is a special case of a relation, the homomorphism \(p_*\) may be inverted and composed with \(q_*\) as a relation. Hence, under the assumption that the homology of X is finitely generated and taken with coefficients in a finite field, the pair \((H_*(X),q_*p_*^{-1})\) becomes an object in the category \(\text {Rel}_\textrm{f}\) consisting of finite sets as objects and binary relations as morphisms (arrows) (see Sect. 5). Therefore, we may consider the shift equivalence class of \((H_*(X),q_*p_*^{-1})\) in \(\text {Rel}_\textrm{f}\). To make such an approach useful, we need to know that shift equivalence in \(\text {Rel}_\textrm{f}\) is not trivial.

We first take a look at a simpler case of category, \(\text {Set}_\textrm{f}\), consisting of finite sets as objects and maps as morphisms. It turns out that for the characterization of shift equivalences classes it is enough to consider the ordered sequence of periods of disjoint orbits of a map, that is a non-decreasing, finite sequence \(p_1\le p_2\le \cdots \le p_k\) in \(\mathbb {N}_1\), where \(p_i\) is a period of one orbit of a map (see Sect. 4).

Theorem 1

(see Theorem 7) Two objects of \({\text {End}}(\text {Set}_\textrm{f})\) are in the same shift equivalence class if and only if their sequences of periods are the same.

In order to characterize shift equivalence classes in \(\text {Rel}_\textrm{f}\) we need a definition in which it is convenient to interpret an object (XR) in \({\text {End}}(\text {Rel}_\textrm{f})\) as a directed graph with X as the set of vertices and R as the set of edges. We say that such an object is canonical (see Definition 5 for the details) if each vertex in X belongs to a closed path, for each strongly connected component \(U\subseteq X\) (that is, a maximal subset of X such that whenever \(x,y\in U\) then \(y\in R^n(x)\) and \(x\in R^m(y)\) for some \(n,m\in \mathbb {N}_1\)) the restriction \(R_U:=R\cap U\times U\) is a bijection \(R_U:U\rightarrow U\), and R has periodic powers, that is, there exists a \(p\ge 1\) such that \(R^{p+1}=R\).

The following two theorems constitute the main theoretical results of the paper. We prove them in Sect. 7.

Theorem 2

(see Theorem 12) Every object in \({\text {End}}(\text {Rel}_\textrm{f})\) is isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) to a canonical object.

Theorem 3

(see Theorem 13) Two canonical objects are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) if and only if they are isomorphic in \({\text {End}}(\text {Rel}_\textrm{f})\).

Table 1 Number of different objects in \(\text {Szym}(\text {Rel}_\textrm{f})\) and different shift equivalence classes in \(\text {Rel}_\textrm{f}\) for sets of cardinality not exceeding \(n=1,2,3,4,5\)
Fig. 1
figure 1

Canonical objects in \(\text {Szym}(\text {Rel}_\textrm{f})\) of cardinality one and two. Relations which are maps are canonical objects in \(\text {Szym}(\text {Set}_\textrm{f})\)

Theorem 2 shows that each shift equivalence class in \(\text {Rel}_\textrm{f}\) admits a canonical representative. Since the proof is constructive, the representative may be computed algorithmically. Thus, the classification problem in \(\text {Szym}(\text {Rel}_\textrm{f})\) is reduced to the classical classification of graphs. This lets us compute all canonical representatives of shift equivalence classes in \(\text {Rel}_\textrm{f}\) for sets of cardinality not exceeding five. The number of different shift equivalence classes is presented in Table 1. The four canonical objects of cardinality one and two are presented in Fig. 1. The canonical objects of cardinality three are presented in Figs. 2 and 3. Note that there is also a class of the empty relation. Moreover, the relations from Figs. 1, 2 and  3 which are also maps are canonical objects in \(\text {Szym}(\text {Set}_\textrm{f})\).

One can interpret relations on finite sets as Boolean matrices. Then (XR) and (YS) are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) if and only if R and S are shift equivalent as Boolean matrices. With some work, one can show that the linear algebraic result Proposition 3.5 from [12] (proven in [11]) is equivalent to part of Theorem 2 on canonical objects (the fact that any relation is isomorphic to a canonical form, though not the interpretation of that form). The application in [11, 12] is to the classification of shifts of finite type, so there may be applications of Theorem 2 in that setting as well.

Notice that the lack of acyclicity of fibers of p means that \(p_*^{-1}\) is a linear relation, and the composition \(q_*p_*^{-1}\) is also a linear relation (see Sect. 9 for the details). Therefore, we are interested in understanding shift equivalence classes in \(\text {LRel}_\textrm{f}\). Note that there is a forgetful functor from \(\text {LRel}_\textrm{f}\) to \(\text {Rel}_\textrm{f}\) category. Thus, we may use the classification of \(\text {Szym}(\text {Rel}_\textrm{f})\) to distinguish in some cases between different shift equivalence classes of \(\text {LRel}_\textrm{f}\). Example 3 shows how to use the classifying graph, an invariant proposed in Sect. 8, to recognize linear relations from different shift equivalence classes of \(\text {LRel}_\textrm{f}\). The example implies that the Szymczak functor and shift equivalence for this category are also nontrivial.

Fig. 2
figure 2

Canonical objects in \(\text {Szym}(\text {Rel}_\textrm{f})\) of cardinality three with three strongly connected components. Relations which are maps are canonical objects in \(\text {Szym}(\text {Set}_\textrm{f})\)

Fig. 3
figure 3

Canonical objects in \(\text {Szym}(\text {Rel}_\textrm{f})\) of cardinality three with less than three strongly connected components. Relations which are maps are canonical objects in \(\text {Szym}(\text {Set}_\textrm{f})\)

3 The Szymczak Functor

Let \({\mathcal {E}}\) be a category. Recall that a morphism \(\varphi :E\rightarrow E'\) is an isomorphism in \({\mathcal {E}}\) if there exists a morphism \(\psi :E'\rightarrow E\) such that \(\psi \circ \varphi ={\text {id}}_E\) and \(\varphi \circ \psi ={\text {id}}_{E'}\). Then \(\psi \) is also an isomorphism. It is uniquely determined by \(\varphi \) and called the inverse morphism of \(\varphi \). We denote it \(\varphi ^{-1}\). We recall that an endomorphism in \({\mathcal {E}}\) is a morphism of the form \(e:E\rightarrow E\), that is, a morphism whose source object is the same as the target object. An automorphism is an endomorphism which is also an isomorphism.

Let E and F be two objects of \({\mathcal {E}}\) and let \(e:E\rightarrow E\), \(f:F\rightarrow F\) be morphisms in \({\mathcal {E}}\). We say that e and f are conjugate if there exists an isomorphism \(\varphi :E\rightarrow F\) such that \(\varphi \circ e=f\circ \varphi \).

Proposition 1

Assume the diagram

of morphisms in E is commutative. If e and f are isomorphisms, then so are \(\varphi \) and \(\psi \). In particular, the isomorphisms e and f are conjugate.

Proof

Set \(\varphi ':=\varphi \circ e^{-1}\). Then \(\psi \circ \varphi '={\text {id}}_E\). From \( f\circ \varphi =\varphi \circ e\) we get \(\varphi \circ e^{-1}= f^{-1}\circ \varphi \). Therefore, \(\varphi '\circ \psi =\varphi \circ e^{-1}\circ \psi = f^{-1}\circ \varphi \circ \psi = f^{-1}\circ f={\text {id}}_F\). This proves that \(\psi \) is an isomorphism. It follows that \(\varphi =\psi ^{-1}\circ e\) is an isomorphism as a composition of isomorphisms. \(\square \)

We define the category of endomorphisms of \({\mathcal {E}}\), denoted by \({\text {End}}({\mathcal {E}})\), as follows: the objects of \({\text {End}}({\mathcal {E}})\) are pairs (Ee), where \(E\in {\mathcal {E}}\) and \(e\in {\mathcal {E}}(E,E)\) is an endomorphism of E. The set of morphisms from \((E,e)\in {\text {End}}({\mathcal {E}})\) to \((F,f)\in {\text {End}}({\mathcal {E}})\) is the subset of \({\mathcal {E}}(E,F)\) consisting of exactly those morphisms \(\varphi \in {\mathcal {E}}(E,F)\) for which \(f\varphi =\varphi e\). We write \(\varphi :(E,e)\rightarrow (F,f)\) to denote that \(\varphi \) is a morphism from (Ee) to (Ff) in \({\text {End}}({\mathcal {E}})\). Note that, in particular, \(e:(E,e)\rightarrow (E,e)\) is an endomorphism in \({\text {End}}({\mathcal {E}})\).

Let \({\mathcal {C}}\) be another category and let \(L:{\text {End}}({\mathcal {E}})\rightarrow {\mathcal {C}}\) be a functor. We say that L is normal if \(L(e):L(E,e)\rightarrow L(E,e)\) (that is, L applied to \(e:(E,e)\rightarrow (E,e)\)) is an isomorphism in \({\mathcal {C}}\) for any endomorphism \(e:E\rightarrow E\) in \({\mathcal {E}}\). We have the following theorem.

Theorem 4

Assume \(L:{\text {End}}({\mathcal {E}})\rightarrow {\mathcal {C}}\) is a normal functor and \(\varphi :(E,e)\rightarrow (F,f)\), \(\psi :(F,f)\rightarrow (E,e)\) are such that \(e=\varphi \psi \), \(f=\psi \varphi \). Then we have the commutative diagram

in \({\mathcal {C}}\), in which all morphisms are isomorphisms.

Proof

The theorem is an immediate consequence of Proposition 1. \(\square \)

We denote by \(\mathbb {N}_0=\mathbb {N}\cup \{0\}\) the set of whole numbers and \(\mathbb {N}\) or, alternatively, \(\mathbb {N}_1\) the set of natural numbers.

With every category \({\mathcal {E}}\) one can associate its Szymczak category \(\text {Szym}({\mathcal {E}})\) defined as follows. The objects of \(\text {Szym}({\mathcal {E}})\) are the objects of \({\text {End}}({\mathcal {E}})\). Given objects (Ee) and (Ff) in \(\text {Szym}({\mathcal {E}})\) we consider the equivalence relation in \({\text {End}}({\mathcal {E}})((E,e),(F,f))\times \mathbb {N}_0\) defined by

$$\begin{aligned} (\varphi ,m)\equiv (\varphi ',m') \end{aligned}$$

for \((\varphi ,m),(\varphi ',m')\in {\text {End}}({\mathcal {E}})((E,e),(F,f))\times \mathbb {N}_0\) if and only if there exists a \(k\in \mathbb {N}_0\) such that

$$\begin{aligned} \varphi \circ e^{m'+k} = \varphi ' \circ e^{m+k}, \end{aligned}$$
(1)

or equivalently

$$\begin{aligned} f^{m'+k}\circ \varphi = f^{m+k}\circ \varphi '. \end{aligned}$$

We define the set of morphisms \(\text {Szym}({\mathcal {E}})((E,e),(F,f))\) as the collection of equivalence classes of the relation \(\equiv \). Given morphisms \([\varphi ,m]:(E,e)\rightarrow (F,f)\) and \([\varphi ,m']:(F,f)\rightarrow (G,g)\) we define their composition by

$$\begin{aligned} {[}\varphi ',m']\circ [\varphi ,m]:=[\varphi '\circ \varphi ,m+m'] \end{aligned}$$

One easily verifies that the composition is well defined and \([{\text {id}}_E,0]\) is the identity morphism on (Ee). Thus, \(\text {Szym}({\mathcal {E}})\) is indeed a category.

There is a functor \(\text {Szym}:{\text {End}}({\mathcal {E}})\rightarrow \text {Szym}({\mathcal {E}})\) which fixes objects and sends a morphism \(\varphi :(E,e)\rightarrow (F,f)\) to the equivalence class \([\varphi ,0]\). We call it the Szymczak functor. In general, it may happen that \(\text {Szym}(\varphi )=\text {Szym}(\varphi ')\) even if \(\varphi \ne \varphi '\). Nevertheless it is convenient to write just \(\varphi \) to denote \(\text {Szym}(\varphi )\) whenever it is clear from the context in which category we work. One easily verifies that every morphism \(e:(E,e)\rightarrow (E,e)\) in \(\text {Szym}({\mathcal {E}})\) has an inverse given by

$$\begin{aligned} \bar{e}:=[{\text {id}}_E,1]. \end{aligned}$$

Indeed, we have

$$\begin{aligned} e\circ \bar{e}=[e,0]\circ [{\text {id}}_E,1]=[e,1]=[{\text {id}}_E,0]={\text {id}}_{(E,e)} \end{aligned}$$

which shows that \(\bar{e}\) is an inverse of e. We can also write the abstract morphism \([\varphi ,n]\) in terms of \(\bar{e}\) as

$$\begin{aligned}{}[\varphi ,n]=[\varphi ,0]\circ [{\text {id}}_E,1]^n=\varphi \circ \bar{e}^n. \end{aligned}$$
(2)

Thus, \(\text {Szym}(e)\) is invertible in \(\text {Szym}({\mathcal {E}})\). Therefore, \(\text {Szym}\) is a normal functor. Actually, this is the most general normal functor in the following sense.

Theorem 5

[26, Theorem 6.1] For every normal functor \(L:{\text {End}}({\mathcal {E}})\rightarrow {\mathcal {C}}\) there exists a unique functor \(L':\text {Szym}({\mathcal {E}})\rightarrow {\mathcal {C}}\) such that the diagram

commutes.

The construction of the Szymczak category and the Szymczak functor is due to Szymczak [26].

We say that two objects (Ee) and \((E',e')\) of \({\text {End}}({\mathcal {E}})\) are conjugate if e and \(e'\) are conjugate in \({\mathcal {E}}\).

Proposition 2

Assume (Ee) and \((E',e')\) are conjugate objects of \({\text {End}}({\mathcal {E}})\). Then (Ee) and \((E',e')\) are isomorphic in \(\text {Szym}({\mathcal {E}})\).

Proof

Let \(\varphi :E\rightarrow E'\) be an isomorphism in \({\mathcal {E}}\) such that \(\varphi \circ e=e'\circ \varphi \) and let \(\psi :=\varphi ^{-1}\). Then \([\psi ,0]\circ [\varphi ,0]=[{\text {id}}_E,0]\) and \([\varphi ,0]\circ [\psi ,0]=[{\text {id}}_{E'},0]\), which proves that (Ee) and \((E',e')\) are isomorphic in \(\text {Szym}({\mathcal {E}})\). \(\square \)

It is not difficult to give examples showing that the converse of Proposition 2 is not true. However, it is true in the category \({\text {Aut}}({\mathcal {E}})\) defined as the full subcategory of \({\text {End}}({\mathcal {E}})\) whose objects are objects (Ee) of \({\text {End}}({\mathcal {E}})\) such that e is an isomorphism in \({\mathcal {E}}\). Indeed, we have the following proposition.

Proposition 3

Assume (Ee) and (Ff) are objects in \({\text {Aut}}({\mathcal {E}})\). If \(\text {Szym}(E,e) \cong \text {Szym}(F,f)\), then (Ee) and (Ff) are conjugate.

Proof

Since \(\text {Szym}(E,e) \cong \text {Szym}(F,f)\), we may find morphisms \(\varphi :(E,e)\rightarrow (F,f)\) and \(\psi :(F,f)\rightarrow (E,e)\) as well as constants \(n,n'\in \mathbb {N}_0\) such that \([\varphi ,n]\circ [\psi ,n']=[{\text {id}}_F,0]\) and \([\psi ,n']\circ [\varphi ,n]=[{\text {id}}_{E},0]\). This means that there exist \(k,k'\in \mathbb {N}_0\) such that \(\psi \circ \varphi \circ e^k=e^{k+n+n'}\) and \(\varphi \circ \psi \circ f^{k'}=f^{k'+n+n'}\). Since e and f are isomorphisms, the equalities may be reduced to \(\psi \circ \varphi =e^{n+n'}\) and \(\varphi \circ \psi =f^{n+n'}\). Since both \(e^{n+n'}\) and \(f^{n+n'}\) are isomorphisms, the conclusion follows now immediately from Proposition 1. \(\square \)

The Szymczak category can be seen as a localization of the \({\text {End}}({\mathcal {E}})\) category with respect to the class of morphisms \(e\in {\text {End}}({\mathcal {E}})((E,e),(E,e))\) (see [7]).

As we mentioned in the introduction and following [6, Proposition 8.1], objects are isomorphic in the Szymczak category for some category \({\mathcal {E}}\) if and only if they are shift equivalent in \({\mathcal {E}}\). We implicitly use that fact.

The Szymczak category and the Szymczak functor are very general concepts, defined for any category. However, in practical terms it is not obvious how to compute the Szymczak category and Szymczak functor for concrete categories and how to determine shift equivalence classes of the categories. In the next section we do it for the category of finite sets.

4 The Szymczak Functor and Shift Equivalence in \(\text {Set}_\textrm{f}\)

Let \(\text {Set}_\textrm{f}\) denote the category of finite sets with maps as morphisms. Given an object (Xf) in \({\text {End}}(\text {Set}_\textrm{f})\) and \(x\in X\) we say that the set \(\{f^n(x)\ \vert \ n\in \mathbb {N}_0\}\) is the orbit of x with \((x,f(x),f^2(x),f^3(x),\ldots )\), the associated orbit sequence.

We say that an \(x\in X\) is a periodic point of f if there exists a \(k\in \mathbb {N}_1\) such that \(f^k(x)=x\). We then say that k is a period of x and x is k-periodic. In that case, the orbit is \(\{x,f(x),\ldots ,f^k(x)\}\) and it is called a periodic orbit. We denote the set of periodic points of f by \({\text {Per}}f\).

The following proposition is straightforward.

Proposition 4

Given \(f:X\rightarrow X\) an endomorphism on a finite set X, the following are equivalent:

  1. (i)

    f is injective,

  2. (ii)

    f is surjective,

  3. (iii)

    f is bijective and so is an automorphism of X,

  4. (iv)

    f is a permutation of X and so X is a union of disjoint periodic orbits of f,

  5. (v)

    every point of X is a periodic point of f.

\(\square \)

A subset A of X is invariant for \(f:X\rightarrow X\) when \(f(A)\subseteq A\). In that case, the restriction \(f\vert _A:A\rightarrow A\) is an endomorphism of A. Notice that each periodic orbit is an invariant set and, in particular \(f({\text {Per}}f) = {\text {Per}}f\).

Let (Xf) be a fixed object of \({\text {End}}(\text {Set}_\textrm{f})\).

Proposition 5

Let \(x\in X\). Then there exist unique \(k\in \mathbb {N}_0\), \(p\in \mathbb {N}_1\) such that \(x, f(x), \ldots , f^{k+p-1}(x)\) are distinct points of X and \(f^{k+p}(x)=f^k(x)\). Moreover, \(k+p\le {\text {card}}X\) and for every \(n\ge k\) the element \(f^n(x)\) is in the orbit of the periodic point \(f^k(x)\) and so is a periodic point with minimal period p.

Proof

Since X is finite, the orbit sequence must contain repeats. The first and the second occurrence of the first repeat in the orbit sequence are \(f^k(x)\) and \(f^{k+p}(x)\). These determine k and p. Since \(k+p\) elements of the orbit sequence are distinct, \(k+p\le {\text {card}}X\).

The second part of the proposition is an easy consequence of the fact \(f^{k+p}(x)=f^k(x)\)\(\square \)

Corollary 1

Let p be the least common multiple of the minimal periods of the periodic points of f, and let \(p'\) be the smallest multiple of p such that \(p'\ge {\text {card}}X\). Then

$$\begin{aligned} f^{p'+np} = f^{p'} \text { for all } n\in \mathbb {N}_0, \end{aligned}$$
(3)

and, in particular

$$\begin{aligned} f^{p'}\circ f^{p'} = f^{p'}. \end{aligned}$$

Moreover, the endomorphism \(f^{p'}\) on X restricts to define a retraction \(\hat{f}:X \rightarrow {\text {Per}}f\).

Proof

By definition, p is a period for every periodic point of f. Because \(p'\ge {\text {card}}X\), it follows from Proposition 5 that \(f^{p'}(x)\in {\text {Per}}f\) for all \(x\in X\). Hence,

$$\begin{aligned} f^{p'+np}(x) = f^{np}(f^{p'}(x)) = f^{p'}(x). \end{aligned}$$

Since \(p'\) is a multiple of p, we have, in particular, \(f^{p'}\circ f^{p'} = f^{p'}\) and it follows that if \(x\in {\text {Per}}f\), then \(f^{p'}(x) = x\). Thus, \(f^{p'}\) defines a retraction from X onto \({\text {Per}}f\). \(\square \)

Proposition 6

Assume (Xf) is an object of \({\text {End}}(\text {Set}_\textrm{f})\). Let \(\iota :{\text {Per}}f\rightarrow X\) denote the inclusion map and let \(p'\) and \(\hat{f}:X\rightarrow {\text {Per}}f\) be defined as in Corollary 1. Then,

$$\begin{aligned}{}[\iota ,0]:({\text {Per}}f,f_{\vert {\text {Per}}f})\rightarrow (X,f) \end{aligned}$$

and

$$\begin{aligned}{}[\hat{f},p']:(X,f)\rightarrow ({\text {Per}}f,f_{\vert {\text {Per}}f}) \end{aligned}$$

are mutually inverse isomorphisms in \(\text {Szym}(\text {Set}_\textrm{f})\).

Proof

The equality \(\hat{f}=f^{p'}={\text {id}}_X\circ f^{p'}\) implies that

$$\begin{aligned} {[}\iota ,0]\circ [\hat{f},p']= [\hat{f},p']=[{\text {id}}_X,0]. \end{aligned}$$

By Corollary 1, the map \(\hat{f}\) is a retraction. Thus, \(\hat{f}_{\vert {\text {Per}}f} = {\text {id}}_{{\text {Per}}f}\), which implies

$$\begin{aligned} {[}\hat{f}_{\vert {\text {Per}}f},p']=[{\text {id}}_{{\text {Per}}f},0]. \end{aligned}$$

This proves that \([\iota ,0]\) and \([\hat{f},p']\) are mutually inverse isomorphisms in \(\text {Szym}(\text {Set}_\textrm{f})\). \(\square \)

Proposition 4 lets us define a functor

$$\begin{aligned} \text {Per}:{\text {End}}(\text {Set}_\textrm{f})\rightarrow {\text {Aut}}(\text {Set}_\textrm{f}) \end{aligned}$$

as follows. For an object (Xf) in \({\text {End}}(\text {Set}_\textrm{f})\) we set \(\text {Per}(X,f):=({\text {Per}}f,f_{\vert {\text {Per}}f})\). Given a morphism \(\varphi :(X,f)\rightarrow (X',f')\) we define \(\text {Per}(\varphi )\) as the map \(\text {Per}(\varphi ):{\text {Per}}f \rightarrow {\text {Per}}f'\), \( x\mapsto \varphi (x)\). Note that this map is well defined, because \(x\in {\text {Per}}f\) implies that there exists \(k\in \mathbb {N}_1\) such that \(f'^{k}(\varphi (x))=\varphi (f^k(x))=\varphi (x)\). One easily verifies that \(\text {Per}\) is indeed a functor. Moreover, it is a normal functor, because \(\text {Per}(f)\), as a bijection, is an isomorphism in \({\text {Aut}}(\text {Set}_\textrm{f})\).

Let \(\text {Per}':\text {Szym}(\text {Set}_\textrm{f})\rightarrow {\text {Aut}}(\text {Set}_\textrm{f})\) be the functor associated to \(\text {Per}\) by Theorem  5. In particular, we have

$$\begin{aligned} \text {Per}'\circ \text {Szym}=\text {Per}. \end{aligned}$$
(4)

Theorem 6

The functor \(\text {Per}'\) is an equivalence.

Proof

We need to show that \(\text {Per}'\) is an injective and a surjective functor. To this end assume \([\varphi ,n]:\text {Szym}(X,f)\rightarrow \text {Szym}(X',f')\) and \([\psi ,m]:\text {Szym}(X,f)\rightarrow \text {Szym}(X',f')\) are morphisms in \(\text {Szym}(\text {Set}_\textrm{f})\) such that

$$\begin{aligned} \text {Per}'([\varphi ,n]) =\text {Per}'([\psi ,m]). \end{aligned}$$

Rewriting this formula using the functoriality of \(\text {Per}'\), (2), (4) and multiplying on the right by \(\text {Per}'(f)^{m+n}\) we obtain

$$\begin{aligned} \text {Per}'(\varphi \circ \bar{f}^n)= & {} \text {Per}'(\psi \circ \bar{f}^m),\nonumber \\ \text {Per}'(\varphi )\circ \text {Per}'(\bar{f})^n= & {} \text {Per}'(\psi )\circ \text {Per}'(\bar{f})^m,\nonumber \\ \text {Per}'(\varphi )\circ \text {Per}'(f)^m= & {} \text {Per}'(\psi )\circ \text {Per}'(f)^n,\nonumber \\ \text {Per}(\varphi )\circ \text {Per}(f)^m= & {} \text {Per}(\psi )\circ \text {Per}(f)^n,\nonumber \\ \text {Per}(\varphi \circ f^m)= & {} \text {Per}(\psi \circ f^n),\nonumber \\ (\varphi \circ f^m)_{\vert {\text {Per}}f}= & {} (\psi \circ f^n)_{\vert {\text {Per}}f}. \end{aligned}$$
(5)

By Proposition  5, we may find a \(k\in \mathbb {N}_1\) such that \(f^k(X)\subseteq {\text {Per}}f\). Then, we get from (5) that

$$\begin{aligned} \varphi \circ f^{m+k}=\psi \circ f^{n+k} \end{aligned}$$

which proves that \([\varphi ,n]=[\psi ,m]\). This proves injectivity. To prove surjectivity take a morphism \(\varphi :(X,f)\rightarrow (X',f')\) in \({\text {Aut}}(\text {Set}_\textrm{f})\). Then \(f,f'\) are bijections. We have

$$\begin{aligned} \text {Per}'([\varphi ,0])=\text {Per}'(\text {Szym}(\varphi ))=\text {Per}(\varphi )=\varphi _{\vert {\text {Per}}f}=\varphi , \end{aligned}$$

which proves that \(\text {Per}\) is a surjective functor. \(\square \)

Corollary 2

Every object (Xf) in \({\text {End}}(\text {Set}_\textrm{f})\) admits an object in \({\text {Aut}}(\text {Set}_\textrm{f})\) which is isomorphic to (Xf) in \(\text {Szym}(\text {Set}_\textrm{f})\). Moreover, any such object is conjugate to \(\text {Per}(X,f)\).

Proof

It follows from Proposition 4 that \(\text {Per}(X,f)=({\text {Per}}f,f_{\vert {\text {Per}}f})\) is an object in \({\text {Aut}}(\text {Set}_\textrm{f})\). By Proposition 6 this object is isomorphic in \(\text {Szym}(\text {Set}_\textrm{f})\) to (Xf). If another object in \({\text {Aut}}(\text {Set}_\textrm{f})\) is isomorphic to (Xf) in \(\text {Szym}(\text {Set}_\textrm{f})\) then it is also isomorphic to \(\text {Per}(X,f)\). Therefore, it is conjugate to \(\text {Per}(X,f)\) by Proposition 3. \(\square \)

The above considerations lead to the following conclusion on the shift equivalence classes of \({\text {End}}(\text {Set}_\textrm{f})\). Observe that any \((X,f)\in {\text {End}}(\text {Set}_\textrm{f})\) determines a non-decreasing, finite sequence \(p_1\le p_2\le \cdots \le p_k\) in \(\mathbb {N}_1\). Indeed, since \(\text {Per}(X,f)=(\bar{X},\bar{f})\in {\text {Aut}}(\text {Set}_\textrm{f})\), by Proposition 4, \(\bar{X}\) is a union of disjoint periodic orbits of \(\bar{f}\). Each \(p_i\) in the sequence is the period of one orbit of \(\bar{f}\). We call

$$\begin{aligned} p_1\le \cdots \le p_k \end{aligned}$$
(6)

a sequence of periods for (Xf).

Theorem 7

(Theorem 1) Two objects of \({\text {End}}(\text {Set}_\textrm{f})\) are in the same shift equivalence class if and only if their sequences of periods are the same.

Proof

Let \((X,f),(Y,g)\in {\text {End}}(\text {Set}_\textrm{f})\) be isomorphic in \(\text {Szym}(\text {Set}_\textrm{f})\). By Corollary 2, \((\bar{X},\bar{f}):=\text {Per}(X,f)\) and \((\bar{Y},\bar{g}):=\text {Per}(Y,g)\) are objects of \({\text {Aut}}(\text {Set}_\textrm{f})\) from the same shift equivalence class. By (4), \((\bar{X},\bar{f})\) and \((\bar{Y},\bar{g})\) are isomorphic in \({\text {Aut}}(\text {Set}_\textrm{f})\). Therefore, there exists a bijection \(h:\bar{X}\rightarrow \bar{Y}\) such that \(h\circ \bar{f} = \bar{g}\circ h\). Note that h maps an orbit of \(\bar{f}\) into an orbit of \(\bar{g}\) of the same period, because otherwise it violates \(h\circ \bar{f} = \bar{g}\circ h\). Thus, sequences of periods for (Xf) and (Yg) are the same.

Let \(p_1\le p_2\le \cdots \le p_k\) be the sequence of periods for (Xf) and (Yg). Consider \(Z:=\bigcup _{i=1}^k\{i\}\times \mathbb {Z}/p_i\mathbb {Z}\) and \(h:Z\rightarrow Z\), \((i,t)\mapsto (i,t+1)\). Clearly, \((Z,h)\in {\text {Aut}}(\text {Set}_\textrm{f})\). There are bijections \(h_1:\bar{X}\rightarrow Z\) and \(h_2:\bar{Y}\rightarrow Z\) which map orbits into the orbits of the same period such that \(h_1\circ \bar{f} = h\circ h_1\) and \(h_2\circ \bar{g} = h\circ h_2\). Since \(h_2\circ \bar{g}\circ h_2^{-1} = h\), we get

$$\begin{aligned} h_2^{-1}\circ h_1\circ \bar{f} = h_2^{-1}\circ h\circ h_1 = h_2^{-1}\circ h_2\circ \bar{g}\circ h_2^{-1}\circ h_1 = \bar{g}\circ h_2^{-1}\circ h_1. \end{aligned}$$

Thus, \(h_2^{-1}\circ h_1\) is an isomorphism in \({\text {End}}(\text {Set}_\textrm{f})\) and, in consequence, in \(\text {Szym}(\text {Set}_\textrm{f})\) between \((\bar{X},\bar{f})\) and \((\bar{Y},\bar{g})\). By Corollary 2, (Xf) and (Yg) are in the same shift equivalence class. \(\square \)

5 The Szymczak Functor and Shift Equivalence in \(\text {Rel}_\textrm{f}\)

We recall that a binary relation in \(X\times Y\), or briefly a relation, is a subset \(R\subseteq X\times Y\). If \(X'\subseteq X\) and \(Y'\subseteq Y\), we call the relation \(R_{\vert X'\times Y'}:=R\,\cap \, X'\times Y'\) the restriction of R to \(X'\times Y'\). For a relation \(R\subseteq X\times Y\) and \(x\in X\), \(A\subseteq X\) we define

$$\begin{aligned} R(x):= & {} \{y\in Y\ \vert \ (x,y)\in R\}\\ R(A):= & {} \bigcup \{R(x)\ \vert \ x\in A\} \\ R^{-1}:= & {} \{(y,x)\in Y\times X\ \vert \ (x,y)\in R\} \end{aligned}$$

The relation \(R^{-1}\) is called the inverse relation of R.

The domain of R is \({\text {dom}}R:= R^{-1}(Y)\) and the image of R is \({\text {im}}R:=R(X)\).

If \(X=Y\) we say that R is a relation in X. If \(A\subseteq X\), by the restriction of R to A we mean the restriction of R to \(A\times A\). We denote this restriction by \(R_{\vert A}:=R\,\cap \, A\times A\).

Given another relation \(S\subseteq Y\times Z\) we define the composition of S with R as the relation

$$\begin{aligned} S\circ R:=\{\,(x,z)\in X\times Z\mid (x,y)\in R \text { and } (y,z)\in S \text { for some } y\in Y\,\}. \end{aligned}$$

The category \(\text {Rel}_\textrm{f}\) is the category whose objects are finite sets and whose morphisms from set X to set \(X'\) consist of all relations in \(X\times X'\). The composition of morphisms \(R\subseteq X\times X'\) and \(R'\subseteq X'\times X''\) is defined as the composition of relations. Then \({\text {id}}_X\) is the identity morphism on X for each object X in \(\text {Rel}_\textrm{f}\) and one easily verifies that so defined \(\text {Rel}_\textrm{f}\) is indeed a category.

The following propositions follow immediately from the definition of composition of relations.

Proposition 7

If \(S\subseteq R\subseteq X\times X'\) and \(S'\subseteq R'\subseteq X'\times X''\), then \(S'\circ S\subseteq R'\circ R\).

Proposition 8

Let \(R\subseteq X\times Y\) and \(S\subseteq Y\times Z\) be relations. Then

$$\begin{aligned} {\text {dom}}S\circ R\subseteq {\text {dom}}R \text { and } {\text {im}}S\circ R\subseteq {\text {im}}S. \end{aligned}$$

The identity relation on X is \({\text {id}}_X=\{\,(x,x) \mid x\in X\,\}\). For \(n\in \mathbb {Z}\) the nth power of a relation R in X is given recursively by

$$\begin{aligned} R^n:={\left\{ \begin{array}{ll} {\text {id}}_X &{} \text { for } n=0,\\ R\circ R^{n-1} &{} \text { for } n>0,\\ R^{-1}\circ R^{n+1} &{} \text { for } n<0.\\ \end{array}\right. } \end{aligned}$$

We think of a relation as a generalization of a mapping. The relation \(R\subseteq X\times Y\) is a function from X to Y when for every \(x\in X\) the set R(x) is a singleton. Thus, we consider R as a partial multivalued map or a multivalued map if \({\text {dom}}R = X\).

We say that a relation \(R\subseteq X\times Y\) is injective if \(R(x_1)\cap R(x_2)\ne \emptyset \) implies \(x_1=x_2\) for any \(x_1,x_2\in {\text {dom}}R\). We say that a relation \(R\subseteq X\times Y\) is surjective if \({\text {im}}R=Y\). We say that \(g\subseteq X\times Y\) is a bijection or a bijective map if it is an injective and surjective map. Note that a relation which is both injective and surjective need not be a bijection or even a map. But, we have the following proposition.

Proposition 9

Let \(R\subseteq X\times Y\) be a relation and let \(S\subseteq Y\times Z\) be a multivalued map, that is \({\text {dom}}S=Y\). If \(S\circ R\subseteq X\times Z\) is a bijective map then S is a surjective multivalued map and R is an injective multivalued map.

Proof

Let \(g:=S\circ R\). Since g is a bijection, we have \({\text {im}}g = Z\) and \({\text {dom}}g= X\). It follows from Proposition 8 that \(Z={\text {im}}g={\text {im}}S\circ R\subseteq {\text {im}}S\). Hence, \({\text {im}}S=Z\) which means that S is a surjection. Similarly, \(X={\text {dom}}g={\text {dom}}S\circ R\subseteq {\text {dom}}R\). Hence, \({\text {dom}}R=X\) which means that R is a multivalued map. To see that R is injective assume that \(R(x_1)\cap R(x_2)\ne \emptyset \). Let \(y\in R(x_1)\cap R(x_2)\). Since \({\text {dom}}S=Y\), we can find a \(z\in Z\) such that \((y,z)\in S\). It follows that \((x_1,z)\in S\circ R\) and \((x_2,z)\in S\circ R\). Since \(g=S\circ R\) is a bijection we obtain \(x_1=x_2\). \(\square \)

Although the morphisms in \(\text {Rel}_\textrm{f}\) are arbitrary relations, the following proposition shows that isomorphisms have to be bijective maps.

Proposition 10

A relation \(R\subseteq X\times Y\) is an isomorphism in \(\text {Rel}_\textrm{f}\) if and only if it is a bijective map.

Proof

Clearly, if \(R\subseteq X\times Y\) is a bijective map, then so is \(R^{-1}\) and \(R^{-1}\circ R={\text {id}}_X\) as well as \(R\circ R^{-1}={\text {id}}_Y\). Therefore, R is an isomorphism in \(\text {Rel}_\textrm{f}\). To see the converse statement assume a relation R is an isomorphism. Then, there exists a relation \(S\subseteq Y\times X\) such that \(S\circ R={\text {id}}_X\) and \(R\circ S={\text {id}}_Y\). To see that R is a partial map assume that \(y\in R(x)\) and \(y'\in R(x)\). It follows from Proposition 9 that S is a surjective multivalued map. Therefore, we can find a \(\bar{y}\in Y\) such that \(x\in S(\bar{y})\). Hence, \(y\in (R\circ S)(\bar{y})={\text {id}}_Y(\bar{y})=\{\bar{y}\}\). Similarly we get \(y'\in \{\bar{y}\}\). In consequence, \(y=\bar{y}=y'\) proving that R is a partial map. It is a map, because \(X={\text {dom}}{\text {id}}_X={\text {dom}}S\circ R\subseteq {\text {dom}}R\) by Proposition 8. By Proposition 9 it is a surjective map and since X is finite, it is a bijective map. \(\square \)

Given a relation R in X, we set

$$\begin{aligned} {\text {gdom}}R:= & {} \bigcap _{n\in \mathbb {N}_1}{\text {dom}}R^n,\\ {\text {gim}}R:= & {} \bigcap _{n\in \mathbb {N}_1}{\text {im}}R^n,\\ {\text {Inv}}R:= & {} {\text {gdom}}R\,\cap \, {\text {gim}}R. \end{aligned}$$

The set \({\text {Inv}}R\) can be seen as a invariant part for R, that is the maximal subset \(N\subseteq X\) satisfying the following property: for every \(x\in N\) there exists a map \(\sigma :\mathbb {Z}\rightarrow N\) such that \(\sigma (n+1)\in R(\sigma (n))\) for every \(n\in \mathbb {Z}\) and \(\sigma (0) = x\) (cf. [1, 6]).

We say that a relation R is wide if \({\text {Inv}}R=X\). Notice that the restriction \(R\vert _{{\text {Inv}}R}\) is a wide relation on \({\text {Inv}}R\). We have the following proposition whose straightforward proof is left to the reader.

Proposition 11

A relation R in a finite set X is wide if and only if \({\text {dom}}R^n=X={\text {im}}R^n\) for all \(n\in \mathbb {N}_0\). \(\square \)

Proposition 12

For every relation R in a finite set X there exists a \(q\in \mathbb {N}_1\) such that for all \(p\ge q\) we have \({\text {gdom}}R={\text {dom}}R^p\) and \({\text {gim}}R={\text {im}}R^p\).

Proof

Since \({\text {dom}}R^n\) is a decreasing sequence of sets and X is finite, there exists a \(q\in \mathbb {N}\) such that \({\text {dom}}R^q = {\text {dom}}R^{q+1}\). It follows that \({\text {gdom}}R={\text {dom}}R^p\) for \(p\ge q\). The argument for \({\text {gim}}R\) is analogous. \(\square \)

The following proposition shows that each relation is equivalent in the Szymczak category to a wide relation.

Proposition 13

For a relation R in X we have

$$\begin{aligned} \text {Szym}(X,R) \cong \text {Szym}({\text {Inv}}R, R_{\vert {\text {Inv}}R}). \end{aligned}$$

Proof

By Proposition 12 we may fix an \(n\in \mathbb {N}\) such that \({\text {dom}}R^n={\text {gdom}}R\) and \({\text {im}}R^n={\text {gim}}R\). Let \(A:={\text {Inv}}R\) and let \(\bar{R}:=R_{\vert A}\). Set \(S:=(R^n)_{\vert X\times A}\) and \(T:=(R^n)_{\vert A\times X}\). We will prove that the following diagrams

commute. To see that \(\bar{R}\circ S\subseteq S\circ R\) take \((x,y)\in \bar{R}\circ S\). Then \(x\in X\), \(y\in A\) and there exists an \(a\in A\) such that \((x,a)\in R^n\) and \((a,y)\in \bar{R}\subseteq R\).

Choose an \(x'\in X\) such that \((x,x')\in R\), \((x',a)\in R^{n-1}\). It follows that \((x',y)\in S\) and \((x,y)\in S\circ R\). To prove the opposite inclusion take \((x,y)\in S\circ R\). Then, there exist \(x',x''\in X\) such that \((x,x')\in R\), \((x',x'')\in R^{n-1}\) and \((x'',y)\in R_{\vert X\times A}\). In particular, \((x,x'')\in R^n\). We will show that \(x''\in A\). Indeed, \(x''\in {\text {im}}R^n={\text {gim}}R\) and since \(y\in A\subseteq {\text {gdom}}R\) and \((x'',y)\in R\), it follows that \(x''\in {\text {gdom}}R\). Hence, \((x,x'')\in S\) and \((x'',y)\in \bar{R}\) which implies \((x,y)\in \bar{R}\circ S\). The proof of the commutativity of the other diagram is similar.

Next, we prove that

$$\begin{aligned} S\circ T= & {} R^{2n}\end{aligned}$$
(7)
$$\begin{aligned} T\circ S= & {} \bar{R}^{2n}. \end{aligned}$$
(8)

The inclusions \(S\circ T\subseteq R^{2n}\) and \(T\circ S\supset \bar{R}^{2n}\) follow immediately from Proposition  7. To see that \(S\circ T\supset R^{2n}\) take \((x,y)\in R^{2n}\). Then, there exists a \(z\in X\) such that \((x,z)\in R^n\) and \((z,y)\in R^n\). It follows that \(z\in {\text {im}}R^n={\text {gim}}R\) and \(z\in {\text {dom}}R^n={\text {gdom}}R\). Hence, \(z\in {\text {Inv}}R=A\) and we get \((x,z)\in T\), \((z,y)\in S\) and \((x,y)\in S\circ T\). In order to prove that \(T\circ S\subseteq \bar{R}^{2n}\) take \((x,y)\in T\circ S\). Then, \(x,y\in A\) and there exists a sequence \(x=x_0,x_1,\ldots x_n=y\) of points in X such that \((x_{i-1},x_i)\in R\) for \(i=1,2,\ldots 2n\). Since \(x,y\in A\), it is straightforward to observe that each \(x_i\in A\). Therefore, \((x_{i-1},x_i)\in \bar{R}\), which proves that \((x,y)\in \bar{R}^{2n}\).

Finally, we have

$$\begin{aligned} ~ [S,n]\circ [T,n]= & {} [S\circ T,2n]=[R^{2n},2n]=[{\text {id}}_X,0]\end{aligned}$$
(9)
$$\begin{aligned} ~ [T,n]\circ [S,n]= & {} [T\circ S,2n]=[\bar{R}^{2n},2n]=[{\text {id}}_A,0], \end{aligned}$$
(10)

which proves that \([S,n]:\text {Szym}(X,R)\rightarrow \text {Szym}(A,\bar{R})\) and \([T,n]:\text {Szym}(A,\bar{R})\rightarrow \text {Szym}(X,R)\) are mutually inverse isomorphisms. \(\square \)

We will consider relations between objects from \({\text {End}}(\text {Set}_\textrm{f})\) that are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\). In order to do that, recall that a partition of a set X is a family \({\mathcal {A}}\) of mutually disjoint, nonempty subsets of X such that \(X=\bigcup {\mathcal {A}}\). Given a partition \({\mathcal {A}}\) of X and an element \(x\in X\), we denote by \({\mathcal {A}}[x]\) the unique element of \({\mathcal {A}}\) to which x belongs.

We say that a relation R in X is a block bijection if there exist a partition \({\mathcal {A}}\) of X and a bijection \(\alpha :{\mathcal {A}}\rightarrow {\mathcal {A}}\) such that

$$\begin{aligned} R=\bigcup \{\,A\times \alpha (A)\mid A\in {\mathcal {A}}\,\}. \end{aligned}$$
(11)

Note that for any \(x\in X\) we have \(R(x)=\alpha ({\mathcal {A}}[x])\), which comes easily from the definition of a block bijection. Moreover, a bijection is always a block bijection.

Proposition 14

Assume a relation \(R\subseteq X\times X\) is a block bijection satisfying (11) for some partition \({\mathcal {A}}\) of X and bijection \(\alpha :{\mathcal {A}}\rightarrow {\mathcal {A}}\). Then, the partition \({\mathcal {A}}\) and bijection \(\alpha \) in (11) are uniquely determined by R.

Proof

Let \({\mathcal {A}}\) and \(\alpha \) be the partition and bijection such that (11) is satisfied. If (11) is satisfied with \({\mathcal {A}}\) replaced by another partition \({\mathcal {B}}\) and \(\alpha \) replaced by another bijection \(\beta \), then \(\alpha ({\mathcal {A}}[x])=R(x)=\beta ({\mathcal {B}}[x])\). Since \(\alpha :{\mathcal {A}}\rightarrow {\mathcal {A}}\) and \(\beta :{\mathcal {B}}\rightarrow {\mathcal {B}}\) are bijections, this means that each set in \({\mathcal {A}}\) equals a set in \({\mathcal {B}}\). This is possible only if \({\mathcal {A}}={\mathcal {B}}\). And so \(\alpha =\beta \) as well. \(\square \)

The following facts show the structure of isomorphisms and relations between isomorphic objects in different categories.

Theorem 8

Let (YR) be an object in \({\text {End}}(\text {Rel}_\textrm{f})\) and (Xf) an object in \({\text {Aut}}(\text {Rel}_\textrm{f})\). Assume that (YR) and (Xf) are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\), that is, there exist mutually inverse isomorphisms

$$\begin{aligned}{} & {} [S,m]:\text {Szym}(X,f)\rightarrow \text {Szym}(Y,R),\\{} & {} [T,n]:\text {Szym}(Y,R)\rightarrow \text {Szym}(X,f). \end{aligned}$$

If R is wide, then \(S\circ f^k\circ T\) is a block bijection for sufficiently large \(k\in \mathbb {N}_0\) with \(\{\,S(x)\mid x\in X\,\}\) as the associated partition of Y. Moreover, \(R^p\) is a block bijection for p sufficiently large.

Proof

Since [Sm] and [Tn] are mutually inverse isomorphisms, we can find a \(k_0\in \mathbb {N}_0\) such that \(T\circ S\circ f^k=f^{m+n+k}\) and \(S\circ T\circ R^k=R^{m+n+k}\) for all \(k\ge k_0\). We will prove that

$$\begin{aligned} {\text {dom}}T = Y = {\text {im}}S. \end{aligned}$$
(12)

Indeed, the inclusions \({\text {dom}}T \subseteq Y\) and \({\text {im}}S \subseteq Y\) are obvious. Since R is wide, by Proposition 11 we get \(Y={\text {dom}}R^{m+n+k}\). Hence, by Proposition 8, we get

$$\begin{aligned} Y ={\text {dom}}R^{m+n+k}= {\text {dom}}S\circ T\circ R^k={\text {dom}}R^k\circ S\circ T\subseteq {\text {dom}}T. \end{aligned}$$

Similarly,

$$\begin{aligned} Y={\text {gim}}R={\text {im}}R^{m+n+k}={\text {im}}S\circ T\circ R^k\subseteq {\text {im}}S. \end{aligned}$$

This proves (12).

By Proposition 10f is a bijective map. Hence, it is a wide relation and an analogous argument proves that

$$\begin{aligned} {\text {dom}}S = X = {\text {im}}T. \end{aligned}$$
(13)

Since f is a bijective map, we see that \(\check{f}:=f^{m+n}=T\circ S: X\rightarrow X\) is also a bijective map. We claim that

$$\begin{aligned} S(x)=T^{-1}(\check{f}(x)) \text { for any } x\in X. \end{aligned}$$
(14)

To see this take a \(y\in S(x)\). By (12) we may find an \(x'\in X\) such that \((y,x')\in T\). It follows that \((x,x')\in T\circ S\) which means \(x'=\check{f}(x)\). Thus, \(y\in T^{-1}(x')=T^{-1}(\check{f}(x))\), which proves that \(S(x)\subseteq T^{-1}(\check{f}(x))\). To prove the opposite inclusion take a \(y\in T^{-1}(\check{f}(x))\). Then \((y,x')\in T\), where \(x':=\check{f}(x)\). Since \(\check{f}= T\circ S\), there exists a \(y'\in Y\) such that \((x,y')\in S\) and \((y',x)\in T\). But, by (12) \(y\in {\text {im}}S\). Therefore, we can find an \(x''\in X\) such that \((x'',y)\in S\). Hence, \((x'',x')\in T\circ S\) which means \(x'=\check{f}(x'')\). It follows that \(\check{f}(x'')=\check{f}(x)\) and bijectivity of \(\check{f}\) implies \(x=x''\). This together with \(y\in S(x'')\) gives \(y\in S(x)\) and completes the proof of the opposite inclusion.

We will also prove that

$$\begin{aligned} S(x_1)\cap S(x_2)=\emptyset \text { for } x_1,x_2\in X, x_1\ne x_2. \end{aligned}$$
(15)

To see (15) assume to the contrary that there exists a \(y\in S(x_1)\cap S(x_2)\). By (12) we may find an \(x\in X\) such that \(x\in T(y)\). It follows that \(x\in T(S(x_1))\) and \(x\in T(S(x_2))\). Since \(T\circ S=\check{f}\) is a bijection, we get \(x=\check{f}(x_1)\) and \(x=\check{f}(x_2)\). It follows that \(x_1=\check{f}^{-1}(x)=x_2\), a contradiction proving (15).

Consider the family \({\mathcal {A}}:=\{\,S(x)\mid x\in X\,\}\). By (13) the elements of \({\mathcal {A}}\) are non-empty, by (15) they are disjoint and from (12) we get \(\bigcup {\mathcal {A}}=Y\). Hence, \({\mathcal {A}}\) is a partition of Y. Fix a \(k\ge k_0\) and define a bijection \(\alpha :{\mathcal {A}}\rightarrow {\mathcal {A}}\) by \(\alpha (S(x)):=S(f^k(\check{f}(x)))\). We will prove that

$$\begin{aligned} S\circ f^k\circ T=\bigcup _{x\in X}S(x)\times \alpha (S(x)). \end{aligned}$$
(16)

Consider first a pair \((y,y')\in S\circ f^k\circ T\). Then there exist \(\bar{x},x'\in X\) such that \((y,\bar{x})\in T\), \((\bar{x},x') \in f^k\) and \((x',y')\in S\). Let \(x:=\check{f}^{-1}(\bar{x})\). It follows that \(y\in T^{-1}(\bar{x})=T^{-1}(\check{f}(x))\) and, by (14), \(y\in S(x)\). We also have \(y'\in S(x')=S(f^k(\bar{x}))=S(f^k(\check{f}(x))=\alpha (S(x))\). Hence \((y,y')\in S(x)\times \alpha (S(x))\), which proves that the left hand side of (16) is contained in the right hand side. To prove the opposite inclusion take a pair \((y,y')\in S(x)\times \alpha (S(x))\) for some \(x\in X\). Then \(y\in S(x)=T^{-1}(\check{f}(x))\) which means that \((y,\check{f}(x))\in T\). We also have \(y'\in \alpha (S(x))=S(f^k(\check{f}(x)))\) or, equivalently, \((\check{f}(x),y')\in (S\circ f^k)\). Since \((y,\check{f}(x))\in T\), we obtain \((y,y')\in S\circ f^k\circ T\), which completes the proof of (16). Therefore, \(S\circ f^k\circ T\) is a block bijection. Moreover, since \(R^{m+n+k}=S\circ T\circ R^{k}=S\circ f^{k}\circ T\) holds for all sufficiently large k, equation (16) implies that \(R^p\) is a block bijection for p sufficiently large. \(\square \)

Corollary 3

Let (Xf) and (Yg) be objects in \({\text {End}}(\text {Set}_\textrm{f})\). Then (Xf) and (Yg) are also objects in \({\text {End}}(\text {Rel}_\textrm{f})\). If objects (Xf) and (Yg) are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\), then they are also isomorphic in \(\text {Szym}(\text {Set}_\textrm{f})\).

Proof

It follows from Corollary 2 that both (Xf) and (Yg) are isomorphic in \(\text {Szym}(\text {Set}_\textrm{f})\) to objects in \({\text {Aut}}(\text {Set}_\textrm{f})\). Therefore, without loss of generality we may assume that (Xf) and (Yg) are objects in \({\text {Aut}}(\text {Set}_\textrm{f})\). Let \([S,m]:\text {Szym}(X,f)\rightarrow \text {Szym}(Y,R)\) and \([T,n]:\text {Szym}(Y,R)\rightarrow \text {Szym}(X,f)\) be mutually inverse isomorphisms in \(\text {Szym}(\text {Rel}_\textrm{f})\). Note that every bijection is obviously a wide relation. Therefore, it follows from Theorem  8 that \(R:=S\circ f^k\circ T\) is a block bijection with \(\{\,S(x)\mid x\in X\,\}\) as the associated partition of Y. We also know that \(S\circ T\circ g^k=g^{m+n+k}\) for a \(k\in \mathbb {N}_1\). Hence, \(S\circ f^k\circ T=S\circ T\circ g^k=g^{m+n+k}\) is a bijection. It follows that also \(S\circ T\) is a bijection. Since R is a bijection, we get from Proposition 14 that the partition \(\{\,S(x)\mid x\in X\,\}\) consists of singletons. This means that S is a map. It is surjective, because \(\{\,S(x)\mid x\in X\,\}\) is a partition of Y. By Proposition  9 it is also injective. Hence, S is a bijection. Since \(S\circ T\) is a bijection, it follows that also \(T=S^{-1}\circ (S\circ T)\) is a bijection. This shows that (Xf) and (Yg) are conjugate. In particular, they are isomorphic in \(\text {Szym}(\text {Set}_\textrm{f})\). \(\square \)

The following observation is crucial for the rest of this work.

Proposition 15

Let (XR) be an object of \({\text {End}}(\text {Rel}_\textrm{f})\). Then there exists a \(p\in \mathbb {N}_1\) such that

$$\begin{aligned} R^{i+p}=R^i \text { for } i\ge p \end{aligned}$$
(17)

and, in particular,

$$\begin{aligned} R^{kp}=R^p \text { for } k\in \mathbb {N}_1. \end{aligned}$$
(18)

Moreover,

$$\begin{aligned} {\text {dom}}R^p = {\text {gdom}}R \quad \text { and } \quad {\text {im}}R^p = {\text {gim}}R. \end{aligned}$$

Proof

Since X is finite, the set of all relations in X is finite. In particular, the set of values of the sequence \(R, R^2, R^3,\ldots \) is finite. It follows that there exist \(m_1,m_2\in \mathbb {N}_1\) such that \(m_1<m_2\) and \(R^{m_1}=R^{m_2}\). Set \(q:=m_2-m_1\) and choose an \(m\in \mathbb {N}_1\) such that \(p:=mq\ge m_1\). Then \(R^{m_1+q}=R^{m_1}\). Multiplying both sides by \(R^{q}\) we obtain \(R^{m_1+2q}=R^{m_1+q}=R^{m_1}\). Thus, an induction argument proves that \(R^{m_1+kq}=R^{m_1}\) for \(k\in \mathbb {N}_1\). Fix \(i\ge p\). Then \(i\ge m_1\) and

$$\begin{aligned} R^{i+p}=R^{(i-m_1)+m_1+mq}=R^{(i-m_1)+m_1}=R^i, \end{aligned}$$

which proves (17), and (18) follows easily from (17) by induction.

The last part of the statement comes easily from Proposition 12. \(\square \)

For \(R\subseteq X\times X\) there is a subset of particular interest. By the recurrent set of R we mean a set

$$\begin{aligned} X_R:= \{x\in X\ \vert \ x\in R^m(x) \text { for some } m\in \mathbb {N}_1\}. \end{aligned}$$
(19)

We call its elements the recurrent vertices of R.

We have the following corollary from the previous proposition.

Corollary 4

Let \(R\subseteq X\times X\). Then \(x\in X_R\) if and only if \(x\in R^p(x)\) for any eventual period p.

Proof

Let \(x\in R^m(x)\). By induction, \(x\in R^{km}(x)\) for each \(k\in \mathbb {N}_1\). In particular, \(x\in R^{pm}(x)\). We have \(R^{pm} = R^p\), hence \(x\in R^p(x)\). \(\square \)

Definition 1

For an object \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\), any \(p\in \mathbb {N}_1\) satisfying

$$\begin{aligned} R^{i+p}=R^i \text { for } i\ge p \end{aligned}$$

is called an eventual period of R.

The key feature of an eventual period is (17). Therefore, we do not require that the eventual period be the smallest number with this property. Note that a similar concept, called the index, is introduced in [12].

Theorem 9

Let (XR) be an object of \({\text {End}}(\text {Rel}_\textrm{f})\) and let p be an eventual period of R. Then for each \(s\in \mathbb {N}_1\)

$$\begin{aligned} \text {Szym}(X,R^s)\cong \text {Szym}(X,R^{s+p}). \end{aligned}$$

Proof

Let \(S:=T:=R^p\). We claim that \([S,p]:\text {Szym}(X,R^s)\rightarrow \text {Szym}(X,R^{s+p})\) and \([T,p]:\text {Szym}(X,R^{s+p})\rightarrow \text {Szym}(X,R^s)\) are mutually inverse isomorphisms in \(\text {Szym}(\text {Rel}_\textrm{f})\). Since \(p+s\ge p\), we get from (17) that

$$\begin{aligned} R^{p+s}\circ T= R^{2p+s} = R^{p+s} = T\circ R^s,\\ R^{s}\circ S= R^{p+s} = R^{2p+s} = S\circ R^{p+s}. \end{aligned}$$

This shows that R and S are morphisms in \({\text {End}}(\text {Rel}_\textrm{f})\). Moreover, by (18)

$$\begin{aligned} T\circ S= R^{2p} = R^p= R^{2sp}=(R^s)^{2p},\\ S\circ T= R^{2p} = R^p= R^{2(s+p)p}=(R^{s+p})^{2p}, \end{aligned}$$

which proves that \([T,p]\circ [S,p]=[{\text {id}}_X,0]\) and \([S,p]\circ [T,p]=[{\text {id}}_X,0]\), that is [Tp] and [Sp] are mutually inverse isomorphisms. \(\square \)

6 Induced Relations in \(\text {Rel}_\textrm{f}\)

We will recall some basic notions of directed graph theory. By a directed graph (or just a digraph) we mean a pair \(G:=(V,E)\) consisting of the finite set of vertices V and the set of edges \(E\subseteq V\times V\). We allow a digraph to contain loops, that is edges in the form of (vv), where \(v\in V\). A walk in G is a sequence \(x=x_0x_1\ldots x_k\) with \(k>0\) such that \(x_i\in V\) for \(i=0,1,\ldots ,k\) and \((x_i,x_{i+1})\in E\) for \(i=0,1,\ldots ,k-1\). We then say that x is a walk from \(x_0\) to \(x_k\) or just an \((x_0,x_k)\)-walk. The length of walk x is the number of edges \((x_i,x_{i+1})\), that is, k. We denote it by \(\#x\). We say that a vertex \(x_i\) lies on a walk x if it is contained in the sequence that constitutes the walk x. If the vertices of the walk x are different, then we call x a path (or a path from \(x_0\) to \(x_k\)). A walk \(x=x_0\ldots x_k\) is a cycle if \(x_0 = x_k\). A concatenation of a walk \(x=x_0\ldots x_k\) with a walk \(y=y_0\ldots y_n\) is a walk \(xy:=x_0\ldots x_ky_1\ldots y_n\) provided \(x_k=y_0\).

A digraph \(G=(V,E)\) is strongly connected if for each \(u\ne v\) in V there exist both a (vu)-walk and a (uv)-walk. For any digraph \(G=(V,E)\) a set \(U\subseteq V\) is called a strongly connected component of G if the digraph \(G(U):=(U,\{(v,u)\in E\ \vert \ v,u\in U\})\) is strongly connected and there is no other W such that \(U\subseteq W\subseteq V\) and G(W) is strongly connected. In this paper we do not use any other connectivity of digraphs.

Each relation \(R\subseteq X\times X\) may be considered as the directed graph (XR). Similarly, any directed graph \(G=(V,E)\) may be considered as the binary relation \(E\subseteq V\times V\). This observation lets us use the notions of digraph and relation interchangeably throughout the paper, choosing the one that better fits the presented content and applying digraph terminology to relations and vice versa. For example, we use the following notion extensively.

Definition 2

A set \(A\subseteq X\) is a strongly connected component of relation \(R\subseteq X\times X\) if A is a strongly connected component of the digraph (XR).

Notice that the existence of a \((x_0,x_p)\)-walk of length p in the digraph (XR) is equivalent to the fact \(x_p\in R^{p}(x_0)\). In particular, if a \((x_0,x_p)\)-walk is a cycle, then the existence of a cycle is equivalent to \(x_i\in R^{p}(x_i)\) for each \(i=0,\ldots ,p\).

The following proposition is straightforward.

Proposition 16

Let \(R\subseteq X\times X\) be a strongly connected relation. Then R is wide. Moreover, if \(x\in R^k(x)\), then \(x\in R^{kl}(x)\) for each \(l\in \mathbb {N}_1\). \(\square \)

Consider the greatest common divisor of the length of all cycles in a strongly connected relation R. Following [14, Definition 4.5.2.], we call this number the period of R. Note that the meaning of a period of relation differs from that of a period of an element within an endomorphism domain, as discussed in Sect. 4. In order to compute the period of R one can consider the set of cycles with different vertices (cf. [25, Definition 7.1]). The following proposition relates the period of a strongly connected relation with its eventual period.

Proposition 17

Let \(p\in \mathbb {N}_1\) be an eventual period of a strongly connected relation \(R\subseteq X\times X\) and let \(q\in \mathbb {N}_1\) be the period of R. Then \(q\le p\). Moreover, \(q\vert p\).

Proof

Assume to the contrary that \(q>p\). Then there exists at least one \(x\in X\) such that \(x\notin R^p(x)\) because otherwise q would divide p. Since R is strongly connected, there exists an \(l\in \mathbb {N}_1\) such that \(x\in R^l(x)\) and \(q\vert l\). By Proposition 15 we get \(R^{lp}(x)=R^p(x)\not \ni x\). It follows from Proposition 16 that \(x\in R^{lp}(x)\), a contradiction.

In order to prove that \(q\vert p\) note that for any \(x\in X\) there exists an \(i\in \{0,\ldots ,p-1\}\) such that \(x\in R^{p+i}(x)\). Indeed, by Proposition 15 for any \(m\ge p\) we have \(R^m=R^{p+i}\) for some \(i\in \{0,1,\ldots ,p-1\}\). From the same proposition we conclude that for any \(k\in \mathbb {N}_1\) the equation \(R^{p+i}=R^{kp+i}\) holds. Therefore, \(x\in R^{kp+i}(x)\) and this means \(q\vert p+i\) and \(q\vert kp+i\). It follows that \(q\vert a(p+i)+b(kp+i)\) for any \(a,b\in \mathbb {Z}\) and \(k\in \mathbb {N}_1\). Setting \(a=-1\), \(b=1\) and \(k=2\) we get \(q\vert p\). \(\square \)

There are some relationships between eventual periods of an arbitrary relation and eventual periods of the relation restricted to its strongly connected components.

Proposition 18

Let \(U\subseteq X\) be a strongly connected component of an arbitrary \(R\subseteq X\times X\). Then

$$\begin{aligned} (R\vert _U)^n=(R^n)\vert _U \end{aligned}$$

for each \(n\in \mathbb {N}_0\).

Proof

The left-hand-side is clearly contained in the right-hand-side.

To prove the opposite inclusion consider a pair \((u,v)\in (R^n)\vert _U\). Then \((u,v)\in U\times U\) and there is a (uv)-walk in R of length n. Since u and v belong to the same strongly connected component of R, there is a (vu)-walk in \({R\vert _U}\). Concatenation of both walks gives a cycle in \({R\vert _U}\), because U is a strongly connected component of R. Therefore, vertices lying on the (uv)-walk belong to U. In consequence, \((u,v)\in (R\vert _U)^n\). \(\square \)

Corollary 5

Let \(U\subseteq X\) be a strongly connected component of \(R\subseteq X\times X\) and let p and \(p_U\) be eventual periods of R and \(R\vert _U\), respectively. Then \(p_U\vert p\).

Proof

We have \(R^{p+i} = R^i\) for \(i\ge p\). By Proposition 18

$$\begin{aligned} (R\vert _U)^{p+i} = (R^{p+i})\vert _U=(R^i)\vert _U=(R\vert _U)^i. \end{aligned}$$

Hence, p is a multiple of \(p_U\). \(\square \)

Proposition 19

Let \(q\in \mathbb {N}_1\) be the period of a strongly connected relation \(R\subseteq X\times X\) and let \(x,y\in X\). Then the following conditions are equivalent:

  1. (i)

    there exists an (xy)-walk in R with length divisible by q,

  2. (ii)

    each (xy)-walk in R has length divisible by q.

Proof

Let \(c=x\ldots y\) be an (xy)-walk in R such that \(q\vert \#c\). Consider a walk \(d=x\ldots y\) in R such that \(\#c\ne \#d\). Since R is strongly connected, there exists a (yx)-walk e in R. Then ce is a cycle passing through the vertex y. Since q is the period of R, q divides the length of the cycle. Also \(q\vert \#c\), hence \(q\vert \#e\). Since de is also a cycle in R passing through y, the period q divides its length. Therefore, \(q\vert \#d\), because \(q\vert \#e\).

To prove the opposite implication it suffices to note that the existence of an (xy)-walk follows from the strong connectivity of R. \(\square \)

Let \(R\subseteq X\times X\) be an arbitrary relation. We write \(x\rightarrow _R y\) to denote that there is a walk in R from x to y of positive length. We say that \(x,y\in X\) are strongly connected and write \(x\leftrightarrow _R y\) if \(x\rightarrow _R y\) and \(y\rightarrow _R x\). Note that the recurrent set of R given by (19) can be rewritten in terms of relation \(\leftrightarrow \). Indeed,

$$\begin{aligned} X_R=\{x\in X\ \vert \ x\leftrightarrow _R x\}. \end{aligned}$$

The relation \(\leftrightarrow _R\) is clearly symmetric and transitive. Hence, it is an equivalence relation in \(X_R\). It is easy to check that the equivalence classes of \(\leftrightarrow _R\) in \(X_R\) are exactly the strongly connected components of R. For a recurrent vertex \(x\in X_R\) we denote by \([x]_R\) the strongly connected component to which x belongs.

We refine the relation \(\leftrightarrow _R\) in \(X_R\) to a relation \(\sim _R\) in \(X_R\).

Definition 3

Let \(R\subseteq X\times X\). The relation \(\sim _R\) in \(X_R\) is defined as follows. For each \(x,y\in X_R\) there is \(x\sim _R y\) if \(x\leftrightarrow _R y\) and each walk from x to y has length equal to zero modulo the period of \(R\vert _{[x]_R}\).

Notice that if \(R\subseteq X\times X\) is a strongly connected relation, then \(X_R = X\) and \(\leftrightarrow _R\) has exactly one equivalence class.

Proposition 20

Let \(R\subseteq X\times X\) be an arbitrary relation. Then \(\sim _R\) given by Definition 3 is an equivalence relation in \(X_R\).

Proof

Consider \(A\subseteq X\), a strongly connected component of R. Then, \(R\vert _A\) is a strongly connected relation. Denote by \(A_R\) the recurrent set of \(R\vert _A\). By [9, Lemma 6, Corollary 1], \(\sim _R\) is an equivalence relation on \(A_R=A\). Moreover, \(\sim _R\) has exactly q distinct equivalence classes, where q is a period of \(R\vert _A\).

Since \(X_R\) is a union of disjoint strongly connected components of R, \(\sim _R\) is an equivalence relation on \(X_R\). \(\square \)

The example in Fig. 4 shows the partition of the set of vertices into the equivalence classes of the relation \(\sim _R\).

Fig. 4
figure 4

The eventual period p and the period q of the relation R on the left are both \(p=q=3\). The equivalence classes of the relation \(\sim _R\) are marked with colors. Both relations are in the same shift equivalence class (cf. Theorem 11)

Let \(\gcd (a,b)\) denote the greatest common divisor of \(a,b\in \mathbb {Z}\). In order to proceed we need the following classical result.

Lemma 1

Assume a and b are coprime in \(\mathbb {N}\). Then the set \(\{ax+by\ \vert \ x,y\in \mathbb {N}_0\}\) has finite complement in \(\mathbb {N}_0\). Moreover, if \(a,b\in \mathbb {N}\) with \(q=\gcd (a,b)\), then the set \(\{ax+by\ \vert \ x,y\in \mathbb {N}_0\}\) contains nq for all sufficiently large n.

Proof

If ab are coprime then \(\{0,a,\ldots ,(b-1)a\}\) represents all the congruence classes \(\mod b\), that is multiplication by a is an isomorphism \(\mod b\). Consider \(n>a(b-1)-b\). Then n is congruent to some ax with \(0\le x\le b-1\). Therefore, \(n=ax+by\) for some \(y\in \mathbb {Z}\). Since

$$\begin{aligned} a(b-1)+by\ge ax+by = n > a(b-1)-b, \end{aligned}$$

it follows that \(by>-b\) and so \(y>-1\).

In order to prove the second part assume \(q=\gcd (a,b)\). Then apply the above result to \(\frac{a}{q}\) and \(\frac{b}{q}\), which are coprime in \(\mathbb {N}\). \(\square \)

For \(A,B\subseteq \mathbb {N}_0\) we write \(A+B:=\{a+b\ \vert \ a\in A, b\in B\}\). In general, for any \(A\subseteq \mathbb {N}\) closed under addition (i.e. \(A+A\subseteq A\)) there is a finite subset \(F\subseteq A\) with \(\gcd A = \gcd F\) (see [24] for more details).

Assume R is a strongly connected relation on a finite set X. Define for \(x,y\in X\) the set

$$\begin{aligned} e(x,y):=\{m\in \mathbb {N}\ \vert \ y\in R^m(x)\}, \end{aligned}$$

that is, the set of lengths of paths from x to y. Clearly, \(e(x,y)+e(y,z)\subseteq e(x,z)\), from which we get

  1. (i)

    \(e(x,y)+e(y,x)\subseteq e(x,x),\)

  2. (ii)

    \(e(x,y)+e(y,y)+e(y,x)\subseteq e(x,x),\)

  3. (iii)

    \(e(x,x)+e(x,x)\subseteq e(x,x).\)

Properties (i) and (ii) imply that the \(\gcd e(x,x)\) divides every element of e(yy) and so the period q defined to be the \(\gcd e(x,x)\) is the same for all \(x\in X\). Then (iii) together with Lemma 1 imply that \(nq\in e(x,x)\) for all sufficiently large \(n\in \mathbb {N}\). Finally, from (i) we get that \(m+n\) is congruent to \(0\mod q\) for all \(m\in e(x,y)\) and \(n\in e(y,x)\) and so the elements of e(xy) are contained in a single congruence class.

Proposition 21

Let \(R\subseteq X\times X\) be a strongly connected relation with its period equal to q. For every eventual period p of R we have \({\text {id}}_X\subseteq R^{p+q}\).

Proof

By Proposition 17 we have \(q\vert p\). Hence, by Lemma 1, for large enough n we have \(np+q\in e(x,x)\). That is, \(x\in R^{np+q}(x)\). But \(R^{np+q} = R^{p+q}\) which implies \({\text {id}}_X\subseteq R^{p+q}\). \(\square \)

As a corollary to the above proposition we get a variant of Proposition 15 for strongly connected relations.

Corollary 6

Let R be a strongly connected relation with its period equal to q and an eventual period equal to p. Then

$$\begin{aligned} R^{p+kq} = R^{p} \text { for } k\in \mathbb {N}_0. \end{aligned}$$
(20)

Proof

We prove inductively on \(k\in \mathbb {N}_0\) that

$$\begin{aligned} R^{p+kq}\subseteq R^{p+(k+1)q}. \end{aligned}$$
(21)

By Proposition 21 we have \({\text {id}}_X\subseteq R^{p+q}\), hence \(R^p\subseteq R^{2p+q}\). By Proposition 15 we have \(R^{2p+q}=R^{p+q}\). This proves (21) for \(k=0\).

Proceeding by induction we get

$$\begin{aligned} R^{p+(k+1)q} = R^{p+kq}\circ R^{q} \subseteq R^{p+(k+1)q}\circ R^q = R^{p+(k+2)q}, \end{aligned}$$

which completes the proof of (21).

We will now prove (20). By Proposition 17, \(p=mq\) holds for some \(m\in \mathbb {N}_1\). Fix an \(s\in \mathbb {N}\) such that \(sm\ge k\). By (21), we have

$$\begin{aligned} R^p\subseteq R^{p+kq}\subseteq R^{p+smq} = R^{p+sp} = R^p. \end{aligned}$$

\(\square \)

We are now ready to present a theorem expressing the equivalence classes of \(\sim _R\) in \(X_R\) in terms of a power of the relation \(R\subseteq X\times X\).

Theorem 10

Let \(R\subseteq X\times X\) be an arbitrary relation and let p be an eventual period of R. Then for each \(x\in X_R\) we have

$$\begin{aligned} {[}x]_{\sim _R} = R^p(x)\cap [x]_R. \end{aligned}$$
(22)

In particular, if R is a strongly connected relation, then \([x]_{\sim _R}=R^p(x)\).

Proof

Let \(y\in [x]_{\sim _R}\). This means that there exists an (xy)-walk of length kq, where \(q\in \mathbb {N}_1\) is the period of \(R\vert _{[x]_R}\) and \(k\in \mathbb {N}_1\). In other words, \(y\in (R\vert _{[x]_R})^{kq}(x)\). Notice that \(x\in (R\vert _{[x]_R})^p(x)\). Indeed, we have

$$\begin{aligned} x\in {\text {id}}_{[x]_R}(x)\subseteq (R\vert _{[x]_R})^{p_{[x]_R}+q}(x)=(R\vert _{[x]_R})^{p_{[x]_R}}(x)\subseteq (R\vert _{[x]_R})^{p}(x), \end{aligned}$$

where \(p_{[x]_R}\) is an eventual period of \(R\vert _{[x]_R}\). By Proposition 21, Corollary 6 and Proposition 18 we get

$$\begin{aligned} y\in (R\vert _{[x]_R})^{p+kq}(x) = (R\vert _{[x]_R})^{p}(x) = (R^p)\vert _{[x]_R}(x)\subseteq R^p(x). \end{aligned}$$

It is clear that \(y\in [x]_R\).

In order to prove the opposite inclusion take a \(y\in R^p(x)\cap [x]_R\). There exists an (xy)-walk of length p in \(R\vert _{[x]_R}\). Since \(R\vert _{[x]_R}\) is strongly connected, there exists also a (yx)-walk of length l in \(R\vert _{[x]_R}\) for some \(l\in \mathbb {N}_1\). Concatenation of these walks is a cycle of length \(p+l\). Hence, the period q of \(R\vert _{[x]_R}\) divides \(p+l\). By Proposition 17, we have \(q\vert p_{[x]_R}\), where \(p_{[x]_R}\) is an eventual period of \(R\vert _{[x]_R}\). By Corollary 5, \(q\vert p\). Therefore, \(q\vert l\) and this proves \(y\sim _R x\), that is \(y\in [x]_{\sim _R}\). \(\square \)

Definition 4

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) and let \(p\in \mathbb {N}_1\) be an eventual period of R. The relation R induces a relation \(\bar{R}\) in \(X_R/_{\sim _R}\) given by

$$\begin{aligned} ([x]_{\sim _R}, [y]_{\sim _R})\in \bar{R} \ \text { if }\ (x,y)\in R^{p+1} \end{aligned}$$
(23)

for \(x,y\in X_R\).

The relation \(\bar{R}\) is well-defined. This is a consequence of the following implication:

$$\begin{aligned} x\sim _R x',\ (x,y)\in R^{p+1}, \ y\sim _R y' \implies (x',y')\in R^{p+1}. \end{aligned}$$

The implication holds. Indeed, there are an \((x',x)\)-walk and a \((y,y')\)-walk of length equal to zero modulo the period of the strongly connected component containing \(x,x'\) and \(y,y'\), respectively. By Corollaries 6 and 5 there are also an \((x',x)\)-walk and a \((y,y')\)-walk of length p. Concatenating these walks of length p with an (xy)-walk of length \(p+1\) in the right order we get the \((x',y')\)-walk of length \(3p+1\). By Proposition 15, there is an \((x',y')\)-walk of length \(p+1\) which proves the implication.

Lemma 2

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) and let p be an eventual period of R. Then for \(\bar{R}\) given by Definition 4

$$\begin{aligned} \bar{R}([x]_{\sim _R}) = \bar{R}(\{[y]_{\sim _R}\ \vert \ y\in R^p(x), \ y\in X_R\}) \end{aligned}$$

for all \(x\in X_R\). Moreover, p is an eventual period of \(\bar{R}\).

Proof

The left-hand-side is clearly contained in the right-hand-side.

To prove the opposite inclusion consider a \([z]_{\sim _R}\) which belongs to the right-hand-side. This means that there is a \(y\in R^p(x)\), \(y\in X_R\) such that \(([y]_{\sim _R},[z]_{\sim _R})\in \bar{R} \). Thus, \((y,z)\in R^{p+1}\) and \(z\in R^{p+1}(y)\subseteq R^{p+1}(R^p(x)) = R^{p+1}(x)\). It follows that \((x,z)\in R^{p+1}\) and \(([x]_{\sim _R}, [z]_{\sim _R})\in \bar{R}\).

Let \(i\ge p\). We have

$$\begin{aligned} \begin{array}{ccl} \bar{R}^i([x]_{\sim _R}) &{} = &{} \{[y]_{\sim _R}\ \vert \ (x,y)\in (R^{p+1})^i \} = \{[y]_{\sim _R}\ \vert \ (x,y)\in R^{pi+i+p^2+p} \} \\ &{} = &{}\{[y]_{\sim _R}\ \vert \ (x,y)\in (R^{p+1})^{i+p} \} = \bar{R}^{i+p}([x]_{\sim _R}), \\ \end{array} \end{aligned}$$

which proves that p is an eventual period of \(\bar{R}\). \(\square \)

Lemma 3

Let \(R\subseteq X\times X\) be an arbitrary relation and let p be an eventual period of R. For each \(x\in X\) and \(n\in \mathbb {N}_0\)

$$\begin{aligned} R^{p+n}(x) = R^p(R^{p+n}(x)\cap X_R). \end{aligned}$$
(24)

Proof

Note that if \(X_R=\emptyset \), then the relation \(R^p\) is empty. Therefore, in this case the theorem is trivial. Hence, assume that \(X_R\ne \emptyset \). We prove formula (24) inductively on \(n\in \mathbb {N}_0\).

Assume that \(n=0\). We need to prove that \(R^{p}(x) = R^p(R^{p}(x)\cap X_R)\) for each \(x\in X\). For the proof of the right-to-left inclusion, note that for each \(x\in X\) we have \(R^p(x)\cap X_R\subseteq R^p(x)\) and, in consequence, \(R^p(R^p(x)\cap X_R)\subseteq R^{p+p}(x)=R^p(x)\).

In order to prove the opposite inclusion take a \(y\in R^p(x)\). We claim that there is an (xy)-walk in R such that there exists a \(z\in X_R\) which belongs to the walk. Indeed, if this were not true, then we would get a contradiction to the equality (18) in Proposition 15, because from the finiteness of X there would be a number \(k\in \mathbb {N}_1\) such that \(R^i(x)=\emptyset \) for each \(i\ge k\), in particular \(y\in R^p(x)=R^{kp}(x)=\emptyset \).

Let us take a \(z\in U\) lying on the (xy)-walk in some strongly connected component U. Assume that \(z\in R^l(x)\) for some \(l\in \{0,\ldots ,p\}\). Clearly, \(y\in R^{p-l}(z)\). Note that there exists a \(z'\in U\subseteq X_R\) lying on a cycle starting at z of length p such that \(z'\in R^{p-l}(z)\). Note that it may happen that \(z=z'\). By Theorem 10, the set \(R^p(z')\) contains some equivalence class of \(\sim _R\) defined in \(X_R\). In particular, \(z'\in R^p(z')\). Therefore,

$$\begin{aligned} z'\in R^p(z')\subseteq R^{2p-l}(z)\subseteq R^{2p}(x) = R^p(x). \end{aligned}$$

In consequence, \(z'\in R^p(x)\cap X_R\). We will show that there is a \((z',z)\)-walk in R of length \(p+l\). Indeed, from the definition of \(z'\) we know that \(z\in R^l(z')\). Together with \(z'\in R^p(z')\), we get \(z\in R^{p+l}(z')\). We have \(y\in R^{p-l}(z)\subseteq R^{2p}(z') = R^p(z')\) which proves \(y\in R^p(z')\subseteq R^p(R^p(x)\cap X_R)\).

Hence, formula (24) for \(n=0\) is proved. Now assume that (24) holds. We prove that (24) also holds with n replaced by \(n+1\). Using the inductive assumption and the formula that the image of a union under a multivalued map is equal to the union of the images, we get

$$\begin{aligned} \begin{array}{rcl} R^p(R^{p+n+1}(x)\cap X_R) &{} = &{} R^p(R^{p+n}(R(x))\cap X_R) \\ &{} = &{} R^p((\bigcup _{t\in R(x)}R^{p+n}(t))\cap X_R) \\ &{} = &{} R^p(\bigcup _{t\in R(x)}R^{p+n}(t)\cap X_R) \\ &{} = &{} \bigcup _{t\in R(x)}R^p(R^{p+n}(t)\cap X_R) \\ &{} = &{} \bigcup _{t\in R(x)} R^{p+n}(t) \\ &{} = &{} R^{p+n+1}(x),\\ \end{array} \end{aligned}$$

which ends the proof. \(\square \)

Lemma 4

Let \(R\subseteq X\times X\) be an arbitrary relation and let p be an eventual period of R. Then

$$\begin{aligned} x\sim _R x' \implies R^p(x)=R^p(x'). \end{aligned}$$

Proof

Let \(x\sim _R x'\). By Theorem 10, we have \(x'\in R^p(x)\) and, in consequence, \(R^p(x')\subseteq R^p(x)\). The right-to-left inclusion follows by symmetry of \(\sim _R\). \(\square \)

Theorem 11

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\). Then

$$\begin{aligned} \text {Szym}(X,R)\cong \text {Szym}(X_R/_{\sim _R},\bar{R}), \end{aligned}$$

where \(\bar{R}\) is induced on equivalence classes of \(\sim _R\) given by Definition 4.

Proof

Let p be an eventual period of R and set \(Y:=X_R/_{\sim _R}\). Consider relations \(S\subseteq X\times Y\) and \(T\subseteq Y\times X\) defined by \(S(x):=\{[y]_{\sim _R}\ \vert \ y\in R^p(x), \ y\in X_R\}\) for \(x\in X\) and \(T([x]_{\sim _R}):=R^p(x)\) for \([x]_{\sim _R}\in Y\). By Lemma 4, T is well-defined. We claim that S and T are morphisms in \({\text {End}}(\text {Rel}_\textrm{f})\). Note that by Lemma 2, for \(x\in X\) we have

$$\begin{aligned} \begin{array}{ccl} (S\circ R)(x) &{}=&{} S(R(x)) = \{[y]_{\sim _R}\ \vert \ y\in R^{p+1}(x), \ y\in X_R\} \\ &{}=&{} \{[y]_{\sim _R}\ \vert \ ([x]_{\sim _R},[y]_{\sim _R})\in \bar{R} \} = \bar{R}([x]_{\sim _R}) \\ &{}=&{} \bar{R}(\{[y]_{\sim _R}\ \vert \ y\in R^p(x), \ y\in X_R\}) = (\bar{R}\circ S)(x), \\ \end{array} \end{aligned}$$

and, by Lemma 3, for \([x]_{\sim _R}\in Y\)

$$\begin{aligned} \begin{array}{ccl} (R\circ T)([x]_{\sim _R}) &{}=&{} R(R^p(x)) = R^{2p+1}(x) \\ &{}=&{} R^p(\{y\ \vert \ y\in R^{p+1}(x), y\in X_R\}) \\ &{}=&{} T(\{[y]_{\sim _R}\ \vert \ ([x]_{\sim _R}, [y]_{\sim _R})\in \bar{R}\}) = (T\circ \bar{R})([x]_{\sim _R}), \\ \end{array} \end{aligned}$$

which proves that S and T are morphisms in \({\text {End}}(\text {Rel}_\textrm{f})\).

Now we prove that

$$\begin{aligned} {[}S,p]:\text {Szym}(X,R)\rightarrow \text {Szym}(Y,\bar{R}) \end{aligned}$$

and

$$\begin{aligned} {[}T,p]:\text {Szym}(Y,\bar{R})\rightarrow \text {Szym}(X,R) \end{aligned}$$

are mutually inverse isomorphisms in \(\text {Szym}(\text {Rel}_\textrm{f})\). Again by Lemma 3, for \(x\in X\) we get

$$\begin{aligned} (T\circ S)(x) = T(\{[y]_{\sim _R}\ \vert \ y\in R^p(x)\cap X_R\}) = R^p(\{y\ \vert \ y\in R^p(x)\cap X_R\}) = R^p(x) \end{aligned}$$

and for \([x]_{\sim _R}\in Y\)

$$\begin{aligned} \begin{array}{ccl} (S\circ T)([x]_{\sim _R}) &{}=&{} S(R^p(x)) = \{[y]_{\sim _R}\ \vert \ y\in R^p(R^p(x)), y\in X_R\} \\ &{}=&{} \{[y]_{\sim _R}\ \vert \ y\in R^p(x)\cap X_R\} \\ &{}=&{} \{[y]_{\sim _R}\ \vert \ y\in (R^{p+1})^p(x)\cap X_R\} \\ &{}=&{} \{[y]_{\sim _R}\ \vert \ ([x]_{\sim _R}, [y]_{\sim _R})\in \bar{R}^p\} = \bar{R}^p([x]_{\sim _R}). \\ \end{array} \end{aligned}$$

Note that, in particular, the following holds:

$$\begin{aligned} {\text {id}}_X\circ R^{2p+p} = R^{p+p} = R^p\circ R^p. \end{aligned}$$

Hence, \([T,p]\circ [S,p] = [T\circ S,2p] = [R^p,2p] = [{\text {id}}_X,0]\). By Lemma 2, we get

$$\begin{aligned} {\text {id}}_{Y}\circ \bar{R}^{2p+p} = \bar{R}^p\circ \bar{R}^p. \end{aligned}$$

Therefore, \([S,p]\circ [T,p] = [S\circ T,2p] = [\bar{R}^p,2p] = [{\text {id}}_{Y},0]\), which ends the proof. \(\square \)

Note that for a strongly connected relation R, the relation \(\bar{R}\) from Theorem 11 is, in fact, a cyclic bijection (see the example in Fig. 4).

7 Objects in Canonical Form

Now we will consider a particular class of objects in \({\text {End}}(\text {Rel}_\textrm{f})\).

Definition 5

We say that \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) is in canonical form if the following conditions apply:

  1. (i)

    \(X=X_R\); in other words, each element of X belongs to a strongly connected component of R,

  2. (ii)

    R is a bijection on each strongly connected component,

  3. (iii)

    the equation \(R^{p+1}=R\) holds, where p is an eventual period of R.

Note that the condition (iii) is equivalent to the condition \(R^{n+p}=R^n\) for each \(n\in \mathbb {N}_1\). Moreover, (iii) implies that the bijection from (ii) is cyclic.

Theorem 12

(Theorem 2) For each \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) there exists an object \((\bar{X},\bar{R})\in {\text {End}}(\text {Rel}_\textrm{f})\) in canonical form such that

$$\begin{aligned} \text {Szym}(X,R)\cong \text {Szym}(\bar{X},\bar{R}). \end{aligned}$$

Proof

Let p be an eventual period of R. Consider \((\bar{X},\bar{R})\), where \(\bar{X}:=X_R/_{\sim _R}\) and \(\bar{R}\) is induced by R on equivalence classes of \(\sim _R\) as in (23). We claim that \((\bar{X},\bar{R})\) is in canonical form.

To prove that \(\bar{X} = \bar{X}_{\bar{R}}\) let \(\alpha \in \bar{X}\) and let \(x,x'\in \alpha \). By Corollaries  5, 6 and Proposition 17 there exists an \((x,x')\)-walk in R of length equal to \((p+1)p\). This means \(x'\in (R^{p+1})^p(x)\). Hence, \(([x']_{\sim _R}, [x]_{\sim _R})\in \bar{R}^p\) and \(\alpha \leftrightarrow _{\bar{R}}\alpha \), which proves that \(\alpha \in \bar{X}_{\bar{R}}\). The right-to-left inclusion comes from the definition of recurrent set of \(\bar{R}\).

Recall that by \([\gamma ]_{\bar{R}}\) for \(\gamma \in \bar{X}_{\bar{R}}\) we mean an equivalence class of \(\leftrightarrow _{\bar{R}}\), that is, the strongly connected component of \(\bar{R}\) to which \(\gamma \) belongs. Notice that \(\bar{R}\) restricted to a strongly connected component of \(\bar{R}\) is a map. Indeed, suppose that there are \(\alpha ,\beta \in \bar{X}\), \(\alpha \ne \beta \), such that \(\alpha \in \bar{R}\vert _{[\gamma ]_{\bar{R}}}(\gamma )\) and \(\beta \in \bar{R}\vert _{[\gamma ]_{\bar{R}}}(\gamma )\) for some \(\gamma \in \bar{X}\). This means that for any \(x\in \gamma , y\in \alpha , z\in \beta \) we have \((x,y)\in (R\vert _{\bigcup [\gamma ]_{\bar{R}}})^{p+1}\) and \((x,z)\in (R\vert _{\bigcup [\gamma ]_{\bar{R}}})^{p+1} \). Therefore, there is an (xy)-walk and an (xz)-walk of \(R\vert _{\bigcup [\gamma ]_{\bar{R}}}\), both of length equal to \(p+1\). Hence, yz belong to the same class of \(\sim _R\), \(\alpha =\beta \), a contradiction.

Using a similar argument as in the paragraph above one can prove that \(\bar{R}\) restricted to a strongly connected component is injective. In order to show that \(\bar{R}\) restricted to a strongly connected component is surjective let \(\alpha \in \bar{X}\) and take \(\beta \in [\alpha ]_{\bar{R}}\). Consider \(\gamma = (\bar{R}\vert _{[\alpha ]_{\bar{R}}})^{p-1}(\beta )\), where p is an eventual period of \(\bar{R}\) (see Lemma 2). We have \(\bar{R}\vert _{[\alpha ]_{\bar{R}}}(\gamma ) = (\bar{R}\vert _{[\alpha ]_{\bar{R}}})^p(\beta )\). By Proposition 21 and Corollary 6 we get \({\text {id}}_{[\alpha ]_{\bar{R}}}\subseteq (\bar{R}\vert _{[\alpha ]_{\bar{R}}})^p\). Therefore, \((\bar{R}\vert _{[\alpha ]_{\bar{R}}})^p(\beta ) = \beta \) and \(\bar{R}\vert _{[\alpha ]_{\bar{R}}}(\gamma ) = \beta \). Thus, \(\bar{R}\vert _{[\alpha ]_{\bar{R}}}\) is a bijection.

Careful inspection of the proof of Lemma 2 indicates that the variable i may be replaced by any positive integer, which verifies (iii) of Definition 5.

Isomorphisms between objects (XR) and \((\bar{X},\bar{R})\) in the Szymczak category are given by Theorem 11. \(\square \)

Proposition 22

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form. Put \(\bar{X}:= X_R/_{\sim _R}\). Then \((\bar{X},\bar{R})\) is also in canonical form, where \(\bar{R}\) is given as in (23). Moreover, (XR) and \((\bar{X},\bar{R})\) are conjugate objects of \({\text {End}}(\text {Rel}_\textrm{f})\).

Because of Proposition 22, an object (XR) in canonical form is also said to be canonical.

Proof

By Theorem 12, the object \((\bar{X},\bar{R})\) is in canonical form.

Consider the map \(f:X\rightarrow \bar{X}\) such that \(f(x):=[x]_{\sim _R}\). Since \(X=X_R\), the map f is well-defined. Notice that for each \(x\in X\) we have \({\text {card}}[x]_{\sim _R} = 1\). Indeed, suppose to the contrary that there are \(x,x'\in [x]_{\sim _R}\) such that \(x\ne x'\). Then there are an (xx)-walk and an \((x,x')\)-walk. This means that for some y lying on both walks \({\text {card}}R\vert _{[x]_R}(y)>1\), but \(R\vert _{[x]_R}\) is a bijection, a contradiction.

Using the above fact one can easily prove that f is a bijection. By Proposition 10, the map f is an isomorphism between X and \(\bar{X}\) in \(\text {Rel}_\textrm{f}\).

We will show that \(f\circ R = \bar{R}\circ f\). Let \(p\in \mathbb {N}_1\) be an eventual period of R and let \(x\in X\). We have

$$\begin{aligned} \begin{array}{rcl} \bar{R}(f(x)) &{}=&{} \bar{R}([x]_{\sim _R}) = \{[y]_{\sim _R}\ \vert \ (x,y)\in R^{p+1} \} = f(\{y\ \vert \ (x,y)\in R^{p+1} \}) \\ &{}=&{} f(\{y\ \vert \ y \in R^{p+1}(x)\}) = f(R^{p+1}(x)) = f(R(x)), \\ \end{array} \end{aligned}$$

which proves that (XR) and \((\bar{X},\bar{R})\) are conjugate in \({\text {End}}(\text {Rel}_\textrm{f})\). \(\square \)

Example 1

We will show that the relation \(R_1\) in Fig. 5 is isomorphic to the relation \(R_3\) in the Szymczak category. For the matrix representation A of a relation R we use the convention \(A_{ij} = 1\) if \((x_i,x_j)\in R\) and 0 otherwise. We have

$$\begin{aligned} R_1 = \left( \begin{array}{ccccc} 0 &{} 1 &{} 0 &{} 1 &{} 0 \\ 1 &{} 0 &{} 1 &{} 0 &{} 0 \\ 0 &{} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 0 &{} 1 &{} 0 \\ \end{array} \right) \qquad \text { and }\qquad R_3 = \left( \begin{array}{cccc} 0 &{} 1 &{} 1 &{} 0 \\ 1 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 1 &{} 0 \\ \end{array} \right) . \end{aligned}$$

An eventual period of \(R_1\) is \(p=4\). Relation \(R_1\) has two strongly connected components \([1]_{R_1}:=\{1,2,3\}\) and \([4]_{R_1}:=\{4,5\}\), where the vertex number is also the row-column number of the matrix representation of the relation \(R_1\). Moreover, we have \([1]_{\sim _{R_1}}=\{1,3\}\), \([2]_{\sim _{R_1}}=\{2\}\), \([4]_{\sim _{R_1}}=\{4\}\) and \([5]_{\sim _{R_1}}=\{5\}\). Using the formulas from the proof of Theorem 11 we get

$$\begin{aligned} T:= \left( \begin{array}{ccccc} 1 &{} 0 &{} 1 &{} 0 &{} 1 \\ 0 &{} 1 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 \\ \end{array} \right) \qquad \text { and }\qquad S:= \left( \begin{array}{cccc} 1 &{} 0 &{} 0 &{} 1 \\ 0 &{} 1 &{} 1 &{} 0 \\ 1 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 \\ \end{array} \right) . \end{aligned}$$

It is easy to check that \(R_1\circ T = T\circ R_3\), \(R_3\circ S = S\circ R_1\), \(S\circ T = R_3^p\), and \(T\circ S = R_1^p\). Therefore, [Sp] and [Tp] are mutually inverse isomorphisms and, in consequence, \((\{1,2,3,4,5\},R_1)\) and \((\{1,2,4,5\},R_3)\) are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\). \(\square \)

Fig. 5
figure 5

Relations \(R_1\), \(R_2\) and \(R_3\) (from left to right) from the same shift equivalence class of \(\text {Rel}_\textrm{f}\). Only relation \(R_3\) is in canonical form

Definition 6

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) be an object in canonical form. The relation R induces a partial order \(\le _R\) in \(X/_{\leftrightarrow _R}\) defined by

$$\begin{aligned} {[}x]_R\le _R [y]_R:\iff \text {there exists a } (y,x)\text {-walk in } R. \end{aligned}$$
(25)

Indeed, reflexivity and transitivity of \(\le _R\) are obvious. If \([x]_R\le _R [y]_R\) and \([y]_R\le _R [x]_R\), then there are a (yx)-walk and an (xy)-walk. Hence, x and y are strongly connected, \([x]_R=[y]_R\).

If \([x]_R\le _R [y]_R\), then we say that the component \([y]_R\) is higher than the component \([x]_R\).

Now we present a few technical lemmas which give us information on isomorphisms in \(\text {Szym}(\text {Rel}_\textrm{f})\).

Lemma 5

Let \((X,R), (Y,P)\in {\text {End}}(\text {Rel}_\textrm{f})\) be objects in canonical form isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) with \([S,k]:(X,R) \rightarrow (Y,P)\) and \([T,l]:(Y,P)\rightarrow (X,R)\) mutually inverse isomorphisms. For every \((x,x')\in T\circ S\) such that \([x]_R=[x']_R\), there exists a unique \(y\in Y\) such that \((x,y)\in S\) and \((y,x')\in T\).

Proof

The existence of \(y\in Y\) comes from the composition \(T\circ S\).

Suppose that \(y\in S(x)\), \(y'\in S(x)\) and \(x'\in T(y)\), \(x'\in T(y')\). Hence, \(S(x')\subseteq S(T(y))\) and \(S(x')\subseteq S(T(y'))\). There exists \(n\in \mathbb {N}_1\) such that \(x\in R^n(x')\) and \([x]_R=[x']_R\). Using \(y\in S(x)\), we get

$$\begin{aligned} y\in S(x)\subseteq S(R^n(x')) = P^n(S(x'))\subseteq P^n(S(T(y'))). \end{aligned}$$
(26)

Notice that since \([S\circ T,k+l]=[{\text {id}}_Y,0]\), for some \(m\in \mathbb {N}_0\) we have

$$\begin{aligned} P^m(z)\subseteq P^m(S(T(z'))) = P^{k+l+m}(z') \end{aligned}$$
(27)

and we can always find \(z''\in [z]_P\) such that \(z''\in P^m(z)\) for any m. Moreover, by taking m large enough, the sum \(k+l+m\) is a multiple of eventual periods of relations R and P. Thus, \(z''=z'\), because P is in canonical form. Applying it to (26) with a large enough exponent r we get \(y''\in P^{k+l+r}(y')\), where \([y'']_P=[y]_P\), which means \([y]_P\le _P [y']_P\). Similarly, using \(y'\in S(x)\) and \(S(x')\subseteq S(T(y))\) in (26), we get \(y'''\in P^{k+l+r}(y)\) for large enough r, where \([y''']_P=[y']_P\), which means \([y']_P\le _P [y]_P\). By antisymmetry of \(\le _P\), we have \([y]_P = [y']_P\). Since \(y'\in S(x')\subseteq S(T(y))\), by (27) we get \(y'\in P^{r+t}(y')\subseteq P^{k+l+r+t}(y)\). Thus, \(y'=y\). \(\square \)

Lemma 6

Let \((X,R), (Y,P)\in {\text {End}}(\text {Rel}_\textrm{f})\) be objects in canonical form isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\). If \([S,\alpha ]:(X,R) \rightarrow (Y,P)\) is an isomorphism and U is a component of R, then S(U) contains a uniquely determined component V of P with the same period as U such that no other component of P with non-empty intersection with S(U) is higher than V.

Proof

Let \([T,\beta ]:(Y,P)\rightarrow (X,R)\) be an isomorphism inverse to \([S,\alpha ]\), let \(x\in X\) and \(U:=[x]_R\). We claim that there exists exactly one component V intersecting S(x) such that no other component W intersecting S(x) is higher than V.

We have \(S(x)\ne \emptyset \), because for some \(t\in \mathbb {N}_0\) we get \(R^t(T(S(x)))=R^{t+\alpha +\beta }(x)\) and \(R^{t+\alpha +\beta }(x)\cap [x]_R\ne \emptyset \). Take \(x,x'\in [x]_R\) such that \((x,x')\in T\circ S\). By Lemma 5, there exists a unique \(y\in Y\) such that \((x,y)\in S\) and \((y,x')\in T\).

The component \([y]_{P}\) is uniquely determined. Indeed, for \((\bar{x},\bar{x}')\in T\circ S\), \(\bar{x}\ne x\) and \([\bar{x}]_{R}=[\bar{x}']_{R}=[x]_{R}\) we have \((x,\bar{x})\in R^k\) for some \(k\in \mathbb {N}_1\). By Lemma 5, there exists unique \(\bar{y}\in Y\) such that \((\bar{x},\bar{y})\in S\) and \((\bar{y},\bar{x}')\in T\). Since \(\bar{x}'\in [x']\), for some \(l\in \mathbb {N}_1\) we have \((\bar{x}',x')\in R^l\). Therefore, \((x,x')\in R^l\circ T\circ S\circ R^k = R^{l+k}\circ T \circ S = T\circ P^{l}\circ P^{k}\circ S\) and \((x,\bar{y})\in S\circ R^k\), \((\bar{y},x')\in R^l\circ T\). Since R and P are in canonical form, \((x,y)\in S\), \((y,\bar{y})\in P^{k}\) and \((\bar{y},y)\in P^{l}\), \((y,x')\in T\), which implies \([\bar{y}]_{P} \le _{P} [y]_{P}\) and \( [y]_{P} \le _{P} [\bar{y}]_{P}\). Thus, \([y]_{P} = [\bar{y}]_{P}\).

Suppose that there exists \(y_1\in Y\) such that \((x,y_1)\in S\) and \([y]_{P} \le _{P} [y_1]_{P}\). That is, \(y\in R^k(y_1)\) for some \(k\in \mathbb {N}_1\). We have \(x'\in T(y)\subseteq T(P^{k}(y_1))=R^k(T(y_1))\) and so there exists \(x_1\in T(y_1)\) such that \(x'\in R^k(x_1)\). Because \(y_1\in S(x)\), it follows that \(x_1\in T(S(x))\). By (27), \([x_1]_R = [x]_R\) and, moreover, we can take the exponent \(n\in \mathbb {N}_1\) large enough to be a multiple of eventual periods of R and P such that \(x_1'\in R^n(x_1)\subseteq R^n(T(S(x))) = R^{n+\alpha +\beta }(x)\), where \(x_1'\in [x_1]_{R}\). Thus, \(x_1'=x\) and \(x\in R^n(x_1)\). Therefore, \((x,x)\in R^n\circ T\circ S\) and \((x,x')\in T\circ S\) implies \((x',x)\in R^n\). Since R is in canonical form we get \(x' = x_1\). Hence, \(x'\in T(y_1)\). We have \((x,y_1)\in S\), \((y_1,x')\in T\) and \((x,y)\in S\), \((y,x')\in T\). By Lemma 5, \([y_1]_{P} = [y]_{P}\). Thus, we proved that there is only one component such that no other component of P intersecting S(x) is higher than this component. Let V be this component of P. Assume that the period of \(R\vert _{[x]_R}\) is equal to q.

Now, we prove the statement about the period of V. Take \(e\in V\cap S(x)\). We will prove that the component V has the same period as U (equal to q). Note that \(x\in R^q(x)\), and then \(e\in S(x)\subseteq S(R^q(x)) = P^q(S(x))\). Hence,

$$\begin{aligned} e\in S(x)\subseteq P^{q}(S(x))\subseteq P^{2q}(S(x))\subseteq \ldots . \end{aligned}$$

Therefore, the period of V is equal to either \(k:=rq\) for some \(r\in \mathbb {N}_1\) or some \(k\in \mathbb {N}_1\) such that \(k\vert q\).

As we proved above, U is the component of R with non-empty intersection with T(e) such that no other component of R with non-empty intersection with T(e) is higher than U. Take \(y\in T(e)\cap U\). Since we have the sequence of inclusions

$$\begin{aligned} y\in T(e)\subseteq R^{k}(T(e))\subseteq R^{2k}(T(e))\subseteq \ldots , \end{aligned}$$

the period of U is equal to either \(q = sk\) for some \(s\in \mathbb {N}_1\) or some \(q\in \mathbb {N}_1\) such that \(q\vert k\). Combining the cases for the period of V and U, we have to consider four cases.

In the first case \(q=srq\) it follows that \(sr=1\) and \(k=q\). In the second case \(q\vert k\) and \(k\vert q\), we also get immediately \(k = q\). Consider the next case \(q = sk\) and \(k\vert q\). Since \(e\in P^{k}(e)\), we get \(T(e)\subseteq R^{k}(T(e))\) and \(y\in T(e)\cap U\). Therefore, either \(y\in R^{k}(y)\) and then \(k=q\) or there is \(z\in T(e)\cap U\) such that \(y\ne z\) and \(y\in R^{k}(z)\). We have \(y,z\in T(e)\subseteq R^{k}(T(S(x)))\). Also \(T\circ S\circ R^l = R^{l+\alpha +\beta }\) for some \(l\in \mathbb {N}_0\). Hence, assuming without loss of generality that \(l-k>0\) we get \(R^{l-k}(y)\subseteq R^{l+\alpha +\beta }(x)\) and \(R^{l-k}(z)\subseteq R^{l+\alpha +\beta }(x)\).

We have \(x,y,z\in U\), \(y\ne z\) and \(R\vert _{U}\) is a bijection on U. There exist \(y',z'\in U\) such that \(y'\in R^{l-k}(y)\), \(z'\in R^{l-k}(z)\) and \(y'\ne z'\). Therefore, \(y'\in R^{l+\alpha +\beta }(x)\) and \(z'\in R^{l+\alpha +\beta }(x)\). That means \(y'=z'\). This contradicts the choice of \(y'\) and \(z'\), so the alternative in the third case cannot hold.

Analogously, it can be proved that in the fourth case \(k=q\). Hence, the period of component V is equal to q.

Now we will prove that \(V\subseteq S(U)\). Let \(e\in S(x)\cap V\), where \(x\in U\) and \(d\in P(e)\cap V\), \(y\in R(x)\cap U\). Suppose to the contrary that \(d\notin S(y)\), that is, there exist \(w\in R(x)\), \(w\in [w]_R\ne U\) such that \(d\in S(w)\). Obviously, U is higher than \([w]_R\). Since the period of V is equal to q, \(e\in P^{q-1}(d)\) holds and \(e\in P^{q-1}(d)\subseteq P^{q-1}(S(w))\). We have

$$\begin{aligned} T(e)\subseteq R^{q-1}(T(S(w))), \end{aligned}$$

and by repeating the reasoning of this proof we show that there exists \(z\in T(e)\cap U\) such that \(z\in R^{q-1}(T(S(w)))\). Hence, \([w]_R\) is higher than U. By the assumption U is higher than \([w]_R\). Therefore, \(U=[w]_R\), a contradiction. Repeating the reasoning for each element of V we get \(V\subseteq S(U)\). Since V is uniquely determined by elements of U and no other component with non-empty intersection with S(U) is higher than V, the proof is completed. \(\square \)

Lemma 7

An isomorphism in \(\text {Szym}(\text {Rel}_\textrm{f})\) between objects (XR), \((X',R')\in {\text {End}}(\text {Rel}_\textrm{f})\) in canonical form induces a bijection between \(X/_{\leftrightarrow _R}\) and \(X'/_{\leftrightarrow _{R'}}\). Moreover, the bijection maps \(\le _R\) to \(\le _{R'}\).

Proof

First we prove that an isomorphism preserves the partial order given by (25) between the corresponding components.

Let \([S,\alpha ]:(X,R) \rightarrow (X',R')\), \([T,\beta ]:(X',R')\rightarrow (X,R)\) be mutually inverse isomorphisms in \(\text {Szym}(\text {Rel}_\textrm{f})\). Let U and V be components of R with periods \(q_U\) and \(q_V\), respectively. Let \(W\subseteq S(U)\) and \(Q\subseteq S(V)\) be the uniquely determined components of \(R'\) with periods \(q_U\) and \(q_V\) such that no other components of \(R'\) with non-empty intersection with S(U) and S(V) are higher than W and Q, respectively (see Lemma 6). Assume that \(V\le _R U\). We will prove that \(Q\le _{R'}W\).

Take \(e\in W\). There is an \(x\in T(e)\) such that \(x\in U\). Since \(V\le _R U\), there exists \(y\in R^k(x)\) for some \(k\in \mathbb {N}_1\), where \(y\in V\). We have \(S(x)\subseteq S(T(e))\) and \(S(R^k(x))\subseteq S(T(R'^k(e)))\). Hence, for some \(l\in \mathbb {N}_0\) we get

$$\begin{aligned} R'^{l}(S(y))\subseteq R'^{l}(S(R^k(x)))\subseteq R'^{k+l+\alpha +\beta }(e). \end{aligned}$$

Since S(y) contains elements of Q and no other component of \(R'\) intersecting S(y) is higher than Q, we take an element \(d\in S(y)\cap Q\) and \(c \in R'^{l}(d)\cap Q\). Therefore, \(c\in R'^{k+l+\alpha +\beta }(e)\), that is W is higher than Q, that is, \(Q\le _{\bar{R}} W\).

Define a map \(f:X/_{\leftrightarrow _R}\rightarrow X'/_{\leftrightarrow _{R'}}\) such that \(f(U):=W\), where \(W\subseteq S(U)\) and no other component of \(R'\) intersecting S(U) is higher than W. Since such a W is determined uniquely (see Lemma 6), the map f is well-defined.

We will prove that f is injective. Let \(f(U)=W=f(V)\). Then \(W\subseteq S(U)\cap S(V)\) and \(T(W)\subseteq T(S(U))\), \(T(W)\subseteq T(S(V))\). There is an \(x\in T(W)\cap U\), where U is the component of R higher than any other component intersecting T(W). Similarly, \(y\in T(W)\cap V\), where no other component intersecting T(W) is higher than V. That means U is higher than V and V is higher than U, hence \(U=V\).

We prove that f is surjective. Assume to the contrary that there is \(W\in X'/{\leftrightarrow _{R'}}\) such that for each \(U\in X/_{\leftrightarrow _R}\) the inequality \(f(U)\ne W\) holds. We have \(V\subseteq T(W)\) for some \(V\in X/_{\leftrightarrow _R}\) and no other component of R intersecting T(W) is higher than V. Since \(S(V)\subseteq S(T(W))\), we get \(W\subseteq S(V)\) and no other component intersecting with S(V) is higher than W. Hence, \(f(V)=W\), a contradiction. Therefore, the map f is surjective.

In particular, \({\text {card}}X/_{\leftrightarrow _R} = {\text {card}}X'/_{\leftrightarrow _{R'}}\). By the above facts we get that for each \(U,V\in X/_{\leftrightarrow _R}\), if \(U\le _R V\), then \(f(U)\le _{R'} f(V)\). This proves that f maps \(\le _R\) to \(\le _{R'}\). \(\square \)

Corollary 7

Relations of isomorphic objects in \(\text {Szym}(\text {Rel}_\textrm{f})\) have the same number of components with the same periods.

Proof

Since for each object in \({\text {End}}(\text {Rel}_\textrm{f})\) we can find an object in canonical form (see Theorem 12) isomorphic to the given one in \(\text {Szym}(\text {Rel}_\textrm{f})\), the composition of isomorphisms in \(\text {Szym}(\text {Rel}_\textrm{f})\) is an isomorphism between canonical forms. The conclusion comes from Lemmas 7 and 6. \(\square \)

Corollary 8

Let \((X,R),(X',R')\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form and let \([S,\alpha ]:(X,R)\rightarrow (X',R')\) be an isomorphism in \(\text {Szym}(\text {Rel}_\textrm{f})\). Assume that \(f:X/_{\leftrightarrow _R}\rightarrow X'/_{\leftrightarrow _{R'}}\) is a bijection given by Lemma 7. Then for each \(x\in X\) the restriction of S to \([x]_R\times f([x]_R)\) is a bijection.

Proof

By Lemma 6, \(f([x]_R)\subseteq S([x]_R)\) and the components \([x]_R\) and \(f([x]_R)\) have the same periods. The relations R and \(R'\) restricted to these components respectively are bijections. Hence, \({\text {card}}[x]_R = {\text {card}}f([x]_R)\).

We will prove that \(S\vert _{[x]_R\times f([x]_R)}\) is a map. Let \([T,\beta ]:(X',R')\rightarrow (X,R)\) be an inverse isomorphism to \([S,\alpha ]\). Suppose that there exists \(x\in X\) such that \({\text {card}}S\vert _{[x]_R\times f([x]_R)}(x)>1\) and pick \(y\in S\vert _{[x]_R\times f([x]_R)}(x)\). Then for each \(x'\in [x]_R\) we have \({\text {card}}S\vert _{[x]_R\times f([x]_R)}(x')>1\). Let \(t\in T(y)\) such that \(t\in [x]_R\). Then \(S(t)\subseteq S(T(y))\) and \(y',z'\in S(t)\), \(y'\ne z'\) and \(y',z'\in [y]_{R'}\). There are \(y''\ne z''\) such that \(y'',z''\in [y]_{R'}\) and

$$\begin{aligned} y'',z''\in R'^{k}(S(t))\subseteq R'^k(S(T(y)))=R'^{k+\alpha +\beta }(y) \end{aligned}$$

for some \(k\in \mathbb {N}_0\). This yields \(y''=z''\), a contradiction.

Since \({\text {card}}[x]_R = {\text {card}}f([x]_R)\), the map \(S\vert _{[x]_R\times f([x]_R)}\) is a bijection. \(\square \)

Lemma 8

Let \((X,R),(X',R')\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form and let \([S,\alpha ]:(X,R)\rightarrow (X',R')\) be an isomorphism in \(\text {Szym}(\text {Rel}_\textrm{f})\). Assume that \(f:X/_{\leftrightarrow _R}\rightarrow X'/_{\leftrightarrow _{R'}}\) is a bijection given by Lemma 7. Then for each \(x\in X\)

$$\begin{aligned} R'\circ S\vert _{[x]_R\times f([x]_R)} = S\vert _{[x]_R\times f([x]_R)}\circ R. \end{aligned}$$

Proof

Let \(p\in \mathbb {N}_1\) be an eventual period of R. Let us take \(x'\in R'(S\vert _{[x]_R\times f([x]_R)}(x))\). By Corollary 8, there exist a \(y'=S\vert _{[x]_R\times f([x]_R)}(x)\) and \(x'\in R'(y')\). Consider \([x']_{R'}\). By Lemma 6, there exists a \(z\in X\) such that \([z]_R = f^{-1}([x']_{R'})\). Since \(S\vert _{[z]_R\times f([z]_R)}\) is a bijection, assume that \(x'=S\vert _{[z]_R\times f([z]_R)}(z)\).

We will show that \(z\in R(x)\). Notice that \(S\vert _{[z]_R\times f([z]_R)}(z)\in R'(S\vert _{[x]_R\times f([x]_R)}(x))\) and

$$\begin{aligned} T(S\vert _{[z]_R\times f([z]_R)}(z))\subseteq T(R'(S\vert _{[x]_R\times f([x]_R)}(x))) = R(T(S\vert _{[x]_R\times f([x]_R)}(x))). \end{aligned}$$

It follows that there is a \(t\in T(S\vert _{[z]_R\times f([z]_R)}(z))\) such that \(t\in [z]_R\) and \(t\in R(T(S\vert _{[x]_R\times f([x]_R)}(x)))\). In particular, \(t\in R(T(S(x)))\), therefore \(R^k(t)\subseteq R(R^{\alpha +\beta +k}(x))\) for some \(k\in \mathbb {N}_0\). Let us take \(\tilde{x}\in R^{\alpha +\beta +k}(x)\) such that \(\tilde{x}\in [x]_R\). Since \(R=R^{p+1}\), there exists a \(\tilde{t}\in [z]_R\) such that \(\tilde{t}\in R^k(t)\) and \(\tilde{t}\in R(\tilde{x})\).

Notice that \(\bar{x}\in T(S\vert _{[x]_R\times f([x]_R)}(x))\) such that \(\bar{x}\in [x]_R\) is uniquely determined by x, because the restrictions of S and T to the components are bijections. In consequence, \(\tilde{x}=\bar{x}\).

Furthermore, \(t\in T(S\vert _{[z]_R\times f([z]_R)}(z))\) such that \(t\in [z]_R\) is also uniquely determined by z. Take \(\bar{t}\in R^{\alpha +\beta +k}(z)\) such that \(\bar{t}\in [z]_R\). Then \(\bar{t}\in R^k(t)\) and \(\bar{t}=\tilde{t}\).

Since \(\tilde{t}\in R^k(t)\) and \(\tilde{t}\in R^{\alpha +\beta +k}(z)\), we get \(t\in R^{\alpha +\beta }(z)\). To sum up, we have \(\tilde{x}\in R^{\alpha +\beta +k}(x)\), \(\tilde{t}\in R(\tilde{x})\) and \(z\in R^{mp-\alpha -\beta -k}(\tilde{t})\) for \(mp>\alpha +\beta +k\) and \(m\in \mathbb {N}_1\). Combining these we get

$$\begin{aligned} z\in R^{mp-\alpha -\beta -k}(R(R^{\alpha +\beta +k}(x))), \end{aligned}$$

which means that \(z\in R^{mp+1}(x)\). Hence, \(z\in R(x)\).

Since \(x' = S\vert _{[z]_R\times f([z]_R)}(z)\) and \(z\in R(x)\), we have

$$\begin{aligned} R'\circ S\vert _{[x]_R\times f([x]_R)} \subseteq S\vert _{[x]_R\times f([x]_R)}\circ R. \end{aligned}$$

The proof of the opposite inclusion is analogous. \(\square \)

Lemma 9

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form. Then for any \(n\in \mathbb {N}_1\) and for each \(x\in X\)

$$\begin{aligned} R\circ R\vert _{[x]_R}^n = R\vert _{[x]_R}^n\circ R. \end{aligned}$$

Proof

Since (XR) is in canonical form, \(X_R=X\). Let \(y\in R(R\vert _{[x]_R}(x))\). There exists a \(z=R\vert _{[x]_R}(x)\) such that \(y\in R(z)\) and there exists a \(z'\in [y]_R\) such that \(y\in R(z')\) and \(y=R\vert _{[y]_R}(z')\). We have \(y\in R^2(x)\) and \(z'\in R^{p-1}(y)\), where p is an eventual period of R. Thus, \(z'\in R^{p-1}(y)\subseteq R^{p+1}(x) = R(x)\). Hence, \(z'\in R(x)\) and \(R\circ R\vert _{[x]_R} \subseteq R\vert _{[x]_R}\circ R\). The proof of the opposite inclusion is analogous.

Now assume that \(R\circ R\vert _{[x]_R}^n = R\vert _{[x]_R}^n\circ R\). We have

$$\begin{aligned} R\circ R\vert _{[x]_R}^{n+1} = R\circ R\vert _{[x]_R}^{n}\circ R\vert _{[x]_R} = R\vert _{[x]_R}^{n} \circ R\circ R\vert _{[x]_R} = R\vert _{[x]_R}^{n}\circ R\vert _{[x]_R}\circ R = R\vert _{[x]_R}^{n+1}\circ R. \end{aligned}$$

This completes the proof. \(\square \)

Theorem 13

(Theorem 3) Let \((X,R),(X',R')\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form. The objects (XR) and \((X',R')\) are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) if and only if (XR) and \((X',R')\) are isomorphic in \({\text {End}}(\text {Rel}_\textrm{f})\).

Proof

Let \([S,\alpha ]:(X,R)\rightarrow (X',R')\) and \([T,\beta ]:(X',R')\rightarrow (X,R)\) be mutually inverse isomorphisms in \(\text {Szym}(\text {Rel}_\textrm{f})\) and let \(t\in \mathbb {N}_1\) be such that \(T\circ S\circ R^t=R^{\alpha +\beta +t}\). Let us define morphisms \(U:(X,R)\rightarrow (X',R')\) and \(V:(X',R')\rightarrow (X,R)\) in \({\text {End}}(\text {Rel}_\textrm{f})\) by

$$\begin{aligned} \begin{array}{c} U(x):= S\vert _{[x]_R\times f([x]_R)} (R\vert _{[x]_R}^{mp-\alpha -t}(x)), \\ V(x'):= T\vert _{[x']_{R'}\times f^{-1}([x']_{R'})} (R'\vert _{[x']_{R'}}^{mp-\beta }(x')), \\ \end{array} \end{aligned}$$

where \(p\in \mathbb {N}_1\) is an eventual period of R, \(mp>\alpha +\beta +t\) for some \(m\in \mathbb {N}_1\), \(f^{-1}\) is the inverse of bijection from Lemma 7 and \(x\in X\), \(x'\in X'\). We claim that U and V are mutually inverse isomorphisms in \({\text {End}}(\text {Rel}_\textrm{f})\).

By Corollary 8, both U and V are bijections. Using Lemma 8 one can prove that \(V(U(x))=R\vert _{[x]_R}^p(x)\). By Theorem 10, we have \(R\vert _{[x]_R}^p(x)=[x]_{\sim _R}\) and \({\text {card}}[x]_{\sim _R} = 1\) because (XR) is in canonical form. Therefore, \(V(U(x))=R\vert _{[x]_R}^p(x)={\text {id}}_X(x)\). Similarly, one proves that \(U(V(x'))={\text {id}}_{X'}(x')\).

Equalities \(R'\circ U = U\circ R\) and \(V\circ R' = R\circ V\) easily come from Lemmas 8 and 9.

The proof of the other direction comes from the fact that \(\text {Szym}\) is a functor. \(\square \)

8 Classifying Graphs

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form. Define the map \(l_{[x]_R}:[x]_R\times [x]_R\rightarrow \mathbb {Z}/(q_{[x]_R}\mathbb {Z})\) on strongly connected components of R such that

$$\begin{aligned} l_{[x]_R}(x',x''):=m\mod q_{[x]_R}, \text { if } x''\in R\vert _{[x]_R}^m(x'), \end{aligned}$$

where \(q_{[x]_R}\) is the period of \(R\vert _{[x]_R}\). Since the restriction \(R\vert _{[x]_R}\) is a bijection and \((R\vert _{[x]_R})^k=(R\vert _{[x]_R})^{k+q_{[x]_R}}\) holds for \(k\in \mathbb {N}_1\), the maps \(l_{[x]_R}\) are well-defined for each component \([x]_R\) of R.

Let \([x]_R\) and \([y]_R\) be components of R and let \(q_{[x]_R}\) and \(q_{[y]_R}\) be the periods of \(R\vert _{[x]_R}\) and \(R\vert _{[y]_R}\), respectively. Define the relation \(\sim _{[x]_R[y]_R}\subseteq ([x]_R\times [y]_R)^2\) such that for \((x',y'),(x'',y'')\in [x]_R\times [y]_R\) we have

$$\begin{aligned} \begin{array}{rcl} &{}(x',y')\sim _{[x]_R[y]_R} (x'',y''):\iff &{} \\ &{} l_{[x]_R}(x',x'')=l_{[y]_R}(y',y'')\mod \gcd (q_{[x]_R},q_{[y]_R}).&{} \\ \end{array} \end{aligned}$$
(28)

Proposition 23

The relation \(\sim _{[\tilde{x}]_R[\tilde{y}]_R}\) on \([\tilde{x}]_R\times [\tilde{y}]_R\) is an equivalence relation for all components \([\tilde{x}]_R\ne [\tilde{y}]_R\) of R.

Proof

For the proof we denote \(\sim _{[\tilde{x}]_R[\tilde{y}]_R}\) by \(\simeq \). Reflexivity of \(\simeq \) is obvious. Let \((x,y)\simeq (x',y')\). Then \(l_{[\tilde{x}]_R}(x',x)=q_{[\tilde{x}]_R}-l_{[\tilde{x}]_R}(x,x')\) and \(l_{[\tilde{y}]_R}(y',y)=q_{[\tilde{y}]_R}-l_{[\tilde{y}]_R}(y,y')\). Since \(q_{[\tilde{x}]_R}=q_{[\tilde{y}]_R}=0\mod \gcd (q_{[\tilde{x}]_R},q_{[\tilde{y}]_R})\) and \(l_{[\tilde{x}]_R}(x,x')=l_{[\tilde{y}]_R}(y,y')\mod \gcd (q_{[\tilde{x}]_R},q_{[\tilde{y}]_R})\), we get \((x',y')\simeq (x,y)\). Hence, \(\simeq \) is symmetric.

In order to prove transitivity of \(\simeq \), let \((x,y)\simeq (x',y')\) and \((x',y')\simeq (x'',y'')\). Since \(l_{[\tilde{x}]_R}(x,x')= l_{[\tilde{y}]_R}(y,y')\mod \gcd (q_{[\tilde{x}]_R},q_{[\tilde{y}]_R})\) and \(l_{[\tilde{x}]_R}(x',x'')=l_{[\tilde{y}]_R}(y',y'')\mod \gcd (q_{[\tilde{x}]_R},q_{[\tilde{y}]_R})\), also

$$\begin{aligned} l_{[\tilde{x}]_R}(x,x')+l_{[\tilde{x}]_R} (x',x'')=l_{[\tilde{y}]_R}(y,y')+l_{[\tilde{y}]_R} (y',y'')\mod \gcd (q_{[\tilde{x}]_R},q_{[\tilde{y}]_R}). \end{aligned}$$

It follows that \(l_{[\tilde{x}]_R}(x,x'')=l_{[\tilde{y}]_R}(y,y'') \mod \gcd (q_{[\tilde{x}]_R},q_{[\tilde{y}]_R})\) and in consequence \((x,y)\simeq (x'',y'')\). \(\square \)

Note that \(\sim _{[x]_R[y]_R}\) gives a partition of \([x]_R\times [y]_R\) into \(\gcd (q_{[x]_R},q_{[y]_R})\) equivalence classes. Let \((X,R),(X',R')\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form and \([S,\alpha ]:(X,R)\rightarrow (X',R')\) be an isomorphism between the objects in \(\text {Szym}(\text {Rel}_\textrm{f})\). If \(f([x]_R)\subseteq S([x]_R)\) and \(f([y]_R)\subseteq S([y]_R)\) are components of \(R'\) from Lemma 6, where f is the bijection from Lemma 7, then \(\sim _{f([x]_R)f([y]_R)}\) on \(f([x]_R)\times f([y]_R)\) also defines the partition into \(\gcd (q_{[x]_R},q_{[y]_R})\) number of equivalence classes.

For (XR) in canonical form define the number of connections between components \([x]_R\) and \([y]_R\) of R as

$$\begin{aligned} \begin{array}{rcl} &{}l_{[x]_R[y]_R}(R):=&{} \\ &{}{\text {card}}\{ [(x',y')]_{\sim _{[x]_R[y]_R}}\in {[x]_R\times [y]_R/}_{\sim _{[x]_R[y]_R}}\ \vert \ (x',y')\in R\vert _{[x]_R\times [y]_R}\}. &{} \\ \end{array} \end{aligned}$$
(29)

This number determines how many equivalence classes of \(\sim _{[x]_R[y]_R}\) are realized by connections given by the relation between the \([x]_R\) and \([y]_R\) components of R. The following proposition holds.

Proposition 24

Let \((X,R),(X',R')\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form. If the objects are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) and f is the bijection between components of R and \(R'\) from Lemma 7, then \(l_{[x]_R[y]_R}(R) = l_{f([x]_R)f([y]_R)}(R')\).

Proof

Let \([S,\alpha ]:(X,R) \rightarrow (X',R')\) and \([T,\beta ]:(X',R')\rightarrow (X,R)\) be mutually inverse isomorphisms. Consider components \([x]_R\) and \([y]_R\) and let \(q_{[x]_R}\) and \(q_{[y]_R}\) be the periods of \(R\vert _{[x]_R}\) and \(R\vert _{[y]_R}\), respectively. Let \(\tilde{x}\in [x]_R\) and \(e\in S(\tilde{x})\cap f([x]_R)\). Take all \(e_1,\ldots ,e_{k'}\in f([x]_R)\) such that \([(e,e_l)]_{\sim _{f([x]_R)f([y]_R)}}\ne [(e,e_m)]_{\sim _{f([x]_R)f([y]_R)}}\) for all \(l\ne m\), \(l,m\in \{1,\ldots ,k'\}\). There exists a sequence \(s'_1,\ldots ,s'_{k'}\in \mathbb {N}_1\) such that \(e_l\in R'^{s'_l}(e)\) and \(s'_l\ne s'_m\mod \gcd (q_{[x]_R},q_{[y]_R})\) for each \(l\ne m\). In other words, \(l_{f([x]_R),f([y]_R)}(R') = k'\).

We have also \(T(e_l)\subseteq T(R'^{s'_l}(e))\). Take \(x_l\in T(e_l)\cap [y]_R\) for each \(l=1,\ldots ,k'\). Then there is \(t\in \mathbb {N}_0\) such that for each \(x_l\) we have \(x_l\in R^{t+\alpha +\beta +s'_l}(\tilde{x})\). Since \(s'_l\ne s'_m\mod \gcd (q_{[x]_R},q_{[y]_R})\) for \(l\ne m\), we get \(l_{[x]_R[y]_R}(R)\ge k'\).

Assume to the contrary that there exist \(x_1,x_2\in [y]_R\) such that the classes \([(\tilde{x},x_1)]_{\sim _{[x]_R[y]_R}} \ne [(\tilde{x},x_2)]_{\sim _{[x]_R[y]_R}}\) and for \(e'\in S(x_1)\) and \(e''\in S(x_2)\) we have \([(e,e')]_{\sim _{f([x]_R)f([y]_R)}} = [(e,e'')]_{\sim _{f([x]_R)f([y]_R)}}\). Then \(e'\in R'^{s'}(e)\), \(e''\in R'^{s''}(e)\) and \(s'=s''\mod \gcd (q_{[x]_R},q_{[y]_R})\). Note that \(e'\in R'^{s'}(S(\tilde{x}))\) and \(e''\in R'^{s''}(S(\tilde{x}))\), hence \(x_1\in T(e')\subseteq R^{t+\alpha +\beta +s'}(\tilde{x})\) and \(x_2\in T(e'')\subseteq R^{t+\alpha +\beta +s''}(\tilde{x})\) for some \(t\in \mathbb {N}_0\). But \(s'=s''\mod \gcd (q_{[x]_R},q_{[y]_R})\), so we get \([(\tilde{x},x_1)]_{\sim _{[x]_R[y]_R}} = [(\tilde{x},x_2)]_{\sim _{[x]_R[y]_R}}\), a contradiction. Therefore, \(l_{[x]_R[y]_R}(R) = k' = l_{f([x]_R),f([y]_R)}(R')\). \(\square \)

Definition 7

Let \((X,R)\in {\text {End}}(\text {Rel}_\textrm{f})\) and let \((\bar{X},\bar{R})\in {\text {End}}(\text {Rel}_\textrm{f})\) be in canonical form such that the two objects are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) (see Theorem 12). We define a classifying graph k(R), that is a directed graph \(k(R):= (V,E)\) such that \(V:=\bar{X}/_{\leftrightarrow _{\bar{R}}}\) and \(E:=\{([x]_{\bar{R}},[y]_{\bar{R}})\in V\times V\ \vert \ l_{[x]_{\bar{R}}[y]_{\bar{R}}}(\bar{R})\ne 0 \text { and } [x]_{\bar{R}}\ne [y]_{\bar{R}}\}\). Vertices and edges of a classifying graph are labelled by positive integers. For an \([x]_{\bar{R}}\in V\) we label it by \({\text {lab}}([x]_{\bar{R}}):= q_{[x]_{\bar{R}}}\), where \(q_{[x]_{\bar{R}}}\) is the period of \(\bar{R}\vert _{[x]_{\bar{R}}}\) and for an edge \(([x]_{\bar{R}},[y]_{\bar{R}})\in E\) we label it by \({\text {lab}}([x]_{\bar{R}},[y]_{\bar{R}}):=l_{[x]_{\bar{R}}[y]_{\bar{R}}}(\bar{R})\).

Classifying graphs are invariants of isomorphic objects in \(\text {Szym}(\text {Rel}_\textrm{f})\).

Theorem 14

Isomorphic objects in \(\text {Szym}(\text {Rel}_\textrm{f})\) have the same classifying graphs up to graph isomorphism preserving labels of vertices and edges.

Proof

By Theorem 11, each object in \({\text {End}}(\text {Rel}_\textrm{f})\) is isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) to some object in canonical form. Composing corresponding isomorphisms we get an isomorphism between canonical forms of the isomorphic objects. By Lemma 7, Corollary 7 and Proposition 24 we get the proof. \(\square \)

Example 2

Consider objects (XR) and \((X',R')\) in canonical form given by

$$\begin{aligned} R= \left( \begin{array}{cccc} 0 &{} 1 &{} 1 &{} 1 \\ 1 &{} 0 &{} 1 &{} 1 \\ 0 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 1 &{} 0 \\ \end{array} \right) \qquad \text { and }\qquad R'= \left( \begin{array}{cccc} 0 &{} 1 &{} 1 &{} 0 \\ 1 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 0 &{} 1 \\ 0 &{} 0 &{} 1 &{} 0 \\ \end{array} \right) . \end{aligned}$$

Both relations R and \(R'\) are pretty similar. They have two components with period both equal to 2. One component is higher than the other. Assume that the first component in both relations is the set \(\{1,2\}=:[1]_R=:[1]_{R'}\) and the second is the set \(\{3,4\}=:[3]_R=:[3]_{R'}\) (numbers correspond to row-column positions of ones in matrix representation of these relations). We have \(l_{[1]_R,[3]_R}(R)\ne 0\) and \(l_{[1]_{R'},[3]_{R'}}(R')\ne 0\). More precisely,

$$\begin{aligned} {\text {card}}([1]_R\times [3]_R/_{\sim _{[1]_R,[3]_R}}) = {\text {card}}([1]_{R'}\times [3]_{R'}/_{\sim _{[1]_{R'},[3]_{R'}}}) = \gcd (2,2) = 2. \end{aligned}$$

By (28), we easily compute that \(l_{[1]_R,[3]_R}(R) = 2\) whereas \(l_{[1]_{R'},[3]_{R'}}(R') = 1\). By Theorem 14, we conclude that (XR) and \((X',R')\) are not isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\) (cf. Fig. 6). \(\square \)

Fig. 6
figure 6

From left to right: relation R, classifying graph k(R) of R, relation \(R'\), and its classifying graph \(k(R')\). The numbers of the vertices marked on relations digraphs denote the position in the matrix representation of the relations. The numbers marked on the classifying graphs denote the labels of the vertices and the edges

Unfortunately, the classifying graph as an invariant of shift equivalence classes is not complete, in the sense that objects in \({\text {End}}(\text {Rel}_\textrm{f})\) having the same classifying graphs up to graph isomorphism preserving labels of vertices and edges are isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\). To see this, observe the example on Fig. 7. Both relations are in canonical form and have the same classifying graphs but are neither isomorphic in \({\text {End}}(\text {Rel}_\textrm{f})\) nor \(\text {Szym}(\text {Rel}_\textrm{f})\).

Fig. 7
figure 7

Two relations in canonical form with the same classifying graph (on the right) not isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\)

9 Final Remarks

The classification that we obtained allows us to distinguish non-isomorphic objects in \(\text {Szym}(\text {Rel}_\textrm{f})\) in an effective way. The main computational aspects involve strongly connected component detection, finding the period of a digraph component (the time complexity for both tasks is linear with respect to the sum of the number of vertices and edges of the digraph; see [9]) and composition of relations (Boolean matrix multiplication). But in order to put this result into direct application in dynamics we need to consider relations with some algebraic structure, namely so-called linear relations. Recall, for vector spaces XY over the field \(\mathbb {F}\) a relation \(R\subseteq X\times Y\) is called linear (or additive; see [15, Sect. II.6]) if

$$\begin{aligned} \begin{array}{c} (x_1,y_1)\in R, (x_2,y_2)\in R \implies (x_1+x_2,y_1+y_2)\in R, \\ (x_1,y_1)\in R \implies (ax_1,ay_1)\in R \text { for each } a\in \mathbb {F}. \\ \end{array} \end{aligned}$$

Thus a linear relation is just a vector subspace of \(X\times Y\). The sets with vector space structures are objects and linear relations are morphisms of the category of linear relations, denoted by \(\text {LRel}_\textrm{f}\). Composition of morphisms is defined as standard composition of relations.

We focus on linear relations since a multivalued generator of a dynamical system with non-acyclic values induces a linear relation (see Sect. 2). Such generators are common in sampled dynamics (see [1, 8]). Moreover, there are strong connections between \(\text {LRel}_\textrm{f}\) and \(\text {Rel}_\textrm{f}\). Therefore, we may use the \(\text {Szym}(\text {Rel}_\textrm{f})\) classification to understand \(\text {Szym}(\text {LRel}_\textrm{f})\).

Notice that in general \(\text {LRel}_\textrm{f}\) is not a subcategory of the category of sets and relations since a given set may have more than one vector space structure. But there is a forgetful functor to \(\text {Rel}_\textrm{f}\) which forgets the linear structure of the space. Therefore, it is easy to check that if two objects equipped with relations on finite vector spaces are isomorphic in \(\text {Szym}(\text {LRel}_\textrm{f})\), then both objects are also isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\). Thus, we may use the invariant from \(\text {Szym}(\text {Rel}_\textrm{f})\) as an invariant in \(\text {Szym}(\text {LRel}_\textrm{f})\).

Example 3

Consider the following example. Let \((\mathbb {Z}_3,R)\) and \((\mathbb {Z}_3,R')\) be objects of \({\text {End}}(\text {LRel}_\textrm{f})\), where relations are defined in \(\mathbb {Z}_3\) over \(\mathbb {Z}_3\) with the standard operations. The relations are given by

$$\begin{aligned} R:=\{(0,0),(0,1),(0,2)\} \ \text { and } \ R':=\{(0,0),(1,2),(2,1)\}. \end{aligned}$$

One can easily check that both relations are linear. Notice that relation R is multivalued. After applying a functor induced by the forgetful functor we get two objects non-isomorphic in \(\text {Szym}(\text {Rel}_\textrm{f})\), because their classifying graphs are different (they have different numbers of components). Hence, \((\mathbb {Z}_3,R)\) and \((\mathbb {Z}_3,R')\) are non-isomorphic in \(\text {Szym}(\text {LRel}_\textrm{f})\). \(\square \)

In such a way we may use the classification of \(\text {Szym}(\text {Rel}_\textrm{f})\) in understanding \(\text {Szym}(\text {LRel}_\textrm{f})\). On the other hand, the assumption of a linear structure of relations is strong enough that it may significantly improve the classification of \(\text {Szym}(\text {LRel}_\textrm{f})\). For example, there are reasons to suppose that for linear relations over fields of finite (nonzero) characteristic the gradient structure of a relation between its components is no longer present or is trivial. Moreover, the stronger conditions imply that there are fewer morphisms in \(\text {Szym}(\text {LRel}_\textrm{f})\), so it is possible that the identification of two objects is not as common as in \(\text {Szym}(\text {Rel}_\textrm{f})\). Addressing these observations is beyond the scope of this paper and is a part of further research. We suppose that Szymczak’s ideas may lead to the development of a Conley-index-type tool, enabling us to obtain dynamical information for systems reconstructed from data.