1 Introduction and Preliminaries

The regularity was first introduced in ring theory by von Neumann [21] (cf. [3]) in 1936. Later, Green [12] transmitted this concept in semigroup theory and became one of the most-studied topics.

An element a of a semigroup S is said to be regular if there exists an element \(b\in S\) such that \(a=aba\). A \({ regular}\) semigroup is a semigroup in which all elements are regular.

Some properties of semigroups can be deduced from their regularities. For example, Neumann [21] showed that any principle left (right) ideal of a regular semigroup has an idempotent generator and Hall [13] proved that a Green’s relation H is a congruence on a certain regular semigroup. For more information about regular semigroups, we refer to [3, 14, 16].

It is well known that any semigroup can be embedded in the semigroup T(X) of all transformations on a set X. So, T(X) and their subsemigroups play a significant role to study properties of semigroups. It is well known that T(X) is regular. However, a subsemigroup of T(X) does not need to be regular. A related question is: What is a regular subsemigroup of T(X)? The different types of regular subsemigroups were studied. In 2005, Huisheng [17] investigated the regularity for the subsemigroup

$$\begin{aligned} T_E(X)=\left\{ \alpha \in T(X)\mid \forall (x,y)\in E, (x\alpha ,y\alpha )\in E\right\} \end{aligned}$$

of T(X) where E is an equivalence relation on X. Sanwong and Sommanee [24] characterized the subsemigroups \(T(X,Y)=\{\alpha \in T(X)\mid x\alpha \subseteq Y\}\) of T(X) which are regular.

A map \(\alpha {:}\,X\rightarrow Y\) is order-preserving from an ordered set X to an ordered set Y if \(a\alpha \le b\alpha \) in Y whenever \(a\le b\) in X. We denote by \(\mathrm{OT}(X)\) the semigroup of all order-preserving transformations on an ordered set X. Such a semigroup is a subsemigroup of T(X). In [11], Gluskin showed that if \(\mathrm{OT}(X)\) is isomorphic to \(\mathrm{OT}(Y)\), then the ordered sets X and Y are isomorphic or anti-isomorphic. Repnitskǐ and Vernitskǐ [22, Lemma 1.1] proved that every free semigroup can be represented by the semigroup \(\mathrm{OT}(X)\) of a chain (or a totally ordered set). Later, Higgins et al. [15] considered the relative rank of T(X) modulo the semigroup \(\mathrm{OT}(X)\) of a finite chain X. These results show that the semigroups \(\mathrm{OT}(X)\) can be used to determine the structure of the initial one.

For a chain X, the regularity of \(\mathrm{OT}(X)\) was widely investigated. It was shown that \(\mathrm{OT}(X)\) is a regular subsemigroup of T(X) if X is finite (see [14, page 203, Exercise 6.1.9]). Kemprasit and Changphas [19] showed that if X is order-isomorphic to a subchain of \({\mathbb {Z}}\), then \(\mathrm{OT}(X)\) is regular. In [9], Fernandes et al. described the largest regular subsemigroup of \(\mathrm{OT}(X)\).

Our interest focuses on an important ordered set which is closed to chains and paths, respectively. A fenceX is an ordered set that the order forms a path with alternating orientation. Indeed, X is in which either

$$\begin{aligned} x_1\le x_2\ge x_3,\ldots ,x_{2m-1}\le x_{2m}\ge x_{2m+1},\ldots \end{aligned}$$

or

$$\begin{aligned} x_1\ge x_2 \le x_3,\ldots ,x_{2m-1}\ge x_{2m} \le x_{2m+1},\ldots \end{aligned}$$

are the only comparability relations where \(X=\{x_1,x_2,\ldots ,x_n,\ldots \}\). Every element in X is minimal or maximal.

Properties of order-preserving transformations of a fence have been long considered (see for example: [5, 8, 23]). Recently, in 2015, Jendana and Srithus [18] gave a characterization for a finite fence X having \(\mathrm{OT}(X)\) as a coregular semigroup and described coregular elements of \(\mathrm{OT}(X)\). Tanyawong et al. [26] in 2016 described all regular semigroups \(\mathrm{OT}(X)\) where X is a finite fence. In 2017, Dimitrova and Koppitz [6] considered the regularity and Green’s relations for the semigroup of all partial injection order-preserving transformations on a fence. Dimitrova et al. [7] determined the relative rank of the monoid \(\mathrm{PF}_{{\mathbb {N}}}\) of all partial transformations on the set \({\mathbb {N}}\) of natural numbers preserving a zig-zag order on \({\mathbb {N}}\) modulo a set containing all idempotents and all surjections in \(\mathrm{PF}_{{\mathbb {N}}}\). Particular maximal regular subsemigroups of the monoid \(\mathrm{OP}_{{\mathbb {N}}}\) of all order-preserving partial transformations on \({\mathbb {N}}\) were determined by Lohapan and Koppitz [20] and they showed that \(\mathrm{OP}_{{\mathbb {N}}}\) has infinitely many maximal regular subsemigroups. Later, in 2018, Fernandes et al. [10] studied the rank of the semigroup \(\mathrm{OT}(X)\) when X is a fence. For the present, in Sect. 3, we focus on regular subsemigroups of T(X) that are contained in \(\mathrm{OT}(X)\) when X is a finite fence.

Various types of regularity have been introduced by Croisot [4] (cf. [3]) in 1953 as Croisot’s theory. One of the central concepts in this theory is the left (right) regular. An element a of a semigroup S is said to be left regular (right regular) if there exists an element \(b\in S\) such that \(a=ba^2\) (\(a=a^2b\)). A left regular (right regular) semigroup is a semigroup in which all elements are left regular (right regular). Notice that the left (right) regularity is not a generalization of the regularity and in general, left regular, right regular and regular elements might not be related (see examples in [2, 25]).

Properties of semigroups can be deduced from their left (right) regularities. For example, if a is both left and right regular of a semigroup S, then a is in a subgroup of S and has an inverse which commutes with a [1]. Every left semigroup can decomposite into a union of left simple semigroups [3]. So, the left (right) regularity is a powerful tool in semigroup theory. Characterizations of left (regular) semigroups were given. Here, we show only some results for subsemigroups of T(X).

Sirasuntorn and Kemprasit [25] in 2010 characterized the left regular and right regular elements of the semigroup of all 1–1 transformations of a set and of all 1–1 transformations of a vector space. Later, in 2013, Choomanee et al. [2] described the left regular and right regular elements of the semigroup \(S(X,Y)=\{\alpha \in T(X)\mid Y\alpha \subseteq Y\}\).

Throughout this paper, the word “fence” will mean a finite fence. Our main purpose is to investigate the left (right) regularity of the semigroup \(\mathrm{OT}(X)\) where X is a fence. In Sect. 2, we give a necessary and sufficient condition for \(\mathrm{OT}(X)\) to be left (right) regular. Left (right) regular elements in \(\mathrm{OT}(X)\) are completely described. In Sect. 3, we define the set

$$\begin{aligned} \mathrm{OT}_S(X)=\{\alpha \in \mathrm{OT}(X) \mid {{\,\mathrm{ran}\,}}\alpha =S\} \end{aligned}$$

where \(S\subseteq X\) and \({{\,\mathrm{ran}\,}}\alpha \) is the range of \(\alpha \). In general, \(\mathrm{OT}_S(X)\) does not need to be a subsemigroup of T(X). We characterize a subset S of a fence X having \(\mathrm{OT}_S(X)\) as a subsemigroup of T(X). Finally, we show that if \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), then \(\mathrm{OT}_S(X)\) is a regular subsemigroup of T(X). Some regular subsemigroups of T(X) that are contained in \(\mathrm{OT}_S(X)\) are discussed.

2 The Left and Right Regularity for \(\mathrm{OT}(X)\)

In this section, we will be interested in the left and right regularity for \(\mathrm{OT}(X)\) where X is a fence. A general question is whether the semigroup \(\mathrm{OT}(X)\) is left (right) regular. For attacking this question, we start by giving basic knowledge involving order-preserving maps. An ordered set P is called connected if for all \(a,b\in P\) there is a fence \(F\subseteq P\) with endpoints a and b. It is well known that if P is connected and \(\alpha {:}\,P\rightarrow Q\) is order-preserving from P to an ordered set Q, then \(P\alpha \) is connected. Consequently, every order-preserving map \(\alpha \) maps order-connected sets to order-connected sets. Because order-connected subsets of a fence X are precisely the subfences, an order-preserving map \(\alpha {:}\,X\rightarrow X\) maps subfences to subfences.

Consider a fence X with \(|X|\ge 3\). The following lemma is obtained.

Lemma 1

Let X be a fence with \(|X|\ge 3\) and let abc be distinct elements in X with \(a<b>c\) or \(a>b<c\). Define the map \(\alpha {:}\,X \rightarrow X\) by

$$\begin{aligned} x\alpha = {\left\{ \begin{array}{ll} a,\quad x\,\text {is}\,\text {minimal}\,\text {and}\,x\not =a\\ b,\quad \text{ otherwise }. \end{array}\right. } or \, x\alpha = {\left\{ \begin{array}{ll} a,\quad x\,\text {is}\,\text {maximal}\,\text {and}\,x\not =a\\ b,\quad \text{ otherwise }. \end{array}\right. } \end{aligned}$$

Then, the following statements hold:

  1. (i)

    The map \(\alpha \) is an element of \(\mathrm{OT}(X)\).

  2. (ii)

    The map \(\alpha \) is regular in \(\mathrm{OT}(X)\).

  3. (iii)

    The map \(\alpha \) is not left regular in \(\mathrm{OT}(X)\).

  4. (iv)

    The map \(\alpha \) is not right regular in \(\mathrm{OT}(X)\).

Proof

Consider the map \(\alpha \) of the case \(a<b>c\). We show that \(\alpha \) satisfies the statements (i)–(iv).

  1. (i)

    Let \(x,y\in X\) with \(x\le y\). If x is minimal and \(x\not =a\), then \(x\alpha =a\). Since \(y\alpha \in \{a,b\}\) and \(a\le b\), we have \(x\alpha \le y\alpha \). If x is maximal or \(x=a\), then y is maximal or \(y=a\) implying \(x\alpha =b=y\alpha \). So, \(\alpha \) is order-preserving.

  2. (ii)

    Define the map \(\beta {:}\,X \rightarrow X\) by

    $$\begin{aligned} x\beta = {\left\{ \begin{array}{ll} c, &{} x~\text {is minimal}\\ b, &{} x~\text {is maximal}. \end{array}\right. } \end{aligned}$$

    Then, \(\beta \) is order-preserving. Let \(x\in X\). If x is minimal and \(x\not = a\), then \(x\alpha =a\) implies \(x\alpha \beta \alpha =a\beta \alpha =c\alpha =a=x\alpha \). Similarly, \(x\alpha \beta \alpha =x\alpha \) if x is maximal or \(x=a\). So, \(\alpha \) is regular in \(\mathrm{OT}(X)\).

  3. (iii)

    Suppose that \(\alpha \) is left regular in \(\mathrm{OT}(X)\). Then there is a \(\beta \in \mathrm{OT}(X)\) with \(\alpha =\beta \alpha ^2\). Hence, \(a=c\alpha =c\beta \alpha ^2=c\alpha ^2=a\alpha =b\) which is a contradiction.

  4. (iv)

    Suppose that \(\alpha \) is right regular in \(\mathrm{OT}(X)\). Then there is a \(\beta \in \mathrm{OT}(X)\) with \(\alpha =\alpha ^2\beta \). Hence, \(a=c\alpha =c\alpha ^2\beta =a\alpha \beta =b\beta =b\) which is a contradiction.

    Similarly, the statements (i)–(iv) hold for the map \(\alpha \) of the case \(a>b<c\). \(\square \)

Lemma 1 shows that there is a map in \(\mathrm{OT}(X)\) which is neither left nor right regular, but regular in \(\mathrm{OT}(X)\) if \(|X|\ge 3\). We have immediately the following proposition.

Proposition 1

Let X be a fence. If \(|X|\ge 3\), then \(\mathrm{OT}(X)\) is neither left regular nor right regular.

Observe that for an ordered set P, the identity map \(id_P\) and a constant \(C_a\) which maps all elements in P to \(a\in P\) are order-preserving. Since \(id_P^3=id_P\) and \(C_a^3=C_a\), the both maps are left regular, right regular and regular in \(\mathrm{OT}(P)\). It follows that every semigroup \(\mathrm{OT}(P)\) has always a left regular and right regular element, even though \(\mathrm{OT}(P)\) is not left or right regular. It is natural to ask when an element \(\alpha \) in \(\mathrm{OT}(X)\) is left and right regular, respectively. The answer is shown in the following theorem. To do so, we need some basic concepts. A map \(\alpha {:}\,P\rightarrow Q\) is said to be order-embedding from an ordered set P to an ordered set Q if it satisfies the condition: for every \(x,y\in P\),

$$\begin{aligned} x\le y~\text {in}~P~\text {if and only if}~ x\alpha \le y\alpha ~\text {in}~Q. \end{aligned}$$

If \(\alpha \) is onto, then \(\alpha \) is called an order-isomorphism.

In general, left regular, right regular and regular elements in a semigroup might not be related. Theorem 1 says that for a fence X, left regular and right regular elements in \(\mathrm{OT}(X)\) are identical. Every left (right) regular element is regular in \(\mathrm{OT}(X)\). Moreover, a characterization of all left (right) regular elements in \(\mathrm{OT}(X)\) is given.

Theorem 1

Let X be a fence and \(\alpha \in \mathrm{OT}(X)\) with \(Y={{\,\mathrm{ran}\,}}\alpha \). Then, the following statements are equivalent : 

  1. (i)

    \(\alpha \) is left regular in \(\mathrm{OT}(X)\).

  2. (ii)

    \(\alpha |_Y{:}\,Y\rightarrow Y\) is bijective.

  3. (iii)

    \(\alpha \) is right regular in \(\mathrm{OT}(X)\).

Moreover, if \(\alpha \) is left regular (or right regular) in \(\mathrm{OT}(X)\), then there is a map \(\beta \) in \(\mathrm{OT}(X)\) with \({{\,\mathrm{ran}\,}}\beta =Y={{\,\mathrm{ran}\,}}\alpha \) and \(\alpha \beta \alpha =\alpha \) and therefore, \(\alpha \) is regular in \(\mathrm{OT}(X)\).

Proof

To begin with, let \(\gamma :=\alpha |_Y\) and for each \(y\in Y\), let \({\bar{y}}=\{x\in X{\setminus } Y\mid x\alpha =y\alpha \}\). We use the symbol \(x\parallel y\) to mean that x and y are not comparable.

(i) \(\Rightarrow \) (ii) Assume that \(\alpha \) is left regular in \(\mathrm{OT}(X)\). Suppose that \(\gamma {:}\,Y\rightarrow Y\) is not bijective. Since Y is finite, \(\gamma \) is neither injective nor surjective. It follows that there are elements \(a\in Y={{\,\mathrm{ran}\,}}\alpha \) and \(z\in X{\setminus } Y\) with \(z\alpha =a\) and \(x\alpha \not =a\) for all \(x\in Y\). By the left regularity of \(\alpha \), there is a map \(\beta \in \mathrm{OT}(X)\) with \(\alpha =\beta \alpha ^2\) implying \(a=z\alpha =z\beta \alpha ^2=((z\beta )\alpha )\alpha \). Since \((z\beta )\alpha \in Y\), there is an element \(y\in Y\) with \(y\alpha =a\), a contradiction.

(ii) \(\Rightarrow \) (i) Assume that \(\gamma {:}\,Y\rightarrow Y\) is bijective. First, we show that \(\gamma \) is order-embedding on Y. Let \(x,y\in Y\) with \(x\gamma \le y\gamma \). By the order-preserving property of \(\alpha \), \(x\le y\) or \(x\parallel y\) since otherwise \(x\gamma =x\alpha > y\alpha =y\gamma \). If \(x\parallel y\), then there is a subfence F of Y having x and y as the endpoints. Since \(x\parallel y\), the number of elements in F is greater than 2. By the injectivity of \(\gamma \), \(|F\alpha |\ge 3\) and \(x\gamma \parallel y\gamma \) which is a contradiction. So, \(x\le y\) and therefore, \(\gamma \) is order-embedding. Because \(\gamma \) is surjective, \(\gamma \) is an order-isomorphism. It follows that \(\gamma ^{-1}\) is an order-isomorphism. Define a map \(\beta {:}\,X\rightarrow X\) by

$$\begin{aligned} x\beta = {\left\{ \begin{array}{ll} x\gamma ^{-1}, &{} x\in Y\\ y\gamma ^{-1}, &{} x\in {\bar{y}}. \end{array}\right. } \end{aligned}$$

Clearly, \({{\,\mathrm{ran}\,}}\beta =Y\). To show that \(\beta \) is order-preserving, we let \(a,b\in X\) with \(a\le b\). Then, there are \(y,z\in Y\) with \(a\alpha =y\alpha =y\gamma \) and \(b\alpha =z\alpha =z\gamma \). By the definition of \(\beta \), we get \(a\beta =y\gamma ^{-1}\) and \(b\beta =z\gamma ^{-1}\). Since \(\alpha \) is order-preserving, \(y\gamma =a\alpha \le b\alpha =z\gamma \). It follows that \(y=z\). So, \(a\beta =y\gamma ^{-1}\le z\gamma ^{-1}=b\beta \).

Next, we show that \(\beta \alpha ^2=\alpha \). Let \(x\in X\). Then, there exists \(y\in Y\) with \(x\alpha =y\alpha \) and hence, \(x\beta =y\beta \). By the definition of \(\beta \), we have \(x\beta \alpha ^2=y\beta \alpha ^2=y\gamma ^{-1}\gamma \alpha =y\alpha =x\alpha \). Therefore, \(\alpha \) is left regular in \(\mathrm{OT}(X)\).

(ii) \(\Rightarrow \) (iii) Assume that \(\gamma {:}\,Y\rightarrow Y\) is bijective. We show that the map \(\beta \) as defined above satisfies the condition \(\alpha ^2\beta =\alpha \). Let \(x\in X\). Then, \(x\alpha \in Y\) and by the definition of \(\beta \), we have \(x\alpha ^2\beta =x\alpha \gamma \gamma ^{-1}=x\alpha \). So, \(\alpha \) is right regular in \(\mathrm{OT}(X)\).

(iii) \(\Rightarrow \) (ii) Assume that \(\alpha \) is right regular in \(\mathrm{OT}(X)\). We prove that \(\gamma \) is bijective. Let \(a,b\in Y\) with \(a\gamma =b\gamma \). Then, there are \(y,z\in Y\) with \(y\gamma =y\alpha =a\) and \(z\gamma =z\alpha =b\). So, \(y\alpha ^2=a\gamma =b\gamma =y\alpha ^2\). Because \(\alpha \) is right regular, there exists a map \(\beta \in \mathrm{OT}(X)\) with \(\alpha ^2\beta =\alpha \) and hence, \(a=y\alpha =y\alpha ^2\beta =z\alpha ^2\beta =z\alpha =b\). So, \(\gamma \) is injective which implies that \(\gamma \) is bijective since Y is finite.

Finally, assume that \(\alpha \) is left regular in \(\mathrm{OT}(X)\). Consider the map \(\beta \) as defined above. Let \(x\in X\). Then, \(x\alpha =y\alpha \) for some \(y\in Y\) and so, \(x\alpha \beta \alpha =y\alpha \beta \alpha =y\gamma \gamma ^{-1} \alpha =y\alpha =x\alpha \). Therefore, \(\alpha \) is regular in \(\mathrm{OT}(X)\). \(\square \)

To finish this section, it remains to describe a fence X having \(\mathrm{OT}(X)\) to be left (right) regular.

Theorem 2

Let X be a fence. Then, \(\mathrm{OT}(X)\) is left (right) regular if and only if \(|X|\le 2\).

Proof

With the use of Proposition 1, the semigroup \(\mathrm{OT}(X)\) is not left regular if \(|X|> 2\). Conversely, assume that \(|X|\le 2\). If \(|X|=1\), then \(\mathrm{OT}(X)\) is the set of a constant map. Hence, \(\mathrm{OT}(X)\) is left regular. Let \(|X|=2\) and \(X=\{a,b\}\) with \(a<b\). Then, \(\mathrm{OT}(X)\) contains exactly 3 elements, namely 2 constant maps and the identity map. Hence, \(\mathrm{OT}(X)\) is left regular. \(\square \)

3 Regular Subsemigroups of T(X)

Consider a fence X. In 2016, Tanyawong et al. [26] described all regular semigroups \(\mathrm{OT}(X)\) of order-preserving transformations on X. Since \(\mathrm{OT}(X)\) is a subsemigroup of T(X), every regular semigroup \(\mathrm{OT}(X)\) is a regular subsemigroup of T(X). This means that we can classify all \(\mathrm{OT}(X)\) which are regular subsemigroups of T(X). The aim of this section is to investigate regular subsemigroups of \(\mathrm{OT}(X)\) when X is a fence.

We now focus on the set \(\mathrm{OT}_S(X)\) of all order-preserving transformations on a fence X having S as their range, i.e.,

$$\begin{aligned} \mathrm{OT}_S(X)=\left\{ \alpha \in \mathrm{OT}(X)\mid {{\,\mathrm{ran}\,}}\alpha =S\right\} \end{aligned}$$

where \(S\subseteq X\). Unfortunately, in general, \(\mathrm{OT}_S(X)\) might not be a subsemigroup of T(X) as shown in the following example.

Example 1

Consider a 5-element fence X as shown in Fig. 1.

Fig. 1
figure 1

The 5-element fence X

Define the maps \(\alpha {:}\,X\rightarrow X\) and \(\beta {:}\,X\rightarrow X\) by

$$\begin{aligned} \alpha := \begin{pmatrix} a&{}\quad b&{}\quad c&{}\quad d&{}\quad e\\ d&{}\quad d&{}\quad c&{}\quad d&{}\quad e \end{pmatrix}&\hbox {and}&\beta := \begin{pmatrix} a&{}\quad b&{}\quad c&{}\quad d&{}\quad e\\ c&{}\quad d&{}\quad e&{}\quad d&{}\quad d \end{pmatrix}, \end{aligned}$$

respectively. It is clear that \(\alpha \) and \(\beta \) are in \(\mathrm{OT}_S(X)\) where \(S=\{c,d,e\}\). But \(\alpha \beta \) is not in \(\mathrm{OT}_S(X)\) since \({{\,\mathrm{ran}\,}}\alpha \beta =\{d,e\}\). Hence, \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X).

Although \(\mathrm{OT}_S(X)\) in Example 1 is not a subsemigroup of T(X), there is a subset S of X such that \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), for example, \(S=\{a\}\) where \(a\in X\). In what follows, we describe all ordered sets X having \(\mathrm{OT}_S(X)\) as a subsemigroup of T(X).

Proposition 2

Let X be an ordered set and let S be a subset of X. Then, \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X) if and only if \(S\alpha =S\) for all \(\alpha \in \mathrm{OT}_S(X)\).

Proof

If \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), then \(\alpha ^2\in \mathrm{OT}_S(X)\) for all \(\alpha \in \mathrm{OT}_S(X)\). It follows that \(S={{\,\mathrm{ran}\,}}\alpha ^2=(X\alpha )\alpha =S\alpha \) for all \(\alpha \in \mathrm{OT}_S(X)\).

Conversely, assume that \(S\alpha =S\) for all \(\alpha \in \mathrm{OT}_S(X)\). Let \(\alpha ,\beta \in \mathrm{OT}_S(X)\). Then, \(X\alpha =S=X\beta \) implies \({{\,\mathrm{ran}\,}}\alpha \beta =(X\alpha )\beta =S\beta =S\). Because the composition of any two order-preserving maps is order-preserving, \(\alpha \beta \in \mathrm{OT}_S(X)\). Hence, \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X). \(\square \)

Corollary 1

Let X be an ordered set and let S be a subset of X. If \(S=X\) or \(|S|=1\), then \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X).

A subset S of an ordered set X is called a subordered set of X if S forms an ordered set under the order of X. If S is a fence, then S is called a subfence of X and S is a non-trivial subfence of X if \(|S|\ge 2\) and \(S\not =X\).

It is known from Theorem 1 that for a fence X, a map \(\alpha \) is left (right) regular in \(\mathrm{OT}(X)\) if and only if \(\alpha |_{{{\,\mathrm{ran}\,}}\alpha }\) is a bijection on \({{\,\mathrm{ran}\,}}\alpha \). Since \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X) if \(S\alpha =S\) for all \(\alpha \in \mathrm{OT}_S(X)\), i.e., \(\alpha |_{S}\) is a bijection on S, we have that \(\mathrm{OT}_S(X)\) is the set of left (right) regular elements in \(\mathrm{OT}(X)\) if \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X). Again by Theorem 1, if \(\alpha \) is left (right) regular in \(\mathrm{OT}(X)\), there is a map \(\beta \in \mathrm{OT}(X)\) with \({{\,\mathrm{ran}\,}}\beta ={{\,\mathrm{ran}\,}}\alpha \) and \(\alpha \beta \alpha =\alpha \). If \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), then \(\mathrm{OT}_S(X)\) is a regular semigroup and therefore, is a regular subsemigroup of T(X).

For the rest of this section, we restrict our study to subsets S of a fence X having \(\mathrm{OT}_S(X)\) as a subsemigroup of T(X). Recall that if \(\alpha \) is an order-preserving transformation on a fence X, then its range is a subfence of X. This means that the set S of \(\mathrm{OT}_S(X)\) is a subfence of X. We start by proving a lemma.

Lemma 2

Let \(S=\{a_1,a_2,\ldots ,a_n\}\) be a subfence of a fence X with \(a_1<a_2>a_3<\cdots >(<)a_n\). Assume that

$$\begin{aligned} X=\left\{ A_1,A_2,\ldots ,A_k,a_1,a_2,\ldots ,a_n,B_1,B_2,\ldots ,B_l\right\} \end{aligned}$$

where \(k,l\in {\mathbb {N}}\). If \(k\ge 2\) or \(l\ge 2\), then \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X).

Proof

We consider k and l in the following 2 cases.

Case 1\(k\ge 2\). We define the map \(\alpha {:}\,X\rightarrow X\) by

$$\begin{aligned} x\alpha = {\left\{ \begin{array}{ll} a_2, &{} x=a_1\\ x, &{} x\in S{\setminus } \{a_1\}\\ a_2, &{} x=A_k\\ a_1, &{} x\in \{A_1,\ldots ,A_{k-1}\}\\ a_n, &{} x\in \{B_1,\ldots ,B_l\}. \end{array}\right. } \end{aligned}$$

It is clear that \(\alpha \in \mathrm{OT}_S(X)\) and \(S\alpha =S{\setminus }\{a_1\}\).

Case 2\(l\ge 2\). If \(a_n\) is minimal, then \(\alpha \) is defined similarly to Case 1. If \(a_n\) is maximal, then the map \(\alpha {:}\,X\rightarrow X\) defined by

$$\begin{aligned} x\alpha = {\left\{ \begin{array}{ll} x, &{} x\in S{\setminus } \{a_n\}\\ a_{n-1}, &{} x=a_n\\ a_n, &{} x=B_2\\ a_{n-1}, &{} x\in \{B_1,B_3,\ldots ,B_l\}\\ a_1, &{} x\in \{A_1,\ldots ,A_{k}\} \end{array}\right. } \end{aligned}$$

is an element in \(\mathrm{OT}_S(X)\) with \(S\alpha =S{\setminus }\{a_n\}\).

Proposition 2 implies that \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X). \(\square \)

The following propositions give useful properties of subfences S that are used later.

Proposition 3

Let S be a non-trivial subfence of a fence X. If \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), then \(|S|\ge 3\), \(|X{\setminus } S|\le 2\) and \(X{\setminus } S\) is not a 2-element fence.

Proof

Assume that \(S=\{a_1,a_2,\ldots ,a_n\}\) with \(a_1<a_2>a_3<\cdots >(<)a_n\). Since \(S\subset X\), the cardinal number \(|X{\setminus } S|\ge 1\). Let

$$\begin{aligned} X=\left\{ A_1,A_2,\ldots ,A_k,a_1,a_2,\ldots ,a_n,B_1,B_2,\ldots ,B_l\right\} \end{aligned}$$

when \(k\ge 1\) or \(l\ge 1\). Then, \(a_{2t+1}\) and \(a_{2t}\) are minimal and maximal, respectively. Since \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), by Proposition 2, \(S\alpha =S\) for all \(\alpha \in \mathrm{OT}_S(X)\). If \(|X{\setminus } S|> 2\) or \(X{\setminus } S\) is a 2-element fence, then \(k\ge 2\) or \(l\ge 2\). Lemma 2 implies that \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X). Hence, \(|X{\setminus } S|\le 2\) and \(X{\setminus } S\) is not a 2-element fence.

To show that \(|S|\not =2\), we prove by contradiction. Suppose that \(|S|=2\). If \(k\ge 2\) or \(l\ge 2\), then \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X). So, \(k\le 1\) and \(l\le 1\). Since S is a proper subset of X, \(k=1\) or \(l=1\). Consider \(k=1\). Define the map \(\alpha {:}\,X\rightarrow X\) by

$$\begin{aligned} x\alpha = {\left\{ \begin{array}{ll} a_2, &{} x=A_1,\\ a_1, &{} \text {otherwise}.\\ \end{array}\right. } \end{aligned}$$

The map \(\alpha \) is in \(\mathrm{OT}_S(X)\) and \(S\alpha =\{a_1\}\not =S\), a contradiction. If \(k=0\), then \(l=1\). The map \(\alpha {:}\,X\rightarrow X\) which is defined by

$$\begin{aligned} x\alpha = {\left\{ \begin{array}{ll} a_1, &{} x=B_1,\\ a_2, &{} \text {otherwise}.\\ \end{array}\right. } \end{aligned}$$

is in \(\mathrm{OT}_S(X)\) and \(S\alpha =\{a_1\}\not =S\), a contradiction. Thus, \(|S|\not =2\) and therefore, \(|S|\ge 3\) since S is non-trivial. \(\square \)

Proposition 4

Let S be a non-trivial subfence of a fence X for which |S| is even. Then, \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X).

Proof

Since |S| is even, the endpoints of S are not both either minimal or maximal. We may assume that \(S=\{a_1,a_2,\ldots ,a_n\}\) with \(a_1<a_2>a_3<\cdots >a_{n-1}<a_n\). If \(|X{\setminus } S|>2\) or \(X{\setminus } S\) is a 2-element fence, then \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X) by Lemma 2. Consider \(|X{\setminus } S|\le 2\) and \(X{\setminus } S\) is not a 2-element fence. The fence X can be written as \(A_1>a_1<a_2>\cdots <a_n\) or \(a_1<a_2>\cdots <a_n>B_1\) or \(A_1>a_1<a_2>\cdots <a_n>B_1\). Define the map \(\alpha {:}\,X\rightarrow X\) as follows:

$$\begin{aligned} x\alpha = {\left\{ \begin{array}{ll} a_n, &{} x=A_1,\\ a_{n-i}, &{} x=a_i\in S{\setminus } \{a_n\},\\ a_1, &{} x=\{a_n,B_1\}, \end{array}\right. } \end{aligned}$$

when \(A_1\in X\) and

$$\begin{aligned} x\alpha = {\left\{ \begin{array}{ll} a_1, &{} x=B_1,\\ a_{n-(i-2)}, &{} x=a_i\in S{\setminus } \{a_1\},\\ a_n, &{} x=a_1, \end{array}\right. } \end{aligned}$$

when \(A_1\not \in X\). It is clear that \(\alpha \) is order-preserving with \({{\,\mathrm{ran}\,}}\alpha =S\) and \(S\alpha \subset S\). Proposition 2 implies that \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X). \(\square \)

In the theorem below, a necessary and sufficient condition for a subfence S of a fence X having \(\mathrm{OT}_S(X)\) as a subsemigroup of T(X) is given.

Theorem 3

Let S be a non-trivial subfence of a fence X. Then, \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X) if and only if |S| is odd, \(|X{\setminus } S|\le 2\) and \(X{\setminus } S\) is not a 2-element fence.

Proof

Assume that \(\mathrm{OT}_S(X)\) is a subsemigroup of \(\mathrm{OT}(X)\). As a consequence of Propositions 3 and 4, |S| is odd, \(|X{\setminus } S|\le 2\) and \(X{\setminus } S\) is not a 2-element fence.

Conversely, assume that |S| is odd, \(|X{\setminus } S|\le 2\) and \(X{\setminus } S\) is not a 2-element fence. Then, \(|S|\ge 3\) and the endpoints of S are both either minimal or maximal. Let \(S=\{a_1,a_2,\ldots ,a_n\}\) with \(a_1<a_2>a_3<\cdots >a_n\), that is, \(a_{2m-1}\) and \(a_{2m}\) are minimal and maximal, respectively. Then, X can be written as \(A>a_1<a_2>a_3<\cdots >a_n\) or \(a_1<a_2>a_3<\cdots >a_n<B\) or \(A>a_1<a_2>a_3<\cdots >a_n<B\). Because of \(|X{\setminus } S|\le 2\) and \({{\,\mathrm{ran}\,}}\alpha =S\), the cardinal number \(|S{\setminus } S\alpha |\le 2\).

To show that \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), we prove by contradiction.

Suppose that \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X). Then, there is a map \(\alpha \in \mathrm{OT}_S(X)\) with \(S\alpha \not =S\). It follows that for every \(y\in S{\setminus } S\alpha \), there is an element \(x\in X{\setminus } S \) with \(x\alpha =y\), that is, \(A\alpha =y\) or \(B\alpha =y\). \(\square \)

Claim 1

Every element in \(S{\setminus } S\alpha \) is maximal.

Let \(a\in S{\setminus } S\alpha \). Then, from \({{\,\mathrm{ran}\,}}\alpha =S\), we have \(A\alpha =a\) or \(B\alpha =a\). We may assume that \(A\alpha =a\). Then, \(a_1\alpha \le A\alpha =a\) since \(a_1<A\). If a is minimal, then \(a_1\alpha =a\) implies \(a\in S\alpha \). Hence, a is maximal.

By Claim 1, every minimal element in S is in \(S\alpha \).

If \(|S|=3\), then \( S{\setminus } S\alpha =\{a_2\}\) implies \(a_2\alpha \not =a_2\) and \(A\alpha =a_2\) or \(B\alpha =a_2\). So, \(a_2\alpha \in \{a_1,a_3\}\). Since \(\alpha \) is order-preserving and \(a_1<a_2>a_3\), we get \(a_1\alpha =a_2\alpha =a_3\alpha \). Hence, \(|\{a_1,a_2,a_3\}\alpha |=1\). If \(|X{\setminus } S|=\{A\}\), then \(|S|=|X\alpha |=|\{A,a_1,a_2,a_3\}\alpha |=2\). So, \(|X{\setminus } S|=\{A,B\}\). If \(A\alpha =a_2\), then from \(a_3<B\), we have \(a_3\alpha \le B\alpha \) and so, \(B\alpha \in \{a_2,a_3\alpha \}\). Hence, \(|S|=|X\alpha |=|\{A,a_1,a_2,a_3,B\}\alpha |=2\), a contradiction. Thus, \(|S|\ge 5\) implies that there are at least 2 maximal elements in S.

Claim 2

Every element in \(S{\setminus } S\alpha \) is mapped to a maximal element in S.

Suppose that there is an element \(a_k\in S{\setminus } S\alpha \) such that \(a_k\alpha =a_l\) for some minimal element \(a_l\) in S. Then, \(A\alpha =a_k\) or \(B\alpha =a_k\). Assume that \(A\alpha =a_k\). Because \(a_k\) is maximal, \(a_{k-1},a_{k+1}\in S\) implies \(a_{k-1}\alpha =a_l=a_{k+1}\alpha \). So, \(|\{A,a_{k-1},a_k,a_{k+1}\}\alpha |=2\). If \(|X{\setminus } S|=\{A\}\), then \(X\alpha \not =S\). Thus, \(|X{\setminus }~S|=\{A,B\}\). If \(B\alpha =a_{k-1}\) which is minimal, then from \(a_n<B\), we have \(a_n\alpha =B\alpha \). It follows that \(|\{A,a_{k-1},a_k,a_{k+1},a_n,B\}\alpha |=3\). From \(|X{\setminus } S|=2\) and \(|S{\setminus } S\alpha |\le 2\), we have \(X\alpha \not =S\), a contradiction. Hence, \(B\alpha \not =a_{k-1}\) and similarly, \(B\alpha \not =a_{k+1}\). Therefore, \(X\alpha \not =S\) since \(|\{a_{k-1},a_k,a_{k+1}\}\alpha |=1\), a contradiction.

From \(|S{\setminus } S\alpha |\le 2\), we consider \(S{\setminus } S\alpha \) in the following 2 cases.

Case 1\(|S{\setminus } S\alpha |=1\), say \(a_k\in S{\setminus } S\alpha \). Then, \(A\alpha =a_k\) or \(B\alpha =a_k\). We may assume that \(A\alpha =a_k\). Then \(a_1\alpha \in \{a_{k-1},a_{k+1}\}\). Suppose that \(a_k=a_2\). Then \(a_1\alpha \in \{a_1,a_3\}\). By Claim 2, \(a_2\alpha =a_4\) since \(a_1<a_2>a_3<a_4\) and so, \(a_1\alpha =a_3\). From \(a_1\in S={{\,\mathrm{ran}\,}}\alpha \), there is an element x in X with \(x\alpha =a_1\). If x is maximal, there is a minimal element in S that is mapped to \(a_1\). Hence, \(a_l\alpha =a_1\) for some minimal element \(a_l\in S{\setminus } \{a_1\}\). Since \(a_2\) is the only element in S that is comparable to \(a_1\) and \(\alpha \) is order-preserving, \(a_{l-1}\alpha =a_1=a_{l+1}\alpha \) if \(a_l\not =a_n\) and \(a_{n-1}\alpha =a_1\) if \(a_l=a_n\). It follows that \(s\alpha =a_1\) for all \(s\in S{\setminus } \{a_1,a_2\}\). From \(a_2\alpha =a_4\), we get \(a_3\alpha \in \{a_3,a_4,a_5\}\) which is a contradiction. Thus \(a_k\not =a_2\). If \(a_1\alpha =a_{k-1}\), then \(a_2\alpha =a_{k-2}\) since \(a_k\not \in S\alpha \). Since \(\alpha \) is order-preserving, there is no element x in X with \(x\alpha =a_{k+1}\). So, \(a_{k+1}\not \in {{\,\mathrm{ran}\,}}\alpha =S\) which is a contradiction. Similarly, we obtain a contradiction if \(a_1\alpha =a_{k+1}\).

Case 2\(|S{\setminus } S\alpha |=2\), say \(a_k,a_l\in S{\setminus } S\alpha \). Let \(A_1\alpha =a_k\) and \(B_1\alpha =a_l\).

Case 2.1\(k<l\). We consider \(a_1\) and \(a_n\) in the following cases.

If \(a_1\alpha =a_{k-1}\) and \(a_n\alpha =a_{l-1}\), then from \(a_1\) and \(a_n\) are not comparable, there is no element \(x\in X\) with \(x\alpha =a_{l+1}\) since \(\alpha \) is order-preserving. So, \(a_{l+1}\not \in {{\,\mathrm{ran}\,}}\alpha =S\). By a similar argument, we obtain the following:

If \(a_1\alpha =a_{k+1}\) and \(a_n\alpha =a_{l+1}\), then \(a_{k-1}\not \in S\).

If \(a_1\alpha =a_{k-1}\) and \(a_n\alpha =a_{l+1}\), then \(a_{k+1}\not \in S\).

If \(a_1\alpha =a_{k+1}\) and \(a_n\alpha =a_{l-1}\), then from \(a_k,a_l\not \in S\alpha \), we have \(a_{k-1}, a_{l+1} \not \in ~S\).

Thus, we get a contradiction.

Case 2.2\(k>l\). By a similar argument as the case \(k<l\), we get a contradiction.

Therefore, \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X). \(\square \)

We end with some results concerning the regular subsemigroup case. As we known, if \(\mathrm{OT}_S(X)\) is a subsemigroup of T(X), then \(\mathrm{OT}_S(X)\) is a regular subsemigroup of T(X). The following characterization is obtained immediately from Theorem 3.

Theorem 4

Let S be a non-trivial subfence of a fence X. Then, \(\mathrm{OT}_S(X)\) is a regular subsemigroup of T(X) if and only if |S| is odd, \(|X{\setminus } S|\le 2\) and \(X{\setminus } S\) is not a 2-element fence.

For the case that \(\mathrm{OT}_S(X)\) is not a subsemigroup of T(X), we are looking for other regular subsemigroups of T(X) that are contained in \(\mathrm{OT}_S(X)\).

Proposition 5

Let S be a subfence of a fence X. Then, the set \(\{\alpha \in \mathrm{OT}_S(X) \mid S\alpha =S\}\) is a regular subsemigroup of T(X).

Proof

Let \(T=\{\alpha \in \mathrm{OT}_S(X) \mid S\alpha =S\}\). A similar argument as the proof of Proposition 2 shows that T is a subsemigroup of T(X). Theorem 1 implies that T is a regular subsemigroup of T(X). \(\square \)