Lattice paths with given number of turns and semimodules over numerical semigroups

Let \Gamma=<\alpha, \beta>be a numerical semigroup. In this article we consider several relations between the so-called \Gamma-semimodules and lattice paths from (0,\alpha) to (\beta,0): we investigate isomorphism classes of \Gamma-semimodules as well as certain subsets of the set of gaps of \Gamma, and finally syzygies of \Gamma-semimodules. In particular we compute the number of \Gamma-semimodules which are isomorphic with their k-th syzygy for some k.


Introduction
In our paper [4] we considered Hilbert series of graded modules over the polynomial ring R = F[X, Y ] with deg(X) and deg(Y ) being coprime. The central result was an arithmetic criterion for such a series to be the Hilbert series of some finitely generated R-module of positive depth. This criterion is formulated in terms of the numerical semigroup generated by deg(X) and deg(Y ). For reader's convenience we recall some basic vocabulary of this theory here.
Let Γ be a sub-semigroup of N such that the greatest common divisor of all its elements is equal to 1. Then the set N \ Γ has only finitely many elements, which are called the gaps of Γ. Such a semigroup is said to be numerical. The crucial notion in [4] was that of a fundamental couple: Let α, β > 0 be coprime integers and let G denote the set of gaps of α, β . An (α, β)-fundamental couple [I, J] consists of two integer sequences I = (i k ) m k=0 and J = (j k ) m k=0 , such that (0) i 0 = 0.
One of the problems considered in this article will be the counting of sets of integers like those appearing in the first position of a fundamental couple. We coin a name for these sets: Definition 1.1. Let Γ be a numerical semigroup. A set {x 0 = 0, x 1 , . . . , x n } ⊆ N is called Γ-lean if |x i − x j | / ∈ Γ for 0 ≤ i < j ≤ n.
The next two sections deal with objects related to Γ-lean sets: we begin with isomorphism classes of Γ-semimodules. In section 3 we consider certain lattice paths; from this section on, Γ is restricted to be generated by two elements. In the last sections we turn our attention to the second position of a fundamental couple: we identify the sequences J appearing there with so-called syzygies of Γ-semimodules and investigate their relation with lattice paths. The process of taking syzygies can be iterated -our final result allows to compute the number of semimodules ∆ whose k-th syzygy is isomorphic with ∆ for some k.

Generators of Γ-semimodules
Let Γ be a numerical semigroup. A Γ-semimodule ∆ is a non-empty subset of N such that ∆ + Γ ⊆ ∆. A system of generators of ∆ is a subset E of ∆ with It is called minimal if no proper subset of E generates ∆. Note that, since ∆ \ Γ is finite, every Γ-semimodule is finitely generated. Lemma 2.1. Every Γ-semimodule ∆ has a unique minimal system of generators.
Proof. Inductively we construct a sequence (x i ) of elements of ∆ starting with x 1 = min ∆ such that any system of generators has to contain this sequence. If x 1 , . . . , x n are already constructed but do not generate ∆ we set x n+1 = min ∆ \ ∪ n i=1 (x i + Γ). After finitely many steps we arrive at a system of generators x 1 , . . . , x r , and by construction it is clear that this system is minimal and that any system of generators must contain x 1 , . . . , x r . Lemma 2.2. Let x 1 , . . . , x r be the minimal system of generators of a Γ-semimodule. Then |x i − x j | is a gap of Γ for all i = j. Conversely, any subset {x 1 , . . . , x r } of N with this property minimally generates a Γ-semimodule.
Proof. We may assume x j > x i for j > i. Then, by minimality, Two Γ-semimodules ∆, ∆ ′ are called isomorphic if there is an integer n such that x → x + n is a bijection from ∆ to ∆ ′ . For every Γ-semimodule ∆ there is a unique semimodule ∆ ′ ∼ = ∆ containing 0; such a Γ-semimodule is called normalized.
The semimodule ∆ • := {x − min ∆ | x ∈ ∆} is called the normalization of ∆. It is the unique semimodule isomorphic to ∆ and containing 0. Corollary 2.3. The minimal system of generators of a normalized Γ-semimodule is Γ-lean, and conversely, every Γ-lean set of N minimally generates a normalized Γ-semimodule. Hence there is a bijection between the set of isomorphism classes of Γ-semimodules and the set of Γ-lean sets of N.

Lattice paths and α, β -lean sets
From now on we only consider numerical semigroups with two generators α < β. In this case there is a connection between Γ-lean sets and certain lattice paths which allows to deduce a formula for the number of α, β -lean sets. (2) Any integer n > 0 has a unique presentation n = pαβ − aα − bβ with integers p > 0, 0 ≤ a < β and 0 ≤ b < α.
Therefore an α, β -lean set yields a lattice path with steps downwards and to the right from (0, α) to (β, 0) not crossing the diagonal, where the points identified with the gaps mark the turns from x-direction to y-direction. In the sequel those turns will be called ES-turns for short.
(Note that in the first component I = (i k ) m k=0 of a fundamental couple the numbering of elements is that of Corollary 3.3 reversed, see [4,Corollary 3.21 a)]. Hence in the path associated to I the ES-turns are numbered from right to left. One could avoid this inversion by considering paths from (β, 0) to (α, 0) or by using a different orientation of the diagram, but we prefer our version for typographical reasons.) Conversely, for every lattice path from (0, α) to (β, 0) not crossing the diagonal the points of the ES-turns can be identified with the gaps in an α, β -lean set: Lemma 3.4. Let α, β be coprime positive integers. Then there is a bijection between the set of α, β -lean sets and the set of lattice paths from (0, α) to (β, 0) not crossing the diagonal.
Therefore counting of α, β -lean sets is equivalent to counting of such lattice paths. The latter was considered by Bizley in [2]. The main idea used there even allows to count the paths with a certain number of ES-turns.
The number of all lattice paths with r ES-turns from (0, α) to (β, 0) is easily computed: The r turning points have x-coordinates in the range {1, . . . , β − 1} and also y-coordinates in the range {1, . . . , α − 1}. Since the sequence of coordinates has to be increasing resp. decreasing there are β−1 r α−1 r lattice paths. We have to determine how many of these paths stay below the diagonal. To this end we use the concept of a cyclic permutation of a path.
A lattice path with r ES-turns can also be described by a 2 × (r + 1)-matrix where the i-th column contains the numbers of steps downwards and to the right the path takes between the (i − 1)-th and the i-th turning points (where the 0-th and (r + 1)-th points are to be understood as (0, α) resp. (β, 0)). For the path in the example above we get the matrix 2 1 1 1 1 2 1 3 .
A cyclic permutation of the path is a path belonging to the matrix with cyclically permuted columns. The permuted matrix 1 1 2 1 1 3 1 2 yields the path One can also imagine a cyclic permutation in a different way. We extend the path with turning points P i = (x i , y i ) beyond (β, 0) with points Q i = (x i + β, y i − α), thus amending a second copy of the original path. The cyclic permutations are the paths from P i to Q i with turning points P i+1 , . . . , P r , (β, 0), Q 1 , . . . , Q i−1 : A lattice path with r turning points admits r + 1 cyclic permutations. As we will show now there is always exactly one permutation staying below the diagonal: Again we consider the doubled path as described above. Let g 0 denote the line through P 0 := (0, α) and Q 0 := (β, 0) and g i the line through P i and Q i for i = 1, . . . , r. Note that all these lines are parallel and that, since α and β are coprime, there is no turning point between P i and Q i lying on g i . Hence there is one line g j , j ∈ {0, . . . , r} namely the one with the greatest distance from the origin, such that the path stays below this line.
Since the line g i yields the diagonal of the i-th cyclic permutation of the original path, indeed exactly one of the permuted paths stays below the diagonal; hence we have proven: Proposition 3.5. Let α and β be two coprime positive integers.
1. For every lattice path from (0, α) to (β, 0) there is exactly one cyclic permutation staying below the diagonal. 2. The number of α, β -lean sets with r gaps equals the number of lattice paths with r ES-turns from (0, α) to (β, 0) staying below the diagonal, and this number is given by In combination with Corollary 2.3 and Lemma 3.4 this result yields the following theorem: Theorem 3.6. Let α, β, r ∈ N with gcd(α, β) = 1. Then the following numbers Using standard techniques one can also deduce a formula for r≥0 L α,β (r), recovering results of Bizley, resp. Beauville, Fantechi-Göttsche-van Straten, and Piontkowski: The Vandermonde convolution yields which implies the following result.

Syzygies of α, β -semimodules and lattice paths
We consider now the sequences appearing in the second position of a fundamental couple. Let [I, J] be a fundamental couple with sequences I = [i 0 = 0, . . . , i n ] and J = [j 0 , . . . , j n ]. By definition, the elements j 1 , . . . , j n−1 are gaps of α, β such that j k ≡ i k mod α and j k ≡ i k+1 mod β.
An inspection of the lattice path belonging to I shows that these gaps j 1 , . . . , j n−1 correspond to the inner SE-turning points of the path. By extension of the labeling beyond the axis we can even identify j 0 and j n with the remaining SE-turns. For illustration see again the example of the previous section: Next we explain the meaning of J in terms of α, β -semimodules: Every α, βsemimodule ∆ yields another α, β -semimodule Syz(∆).
Definition 4.1. Let I be an α, β -lean set, and let ∆ be the α, β -semimodule generated by I. The syzygy of ∆ is the α, β -semimodule The semimodule Syz(∆) consists of those elements in ∆ which admit more than one presentation of the form i + x with i ∈ I, x ∈ α, β . The name syzygy may be justified by considering an analogue of ∆ in the setting of commutative algebra: the module ker ϕ ist non-zero exactly in the degrees contained in Syz(∆).
The connection between fundamental couples and syzygies is described in the following theorem: Proof. By definition of a fundamental couple we have j k = i k + rα = i k+1 + sβ with some r, s ∈ N, hence the inclusion ⊇ is clear. In order to show the other inclusion, we consider i k + α, β ∩ i m + α, β . For every γ m ∈ α, β we have i m + γ m ∈ i k + α, β if and only if i m − i k + γ m ∈ α, β . As mentioned in the previous section, i k and i m can be written in the form by Lemma 3.2 we may assume a k > a m and b k < b m . Since This means and on the other hand Proof. This follows immediately from j k ∈ i k + α, β ∩i k+1 + α, β for k = 1, . . . , n−1 resp. j n ∈ i 0 + α, β ∩ i n + α, β and the previous theorem.

Orbits
Let [I, J] a fundamental couple and let y 0 y 1 . . . y n x 0 x 1 . . . x n be the matrix describing the path for the semimodule ∆ generated by I. We consider a second lattice path from (0, b n ) (the point associated to j n ) to (β, b n − α) with ES-turns in the SE-turning points of the first path (those points representing j n−1 , . . . , j 0 ). The matrix for this path is given by It is easily seen that-up to a cyclic permutation of columns-this matrix also describes the path belonging to the normalization ∆ • of ∆: In terms of lattice paths normalizing ∆ means translation of the path such that the ES-turn belonging to min J is moved to (0, α) and the part of the path left of this point will be appended behind the former end point.
The procedure of building a syzygy can be iterated; we set From the matrix description of the path for Syz(∆) it is clear that Syz (n+1) (∆) ∼ = ∆. Now we consider under which conditions even lower syzygies of ∆ are isomorphic with ∆.
We want to count the number of ℓ-orbits of α, β -semimodules with n generators. To this end we investigate the structure of a semimodule ∆ with Syz (ℓ) (∆) ∼ = ∆; we may restrict our attention to the case of ℓ dividing n, since the length of an orbit can be viewed as the order of an element in the cyclic group of order n. Let y 0 y 1 . . . y n−1 x 0 x 1 . . . x n−1 be the matrix for the path belonging to ∆. Then, as mentioned above, this matrix and the matrix y ℓ y ℓ+1 . . . y ℓ−2 y ℓ−1 have to be equal up to cyclic permutation of columns. This means that there exists a k ∈ {1, . . . , n − 1} such that we may assume that k is minimal with this property. Since By induction we get x j = x rk+j for j ∈ {0, . . . k − 1}, r ≥ 0. Hence the bottom row of the matrix is of the form On the other hand we can find a minimal m ∈ {2, . . . , n} such that x j = β, (5.1) the numbers m ′ and k ′ divide α resp. β, so in particular they are coprime. By assumption, ℓ is the least positive integer p such that the matrices y 0 y 1 . . .
contain the same columns. This is the case if and only if there are r, s ∈ N with p + sm = rk. This implies that p has to be contained in the ideal generated by k and m. Hence, by minimality of ℓ, we get ℓ = gcd(k, m), and so we may write k =kℓ and m =mℓ. From kk ′ = n = mm ′ we getkk ′ =mm ′ = n ℓ ; by gcd(k,m) = 1 this impliesk = m ′ andm = k ′ , and by k ′ | α and m ′ | β moreover k = gcd(β, n ℓ ) and m = gcd(α, n ℓ ), in particular n ℓ | αβ. By now we have shown the following proposition: where k = ℓ · gcd(α, n ℓ ) and m = ℓ · gcd(β, n ℓ ). In fact the structure described in the previous proposition is shared by all α, βsemimodules ∆ with n generators and Syz (ℓ) (∆) ∼ = ∆-not only by elements of ℓ-orbits: Lemma 5.3. Let ∆ be an α, β -semimodule with n generators, let ℓ ∈ N be a divisor of n. If Syz (ℓ) (∆) ∼ = ∆ then the matrix for ∆ can be written in the form mentioned in Proposition 5.2.  Since these blocks cannot be split into smaller ones, the corresponding semimodule cannot be part of a d-orbit with d < ℓ.
Lemma 5.3 allows to count α, β -semimodules ∆ with Syz (ℓ) (∆) ∼ = ∆ and n generators. Using the same notation as in the deduction of Proposition 5.2, we find the following: By (5.1) the steps in the y-block sum up to α m ′ , therefore the partial sums r j=0 y j for r = 0, . . . , m − 2 (these are the y-coordinates of the first m − 1 ES-turns in the corresponding path) have to be chosen in the range 1, . . . , α m ′ − 1. Hence there are α, β -semimodules ∆ with Syz (ℓ) (∆) ∼ = ∆ generated by n elements.
In particular we get a formula for the number of α, β -fixed points: Corollary 5.6. For any integer n ≤ α with n | αβ there are α, β -fixed points with n generators.
(1) In the case of n = ℓ the number provided by Theorem 5.5 agrees with that of all α, β -semimodules with n generators (Thm. 3.6), in accordance to the fact that Syz (n) (∆) ∼ = ∆ for all these semimodules.
(2) For n = α the formula (5.4) yields 1 α β−1 α−1 , which equals L α,β (α−1). Hence all α, β -semimodules with maximal number of generators are fixed points-in this case there are only entries "1" in the top row of the matrix. Note that in the case of α and β being prime numbers there are no other fixed points.
One has to keep in mind that formula (5.3) does not only count the elements with n generators in the ℓ-orbits, but all semimodules with n generators such that Syz (ℓ) (∆) ∼ = ∆, including those with Syz (d) (∆) ∼ = ∆ and d < ℓ, in particular the fixed points. However, it is possible to compute the number of ℓ-orbits using the inclusion-exclusion principle, see the next and closing example.
By considering the corresponding lattice path one can deduce that the admissible permutation of the path is described by