1 Introduction
Let X be a nonempty set. The semigroup
$T(X)$
consists of all mappings from X into itself, with composition as the semigroup operation. For a nonempty subset Y of X, the semigroup

consists of all transformations that leave Y invariant and forms a subsemigroup of
$T(X)$
. It contains the identity map id
$_X$
on X. If
$Y=X$
, then
$S(X,Y)=T(X)$
, making
$S(X,Y)$
a generalisation of
$T(X)$
. This semigroup was introduced by Magill [Reference Magill1] in 1966. Since then, its algebraic properties have been studied extensively. We discuss the natural partial order on
$S(X,Y)$
, which is defined for
$f,g\in S(X,Y)$
by

Recall that a partition
$\pi _1$
refines a partition
$\pi _2$
if every block of
$\pi _1$
is contained in a block of
$\pi _2$
. Moreover, for any
$f\in S(X,Y)$
,

In 2013, Sun and Wang [Reference Sun and Wang3] characterised the natural partial order on
$S(X,Y)$
in terms of images and kernel classes. Their results are as follows.
Theorem 1.1 [Reference Sun and Wang3, Theorem 2.1].
Let
$f\in S(X,Y)$
. Then,
$f\leq g$
if and only if the following statements hold:
-
(1)
$\pi (g)$ refines
$\pi (f)$ and
$\pi _Y(g)$ refines
$\pi _Y(f)$ ;
-
(2) if
$g(x)\in f(X)$ for some
$x\in X$ , then
$f(x)=g(x)$ ;
-
(3)
$f(X)\subseteq g(X)$ and
$f(Y)\subseteq g(Y)$ .
Theorem 1.2 [Reference Sun and Wang3, Corollary 2.2].
Let
$f,g\in S(X,Y)$
and
$f\leq g$
. If
$g(X)=f(X)$
, then
$g=f$
.
Moreover, they described the elements of
$S(X,Y)$
that are left compatible, right compatible, maximal and minimal, and they investigated the greatest lower bound of two elements with respect to this order. However, it was discovered two years later that their results contained errors in the section concerning the determination of left-compatible elements. This error was subsequently corrected by Sun and Sun [Reference Sun and Sun2]. Unfortunately, errors still remain in the result identifying the maximal elements of
$S(X,Y)$
, which is stated as follows.
Theorem 1.3 [Reference Sun and Wang3, Theorem 3.1].
Let
$f\in S(X,Y)$
. Then, f is maximal if and only if either of the following statements holds:
-
(1) f is either surjective or injective;
-
(2)
$f|_{X-Y}$ is injective,
$f(X-Y)\cap Y = \emptyset $ and
$f(Y)=Y$ .
To clarify this issue, consider
$X=\{1,2,3\}$
and
$Y=\{1,2\}$
. We obtain the Hasse diagram in Figure 1 for
$(S(X,Y),\leq )$
, where
$f=(abc)$
represents the mapping
$f\in S(X,Y)$
such that
$f(1)=a, f(2)=b$
and
$f(3)=c$
.

Figure 1 Hasse diagram of
$(S(X,Y),\leq )$
.
From the Hasse diagram, we can see that
$(112)$
and
$(221)$
are maximal, but they are neither surjective nor injective and their images of Y are not equal to Y. In other words, they do not satisfy Theorem 1.3. We aim to correct Theorem 1.3.
2 Main results
This section provides a characterisation of the maximal elements of
$S(X,Y)$
with respect to the natural partial order.
Theorem 2.1. Let
$f\in S(X,Y)$
. Then, f is maximal if and only if it satisfies one of the following conditions:
-
(1) f is surjective or injective;
-
(2)
$\pi (f)$ refines
$\{Y,X-Y\}$ and either of the following holds:
-
(i)
$Y\subseteq f(X) $ and
$f|_{ X- Y}$ is injective;
-
(ii)
$X- Y\subseteq f(X)$ and
$f|_{f^{-1}(Y)}$ is injective.
-
Proof. Let f be maximal and assume that it does not satisfy condition (1). Then, f is neither surjective nor injective, which implies that there exists
$a\in X-f(X)$
. To show that f satisfies condition
$(2)$
, let
$A\in \pi (f)$
and assume that
$A\nsubseteq Y$
and
$A\nsubseteq X- Y$
. Then, there exist
$w,z\in A$
such that
$w\in Y$
and
$z\in X- Y$
. Hence,
$A\in \pi _Y(f)$
. Define
$g:X\rightarrow X$
by

Then,
$g\in S(X,Y)$
and
$f<g$
, which contradicts the maximality of f. Thus,
$A\subseteq Y$
or
$A\subseteq X-Y$
, and therefore,
$\pi (f)$
refines
$\{Y,X-Y\}$
. As a result, since f is not injective, either
$f|_Y$
or
$f|_{X- Y}$
must not be injective.
Case 1:
$f|_Y$
is not injective. We will show that f satisfies condition (i). To prove
$Y\subseteq f(X)$
, assume that there exists
$w\in Y- f(X)$
. Since
$f|_Y$
is not injective, there exist distinct elements
$y_1,y_2\in Y$
such that
$f(y_1)=f(y_2)$
. Define
$g:X\rightarrow X$
by

Then,
$g\in S(X,Y)$
and
$f<g$
, which leads to a contradiction. Therefore,
$Y\subseteq f(X)$
. This implies that
$a\in X- Y$
. To show that
$f|_{X- Y}$
is injective, assume that there exist distinct elements
$x_1, x_2\in X- Y$
such that
$f(x_1)=f(x_2)$
. Define
$g:X\rightarrow X$
by

Then,
$g\in S(X,Y)$
and
$f<g$
, which is a contradiction. Hence,
$f|_{X- Y}$
is injective. Therefore, f satisfies condition (i).
Case 2:
$f|_{X- Y}$
is not injective. Then, there exist distinct elements
$x_1, x_2\in X-Y$
such that
$f(x_1)=f(x_2)$
. We will show that f satisfies condition (ii). To prove
$X-Y\subseteq f(X)$
, assume that there exists
$z\in (X- Y)- f(X)$
. Define
$g:X\rightarrow X$
by

Then,
$g\in S(X,Y)$
and
$f<g$
, which is a contradiction. Therefore,
$X- Y\subseteq f(X)$
. This implies that
$a\in Y$
. To show that
$f|_{f^{-1}(Y)}$
is injective, assume that there exist distinct elements
$z_ 1,z_2\in f^{-1}(Y)$
such that
$f(z_1)=f(z_2)$
. Thus,
$\{z_1,z_2\}\subseteq A$
for some
$A\in \pi _Y(f)$
. Define
$g:X\to X$
by

Then,
$g\in S(X,Y)$
and
$f<g$
, which is a contradiction. Hence,
$f|_{f^{-1}(Y)}$
is injective. Therefore, f satisfies condition (ii).
Conversely, assume that f satisfies condition (1) or (2) and
$f\leq g$
for some
$g\in S(X,Y)$
. Then, by Theorem 1.1(3),
$f(X)\subseteq g(X)$
. Thus, by Theorem 1.2, we can show that
$f=g$
by showing that
$g(X)\subseteq f(X)$
. To do so, let
$a\in g(X)$
; we must show that
$a\in f(X)$
. Since
$a\in g(X)$
, there exists
$z\in X$
such that
$g(z)=a$
. Let
$f(z)=a^\prime $
. It follows that
$a^\prime \in f(X)\subseteq g(X)$
, so there exists
$z^\prime \in X$
such that
$g(z^\prime )=a^\prime $
. By Theorem 1.1(2), we have
$f(z^\prime )=g(z^\prime )=a^\prime =f(z)$
.
Case 1: f satisfies condition (1). It is clear that
$f(X)=g(X)$
when f is surjective. In the case where f is injective, we obtain
$z=z^\prime $
. Hence,
$a=g(z)=g(z^\prime )=f(z^\prime )\in f(X)$
.
Case 2: f satisfies condition (2).
Subcase 2.1: f satisfies condition (i). If
$a\in Y$
, then, since
$Y\subseteq f(X)$
, we conclude that
$a\in f(X)$
. If
$a\in X- Y$
, then
$z\in X- Y$
. Since
$f(z)=f(z^\prime )$
, we have
$\{z,z^\prime \}\subseteq A$
for some
$A\in \pi (f)$
, implying that
$z^\prime \in X- Y$
. Since
$f|_{X- Y}$
is injective, it follows that
$z=z^\prime $
. As in Case 1, we conclude that
$a\in f(X)$
.
Subcase 2.2: f satisfies condition (ii). If
$a\in X- Y$
, then, since
$X-Y\subseteq f(X)$
, we conclude that
$a\in f(X)$
. If
$a\in Y$
, then, since
$g(z)=a$
, we have
$z\in A$
for some
$A\in \pi _Y(g)$
. Since
$\pi _Y(g)$
refines
$\pi _Y(f)$
, we obtain
$f(z')=f(z)\in Y$
and, hence,
$z, z'\in f^{-1}(Y)$
. Since
$f|_{f^{-1}(Y)}$
is injective, it follows that
$z=z^\prime $
. As before,
$a\in f(X)$
.
Therefore, f is maximal.
Note that if Y is a finite subset of X, then the injectivity of
$f|_{f^{-1}(Y)}$
implies that f is surjective on Y, that is,
$Y\subseteq f(X)$
. Thus, in Theorem 2.1, the functions satisfying condition (2), type (ii), are already included in condition (1).
Acknowledgment
The authors are grateful to the referee for corrections and valuable suggestions on the manuscript.