On kernels of descent statistics

The kernel $\mathcal{K}^{\operatorname{st}}$ of a descent statistic $\operatorname{st}$, introduced by Grinberg, is a subspace of the algebra $\operatorname{QSym}$ of quasisymmetric functions defined in terms of $\operatorname{st}$-equivalent compositions, and is an ideal of $\operatorname{QSym}$ if and only if $\operatorname{st}$ is shuffle-compatible. This paper continues the study of kernels of descent statistics, with emphasis on the peak set $\operatorname{Pk}$ and the peak number $\operatorname{pk}$. The kernel $\mathcal{K}^{\operatorname{Pk}}$ in particular is precisely the kernel of the canonical projection from $\operatorname{QSym}$ to Stembridge's algebra of peak quasisymmetric functions, and is the orthogonal complement of Nyman's peak algebra. We prove necessary and sufficient conditions for obtaining spanning sets and linear bases for the kernel $\mathcal{K}^{\operatorname{st}}$ of any descent statistic $\operatorname{st}$ in terms of fundamental quasisymmetric functions, and give characterizations of $\mathcal{K}^{\operatorname{Pk}}$ and $\mathcal{K}^{\operatorname{pk}}$ in terms of the fundamental basis and the monomial basis of $\operatorname{QSym}$. Our results imply that the peak set and peak number statistics are $M$-binomial, confirming a conjecture of Grinberg.


Introduction
This paper studies ideals of the ring of quasisymmetric functions associated with shufflecompatible permutation statistics.We begin by giving the relevant definitions.
We call π a permutation of length n if it is a sequence of n distinct positive integers, displayed as the word π = π 1 π 2 • • • π n .Let |π| denote the length of a permutation π and let P n denote the set of all permutations of length n.Note that P n contains the set S n of permutations of [n] := {1, 2, . . ., n}, as every permutation in S n can be written in one-line notation as a sequence of n distinct positive integers, but P n and S n are not the same.For example, 83416 is an element of P 5 but not of S 5 .
Given a permutation π ∈ P n , define the standardization std π of π to be the unique permutation in S n obtained by replacing the smallest letter of π by 1, the second smallest by 2, and so on.For example, std 83416 = 52314.A permutation statistic is a function st defined on permutations such that st π = st σ whenever std π = std σ. 1 Note that every permutation statistic st defined on S n can be extended to P n by taking st π := st(std π).
A classical example of a permutation statistic is the descent set, defined as follows.We say that i ∈ [n − 1] is a descent of a permutation π ∈ P n if π i > π i+1 , and the descent set The information contained inside the descent set can also be encoded as an integer composition.First observe that every permutation can be uniquely decomposed into a sequence of maximal increasing consecutive subsequences called increasing runs.The descent composition of π, denoted Comp π, is the composition whose parts are the lengths of the increasing runs of π in the order that they appear.For example, the increasing runs of π = 379426 are 379, 4, and 26, so Comp π = (3, 1, 2).If Comp π = (j 1 , j 2 , . . ., j m ), then the descent set of π is given by Des π = {j 1 , j 1 + j 2 , . . ., j 1 + j 2 + • • • + j m−1 }. (1.1) where n is the length of π.We shall use the notations L ⊨ n and |L| = n to indicate that L is a composition of n, and C for the set of all compositions.By convention, we allow the "empty composition" ∅ to be a composition of 0; this is the descent composition of the empty permutation, the sole element of P 0 .A permutation statistic st is called a descent statistic if Comp π = Comp σ implies st π = st σ-that is, if st depends only on the descent composition, or equivalently, on the descent set and the length.Whenever st is a descent statistic, we may write st L for the value of st on any permutation with descent composition L.Besides the descent set Des, examples of descent statistics include the descent number des, major index maj, peak set Pk, peak number pk, exterior peak set Epk, valley set Val, and valley number val; their definitions will be given later.
For a descent statistic st, two compositions J and K are said to be st-equivalent if st J = st K and |J| = |K|; when this is the case, we write J ∼ st K. Then the kernel of st, denoted K st , is the subspace of the Q-algebra QSym of quasisymmetric functions, where F L refers to the fundamental quasisymmetric function The kernel of a descent statistic was defined by Grinberg in [8,9], 2 which was a continuation of the work by Gessel and Zhuang on shuffle-compatible permutation statistics [6].Gessel and Zhuang defined the shuffle algebra A st of a shuffle-compatible permutation statistic (see Section 2.3 for definitions), and showed that whenever a descent statistic st is shufflecompatible, its shuffle algebra is isomorphic to a quotient of QSym.The kernel K st is an ideal of QSym if and only if st is shuffle-compatible, and is in fact the kernel of the canonical projection from QSym to A st .
Using their framework, Gessel and Zhuang proved that a number of descent statistics are shuffle-compatible and gave explicit descriptions for their shuffle algebras, but left the shuffle-compatibility of the exterior peak set Epk as a conjecture.Grinberg proved the shufflecompatibility of Epk and gave two characterizations of the ideal K Epk : one in terms of the fundamental quasisymmetric functions and another in terms of the monomial quasisymmetric functions where L = (j 1 , j 2 , . . ., j m ).Both characterizations have nice combinatorial descriptions involving the underlying compositions.We state these two results together in the following theorem.
Then the ideal K Epk is spanned (as a Q-vector space) in the following ways: Grinberg suggests a systematic study of kernels of descent statistics.One direction of research concerns the M -binomial property: a descent statistic st is said to be M -binomial if K st can be spanned by elements of the form λM J + µM K with λ, µ ∈ Q.For example, it follows from Theorem 0 that Epk is M -binomial, and Grinberg gave a list of other descent statistics-including the peak set Pk and the peak number pk-for which computational evidence suggests are M -binomial as well [8,Question 107].

Overview of results
The purpose of the present work is to continue the study of kernels of descent statistics initiated by Grinberg, with emphasis on the kernels of the peak set and the peak number.Both Pk and pk are shuffle-compatible statistics, so K Pk and K pk are ideals of QSym.We will give characterizations-analogous to the ones given by Grinberg for K Epk -for both ideals, and the ones given in terms of the monomial quasisymmetric functions show that Pk and pk are indeed M -binomial.
To obtain characterizations for the kernels in terms of the fundamental quasisymmetric functions, we prove necessary and sufficient conditions for a subset of { F J − F K : J ∼ st K } to be: (a) a spanning set of K st , and (b) linearly independent.Note that every subset of { F J − F K : J ∼ st K } can be written as for some subset S of { (J, K) : J ∼ st K }, and we associate to S a directed graph G S with vertex set C and edge set S-i.e., there is an edge from J to K if and only if (J, K) ∈ S.
For us, a connected component of a directed graph refers to a connected component of the underlying undirected graph, and a directed graph is called a forest if its underlying undirected graph has no cycles.Theorem 1.Let st be a descent statistic and let S ⊆ { (J, K) : J ∼ st K }.
(a) The kernel K st is spanned by F st S if and only if the connected components of G S are precisely the st-equivalence classes of C-i.e., J ∼ st K if and only if J and K are in the same connected component of G S .

(b)
The set F st S is linearly independent if and only if G S is a forest.
See Figure 1.1 for all relations → 1 , → 2 , and → 3 among compositions of at most 5. Ignoring edge labels, this is also the subgraph of G S for S = { (J, K) : J → 1 K, J → 2 K, or J → 3 K } induced by the compositions of at most 5.
(2, 1) (2, 2) (1, 2, 1) (2, 2, 1) Theorem 2. The ideals K Pk and K pk are spanned (as Q-vector spaces) in the following ways: In fact, there is a simple way to trim the spanning sets in Theorem 2 to obtain bases for K Pk and K pk which still admit nice descriptions, but we will delay the statement of these results until later.
We then use Theorem 2 and a change-of-basis argument to obtain characterizations for these ideals in terms of monomial quasisymmetric functions.Given compositions J = (j 1 , j 2 , . . ., j m ) and K, we write: • J ▷ 1 K if there exists l ∈ [m] for which j l > 2 and K = (j 1 , . . ., j l−1 , 2, j l − 2, j l+1 , . . ., j m ); See Figure 1.2 for all relations ▷ 1 and ▷ 2 , and elements of C, among compositions of at most 5.
Theorem 3. The ideals K Pk and K pk are spanned (as Q-vector spaces) in the following ways: Therefore, Pk and pk are M -binomial.
We note that the shuffle algebra A Pk is isomorphic to Stembridge's algebra Π of peak quasisymmetric functions [17], which occupies an important position in the theory of combinatorial Hopf algebras [2].Our results about K Pk can thus be translated into results about the canonical projection map from QSym to Π.Moreover, K Pk is the orthogonal complement of Nyman's peak algebra [13] (as a nonunital subalgebra of the noncommutative symmetric functions), and similarly K pk is the orthogonal complement of Schocker's Eulerian peak algebra [14].
Peaks and valleys in permutations are related via complementation, and this symmetry will be exploited to obtain from Theorem 2 an analogous result for the kernels of the valley set and valley number statistics.We will give the statement of this result later.

Outline
This paper is organized as follows.Section 2 focuses on background material, including definitions and properties of various descent statistics, the connection between quasisymmetric functions and shuffle-compatibility, and a result from linear algebra which will be used in our later proofs.In Section 3, we first prove a couple general results about spanning sets and linear independence in arbitrary vector spaces, which together imply Theorem 1.We then use Theorem 1 to produce our characterizations for the ideals K Pk and K pk given in Theorem 2, and also obtain linear bases for K Pk and K pk by trimming the spanning sets from Theorem 2 in a simple way.Section 4 will be devoted to the proof of Theorem 3, and Section 5 on the ideals K Val and K val for the valley set and valley number statistics.We end in Section 6 with a discussion of future directions of research.
All vector spaces, algebras, linear combinations, spans, and related notions are over the field Q except in Section 3.1 (where we work over an arbitrary field of characteristic ̸ = 2).

Descent statistics
Recall that a permutation statistic st is a descent statistic if st π = st σ whenever Comp π = Comp σ.The descent set Des is clearly a descent statistic, and other examples of descent statistics include the following: • The descent number des and major index maj.Given a permutation π, define des π := |Des π| and maj π := k∈Des π k to be its number of descents and its sum of descents, respectively.
• The peak set Pk and the peak number pk.Given π ∈ P n , we say that i ∈ {2, 3, . . ., n−1} is a peak of π if π i−1 < π i > π i+1 .Then Pk π is defined to be the set of peaks of π and pk π its number of peaks.
• The exterior peak set Epk and the exterior peak number epk.Given π ∈ P n , we say Then Epk π is defined to be the set of exterior peaks of π and epk π its number of exterior peaks.
Next, recall that the notation Des L refers to the descent set of any permutation with descent composition L, and from Equation (1.1), we have for L = (j 1 , j 2 , . . ., j m ).Similarly, we can use Equation (1.2) to define Comp on subsets: Then Des and Comp are inverse bijections between compositions of n and subsets of [n − 1].
For our characterizations of the ideals K Pk and K pk , it will be helpful to have an explicit formula for the Pk and pk statistics on compositions.The lemma below follows immediately from the fact that the peaks of a permutation occur precisely at the end of its non-final increasing runs of length at least 2.

Quasisymmetric functions and shuffle-compatibility
Quasisymmetric functions arose in the early work of Stanley as generating functions for P -partitions [15], were first defined and studied per se by Gessel [5], and are now ubiquitous in algebraic combinatorics.We review some elementary definitions and results surrounding quasisymmetric functions, emphasizing their role in the theory of shuffle-compatibility; see [16,Section 7.19], [10, Section 5], and [12] for further references.
Let x 1 , x 2 , . . .be commuting variables.A formal power series have the same coefficients in f .Let QSym n denote the vector space of quasisymmetric functions homogeneous of degree n, and let The monomial quasisymmetric functions {M L } L⊨n and the fundamental quasisymmetric functions {F L } L⊨n defined in the introduction are two bases of QSym n , and since (for n ≥ 1) there are 2 n−1 compositions of n, it follows that QSym n has dimension 2 n−1 .Through the inverse bijections Comp and Des, we may also index the monomial and fundamental quasisymmetric functions by subsets C of and it will sometimes be convenient for us to do so.
Let us recall the change-of-basis formulas between the monomial and fundamental bases.First, we say that J ⊨ n refines (or is a refinement of) K ⊨ n if Des K ⊆ Des J. Informally, this amounts to saying that we can obtain K from J by combining some of its adjacent parts.For example, we have that J = (2, 1, 3, 1, 1, 2) refines K = (3, 5, 2) because Des J = {2, 3, 6, 7, 8} contains Des K = {3, 8}, and indeed we have 2 + 1 = 3 and 3 + 1 + 1 = 5.Let us write J ≤ K if J refines K. Then we have Part (a) of the next lemma then follows from inclusion-exclusion. Parts (b)-(c) appear as Propositions 5.10 (b)-(c) of [9].
Our present work on kernels of descent statistics only concerns the vector space structure of the quasisymmetric functions, but it is worthwhile to also discuss the ring structure of QSym as it will allow us to understand the background and motivation for studying these kernels.Let π ∈ P m and σ ∈ P n be disjoint permutations-that is, they have no letters in common.Then we say that τ ∈ P m+n is a shuffle of π and σ if both π and σ are subsequences of τ , and we let π ¡ σ denote the set of shuffles of π and σ.For example, given π = 13 and σ = 42, we have The product of two fundamental quasisymmetric functions is given by where π and σ are any disjoint permutations satisfying In order for the product formula (2.1) to make sense, the multiset { Comp τ : τ ∈ π ¡ σ } must only depend on the descent compositions of π and σ; equivalently, in terms of descent sets, the multiset { Des τ : τ ∈ π ¡ σ } only depends on Des π, Des σ, and the lengths of π and σ.More generally, we say that a permutation statistic st is called shuffle-compatible if for any disjoint permutations π and σ, the multiset { st τ : τ ∈ π ¡σ } giving the distribution of st over π ¡ σ depends only on st π, st σ, and the lengths of π and σ.In other words, (2.1) implies that the descent set Des is a shuffle-compatible permutation statistic, which is implicit in Stanley's theory of P -partitions [15]; the shuffle-compatibility of the statistics des, maj, and (des, maj) follow from Stanley's work as well.
Before proceeding, we note that QSym additionally has the structure of a dendriform algebra [7] and a Hopf algebra (and is in fact the terminal object in the category of combinatorial Hopf algebras [2]).The dendriform structure of QSym is relevant to shuffle-compatibility and the kernels of descent statistics; this connection is not important for our present work but will be touched on in Section 6.

Shuffle algebras and the kernels K st
Motivated by the shuffle-compatibility results implicit in Stanley's work on P -partitions, Gessel and Zhuang [6] formalized the notion of a shuffle-compatible permutation statistic and built a framework for investigating this phenomenon centered around the shuffle algebra of a shuffle-compatible statistic.Let us outline this construction below.
We say that permutations π and σ are st-equivalent if st π = st σ and |π| = |σ|.We write the st-equivalence class of π as [π] st .For a shuffle-compatible statistic st, we associate to st a Q-algebra in the following way.First, associate to st a Q-vector space by taking as a basis the st-equivalence classes of permutations.We give this vector space a multiplication by taking which is well-defined if and only if st is shuffle-compatible.The resulting algebra A st is called the shuffle algebra of st.Observe that A st is graded by length-i.e., [π] st belongs to the nth graded component of A st if π has length n.
When st is a descent statistic, the notion of st-equivalence of permutations induces the notion of st-equivalence of compositions as defined in the introduction, so we can think of the basis elements of A st as being st-equivalence classes of compositions.From this perspective, it is evident from the product formula (2.1) that A Des is isomorphic to QSym with the basis of Des-equivalence classes corresponding to the fundamental quasisymmetric functions.
The following provides a necessary and sufficient condition for a descent statistic to be shuffle-compatible.

Theorem 2.3 (Gessel-Zhuang [6, Theorem 4.3]).
A descent statistic st is shuffle-compatible if and only if there exists a Q-algebra homomorphism ϕ st : QSym → A, where A is a Q-algebra with basis {u α } indexed by st-equivalence classes α of compositions, such that ϕ st (F L ) = u α whenever L is in the st-equivalence class α.When this is the case, the map It follows from Theorem 2.3 that, whenever st is a shuffle-compatible descent statistic, the linear map p st : QSym → A st sending each F L to the st-equivalence class of L is a Q-algebra homomorphism with the same kernel as ϕ st ; this implies that QSym / ker p st is isomorphic to A st as algebras.Note that when st is not shuffle-compatible, it still holds that QSym / ker p st and A st are isomorphic as vector spaces.
Gessel and Zhuang [6] used Theorem 2.3 to give explicit descriptions of the shuffle algebras of a number of descent statistics-including des, maj, Pk, pk, and (pk, des)-which yield algebraic proofs for their shuffle-compatibility.In [8], Grinberg proved Gessel and Zhuang's conjecture that the exterior peak set Epk is shuffle-compatible and gave a characterization of its shuffle algebra, introduced a strengthening of shuffle-compatibility called "LR-shufflecompatibility" which is closely related to the dendriform algebra structure of QSym, and initiated the study of the kernels K st .
Recall that the kernel K st of a descent statistic st is the subspace Later on, we shall use the notation K st n for the nth homogeneous component of K st , so that It is easy to see that K st is precisely the kernel of the linear map p st defined above, hence the name "kernel".The following is then a consequence of Theorem 2.3.

Theorem 2.4 (Grinberg [8, Proposition 101]).
A descent statistic st is shuffle-compatible if and only if K st is an ideal of QSym.When this is the case, A st is isomorphic to QSym /K st as Q-algebras.

Linear expansions and triangularity
Lastly, we state a lemma concerning "invertibly triangular expansions" which will be used in our proof of Theorem 3.This lemma appears (in a slightly different yet equivalent form) in the Appendix to [10], which gives a treatment of some fundamental results from linear algebra for matrices whose rows and columns are indexed by arbitrary objects (rather than numbers).In particular, we are interested in the case when both the rows and columns are indexed by elements of a finite poset S, such that the matrix is "invertibly triangular"-i.e., all the entries a s,s on the "diagonal" are invertible and a s,t = 0 whenever we do not have t ≤ s. (When working over a field, as we do, the condition that a s,s is invertible is equivalent to a s,s ̸ = 0.) Note that this reduces to the typical notion of an invertible lower-triangular n × n matrix upon taking S = [n].
A family (f s ) s∈S indexed by a set S refers to an assignment of an object f s to each s ∈ S. The objects in a family need not be distinct-i.e., we may have f s = f t for s ̸ = t.Roughly speaking, a family (e s ) s∈S can be expanded invertibly triangularly in another family (f s ) s∈S if we can write the e s as linear combinations of the f s such that the coefficients of these linear combinations form an invertibly triangular matrix in the sense described above.However, rather than giving the formal definition of an invertibly triangular expansion in terms of these generalized matrices, it is easier for our purposes to give the following equivalent definition.
Given a Q-vector space V , a finite poset S, and two families (e s ) s∈S and (f s ) s∈S of elements of V , we say that (e s ) s∈S expands invertibly triangularly in (f s ) s∈S if, for each s ∈ S, we can write e s as for some c t ∈ Q with c s ̸ = 0. Importantly, two families have the same span if one can be expanded invertibly triangularly in another.).Let V be a Q-vector space, S a finite poset, and (e s ) s∈S and (f s ) s∈S two families of elements of V .If (e s ) s∈S expands invertibly triangularly in (f s ) s∈S , then span(e s ) s∈S = span(f s ) s∈S .
We note that our definition of "expands invertibly triangularly" is the opposite of that in [10]-i.e., [10] has t < s in place of t > s in (2.2)-but it is clear that Lemma 2.5 still holds as we can simply reverse the order of the poset S.

Characterizations in terms of the fundamental basis
The purpose of this section is to provide proofs for Theorems 1 and 2. In proving Theorem 1, we will first establish a couple general results for arbitrary vector spaces.

Proof of Theorem 1
Throughout this section, fix a field k of characteristic ̸ = 2 and let V be a vector space over k with basis {u s } s∈I (where I is an index set for the basis).Let ∼ be an equivalence relation on I, and let R := { (s, t) ∈ I 2 : s ∼ t } and U := { u s − u t : s ∼ t }.
Consider the subspace W of V spanned by the set U. Note that every subset of U can be written as for some S ⊆ R. We associate to S a directed graph G S with vertex set I and edge set S-i.e., there is an edge from s to t if and only if (s, t) ∈ S. As a special case, let G := G R , so the connected components of G are simply the equivalence classes of I under ∼.More generally, the connected components of G S refine the equivalence classes of I.
Proof.Let s, t ∈ I be in the same connected component of G S .Then there is a sequence where s i−1 ↔ s i means that there is an edge in either direction (not necessarily both) between s i−1 and s i .As a result, we have either Proof.Suppose that s and t are in the same connected component of G S .Then, as in the proof of Lemma 3.1, there is a sequence where s i−1 ↔ s i means that there is an edge in either direction (not necessarily both) between s i−1 and s i .For each i ∈ [k], we have Conversely, suppose that u s − u t ∈ span U S .Let f s : V → k be the linear map defined by f s (u r ) = 1, if s and r are in the same connected component of G S , 0, otherwise.
Recall that if u p − u q ∈ U S , then p and q are joined by an edge, which means f s (u p ) = f s (u q ); after all, s is either in the same connected component of G S as p and q or it is not.Thus, all of the spanning vectors u p − u q of U S belong to the kernel of f s , so span U S ⊆ ker f s .Since Then W is spanned by U S if and only if the connected components of G S are precisely the connected components of G (as sets of vertices, not as subgraphs).
Proof.Suppose that the connected components of G S are those of G. Fix s, t ∈ I satisfying s ∼ t.Then s and t belong to the same connected component of G and thus the same connected component of G S , so u s − u t ∈ span U S by Lemma 3.2.Since u s − u t was arbitrarily taken from U, which spans W , it follows by linearity that W is spanned by U S .Conversely, suppose that W is spanned by U S .To show that G S and G have the same connected components, it suffices to show that for any s, t ∈ I, if s and t are in the same connected component of G then they are in the same connected component of G S .As such, fix s, t ∈ I which belong to the same connected component of G. Then s ∼ t, and so u s − u t ∈ U ⊆ W = span U S .By Lemma 3.2, s and t are in the same connected component of G S , and we are done.Theorem 3.4.Let S ⊆ R. Then U S is linearly independent if and only if G S is a forest.
Proof.Suppose that G S is a forest, and assume toward contradiction that U S is linearly dependent.Then there exists (s, t) ∈ S for which u s − u t is a linear combination of other elements of U S .Let S ′ := S\{(s, t)}, so that u s − u t ∈ span U S ′ .Applying Lemma 3.2 to S ′ , it follows that there is a path from s to t in the underlying undirected graph of G S ′ .Now, recall that there is an edge between s and t in G S because (s, t) ∈ S; combining this edge with the path from s to t in G S ′ yields a cycle in G S , which contradicts G S being a forest.Therefore, U S is linearly independent.
Conversely, suppose that G S is not a forest.Then the undirected graph G S has a cycle (s 1 , s 2 , . . ., s k ), so each of the vectors belongs to U S up to sign (either it belongs to U S or its negative does).However, the sum of these vectors is equal to 0, so U S is linearly dependent.
We can now recover Theorem 1 from Theorems 3.3 and 3.4.
Proof of Theorem 1.Take k = Q, V = QSym, I = C, the basis {u s } to be the fundamental basis of QSym, and ∼ to be st-equivalence of compositions.Part (a) then follows from Theorem 3.3, and part (b) from Theorem 3.4.

Application to the peak set-proof of Theorem 2 (a)
We shall now apply Theorem 1 to obtain spanning sets for the kernels K Pk and K pk as given in Theorem 2. Let us begin with the peak set statistic.Recall the notations → 1 and → 2 defined in the introduction; for convenience, let us write Proof.It is immediate from the definitions of → 1 and → 2 that J → Pk K implies |J| = |K|.So, it remains to show that J → Pk K implies Pk J = Pk K. Suppose that J → 1 K, so that there exists l ∈ [m] for which j l > 2 and K = (j 1 , . . ., j l−1 , 1, j l − 1, j l+1 , . . ., j m ).
Since j l > 2, we have that j l − 1 ≥ 2 and thus Pk J = Pk K by Lemma 2.1 (a).The proof for the case J → 2 K is similar.
We are now ready to prove Theorem 2 (a).
Proof of Theorem 2 (a).We shall apply Theorem 1 (a) to st = Pk.By Lemma 3.5, we may take S = { (J, K) : J → Pk K }.We seek to show that J ∼ Pk K if and only if J and K are in the same connected component of G S , and in light of Lemma 3.1, it remains to prove the forward direction.
Suppose that J ∼ Pk K. Let J α be the composition obtained from J by replacing each part j l > 2 with the parts of the composition (1 j l −2 , 2) ⊨ j l .For example, if J = (3, 2, 4, 1) then J α = (1, 2, 2, 1, 1, 2, 1).Then there is a sequence of compositions satisfying Continuing the example above, we have It follows that J and J α are in the same connected component of G S , and similarly with K and K α .
Next, if 2 is the final part of J α , then let J β be the composition obtained from J α by replacing the final part 2 with two 1s.For instance, if J α = (1, 2, 1, 2, 2) then J β = (1, 2, 1, 2, 1, 1).Otherwise, if J α ends with a 1, then set J β := J α .Note that either J α = J β or J α → 2 J β ; either way, J α is in the same connected component as J β , and thus J is as well.The same holds for K and K β .We then have We claim that J β = K β ; this will imply that J and K are in the same connected component.Assume by contradiction that J β ̸ = K β .Let l be the position of the first part where J β and K β differ.Since J β and K β have all parts 1 or 2, we may assume without loss of generality that the lth part of J β is a 1 and that the lth part of K β is a 2. Note that the lth part of J β or K β cannot be its final part; after all, K β cannot end with a 2 by construction, and if the lth part of J β is its final part then we would have |J β | < |K β |.Thus, Lemma 2.1 (a) implies that the sum of the first l parts of K β is an element of Pk K β but not of Pk J β , which contradicts Pk J β = Pk K β .Therefore, J β = K β .
We have shown that the connected components of G S are precisely the Pk-equivalence classes of compositions; hence the result follows from Theorem 1 (a).
The spanning set for K Pk provided by Theorem 2 (a) is not a basis for K Pk , as the corresponding directed graph is not a forest.For example, upon revisiting Figure 1.1, we see that there is a cycle formed by the relations One way that we can obtain a basis from Theorem 2 (a) is to specify that we must "split" the first entry that we are able to.Then, for example, we no longer have (3, 2) → 2 (3, 1, 1) because we are forced to split the first part, leading to (1, 2, 2).More formally, we have the following: Given compositions J = (j 1 , j 2 , . . ., j m ) and K, let us write J Pk K if l = min{ i : j i > 2, or i = m and j m = 2 } exists and K = (j 1 , . . ., j l−1 , 1, j l − 1, j l+1 , . . ., j m ).
Theorem 3.6.The set { F J − F K : J Pk K } is a linear basis of the ideal K Pk .
Proof.Let S = { (J, K) : J Pk K }, so that we wish to show that F Pk S is a basis of K Pk .We shall first argue that G S is a forest.First, observe that G S has no directed cycles; after all, J Pk K implies that K has more parts than J. Therefore, G S can only fail to be a forest if it has an undirected cycle which is not a directed cycle, and it is not hard to see that this is only possible if two edges of G S have the same tail.(Given an undirected cycle, any attempt to orient the edges of this cycle will either result in a directed cycle or a vertex with outdegree 2.) By definition of Pk , for every composition J there is at most one K for which J Pk K, which means that no vertex of G S is the tail of more than one edge.Therefore, G S is a forest which implies that F Pk S is linearly independent by Theorem 1 (b).The proof of Theorem 2 (a) can be easily adapted to show that F Pk S is a spanning set for K Pk as well.Indeed, we already have J α Pk J β and K α Pk K β , and when forming the sequences J → we can require that the parts be split from left to right so that The rest of the proof proceeds in the same way.

Application to the peak number-proof of Theorem 2 (b)
Similar to the notation → Pk defined in Section 3.2, let us write Proof.If J → 1 K or J → 2 K, then it follows from Lemma 3.5 that J and K are Pk-equivalent and thus pk-equivalent.If J → 3 K, then K has the same parts as J but listed in a different order, which implies pk J = pk K by Lemma 2.1 (b) as well as |J| = |K|.
We now proceed to the proof of Theorem 2 (b).
Proof of Theorem 2 (b).We follow the same approach taken in the proof of part (a).Let S = { (J, K) : J → pk K }, which is a subset of { (J, K) : J ∼ pk K } by Lemma 3.7.From Lemma 3.1, we know that if J and K are in the same connected component of G S then J ∼ pk K, so it remains to prove the converse.
Suppose that J ∼ pk K. Define J β and K β in the same way as in the proof of part (a); as before, J and J β are in the same connected component and the same is true for K and K β .Recall that J β and K β have all parts 1 and 2, and end with a 1.Let J γ be the composition (2 b , 1 a ) where a > 0 is the number of 1s in J β and b is the number of 2s in J β .Then there is a sequence of compositions satisfying For example, if J β = (1, 2, 2, 1, 1), then Note that J γ is in the same connected component of G S as J β and thus J, and similarly with K γ and K. Therefore, J ∼ pk J γ and K ∼ pk K γ .Along with J ∼ pk K, these pk-equivalences imply that J γ ∼ pk K γ , so pk J γ = pk K γ and |J γ | = |K γ |.From Lemma 2.1 (b), we know that the number of peaks is equal to the number of non-final parts of size at least 2, and since both J γ and K γ consist of a sequence of 2s followed by a sequence of 1s, we conclude that J γ = K γ .Hence, J and K are in the same connected component of G S .
Since the connected components of G S are precisely the pk-equivalence classes of compositions, applying Theorem 1 (a) yields the desired result.
Like with K Pk , we shall trim the spanning set for K pk provided by Theorem 2 (b) to yield a basis for this ideal.Given compositions J = (j 1 , j 2 , . . ., j m ) and K, we write J pk K if either J Pk K-or, in the case that l (as in the definition of Pk ) does not exist, if k = min{ i : j i = 1 and j i+1 = 2 } exists and K = (j 1 , . . ., j k−1 , j k+1 , j k , j k+2 , . . ., j m ).
Informally speaking, here we are also requiring the "swapping" (→ 3 ) to occur from left to right and only after all of the "splitting" (→ 1 and → 2 ) has taken place.
Given a composition J = (j 1 , j 2 , . . ., j m ), let us call the pair (j k , j l ) an inversion of the composition J if 1 ≤ k < l ≤ m and j k > j l .
Theorem 3.8.The set { F J − F K : J pk K } is a linear basis of the ideal K pk .
Proof.Let S = { (J, K) : J pk K }; we wish to show that F pk S is a basis of K pk .By the same reasoning as in the proof of Theorem 3.6, G S cannot have a directed cycle containing any edges of the form J Pk K. On the other hand, we also cannot have a directed cycle only containing edges of the form J → 3 K, as when J → 3 K, the number of inversions of K is greater than that of J. Therefore, G S does not have any directed cycles.The same reasoning from the proof of Theorem 3.6 shows that G S has no undirected cycles either.Thus, G S is a forest, and it follows from Theorem 1 (b) that F pk S is linearly independent.The proof that F pk S spans K pk is similar to that of the analogous result for Pk (again, see the proof of Theorem 3.6); we omit the details.We now turn our attention to characterizing the ideals K Pk and K pk in terms of the monomial basis, beginning with K Pk .Our proofs here are based on Grinberg's proof for the analogous result on K Epk .Let us first introduce some notation which will simplify the presentation of our proofs.

Characterizations in terms of the monomial basis
Recall that K st n denotes the nth homogeneous component of K st .Define We know from Theorem 2 (a) that K Pk n = span F Pk n for all n, and our present goal is to show that Here we let [0] be the empty set, so that Ω 2,3 = {(∅, 1)}.Note that Ω n,1 is empty for n ≤ 2, Ω n,2 is empty for n ≤ 3, and Ω n,3 is empty for n ≤ 1.It is easy to check that the sets Ω n,1 , Ω n,2 , and Ω n,3 are disjoint for any fixed n; let In what follows, we will consider the families As noted in Section 2.4, a family can admit repeated members.For instance, given where This is in contrast to F Pk n and M Pk n , which have no repeated elements by virtue of being sets.
In order to prove Theorem 3 (a), we first prove that span(f In doing so, we will make repeated use of the correspondence between compositions of n and subsets of [n − 1], but many of the details will be omitted as they are straightforward to verify from the relevant definitions yet distract from the main essence of the proof.

The peak number-proof of Theorem 3 (b)
Let us now proceed to K pk .Define so that we wish to prove K pk n = span M pk n for all n.Recall the definitions of Ω n,1 , Ω n,2 , and Ω n,3 from Section 4.1, and define Note that Ω n,4 is empty for n ≤ 3, and that Ω n,4 is disjoint from Ω n,1 , Ω n,2 , and Ω n,3 .Write Next, we shall expand the definitions of f C,k and m C,k from Section 4.1 to all (C, k) ∈ Θ n .Let The proof of the next lemma is routine and so it is omitted.
where J → 3 K, so the forward inclusion of (4.1) follows from linearity.The reverse inclusion is similar.
Finally, we complete the proof of Theorem 3 (b) using the preceding propositions.
Proof of Theorem 3 (b).We have for all n ≥ 0, and therefore

Valleys
Given π ∈ P n , we say that i Val π is defined to be the set of valleys of π and val π the number of valleys of π.There is a clear symmetry relating peaks and valleys in permutations, and this section will describe the implications that this symmetry has on the statistics Pk, pk, Val, and val, their shuffle algebras, and their kernels.In particular, we will obtain from Theorem 2 an analogue of this theorem for K Val and K val .The complement π c of π ∈ P n is the permutation obtained by (simultaneously) replacing the ith smallest letter in π with the ith largest letter in π for all 1 ≤ i ≤ n.For example, if π = 472691 then π c = 627419.Observe that Pk π = Val π c and pk π = val π c ; this implies that Pk and Val are c-equivalent statistics (see [6,Section 3.2] for the definition), and so are pk and val.Complementation is a "shuffle-compatibility-preserving" involution on permutations, and according to [6, Theorem 3.5], if two permutation statistics st 1 and st 2 are f -equivalent where f is a shuffle-compatibility-preserving involution and st 1 is shufflecompatible, then st 2 is also shuffle-compatible and the map [π] st 1 → [π f ] st 2 extends to an isomorphism between their shuffle algebras.Consequently, we have A Pk ∼ = A Val and A pk ∼ = A val .
Theorem 5.1.The ideals K Val and K val are spanned (as Q-vector spaces) in the following ways: To prove Theorem 5.1, we will need a couple lemmas.
Lemma 5.2.Let J and K be compositions.
Upon drawing the ribbon diagrams of J and K and reading the columns from left to right, we see that J c and K c are the same except that a segment (α, 1 j l −2 ) of J c is replaced with (α + 1, 1 j l −3 ) in K c : . . . . . .
Then J c and K c are the same except that J c ends with (α, 1) and K c ends with α + 1: . . . . . .In light of (a), to prove (b) it suffices to show that J → 3 K implies J c ↠ 3 K c .To that end, let us suppose that J → 3 K, so that j i ≤ 2 for all i ∈ [m], j m = 1, j l = 1 and j l+1 = 2 for some l ∈ [m − 2], and K = (j 1 , . . ., j l−1 , j l+1 , j l , j l+2 , . . ., j m ).
Then J c and K c are the same except that a segment (α, β) of J c is replaced with (α − 1, β + 1) in K c , where α ≥ 2 if α is the first part of J c and α ≥ 3 otherwise: Furthermore, requiring J to have every part at most 2 and for J to end with a 1 implies that every part of J c , except possibly the first one, is at least 2. Thus J c ↠ 3 K c , and the proof is complete.
Just as the peaks of a permutation occur precisely at the end of its non-final increasing runs of length at least 2, the valleys occur precisely at the beginning of its non-initial increasing runs of length at least 2. Then the following lemma readily follows; compare with Lemma 2.1 for peaks.Proof of Theorem 5.1.In light of Theorem 2 and the involution ψ, Lemma 5.2 implies the forward inclusions For the reverse inclusions, it suffices to show that J ↠ 1 K and J ↠ 2 K each imply J ∼ Val K, and that J ↠ 1 K, J ↠ 2 K, and J ↠ 3 K each imply J ∼ val K.However, it is readily seen from Lemma 5.3 and the definitions of ↠ 1 , ↠ 2 , and ↠ 3 that these indeed hold.
Ehrenborg's formula ψ(M L ) = (−1) n−ℓ(L) L≤K M K [4, Section 5], where ℓ(L) is the number of parts of L, gives us the image of the involution ψ on the monomial basis.One can use this formula along with Theorem 3 to obtain spanning sets for K Val and K val in terms of monomial quasisymmetric functions, but more work is needed to show that Val and val are M -binomial.We will not do this here.Finally, it is worth mentioning that the kernel K epk of the exterior peak number is identical to K val .This is because epk π = val π + 1 for all (nonempty) permutations π [6, Lemma 2.1 (e)], and therefore J ∼ epk K if and only if J ∼ val K.

Future directions of research
We conclude this paper by surveying some directions for future research.
Given π ∈ P n , we say that: • i ∈ [n − 1] is a left peak of π if i is a peak of π, or if i = 1 and π 1 > π 2 .Then Lpk π is defined to be the set of left peaks of π and lpk π the number of left peaks of π.
• i ∈ {2, 3, . . ., n} is a right peak of π if i is a peak of π, or if i = n and π n−1 < π n .Then Rpk π is defined to be the set of right peaks of π and rpk π the number of right peaks of π.
All four of these statistics are known to be shuffle-compatible [6], and they were conjectured by Grinberg (along with Pk, pk, Val, and val) to be M -binomial.While we have resolved Grinberg's conjecture for the Pk and pk statistics, it remains open for these six other statistics, so we repeat this conjecture for these remaining statistics here.In particular, Theorems 2.8 and 3.7 of [11] allow one (under certain conditions) to construct the cyclic shuffle algebra of a cyclic statistic from the shuffle algebra of a related shuffle-compatible (linear) statistic; this suggests an analogous result relating kernels of cyclic descent statistics and kernels of linear descent statistics.There is also an analogue of the monomial basis in cQSym − , so one can investigate the M -binomial property in this setting.

F pk n (
by Theorem 2 (b)) = span(f C,k ) (C,k)∈Θn (by Proposition 4.5) = span(m C,k ) (C,k)∈Θn (by Proposition 4.7) = span M pk n (by Proposition 4.6) .1 for an example); reading off the columns from left to right (as opposed to the rows from bottom to top) yields L c .It is evident that Comp π = L implies Comp π c = L c , so we have Pk L = Val L c and pk L = val L c .

Figure 5 . 2 :
Figure 5.2: Relationships between the shuffle algebras and kernels of Pk, pk, Val, and val

Conjecture 6 . 1 (Problem 6 . 5 .
Grinberg [8, Question 107]).The statistics Lpk, lpk, Rpk, rpk, Val, and val are M -binomial.Just as peaks and valleys are related by complementation, left peaks and right peaks are related by reversal.Given π = π 1 π 2 • • • π n ∈ P n , define its reverse π r by π r := π n • • • π 2 π 1 .Then Lpk π = (n + 1) − Rpk π r := { n + 1 − i : i ∈ Rpk π r }and lpk π = rpk π r , cyclic compositions", form a basis of cQSym − , and one can then define the kernel of a cyclic descent statistic cst to be the subspace of cQSym − spanned by all elements of the formF cyc [J] −F cyc [K]where [J] and [K] are cst-equivalent cyclic compositions.In analogy with the linear setting, the kernel of cst is an ideal of cQSym − if and only if cst is cyclic shuffle-compatible.Study kernels of cyclic descent statistics.