Self-embeddings of Hamming Steiner triple systems of small order and APN permutations

The classification, up to isomorphism, of all self-embedding monomial power permutations of Hamming Steiner triple systems of order n=2m-1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n=2^m-1$$\end{document} for small m(m≤22)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m\,(m \le 22)$$\end{document}, is given. As far as we know, for m∈{5,7,11,13,17,19}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m\! \in \! \{5,7,11,13,17,19 \}$$\end{document}, all given self-embeddings in closed surfaces are new. Moreover, they are cyclic for all m\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m$$\end{document} and nonorientable at least for all m≤19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m \le 19$$\end{document}. For any non prime m\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m$$\end{document}, the nonexistence of such self-embeddings in a closed surface is proven. The rotation line spectrum for self-embeddings of Hamming Steiner triple systems in pseudosurfaces with pinch points as an invariant to distinguish APN permutations or, in general, to classify permutations, is also proposed. This invariant applied to APN monomial power permutations gives a classification which coincides with the classification of such permutations via CCZ-equivalence, at least up to m≤17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m\le 17$$\end{document}.

in which x and y differ. The Hamming weight of x ∈ F n , denoted by w(x), is given by w(x) = d(x, 0), where 0 is the all-zero vector of length n (it will always be clear from the context what is the length of the vector 0). The support of x ∈ F n is the set of nonzero coordinate positions of x and is denoted by supp(x).
Any nonempty subset C of F n is a binary code and any vector subspace of F n is a binary linear code. The elements of C are called codewords. The minimum distance of C, denoted by d C , is the smallest Hamming distance between any pair of different codewords. Let S n be the symmetric group of permutations of length n. Assume that a permutation π ∈ S n acts on a vector x = (x 1 , . . . , x n ) as π(x) = (x π −1 (1) , . . . , x π −1 (n) ). Two binary codes C 1 and C 2 of length n are said to be isomorphic if there exists a coordinate permutation π ∈ S n such that C 2 = {π(x) : x ∈ C 1 }. They are said to be equivalent if there exists a vector y ∈ F n and a coordinate permutation π ∈ S n such that C 2 = {y + π(x) : x ∈ C 1 }. Although the two definitions above stand for two different concepts, it follows that two binary linear codes are equivalent if and only if they are isomorphic [17].
A binary code C of length n is a perfect 1-error correcting code (briefly, perfect code) if every x ∈ F n is within distance 1 from exactly one codeword of C. The perfect codes have length n = 2 m − 1, 2 n−m codewords and minimum distance 3. For any integer m ≥ 2, there exists a unique, up to equivalence, perfect linear code of length n = 2 m − 1, called the Hamming code and denoted by H n [17]. Let H m be a parity check matrix of the Hamming code H n of length n = 2 m − 1. The columns in H m are all the nonzero vectors in F m , that is, the elements {α 0 , α 1 , . . . , α n−1 }, where α is a primitive element of F m . We can naturally associate, to each one of them, one element from the set N = {1, 2, . . . , n} as α i → i + 1, i = 0, 1, . . . , n − 1.
Let F : F m −→ F m be a function such that F(0) = 0. The function F is called APN (almost perfect nonlinear) if all equations have no more than two solutions in F m . In this paper, we consider APN permutations, that is, when the APN function F : F m −→ F m is bijective, so it corresponds to a permutation π F ∈ S n , where n = 2 m − 1. Let H F be the matrix where x ∈ F m , x = 0, and let C F be the linear code admitting H F as a parity check matrix. Note that C F is a subcode of the Hamming code H n . Two functions F, G : F m −→ F m , with rank(H F ) = rank(H G ) = 2m, are CCZ-equivalent if and only if the extended codes C * F and C * G are equivalent [4,8]. This equivalence relation has been used to classify APN functions, since if F is an APN function and G is CCZ-equivalent to F, then G is also an APN function. Note that we will use • to denote the function composition, that is, (F • G)(x) = F(G(x)).
In the last years, many new APN functions have been constructed [2,5,6,9,10]. However, it is not always easy to prove that they are not CCZ-equivalent to any of the known ones. In order to help to distinguish them, up to CCZ-equivalence, some invariants have been defined [3,9].
A classical (block) t-(n, k, λ) design is a set N of n elements together with a collection of blocks whose elements are k-subsets of N such that every t-subset of points of N is contained in exactly λ blocks. A Steiner triple system of order n (briefly STS (n)) is a 2 − (n, 3, 1) design, where the blocks will be called triples. Two STS(n) or, in general, two designs, are called isomorphic if there is a permutation on the set of points such that blocks of one design are mapped to blocks of the other design. An STS(n) exists if and only if n ≡ 1 or 3 (mod 6). It is well known that the supports of the codewords of weight 3 in any perfect code containing the all-zero vector define a Steiner triple system. For a Hamming code H n , the corresponding Steiner triple system is called Hamming Steiner triple system or Boolean Steiner triple system and denoted by STS (H n ). Note that since the Hamming code H n , for each n = 2 m − 1, is unique up to isomorphism, its Steiner triple system STS (H n ) is also unique up to isomorphism.
The relation between combinatorial designs and graph embeddings comes from the fact that when a graph is embedded in a surface, the faces that result can be regarded as the blocks of a design [11]. In the current paper, we consider the case of a complete graph with n vertices, embedded into a closed surface in which all the faces are triangles. It is known [21] that this complete graph admits a triangulation of some orientable surface if and only if n ≡ 0, 3, 4 or 7 (mod 12), and admits a triangulation of some nonorientable surface if and only if n ≡ 0 or 1 (mod 3) for n > 7. All necessary definitions concerning orientable and nonorientable surfaces could be found in [11,21].
A triangulation is called face 2-colourable if the triangular faces of an embedding into a surface can be properly 2-coloured (for example, in black and white colours), that is, in such a way that no two faces with a common edge have the same colour [21]. The case of 2-colourability is of special interest because all the triangles of the same colour on the surface induce an STS(n). Therefore, we have two STS(n) (black and white) biembedded in the surface. Such a pair of Steiner triple systems of order n is called a biembedding. If these two STS(n) are isomorphic, then it is called a self-embedding, and the corresponding permutation is called a self-embedding permutation. If each one of the triples of a biembedding can be cyclically ordered so that every ordered pair of vertices is contained in precisely one cyclically ordered triple then the biembedding is orientable, otherwise the biembedding is called nonorientable [22].
Two biembeddings are said to be isomorphic if there exists a permutation on the n vertices (of the complete graph) such that it maps edges and triangles of one biembedding to edges and triangles of the other one either preserving the colour of the triangles or reversing it [12,14]. In the case when the colours of the triangles are preserved, the isomorphism is said to be colour-preserving.
For an embedding to be face 2-colourable, n must be odd because the vertex degrees should be even. Therefore, for an orientable case, we have that n ≡ 3 or 7 (mod 12), and it is known [21,22] that if a biembedding of a surface exists, the surface should be a sphere S g with g = (n − 4)(n − 3)/12 handles. On the other hand, for a nonorientable case, we have that n ≡ 1 or 3 (mod 6) for n > 7, and therefore a biembedding of a sphere N γ with γ = (n − 4)(n − 3)/6 crosscaps should exist [21,22].
The previous ideas about biembeddings in a closed surface (the sphere with g handles or with γ crosscaps) can be extended to pseudosurfaces, see for example [16]. A pseudosurface is the topological surface (allowing, in general, repeated triangles) which results when finitely many identifications, of finitely many points each, are made on a given surface. Specifically, distinct point { p i, j : i = 1, 2, . . . , k, j = 0, 1, . . . , n i } on a given surface are identified to form points p i = {p i, j : j = 0, 1, . . . , n i }, i = 1, 2, . . . , k, called pinch points. All necessary definitions and notions concerning embeddings in closed surfaces can be found in [11,21] and concerning embeddings in pseudosurfaces with pinch points in [11,16]. Throughout of what follows, when we refer to self-embeddings, we always mean self-embeddings in a pseudosurface in general (either a closed surface or pseudosurface with pinch points), and each time we emphasize if we just deal with a closed surface, that is, a pseudosurface without pinch points.
Despite the existence of many results devoted to embeddings of a complete graph in a closed surface or pseudosurface with pinch points, there still remain many unsolved problems, see the surveys [11,16]. For example, it is interesting to find self-embeddings in a closed surface for the Hamming Steiner triple system STS(H n ) of order n = 2 m − 1, m > 4. For n = 7, it is well known that, up to isomorphism, the STS(H 7 ) has only one self-embedding, which is a torus and, therefore, is orientable [21]. For n = 15, there are four nonisomorphic self-embeddings of STS(H 15 ), three of them are nonorientable and one is orientable [13]. On the other hand, in general, it is easy to obtain self-embeddings in a pseudosurface just taking any two isomorphic STS(H n ), or in general any two isomorphic STS(n), on the same set N .
In this paper, we only consider self-embeddings, in closed surfaces and pseudosurfaces with pinch points, obtained from the Hamming Steiner triple systems STS(H n ) of order n = 2 m − 1, m > 4, via monomial power permutations. We restrict ourselves to these permutations in order to develop techniques to find new self-embeddings in closed surfaces for these STS(H n ) and investigate the connection between pseudosurfaces and APN functions which are also monomial power permutations.
The paper is organized as follows. In Sect. 1, we defined some notions of coding theory (specifically, Hamming codes and APN functions), design theory (specifically, Steiner triple systems), and graph embeddings into a surface or pseudosurface (specifically, selfembeddings for Hamming Steiner triple systems). In Sect. 2, we present self-embeddings in closed surfaces for the Hamming Steiner triple systems STS(H n ), where n = 2 m − 1 and m ∈ {5, 7, 11, 13, 17, 19}, which, as far as we know, were not described before. Actually, we give all possible self-embeddings in a closed surface constructed from an STS(H n ) and considering only monomial power permutations, for all m ≤ 22. Up to isomorphism, there are exactly 1, 1, 4, 14, 12, 65 and 88 such self-embeddings for m = 3, 5, 7, 11, 13, 17, 19, respectively. Note that for any non prime m, there are no such self-embeddings. We also point out which of all these self-embedding permutations are APN permutations. In Sect. 3, we focus on showing that the rotation line spectrum (defined below, in Sect. 2) for self-embeddings of Hamming Steiner triple systems in pseudosurfaces with pinch points can be used as an invariant to classify APN permutations. Actually, this invariant gives a complete classification of all APN monomial power permutations for all m ≤ 17, up to CCZ-equivalence. Moreover, it could be used to classify any APN permutation, or in general, any permutation, not necessarily APN. Finally, in Sect. 4, we present some conclusions and further research.

Self-embeddings of STS(H n ) in closed surfaces
In this section, we construct new self-embeddings in closed surfaces for Hamming Steiner triple systems STS(H n ), where n = 2 m − 1 and m ∈ {5, 7, 11, 13, 17, 19}. Moreover, up to isomorphism, we give all possible such self-embeddings for the STS(H n ), with m ≤ 22, constructed from monomial power permutations, together with their classification.
A design defined on the set N is called cyclic if there is a permutation on the set N consisting of a single cycle of length n such that blocks are mapped to blocks. We consider a cyclic STS(H n ) corresponding to a cyclic version of the Hamming code H n of length n (for example, the one considered in the introduction). A self-embedding is called cyclic if there is a cyclic automorphism of order n which necessarily extends to the two STS(H n ) and F(STS(H n )) conforming the self-embedding.
It is easy to see that there is only one self-embedding in a closed surface for the cyclic STS(H 7 ) via the permutation corresponding to the monomial power function F(x) = x 3 over F 3 . For n = 15, none of the four nonisomorphic self-embeddings of STS(H 15 ) classified in [13] are cyclic, so there are no self-embeddings in a closed surface for the cyclic STS(H 15 ) given by monomial power permutations. For n = 31, Bennett at al. proved that there is not any cyclic orientable self-embedding in a closed surface for the STS(H 31 ) [1]. It is still an open question to determine whether there exist noncyclic orientable self-embeddings in a closed surface for the STS(H 31 ) or not. In this section, we present new self-embeddings for the cyclic STS(H n ) with n = 2 m − 1, which are cyclic for all m and nonorientable at least for all m ≤ 19.
Note that there are STS(n) which are not isomorphic to the STS(H n ) but also have permutations without fixed points in their automorphism group. For example, the STS(n) given by the well known Bose construction [15] has an automorphism group containing a permutation with three short cycles of length n/3. An interesting fact is that Bose STS(15) cannot be included in any perfect code of length 15, see [18]. There are several constructions of self-embeddings for the STS(n) obtained from the Bose construction, orientable and nonorientable [11,21,23].
In order to construct these mentioned new self-embeddings in a closed surface for the cyclic STS(H n ), we only consider permutations π F ∈ S n , where n = 2 m − 1, given by monomial power functions F(x) = x t over F m , so such that gcd(t, n) = 1. The next proposition shows us that these constructed self-embeddings are cyclic.

be any monomial power permutation. Then, the self-embedding for STS(H n ) given by the permutation F is also cyclic.
Proof Let α be a primitive element of the finite field F m . For any triple (α i , α j , α k ) from the cyclic STS(H n ) corresponding to the Hamming code with parity check matrix In general, a biembedding in a pseudosurface has a pinch point if and only if there is a point i ∈ N such that the cyclically ordered points of all triples containing i in both black and white STS(n) can be divided into more than one cycle. Each one of these cycles is called rotation line at point i ∈ N [21]. Note that a biembedding in a closed surface has no pinch points, so the rotation line at each point contains a single cycle of length n − 1. We collect all rotation lines at point i ∈ N taking them in any order. The number of rotation lines at point i ∈ N will be denoted by rl(i). A biembedding in a closed surface can be considered as a biembedding in a pseudosurface such that rl(i) = 1 for any i ∈ N . The set of rotation lines at all the points of N is called the rotation scheme for the biembedding.
The next proposition gives us an alternative definition for a self-embedding permutation in a closed surface for an STS(H n ). Given an STS(H n ), where n = 2 m − 1, if (a, b, c) is a triple in STS(H n ), then we have that a + b = c, considering the corresponding columns in H m as elements in F m \{0}. Note that, from now on, we will use indistinctly the vectors in F m \{0} as elements (points) of the STS(H n ) and vice versa. Proposition 2 Let F be any bijective function over F m such that F(0) = 0. The permutation F is a self-embedding permutation in a closed surface for the STS(H n ) if and only if, for any a ∈ F m \{0}, the elements in the sequence a 1 , a 2 , . . . , Proof Given the self-embedding permutation F in a closed surface, the rotation line at any element a ∈ F m \{0} is a sequence of 2 m − 2 different elements: is a Steiner triple system isomorphic to STS(H n ). Moreover, the blocks in F(STS(H n )) can be seen as the triples (a, b, F(F −1 (a) + F −1 (b))), where + stands for the operation defined above for the STS(H n ). Therefore, for all The converse is straightforward using the same argumentation.
We have used Proposition 2 to find new self-embedding permutations in closed surfaces for the cyclic STS(H n ), where n = 2 m − 1 with m ≤ 22. Note that, considering permutations π F ∈ S n given by a monomial power function F(x) = x t over F m such that gcd(t, n) = 1, it is only necessary to check the condition for just one element a ∈ F m \{0}.
For any self-embedding of STS(H n ) given by a permutation F : F m −→ F m with F(0) = 0, and any element a ∈ F m \{0}, we can construct the sequence a 1 , a 2 , . . . , a r 1 beginning with any element a 1 ∈ F m \{0} such that a 1 = a and a r 1 +1 = a 1 , where so the rotation line spectrum is (1;30).
On the other hand, the permutation corresponding to the function F(x) = x 3 over F 5 is a self-embedding permutation in a pseudosurface with pinch points for the STS(H 31 ). Note that in this case there are two rotation lines at point 1 given by the sequences  (6) so the rotation line spectrum is (2; 10, 20).
For any self-embedding of STS(H n ) given by a permutation F : We can also calculate the multisetṼ be the set associated toṼ F (a), and let V * F (a) be the multiset containing the multiplicities of the different elements inṼ F (a). We denote by x ∧ s the elements in V * F (a), understanding that we have s different elements inṼ F (a) appearing x times. In the following lemma, we give the connection between v F (a) and V F (a), and then we show these definitions by Example 2.

Lemma 1 Let F be any bijective function over
where ) and a 1 , a + a 1 ; a 2 , a + a 2 ; . . . ; a 2 m−1 −1 , a + a 2 m−1 −1 is the sequence containing all the rotation lines at point a. Note that regardless having a selfembedding in a closed surface or pseudosurface with pinch points, we just consider the triples  10,43), (74,79,17),. . . , (36,110,124) are triples in F(STS(H 127 )). Therefore, by Lemma 1 (see also Table 3), Proof It is easy to check that the permutation F transforms the triples from S into the triples in F(S) and the triples from F −1 (S) into the triples in S.
Proof By Lemma 2, it is enough to assume that the isomorphism is given by a function F transforming triples into triples such that F(S) = S and F(F 1 (S)) = F 2 (S). Looking at the points as vectors in F m \{0}, we can consider the function F as a linear transformation on F m . The elements in the set ) is a triple in F 2 (S) and so, as F(a)) and using Lemma 1 we obtain v F 1 (a) = v F 2 (F(a)) for all a ∈ F m \{0}. Therefore, the result follows.
Proof If F is a monomial power permutation, then at each point a ∈ F m \{0} the rotation line is the same, up to a permutation and soṼ F (a) andṼ F (1) also coincide, up to a permutation. Finally, by the definitions of v F (a), V * F (a) and Lemma 1, the result follows.
For the self-embedding in a pseudosurface with pinch points, given by the permutation Note that v F (a) is maximum when all the elements inṼ F (a) are different, that is, when v F (a) = 2 m−1 . For both permutations in the previous example, v F (a) is maximum for all a ∈ F m \{0}. Therefore, by Proposition 6 (see Sect. 3, where we investigate the connection between APN functions and self-embeddings), they are APN permutations.
By Theorem 1, we have that the sets {v F (a) : a ∈ F m \{0}} and {V * F (a) : a ∈ F m \{0}} can be used as invariants to distinguish nonisomorphic self-embedding permutations F. By Proposition 3, note that considering monomial power permutations, it is only necessary to compute v F (a) and V * F (a) for one element a ∈ F m \{0}, for example a = 1.
. We further use these invariants to classify the found self-embedding permutations in closed surfaces.
Let C i be the (binary) cyclotomic coset containing i, that is, the set of integers [17]. The cyclotomic cosets give a partition of the integers modulo 2 m −1 into disjoint subsets. Let C * i be the union of the cyclotomic coset containing i and the cyclotomic coset containing the multiplicative inverse of i modulo 2 m − 1. Note that in some cases the set C * i coincides with C i , for example, C * 1 = C 1 = {1, 2, 4, . . . , 2 m−1 }. The following result demonstrates that if t 1 and t 2 are in the same set C * i , the selfembedding permutations corresponding to F 1 (x) = x t 1 and F 2 (x) = x t 2 are isomorphic and have the same parameters Proposition 4 Let F 1 , F 2 : F m −→ F m be two monomial power permutations F 1 (x) = x t 1 and F 2 (x) = x t 2 such that t 1 , t 2 ∈ C * i , and let S = STS(H n ). If S ∪ F 1 (S) and S ∪ F 2 (S) are two self-embeddings, then they are isomorphic, Proof The Frobenius automorphisms F(x) = x 2 s over F m , for s ∈ {1, 2, . . . , m − 1}, are well-known examples of permutations π F ∈ S n transforming S = STS(H n ) into itself. Indeed, the triples (a, b, c) of S are such that a + b = c, where a, b, c ∈ F m \{0}, so (a + b) 2 s = a 2 s + b 2 s = c 2 s giving that (F(a), F(b), F(c)) are also triples in S.
Let t 1 ∈ C i and t 2 ∈ C j , where C i and C j are the inverse cyclotomic cosets such that Up to a Frobenius automorphism F(x) = x 2 s for some s ∈ {1, 2, . . . , m − 1}, we can assume that t 1 is the multiplicative inverse of t 2 modulo 2 m − 1. Hence, (x t 1 ) t 2 = x, which means that F 2 (F 1 (x)) = x, and the corresponding permutations π F 1 and π F 2 satisfy π F 2 = π −1 F 1 . Therefore, in general, F 2 = F −1 1 • F, and again the two self-embeddings S ∪ F 1 (S) and S ∪ F 2 (S) are isomorphic.
Finally, by Theorem 1 and Proposition 3, we have that

Proposition 5 For any non prime m, there is not any self-embedding in a closed surface for the STS(H n ) given by a monomial power permutation.
Proof Let us assume there is a self-embedding in a closed surface for the STS(H n ) given by a permutation F(x) = x t , that is, such that gcd(t, n) = 1, where n = 2 m − 1.
Let m be a divisor of m such that 1 < m < m. Then, n = 2 m − 1 divides n = 2 m − 1. Let b = n/n and α be a primitive element in F m . Hence, α b is a primitive element in a subfield K ⊂ F m of 2 m elements. Since F is a permutation, gcd(t, n) = 1, and we have that F(α b ) = α tb generates a finite field of 2 m elements which coincides with F(K ) ⊂ F m .
We will prove the statement by contradiction. We can construct the rotation line at point 1 as (3). Then, we can consider a 1 = α tb ∈ F(K ). Therefore, a i+1 ∈ F(K ) for i = 1, 2, . . . , 2 m−1 − 2. All these elements a i , together with the element 1 and the elements 1 + a i , for all i = 1, 2, . . . , 2 m−1 − 1, should give us all the elements in F m , by Proposition 2. However, these elements belong to F(K )\{0} and, since |F(K )| = 2 m and m < m, this leads to a contradiction. Proof Using Proposition 2 and the Magma software package [7], we found all selfembedding permutations for the STS(H n ) in closed surfaces, where n = 2 m − 1 and m ≤ 19, given by monomial power permutations, F(x) = x t over F m such that gcd(t, n) = 1. We also computed the parameter v F (a) for all found self-embedding permutations F and all a ∈ F m \{0}. By Propositions 3 and 4, we just had to compute v F for one representative element of the set C * t . In Tables 1 and 2, all these values are listed. By Proposition 5, for any non prime m, there is not any self-embedding monomial power permutation in a closed surface.
Since the parameter v F is an invariant, by Theorem 1, the self-embeddings having different parameters v F in Tables 1 and 2 are nonisomorphic. For m = 3 and m = 5, this parameter gives a complete classification, since there is only one class. It is well known that the case F(x) = x 3 for m = 3 is the torus given by STS(H 7 ). For m = 7, there are at most 4 classes of nonisomorphic such self-embeddings. Since the self-embedding permutations F 1 (x) = x 7 and F 2 (x) = x 21 have the same parameter v F 1 = v F 2 = 50, we cannot assure whether they are isomorphic or not. However, using Magma, it is easy to check that the corresponding self-embeddings are not isomorphic, so there are exactly 4 classes of nonisomorphic such self-embeddings.
For the classes having the same parameter v F , we computed V * F , which is also an invariant, by Theorem 1. For m = 11, the self-embedding permutations given by F 1 (x) = x 21 and However, using Magma, we checked that the weight distributions of codes C F 1 and C F 2 are different and, by Proposition 7 below, we can conclude that the two self-embeddings are nonisomorphic. On the other hand, for the self-embedding permutations F 1 (x) = x 73 and F 2 (x) = x 165 over F 11 , which also have the same parameter v F 1 = v F 2 = 826, just using that V * F 1 = V * F 2 , we have that they are nonisomorphic. Therefore, there are exactly 14 nonisomorphic such self-embeddings. For m = 13, 17 and 19, Tables 3 and 4 show the parameter V * F for the sets C * t having the same parameter v F in Tables 1 and 2. Note Table 1 Classification of all self-embedding monomial power permutations in closed surfaces, that all classes can be distinguish, either using just the invariant v F or using also the invariant V * F . In order to check the nonorientability, we can start taking all the glued triples corresponding to the rotation line for the element 1. Then, we take any element x = 1 and glue all the triples having the element x in the first chosen set of triples. After that, we check whether there is an ordered pair (u, v) such that the triple (x, u, v) ∈ STS(H n ) and (1, u, v) ∈ F(STS(H n )) (or vice versa (1, u, v) ∈ STS(H n ) and (x, u, v) ∈ F (STS(H n ))). If we obtain this property, then the surface is nonorientable. Finally, the computer search using the Magma software  package showed that the obtained self-embeddings are nonorientable at least for all m ≤ 19. Therefore, the result follows.
As far as we know, all found self-embedding permutations in closed surfaces given by Theorem 2 are new with the exception of the one given for m = 3. By Proposition 1, these self-embeddings are cyclic for all m.
Moreover, note that for every m ∈ {3, 5, 7, 11, 17}, there exists a cyclotomic coset C * i such that for all permutations F(x) = x t with t ∈ C * i , v F = 2 m−1 is maximum, so the corresponding self-embedding permutations are also APN. In Table 1, we point out these cases with (·) AP N . Note that for any non prime m and for m ∈ {13, 19} there are no APN self-embeddings in a closed surface. sponding code C F has minimum distance 5. In fact, F is an APN function if and only if C F has minimum distance 5 [8]. Therefore, since C F = H n ∩ π F (H n ), any APN permutation F gives two nonintersecting Hamming Steiner triple systems, STS(H n ) and F(STS(H n )), Actually, the invariants v F and V * F given in Sect. 2, can be also used to distinguish between CCZ-equivalent classes of monomial power permutations, not necessarily APN.
The next proposition gives a characterization of the APN permutations using the parameter v F (a), defined in the previous section for all a ∈ F m \{0}.

Proposition 6 Let F be any bijective function over
This means that there are 2 m−1 different values b ∈ F m \{0}, such that the equation has two solutions, and there is no solution for the other values of b. Since (9) is equivalent to (1), F is an APN permutation. Vice versa, assume that F is an APN permutation, and the values x + F −1 (a + F(x)) are not all different (up to a multiplicity of two), for a fixed a ∈ F m \{0}. Hence, there exists a value b = 0 such that (9) has more than two solutions. Again, from (9), we obtain that (1) has more than two solutions, which contradicts the assumption about F being APN.
The concept of CCZ-equivalence is not so fine than the concept of self-embedding equivalence as we show in the next two propositions.

Proposition 7
Let F 1 and F 2 be two bijective functions over F m such that F 1 (0) = 0 and F 2 (0) = 0. If F 1 and F 2 are isomorphic self-embedding permutations for the STS(H n ), then the corresponding codes C F 1 and C F 2 are equivalent.
Proof It is straightforward.

Corollary 1 Any two isomorphic self-embedding permutations for the same STS(H n ) are CCZ-equivalent.
Proof Let F 1 and F 2 be two self-embedding permutations for the STS(H n ). By Proposition 7, the codes C F 1 and C F 2 are equivalent, so the extended codes are equivalent, too. Then, we conclude that F 1 , F 2 are CCZ-equivalent.
Proposition 8 Let F 1 , F 2 be two CCZ-equivalent monomial power permutations. Then, Proof Given a monomial power permutation F, by Proposition 3, we have that v F = v F (a) and V * F = V * F (a) for any a ∈ F m \{0}, so we can just take a = 1. Moreover, we know that v F (1) is the number of values b = 0 for which (1) has solutions in F m for a = 1. Note that if x is a solution of this equation, then x + b is also a solution, so the solutions come in pairs and the maximum value of v F is 2 m−1 , which is reached when F is an APN permutation, by Proposition 6. Hence, the permutations F in all classes of CCZ-equivalent monomial power permutations which are APN satisfy that v F = 2 m−1 and V * F = {1 ∧ (2 m−1 − 1)}. Note that if F 1 is an APN function and F 2 is CCZ-equivalent to F 2 , then F 2 is also an APN function [8].
If F is not an APN permutation, then (1) has more than a pair of solutions for some values of b and a = 1. When this happens, there is a connection with the quadruples in C * F , which is the extended code of C F . For example, if x, x + b and y, y + b are two different pairs of solutions of (1), then the codeword given by the quadruple (x, x + b, y, y Or, for instance, if x, x + b; y, y + b; and z, z + b are three different pairs of solutions, the quadruples ( x, x + b, y, y + b), (x, x + b, z, z + b), (y, y + b, z, z + b) give three codewords in C * F for the same argument. In general, if n b is the number of solutions of (1) for b and a = 1, there are c b = n b /2 2 quadruples in C * F associated to b. Note that if n b = 2, there is only a pair of solutions of (1) and we have that c b = 0. Since the same quadruple is associated to 1 Let is the number of elements that appear i times in the multisetṼ F .
nonzero terms corresponding to the values b for which (1) has more than a pair of solutions.
Let F 1 and F 2 be two CCZ-equivalent monomial power permutations, such that they are not APN. Then, there exists a bijection between the codewords corresponding to the quadruples in both codes C * F 1 and C * F 2 , given by a permutation π. Hence, the set of c b quadruples in C * F 1 goes to a set of cb quadruples in C * F 2 for an appropriateb. Then, the number of quadruples in both codes C * F 1 and C * F 2 is the same: where for each b ∈ F m \{0} there exists an appropriateb ∈ F m \{0} such that c b = cb. Not only the number of nonzero terms in the corresponding sums are the same, but also the repeated values. Hence, v for i > 1, we can extend the equality for i = 1. Therefore, we can conclude that V * It is clear that dealing with monomial power permutations, the rotation lines at any two points are the same up to a permutation. Therefore, it is enough to consider the rotation lines at one point, for example, the point 1. The rotation line spectrum at point 1 can be used to classify monomial power permutations, up to self-embedding isomorphism, since any two isomorphic self-embedding permutations (regardless of they are monomial or not) have equivalent rotation schemes, so also the same rotation line spectrums up to a permutation.
For any m ≤ 17, Tables 5 and 6 show all APN monomial power permutations F(x) = x t over F m , taking just one representative up to self-embedding isomorphism by Proposition   rotation line spectrum at point 1. For lack of space, the full rotation line spectrum is not given in these tables. However, we describe a reduced rotation line spectrum including only the different cardinalities of all rotation lines at point 1, since this is enough to distinguish all the cyclotomic classes C * t , which represent all the nonisomorphic classes of APN monomial power permutations. Note that at least for all m ≤ 17, all APN monomial power permutations in the same CCZ-equivalent class have the same number of rotation lines, so the classification given by the self-embedding isomorphism coincides with the CCZ-equivalence. Proof Note that F −1 (x) = F(x), since F 2 (x) = x for all x ∈ F m \{0}. Without loss of generality, we can consider any point a as the starting point. By the arguments shown after Proposition 2, the rotation lines R 1 , R 2 , . . . , R s at point a, where s = rl(a), give a partition of the n − 1 = 2 m − 2 elements in F m \{0, a}. Given any of the rotation lines, R j , we can write it as R j = [a 1 , a + a 1 ; a 2 , a + a 2 ; . . . ; a r j , a + a r j ], where a 1 is any element in F m \{0} such that a 1 = a and a i+1 = F(F −1 (a) + F −1 (a + a i )) for all i ∈ {1, . . . , r j − 1}. It is easy to check that a 2 = a 1 if and only if x 2 + x + 1 = 0 has solutions over F m , so if and only if m is even. When m is even, the equation has two solutions and we obtain a rotation line with 2 points. Otherwise, when a 1 = a 2 , then a 4 = a 1 , and the rest of rotation lines have always 6 points.
From Tables 5 and 6, it can be observed that the minimum number of points in a rotation line is 6. In the next proposition, we prove that this is true in general for any m and any APN permutation.
Proposition 10 Let F be any bijective function over F m such that F(0) = 0. If the permutation F is APN, then any rotation line at any point has at least 6 points and at most 2 m − 2 points.
Proof Note that the minimum distance of the code C F = H n ∩ π F (H n ) corresponding to an APN permutation F is 5 [8]. Therefore, there is not any rotation line having 2 points, because there are no common triples in the Hamming codes H n and π F (H n ). Let us assume that there is a rotation line having 4 points for some element a: [a 1 , a +a 1 ; a 2 , a +a 2 ]. Then, the triples (a, a 1 , a + a 1 ), (a, a 2 , a + a 2 ) belong to H n and the triples (a, a + a 1 , a 2 ), (a, a + a 2 , a 1 ) belong to π F (H n ). Since H n and π F (H n ) are linear codes, we obtain the common quadruple (a 1 , a + a 1 , a 2 , a + a 2 ) ∈ H n ∩ π F (H n ) = C F . Therefore, the minimum distance in C F would be 4, which is a contradiction. Then, any rotation line at any point has at least 6 points.
The upper bound corresponds to the case when there is only one rotation line at a given point, so it has 2 m − 2 points.
The lower bound given in Proposition 10 is attainable by the APN permutation F corresponding to the Melas code C F for any length n = 2 m − 1, where m is odd, by Proposition 9. On the other hand, the upper bound corresponds to an APN self-embedding permutation in a closed surface. These self-embeddings are pointed out in Table 1 with (·) AP N . Recall that they exist at least for m ∈ {3, 5, 7, 11, 17}, and there are none, at least for any non prime m and for m ∈ {13, 19}.

Conclusions
We classified, up to isomorphism, all self-embedding monomial power permutations in closed surfaces of the Hamming Steiner triple system STS(H n ) for m ≤ 22. The existence of such self-embeddings and their classification for all prime m ≥ 23 is still an open problem. The found and classified ones are cyclic and nonorientable. The cyclicity is proven for all m, and the nonorientability is checked only for all m ≤ 19 using Magma. For m ∈ {3, 5, 7, 11, 17}, there exists one class of these permutations which is also APN, but for m ∈ {13, 19}, there is not any APN monomial power self-embedding permutations in a closed surface.
We established new invariants, v F and V * F , to distinguish CCZ-equivalent monomial power permutations. Up to m ≤ 17, the classification of APN monomial power permutations, given by the self-embedding isomorphism, coincides with the CCZ-equivalence. It is still not known whether this is also true for any m ≥ 19. In any case, since two isomorphic self-embedding permutations are CCZ-equivalent, we can use the rotation line spectrum as a first step to obtain a classification, up to CCZ-equivalence, for any permutation not only for monomial power permutations.