1 Introduction

Operads are algebraic structures introduced in the 1970s by Boardman and Vogt [5] and by May [24] in the context of algebraic topology. Informally, an operad is a structure containing operators with \(n\) inputs and \(1\) output, for all positive integers \(n\). Two operators \(x\) and \(y\) can be composed at the \(i\)th position by grafting the output of \(y\) on the \(i\)th input of \(x\). The new operator thus obtained is denoted by \(x \circ _i y\). In an operad, one can also switch the inputs of an operator \(x\) by letting a permutation \(\sigma \) act to obtain a new operator denoted by \(x \cdot \sigma \). One of the main relishes of operads comes from the fact that they offer a general theory to study in an unifying way different types of algebras, such as associative algebras and Lie algebras.

In recent years, the importance of operads in combinatorics has increased and several new (nonsymmetric) operads were defined on combinatorial objects (see e.g., [7, 8, 19, 20]). The structure thereby added on combinatorial families enables us to see these in a new light and offers original ways to solve some combinatorial problems. For example, the dendriform operad [20] is a nonsymmetric operad on binary trees that plays an interesting role in describing the Hopf algebra of Loday–Ronco of binary trees [16, 21]. Besides, this nonsymmetric operad is a key ingredient for the enumeration of intervals of the Tamari lattice [6, 7]. There is also a very rich link connecting combinatorial Hopf algebra theory and operad theory: various constructions produce combinatorial Hopf algebras from operads [9, 11, 23, 27, 31].

In this paper, we propose a new generic method to build combinatorial operads. The starting point is to pick a monoid \(M\). We then consider the set of words whose letters are elements of \(M\). The arity of such words are their length, the composition of two words is expressed from the product of \(M\), and permutations act on words by permuting letters. In this way, we associate an operad denoted by \(\mathsf{T}M\) with any monoid \(M\). This construction is rich from a combinatorial point of view since it allows us, by considering suboperads and quotients of \(\mathsf{T}M\), to get new (symmetric or not) operads on various combinatorial objects. Our construction is related to two previous ones.

The first one is a construction of Méndez and Nava [26] emerging from the context of the species theory [17]. Roughly speaking, a species is a combinatorial construction \(U\) which takes an underlying set \(E\) as input and produces a set \(U[E]\) of objects by adding some structure on the elements of \(E\) (see [4]). This theory has many links with the theory of operads since an operad is a monoid with respect to the operation of substitution of species. In [26], the authors defined the plethystic species, that are species taking as input sets where any element has a colour picked from a fixed monoid \(M\). This monoid has to satisfy some precise conditions (as to be left cancellable and without proper divisor of the unity, and such that any element has finitely many factorizations). It appears that the elements of the so-called uniform plethystic species can be seen as words of colours and hence, as elements of \(\mathsf{T}M\). Moreover, the composition of this operad is the one of \(\mathsf{T}M\). The main difference between the construction of Méndez and Nava and ours lies in the fact that the construction \(\mathsf{T}\) can be applied on any monoid.

The second one, introduced by Berger and Moerdijk [3], is a construction which allows to obtain, from a commutative bialgebra \(\mathcal {B}\), a cooperad \({ T}\mathcal {B}\). Our construction \(\mathsf{T}\) and the construction \({ T}\) of these two authors are different but coincide in many cases. For instance, when \((M, \bullet )\) is a monoid such that for any \(x \in M\), the set of pairs \((y, z) \in M^2\) satisfying \(y \bullet z = x\) is finite, the operad \(\mathsf{T}M\) is the dual of the cooperad \({ T}\mathcal {B}\) where \(\mathcal {B}\) is the dual bialgebra of \(\mathbb {K}[M]\) endowed with the diagonal coproduct (\(\mathbb {K}\) is a field). On the other hand, there are operads that we can build by the construction \(\mathsf{T}\) but not by the construction \({ T}\), and conversely. For example, the operad \(\mathsf{T}\mathbb {Z}\), where \(\mathbb {Z}\) is the additive monoid of integers, cannot be obtained as the dual of a cooperad built by the construction \({ T}\) of Berger and Moerdijk.

Furthermore, our construction is defined in the category of sets and computations are explicit. It is therefore possible given a monoid \(M\), to make experiments on the operad \(\mathsf{T}M\), using if necessary a computer. In this paper, we study many applications of the construction \(\mathsf{T}\) focusing on its combinatorial aspect. More precisely, we define, by starting from very simple monoids like the additive or multiplicative monoids of integers, or cyclic monoids, various nonsymmetric operads involving well-known combinatorial objects.

This paper is organized as follows. In Sect. 2, we set some notations about syntax trees and rewriting systems on syntax trees. We then briefly recall the basics about operads. We also prove in this section two important lemmas used in the sequel of the paper: the first one deals with the form of elements of nonsymmetric operads generated by a set of generators and the second one is a tool to prove presentations by generators and relations of nonsymmetric operads using rewrite rules on syntax trees. Sect. 3 defines the construction \(\mathsf{T}\), associating an operad with a monoid and establishes its first properties. We show that this construction is a functor from the category of monoids to the category of operads which respects injections and surjections. Finally we apply this construction in Sect. 4 on various monoids and obtain several new (symmetric or not) operads. We construct in this way some operads on combinatorial objects which were not provided with such a structure: planar rooted trees with a fixed arity, Motzkin words, integer compositions, directed animals, and segmented integer compositions. We also obtain new operads on objects which are already provided with such a structure: endofunctions, parking functions, packed words, permutations, planar rooted trees, and Schröder trees. By using the construction \(\mathsf{T}\), we also give an alternative construction for the diassociative operad [20] and for the triassociative operad [22].

This paper is an extended version of [13] and [14]. It contains all proofs and new results like the presentations by generators and relations of the considered nonsymmetric operads.

2 Syntax trees and operads

In this section, we set some notation about syntax trees and operads. All our operads are reduced, i.e., all their elements have at least one input. In the same way, all our syntax trees are reduced, i.e., all their internal nodes have at least one child. We also present in this section some notions about rewriting systems on syntax trees that we shall use to prove presentations of operads throughout the rest of the paper.

2.1 Rewriting systems on syntax trees

In the same way as the elements of free monoids can be seen as words and also are good objects to study monoids, the elements of free operads can be seen as syntax trees and are useful objects to manipulate these algebraic structures.

2.1.1 Syntax trees

We use in the sequel the standard terminology (i.e., node, edge, root, subtree, parent, child, path, etc.) about trees (see for instance [2]). In our graphical representations, internal nodes are represented by circles

figure a

, leaves by squares

figure b

, and edges by segments 

figure c

. Each tree is depicted so that its root is the uppermost node.

Let \(S\) be a nonempty set. A syntax tree on \(S\), or simply a syntax tree if \(S\) is fixed, is a planar rooted tree such that internal nodes are labeled on \(S\). We shall denote by \(\mathcal {T}^S_n\) the set of syntax trees on \(S\) with \(n\) leaves and by \(\mathcal {T}^S\) the set \(\sqcup _{n \geqslant 1} \mathcal {T}^S_n\).

Let \(T\) be a syntax tree. We denote by \(\mathrm{n }(T)\) (resp. \(\ell (T)\)) the number of internal nodes (resp. leaves) of \(T\). The arity of an internal node is the number of its children. The depth-first traversal of \(T\) consists in visiting the root of \(T\) and then, recursively visiting by a depth-first traversal the subtrees of \(T\), from left to right. The \(i\) th internal node (resp. \(i\) th leaf) of \(T\) is the \(i\)th internal node (resp. \(i\)th leaf) of \(T\) visited by a depth-first traversal. The depth of a node \(x\) of \(T\) is the length of the unique path connecting \(x\) with the root of \(T\). Note that the depth of the root of \(T\) is \(0\). The weight \(\mathrm{w }(T)\) of \(T\) is the sum, for all internal nodes \(x\) of \(T\), of the number of internal nodes of the rightmost subtree of \(x\).

For example,

(2.1)

is a syntax tree on the set \(\{1, 2\}\). It has \(9\) internal nodes, \(13\) leaves, its weight is \(5\), and the sequence of the labels of its internal nodes visited by the depth-first traversal is \(121221122\).

2.1.2 Syntax tree patterns

Let \(T\) and \(\alpha \) be two syntax trees. We say that \(T\) admits an occurrence of \(\alpha \) at the root if one of the following two conditions is satisfied:

  1. (i)

    the tree \(\alpha \) consists in exactly one leaf and no internal node;

  2. (ii)

    the roots of \(T\) and \(\alpha \) have same arities and same labels, and, by denoting by \((T_1, \ldots , T_k)\) and \((\alpha _1, \ldots , \alpha _k)\) the sequence of the subtrees of \(T\) and \(\alpha \) from left to right, \(T_i\) admits an occurrence of \(\alpha _i\) at the root, for any \(i \in [k]\).

We say that \(T\) admits an occurrence of \(\alpha \) if there is a node \(x\) of \(T\) such that the syntax tree rooted on \(x\) admits an occurrence of \(\alpha \) at the root.

For example, set

(2.2)

Then \(T\) admits one occurrence of \(\alpha \).

2.1.3 Rewrite rules on syntax trees

Let \(S\) be a nonempty set and \(\mathcal {T}\) be a subset of \(\mathcal {T}^S\). A rewrite rule on \(\mathcal {T}\) is a binary relation \(\mapsto \) on \(\mathcal {T}\) such that

$$\begin{aligned} \alpha \mapsto \beta \quad \hbox { implies } \quad \ell (\alpha ) = \ell (\beta ). \end{aligned}$$
(2.3)

A syntax tree \(T_0\) is rewritable into a syntax tree \(T_1\) by \(\mapsto \) if:

  1. (i)

    there are two syntax trees \(\alpha \) and \(\beta \) such that \(\alpha \mapsto \beta \);

  2. (ii)

    there is in \(T_0\) an occurrence of \(\alpha \);

  3. (iii)

    we obtain \(T_1\) by replacing an occurrence of \(\alpha \) in \(T_0\) by \(\beta \).

We denote this property by \(T_0 \rightarrow T_1\) and we call the pair \((T_0, T_1)\) a rewriting. Moreover, if there is a sequence \(S_1, \ldots , S_k\) of syntax trees such that

$$\begin{aligned} T_0 \rightarrow S_1 \rightarrow \ldots \rightarrow S_k \rightarrow T_1, \end{aligned}$$
(2.4)

we say that \(T_0\) is rewritable into \(T_1\) by \(\rightarrow \) and we denote this property by \(T_0 \xrightarrow {*} T_1\).

If there is no infinite chain

$$\begin{aligned} T_0 \rightarrow T_1 \rightarrow \cdots , \end{aligned}$$
(2.5)

we say that \(\mapsto \) is terminating. In this case, a syntax tree \(T\) that cannot be rewritten is a normal form for \(\mapsto \). When \(\mapsto \) is terminating and there are for all \(n \geqslant 1\) finitely many normal forms for \(\mapsto \) with \(n\) leaves, we denote by \(\#(\mapsto _n)\) the number of normal forms for \(\mapsto \) with \(n\) leaves. In this case, the generating series of \(\mapsto \) is

$$\begin{aligned} F_{\mapsto }(t) := \sum _{n \geqslant 1} \#(\mapsto _n) t^n. \end{aligned}$$
(2.6)

In the sequel, we shall make use of regular specifications to describe normal forms of rewrite rules and obtain their generating series. Regular specifications are formal grammars explaining how to build combinatorial objects (see [10] for an introduction on regular specifications).

To give an example, set \(S := \{1, 2, 3\}\) and consider the rewrite rule \(\mapsto \) on \(\mathcal {T}^S\) defined by

(2.7)

Here is a sequence of rewritings:

(2.8)

Since for any rewriting \(T_0 \rightarrow T_1\)\(T_1\) has less nodes labeled by \(1\) than \(T_0\)\(\mapsto \) is terminating. The normal forms of \(\mapsto \) are the syntax trees on \(S\) with no internal node labeled by \(1\) that has two children.

2.2 Operads

Let us now set, in our context, some definitions and notations about operads. We shall use in the next sections the previous notions about syntax trees to handle elements of free nonsymmetric operads and establish presentations by generators and relations of nonsymmetric operads.

2.2.1 Nonsymmetric operads

A nonsymmetric operad, or a ns operad for short, is a collection

$$\begin{aligned} \mathcal {P}:= \bigsqcup _{n \geqslant 1} \mathcal {P}(n), \end{aligned}$$
(2.9)

together with partial composition maps

$$\begin{aligned} \circ _i : \mathcal {P}(n) \times \mathcal {P}(m) \rightarrow \mathcal {P}(n + m - 1), \qquad n, m \geqslant 1, i \in [n], \end{aligned}$$
(2.10)

and a distinguished element \(\mathbf{1}\in \mathcal {P}(1)\), the unit of \(\mathcal {P}\). The above data has to satisfy the following relations:

$$\begin{aligned} (x \circ _i y) \circ _{i + j - 1} z \!&= \! x \circ _i (y \circ _j z), \quad \! x \!\in \! \mathcal {P}(n), y \!\in \! \mathcal {P}(m), z \!\in \! \mathcal {P}(k), i \!\in \! [n], j \!\in \! [m],\nonumber \\ \end{aligned}$$
(2.11)
$$\begin{aligned} (x \circ _i y) \circ _{j + m - 1} z\!&= \!(x \circ _j z) \!\circ _i y, \quad x \!\in \! \mathcal {P}(n), y \!\in \! \mathcal {P}(m), z \in \mathcal {P}(k), 1 \!\leqslant \! i \!<\! j \!\leqslant \! n,\nonumber \\ \end{aligned}$$
(2.12)
$$\begin{aligned} \mathbf{1}\circ _1 x \!&= \! x \!=\! x \circ _i \mathbf{1}, \quad x \in \mathcal {P}(n), i \!\in \! [n]. \end{aligned}$$
(2.13)

One of the simplest ns operads is the associative commutative operad \(\mathsf{Com}\). It is defined for all \(n \geqslant 1\) by

$$\begin{aligned} \mathsf{Com}(n) := \left\{ \alpha _n\right\} , \end{aligned}$$
(2.14)

and the partial composition maps are defined by

$$\begin{aligned} \alpha _n \circ _i \alpha _m := \alpha _{n + m - 1}, \end{aligned}$$
(2.15)

for all \(n, m \geqslant 1\) and \(i \in [n]\).

Let us now fix some terminology about ns operads and recall basic definitions. The arity of an element \(x\) of \(\mathcal {P}(n)\) is \(n\) and is denoted by \(|x|\). If \(\mathcal {Q}\) is a ns operad, a map \(\phi : \mathcal {P}\rightarrow \mathcal {Q}\) is a ns operad morphism if it maps elements of arity \(n\) of \(\mathcal {P}\) to elements of arity \(n\) of \(\mathcal {Q}\) and commutes with partial composition maps. The ns operad \(\mathcal {Q}\) is a ns suboperad of \(\mathcal {P}\) if \(\mathcal {Q}\subseteq \mathcal {P}\), \(\mathbf{1}\in \mathcal {Q}\), and \(\mathcal {Q}\) is closed for the partial composition maps.

For any set \(G \subseteq \mathcal {P}\), the ns operad generated by \(G\) is the smallest ns suboperad of \(\mathcal {P}\) which contains every element of \(G\). When the ns operad generated by \(G\) is \(\mathcal {P}\) itself and \(G\) is minimal with respect to inclusion among the subsets of \(\mathcal {P}\) satisfying this property, \(G\) is a generating set of \(\mathcal {P}\) and its elements are generators of \(\mathcal {P}\). We say that \(\mathcal {P}\) is finitely generated if it admits a finite generating set.

The Hilbert series of a ns operad \(\mathcal {P}\) containing, for all \(n \geqslant 1\), finitely many elements of arity \(n\) is the series

$$\begin{aligned} F_\mathcal {P}(t) := \sum _{n \geqslant 1} \# \mathcal {P}(n) \, t^n. \end{aligned}$$
(2.16)

A combinatorial ns operad is a ns operad which admits a Hilbert series and such that its only element of arity \(1\) is its unit.

The composition map of \(\mathcal {P}\) is the mapping

$$\begin{aligned} \circ : \mathcal {P}(n) \times \mathcal {P}(m_1) \times \cdots \times \mathcal {P}(m_n) \rightarrow \mathcal {P}(m_1 + \cdots + m_n), \end{aligned}$$
(2.17)

defined using partial composition maps \(\circ _i\) by

$$\begin{aligned} x \circ [y_1, \ldots , y_n] := (\ldots ((x \circ _n y_n) \circ _{n - 1} y_{n - 1}) \ldots ) \circ _1 y_1. \end{aligned}$$
(2.18)

The ns operad \(\mathcal {P}\) is basic if for all \(y_1, \ldots , y_n \in \mathcal {P}\), the maps

$$\begin{aligned} \gamma _{y_1, \ldots , y_n} : \mathcal {P}(n) \rightarrow \mathcal {P}(|y_1| + \cdots + |y_n|), \end{aligned}$$
(2.19)

defined by

$$\begin{aligned} \gamma _{y_1, \ldots , y_n}(x) := x \circ [y_1, \ldots , y_n] \end{aligned}$$
(2.20)

are injective.

2.2.2 Symmetric operads

Let \(\mathfrak {S}_n\) be the group of permutations of \([n]\). Any permutation \(\sigma \) is denoted as a word \(\sigma _1 \ldots \sigma _n\) in such a way that the \(i\)th letter \(\sigma _i\) is the image of \(i\). For instance, the word \(312\) represents the bijection \(1 \mapsto 3\), \(2 \mapsto 1\), \(3 \mapsto 2\).

To define what is an operad, we need the following definition. Let \(\mathsf{As}\) be the ns operad satisfying for all \(n \geqslant 1\),

$$\begin{aligned} \mathsf{As}(n) := \mathfrak {S}_n, \end{aligned}$$
(2.21)

and, for all \(\sigma \in \mathsf{As}(n)\), \(\nu \in \mathsf{As}(m)\), and \(i \in [n]\),

$$\begin{aligned} \sigma \circ _i \nu := \sigma '_1 \ldots \sigma '_{i - 1} \nu '_1 \ldots \nu '_m \sigma '_{i + 1} \ldots \sigma '_n, \end{aligned}$$
(2.22)

where

$$\begin{aligned} \nu '_j := \nu _j + \sigma _i - 1, \qquad \hbox {for all}\,j \in [m], \end{aligned}$$
(2.23)

and

$$\begin{aligned} \sigma '_j := {\left\{ \begin{array}{ll} \sigma _j &{} \hbox {if}\,\sigma _j < \sigma _i, \\ \sigma _j + m - 1 &{} \hbox {otherwise}, \end{array}\right. } \qquad \hbox {for all}\,j \in [n]. \end{aligned}$$
(2.24)

This ns operad is known as the associative noncommutative operad.

For instance, here are two examples of compositions in \(\mathsf{As}\)

(2.25)
(2.26)

A symmetric operad, or an operad for short, is a ns operad \(\mathcal {P}\) together with a map

$$\begin{aligned} \cdot : \mathcal {P}(n) \times \mathsf{As}(n) \rightarrow \mathcal {P}(n), \qquad n \geqslant 1, \end{aligned}$$
(2.27)

which satisfies the following relation:

$$\begin{aligned}&(x \cdot \sigma ) \circ _i (y \cdot \nu ) = \left( x \circ _{\sigma _i} y\right) \cdot \left( \sigma \circ _i \nu \right) , \qquad x \in \mathcal {P}(n), y \in \mathcal {P}(m), \nonumber \\&\qquad \sigma \in \mathsf{As}(n), \nu \in \mathsf{As}(m), i \in [n], \end{aligned}$$
(2.28)

in such a way that \(\cdot \) is also a symmetric group action. Note that any operad \(\mathcal {P}\) is also (and thus can be seen as) a ns operad by forgetting its action of \(\mathsf{As}\).

If \(\mathcal {Q}\) is an operad, a map \(\phi : \mathcal {P}\rightarrow \mathcal {Q}\) is an operad morphism if it is a ns operad morphism that commutes with \(\cdot \). The operad \(\mathcal {Q}\) is a suboperad of \(\mathcal {P}\) if \(\mathcal {Q}\) is a ns suboperad of \(\mathcal {P}\) and \(\mathcal {Q}\) is closed for \(\cdot \).

For any set \(G \subseteq \mathcal {P}\), the operad generated by \(G\) is the smallest suboperad of \(\mathcal {P}\) which contains every element of \(G\). When the operad generated by \(G\) is \(\mathcal {P}\) itself and \(G\) is minimal with respect to inclusion among the subsets of \(\mathcal {P}\) satisfying this property, \(G\) is a generating set of \(\mathcal {P}\) and its elements are generators of \(\mathcal {P}\). We say that \(\mathcal {P}\) is finitely generated if it admits a finite generating set.

2.3 Presentation of nonsymmetric operads

We now focus on ns operads and present the tools we will need to establish presentations by generators and relations of ns operads.

2.3.1 Free ns operads

Let \(S := \sqcup _{n \geqslant 1} S(n)\) be a set. The free ns operad over \(S\) is the ns operad \(\mathcal {F}(S)\) defined as follows. For any \(n \geqslant 1\), the set \(\mathcal {F}(S)(n)\) is the set of syntax trees on \(S\) with \(n\) leaves and where internal nodes which have \(k\) children are labeled on \(S(k)\). The composition \(x \circ _i y\) of two elements of \(\mathcal {F}(S)\) consists in grafting the root of \(y\) on the \(i\)th leaf of \(x\). The unit \(\mathbf{1}\) of \(\mathcal {F}(S)\) is the tree with no internal node and hence exactly one leaf. The degree \(\mathrm{d }(x)\) of an element \(x\) of \(\mathcal {F}(S)\) is its number \(\mathrm{n }(x)\) of internal nodes and its arity \(|x|\) is its number \(\ell (x)\) of leaves. If \(\mathrm{d }(x) = 1\), the label \(\mathrm{lbl }(x)\) of \(x\) is the element of \(S\) which labels the only internal node of \(x\).

Let \(S := S(1) \sqcup S(2) \sqcup S(3)\), where \(S(1) := \{\mathtt{a}\}\), \(S(2) := \{\mathtt{b}, \mathtt{c}\}\), and \(S(3) := \{\mathtt{d}\}\). Then,

(2.29)

are two elements of \(\mathcal {F}(S)\). The arity of \(x\) is \(8\) and its degree is \(7\). The arity of \(y\) is \(4\) and its degree is \(3\). Moreover, one has in \(\mathcal {F}(S)\) the following composition

(2.30)

2.3.2 Evaluations

Let \(\left( \mathcal {P}, \circ _i^\mathcal {P}, \mathbf{1}_\mathcal {P}\right) \) be a ns operad and \(X := \sqcup _{n \geqslant 1} X(n)\) be a set of elements of \(\mathcal {P}\), where \(X(n) \subseteq \mathcal {P}(n)\) for all \(n \geqslant 1\). The evaluation \(\mathrm{ev }\) is the mapping

$$\begin{aligned} \mathrm{ev }: \mathcal {F}(X) \rightarrow \mathcal {P}, \end{aligned}$$
(2.31)

recursively defined by \(\mathrm{ev }(\mathbf{1}) := \mathbf{1}_\mathcal {P}\), \(\mathrm{ev }(x) := \mathrm{lbl }(x)\) if \(\mathrm{d }(x) = 1\), and

$$\begin{aligned} \mathrm{ev }(x) := \mathrm{ev }(y) \circ _i^\mathcal {P}\mathrm{ev }(z) \end{aligned}$$
(2.32)

if \(\mathrm{d }(x) \geqslant 2\), where \(y, z \in \mathcal {F}(X) \setminus \{\mathbf{1}\}\), \(i \in \left[ |y|\right] \), and \(x = y \circ _i z\).

In other words, we can see an element \(x\) of \(\mathcal {F}(X)\) as a tree-like expression for an element \(\mathrm{ev }(x)\) of \(\mathcal {P}\). Moreover, it is easy, by induction on the degree, to prove that \(\mathrm{ev }\) is a well-defined surjective mapping and hence, is a ns operad morphism.

2.3.3 Ns operadic congruences

An ns operadic congruence over a ns operad \(\mathcal {P}\) is an equivalence relation \(\equiv \) on its elements such that \(x \equiv x'\) implies \(|x| = |x'|\), and for all \(x, x', y, y' \in \mathcal {P}\) and \(i \in [|x|]\),

$$\begin{aligned} x \equiv x' \hbox { and } y \equiv y' \quad \hbox { implies } \quad x \circ _i y \equiv x' \circ _i y'. \end{aligned}$$
(2.33)

Given a set \(S := \sqcup _{n \geqslant 1} S(n)\) and an operadic congruence \(\equiv \) over the free ns operad \(\mathcal {F}(S)\), one can construct a ns quotient operad \(\mathcal {F}(S)/_\equiv \) of \(\mathcal {F}(S)\) defined as follows. We set

$$\begin{aligned} \mathcal {F}(S)/_\equiv (n) := \left\{ [x]_\equiv : x \in \mathcal {F}(S)(n)\right\} , \quad n \geqslant 1, \end{aligned}$$
(2.34)

where \([x]_\equiv \) is the \(\equiv \)-equivalence class of \(x\), and

$$\begin{aligned}{}[x]_\equiv \circ _i [y]_\equiv := \left[ x \circ _i y\right] _\equiv , \end{aligned}$$
(2.35)

where \(x\) and \(y\) are any elements of \(\mathcal {F}(S)\) such that \(x \in [x]_\equiv \) and \(y \in [y]_\equiv \).

2.3.4 Presentation by generators and relations

In the sequel, we shall define ns operadic congruences \(\equiv \) over free ns operads \(\mathcal {F}(S)\) through equivalence relations \(\leftrightarrow \) on the set \(\mathcal {F}(S)\). The congruence generated by \(\leftrightarrow \) is the most refined ns operadic congruence \(\equiv \) containing \(\leftrightarrow \).

Besides, we say that a relation \(\mapsto \) on \(\mathcal {F}(S)\) is an orientation of \(\leftrightarrow \) if \(\mapsto \) is the finest relation such that its reflexive, symmetric, and transitive closure is \(\leftrightarrow \). The link between rewrite rules on syntax trees and ns operads relies on the fact that orientations can be regarded as rewrite rules.

A presentation of a ns operad \(\mathcal {P}\) consists of a set \(S := \sqcup _{n \geqslant 1} S(n)\) and a ns operadic congruence \(\equiv \) over \(\mathcal {F}(S)\) such that \(\mathcal {P}= \mathcal {F}(S)/_\equiv \). When \(S(2) \ne \emptyset \) and \(S(n) = \emptyset \) for all \(n \ne 2\), \(\mathcal {P}\) is called binary. When \(\equiv \) can be generated as a ns operadic congruence by an equivalence relation \(\leftrightarrow \) on \(\mathcal {F}(S)\) only involving elements of degree \(2\), \(\mathcal {P}\) is called quadratic.

The following lemma presents a description of the elements of ns operads generated by a set of generators.

Lemma 2.1

Let \(\mathcal {P}\) be a ns operad generated by a set \(G\) of generators. Then any element \(x\) of \(\mathcal {P}\) different from the unit of \(\mathcal {P}\) can be written as

$$\begin{aligned} x = y \circ _i g, \end{aligned}$$
(2.36)

where \(y \in \mathcal {P}(n)\), \(n \geqslant 1\), \(g \in G\), and \(i \in [n]\).

Proof

Since the map \(\mathrm{ev }: \mathcal {F}(G) \rightarrow \mathcal {P}\) is surjective, \(x\) admits a tree-like expression \(x' \in \mathcal {F}(G)\) satisfying \(\mathrm{ev }(x') = x\). Since \(x\) is different from the unit of \(\mathcal {P}\), one has \(x' = y' \circ _i g'\) for two syntax trees \(y'\) and \(g'\) of \(\mathcal {F}(G)\) such that \(g'\) has exactly one internal node. Then, by setting \(y := \mathrm{ev }(y')\) and \(g := \mathrm{ev }(g')\), we have, since \(\mathrm{ev }\) is a ns operad morphism, \(x = y \circ _i g\).\(\square \)

We shall use in the sequel Lemma 2.1 to study ns operads \(\mathcal {Q}\) generated by a subset of elements of a bigger ns operad \(\mathcal {P}\). It allows us to describe \(\mathcal {Q}\) arity by arity because any element of \(\mathcal {Q}\) can be obtained by composing an element of a smaller arity with a generator.

The following lemma presents a tool for showing that a given combinatorial ns operad admits a specified presentation.

Lemma 2.2

Let \(\mathcal {P}\) be a combinatorial ns operad generated by a set \(G\) of generators and \(\equiv \) be a ns operadic congruence over \(\mathcal {F}(G)\) generated by an equivalence relation \(\leftrightarrow \) on \(\mathcal {F}(G)\). If the following two conditions are satisfied together:

  1. (i)

    for all \(x, x' \in \mathcal {F}(G)\), \(x \leftrightarrow x'\) implies \(\mathrm{ev }(x) = \mathrm{ev }(x')\);

  2. (ii)

    there exists an orientation \(\mapsto \) of \(\leftrightarrow \) such that \(\mapsto \) is terminating and has as many normal forms of arity \(n\) as elements of \(\mathcal {P}\) of arity \(n\);

then \(\mathcal {P}\) admits the presentation \(\mathcal {P}= \mathcal {F}(G)/_\equiv \).

Proof

The definition of the evaluation map \(\mathrm{ev }\) and (i) imply that the map

$$\begin{aligned} \phi : \mathcal {F}(G)/_\equiv \rightarrow \mathcal {P}\end{aligned}$$
(2.37)

defined for any \(x \in \mathcal {F}(G)\) by \(\phi \left( [x]_\equiv \right) := \mathrm{ev }(x)\) is a surjective ns operad morphism.

Since \(\mapsto \) is an orientation of \(\leftrightarrow \), for any \(x \in \mathcal {F}(G)\), there is at least one normal form for \(\mapsto \) in \([x]_\equiv \) and by (ii), for all \(n \geqslant 1\), we have

$$\begin{aligned} \# \mathcal {P}(n) = \#(\mapsto _n) \; \geqslant \# \mathcal {F}(G)/_\equiv (n). \end{aligned}$$
(2.38)

This, together with the fact that \(\phi \) is surjective, implies that \(\phi \) is also an isomorphism. Hence, \(\mathcal {P}\) admits the claimed presentation.\(\square \)

3 A combinatorial functor from monoids to operads

We describe in this section the main ingredient of this paper, namely the construction \(\mathsf{T}\). This functorial construction associates an operad \(\mathsf{T}M\) with any monoid \(M\) and an operad morphism \(\mathsf{T}\theta : \mathsf{T}M \rightarrow \mathsf{T}N\) with any monoid morphism \(\theta : M \rightarrow N\).

3.1 The construction

3.1.1 From monoids to operads

Let \((M, \bullet , 1)\) be a monoid. Let us denote by \(\mathsf{T}M\) the collection

$$\begin{aligned} \mathsf{T}M := \bigsqcup _{n \geqslant 1} \mathsf{T}M(n), \end{aligned}$$
(3.1)

where for all \(n \geqslant 1\),

$$\begin{aligned} \mathsf{T}M(n) := \left\{ (x_1, \ldots , x_n) : x_i \in M \quad \hbox { for all}\,i \in [n]\right\} . \end{aligned}$$
(3.2)

We endow the set \(\mathsf{T}M\) with maps

$$\begin{aligned} \circ _i : \mathsf{T}M(n) \times \mathsf{T}M(m) \rightarrow \mathsf{T}M(n + m - 1), \qquad n, m \geqslant 1, i \in [n], \end{aligned}$$
(3.3)

defined as follows: for all \(x \in \mathsf{T}M(n)\), \(y \in \mathsf{T}M(m)\), and \(i \in [n]\),

$$\begin{aligned} x \circ _i y := (x_1, \ldots , x_{i-1}, x_i \bullet y_1, \ldots , x_i \bullet y_m, x_{i+1}, \ldots , x_n). \end{aligned}$$
(3.4)

Let us also set \(\mathbf{1}:= (1)\) as a distinguished element of \(\mathsf{T}M(1)\). We endow finally each set \(\mathsf{T}M(n)\) with a map

$$\begin{aligned} \cdot : \mathsf{T}M(n) \times \mathsf{As}(n) \rightarrow \mathsf{T}M(n), \qquad n \geqslant 1, \end{aligned}$$
(3.5)

defined as follows: for all \(x \in \mathsf{T}M(n)\) and \(\sigma \in \mathsf{As}(n)\),

$$\begin{aligned} x \cdot \sigma := \left( x_{\sigma _1}, \ldots , x_{\sigma _n}\right) \!. \end{aligned}$$
(3.6)

The elements of \(\mathsf{T}M\) are words over \(M\) regarded as an alphabet. The arity \(|x|\) of an element \(x\) of \(\mathsf{T}M(n)\) is \(n\). For the sake of readability, we shall denote in some cases an element \((x_1, \ldots , x_n)\) of \(\mathsf{T}M(n)\) by its word notation \(x_1 \ldots x_n\).

Proposition 3.1

If \(M\) is a monoid, then \(\mathsf{T}M\) is an operad.

Proof

This is a straightforward checking of the relations of operads: (2.11) comes from the fact that the product of \(M\) is associative, (2.12) comes from the fact that the elements of \(\mathsf{T}M\) are words, (2.13) comes from the fact that \(M\) has a unit, and (2.28) comes from the fact that \(\cdot \) acts by permuting the letters of the words.\(\square \)

3.1.2 From monoids morphisms to operads morphisms

Let \(M\) and \(N\) be two monoids and \(\theta : M \rightarrow N\) be a monoid morphism. Let us denote by \(\mathsf{T}\theta \) the map

$$\begin{aligned} \mathsf{T}\theta : \mathsf{T}M \rightarrow \mathsf{T}N, \end{aligned}$$
(3.7)

defined for all \((x_1, \ldots , x_n) \in \mathsf{T}M(n)\) by

$$\begin{aligned} \mathsf{T}\theta \left( x_1, \ldots , x_n\right) := \left( \theta (x_1), \ldots , \theta (x_n)\right) . \end{aligned}$$
(3.8)

Proposition 3.2

If \(M\) and \(N\) are two monoids and \(\theta : M \rightarrow N\) is a monoid morphism, then the map \(\mathsf{T}\theta : \mathsf{T}M \rightarrow \mathsf{T}N\) is an operad morphism.

Proof

This is a straightforward checking: the fact that \(\theta \) is a monoid morphism implies the statement of the proposition.\(\square \)

3.2 Main properties of the construction

3.2.1 Functoriality of \(\mathsf{T}\)

Proposition 3.3

Let \(M\) and \(N\) be two monoids and \(\theta : M \rightarrow N\) be a monoid morphism. If \(\theta \) is injective (resp. surjective), then \(\mathsf{T}\theta \) is injective (resp. surjective).

Proof

This is a straightforward checking: the fact that \(\mathsf{T}\theta \) acts letter by letter implies the statement of the proposition.\(\square \)

Theorem 3.4

The construction \(\mathsf{T}\) is a functor from the category of monoids with monoid morphisms to the category of operads with operad morphisms. Moreover, \(\mathsf{T}\) respects injections and surjections.

Proof

By Proposition 3.1, \(\mathsf{T}\) constructs an operad from a monoid, and by Proposition 3.2, an operad morphism from a monoid morphism. Now, since \(\mathsf{T}\) sends identity monoid morphisms to identity operad morphisms and \(\mathsf{T}\) commutes with map composition, \(\mathsf{T}\) is a functor. Finally, by Proposition 3.3, \(\mathsf{T}\) also respects injections and surjections, whence the statement of the theorem.\(\square \)

3.2.2 Miscellaneous properties

Recall that a monoid \((M, \bullet )\) is right cancellable if for any \(x, y, z \in M\), \(y \bullet x = z \bullet x\) implies \(y = z\).

Proposition 3.5

Let \(M\) be a monoid. The operad \(\mathsf{T}M\) is basic if and only if \(M\) is a right cancellable monoid.

Proof

Let us denote by \(\bullet \) the product of \(M\).

Assume first that \(M\) is a right cancellable monoid. Let \(y^{(1)}, \ldots , y^{(n)} \in \mathsf{T}M\), \(x, x' \in \mathsf{T}M(n)\), and assume that

$$\begin{aligned} \gamma _{y^{(1)}, \ldots , y^{(n)}}(x) = \gamma _{y^{(1)}, \ldots , y^{(n)}}(x'). \end{aligned}$$
(3.9)

Then, for any \(i \in [n]\) and \(j \in \left[ \left| y^{(i)}\right| \right] \),

$$\begin{aligned} x_i \bullet y^{(i)}_j = x'_i \bullet y^{(i)}_j. \end{aligned}$$
(3.10)

Since \(M\) is right cancellable, \(x_i = x'_i\) and then, \(x = x'\). This implies that \(\gamma _{y^{(1)}, \ldots , y^{(n)}}\) is injective and that \(\mathsf{T}M\) is basic.

Conversely, assume now that \(\mathsf{T}M\) is basic. In particular, for any \(y \in \mathsf{T}M(1)\), the map \(\gamma _y\) is injective. Hence, for any \(x, x' \in \mathsf{T}M(1)\), the equality \(\gamma _y(x) = \gamma _y(x')\) implies \(x = x'\). This is equivalent to say that \(x \bullet y = x' \bullet y\) implies \(x = x'\). This amounts exactly to say that \(M\) is a right cancellable monoid.\(\square \)

Proposition 3.6

Let \(M\) be a monoid generated by a set \(G\). The ns operad \(\mathsf{T}M\) is generated by the set

$$\begin{aligned} \{(g) : g \in G\} \cup \{(1, 1)\}, \end{aligned}$$
(3.11)

where \((1, 1) \in \mathsf{T}M(2)\) and \(1\) is the unit of \(M\).

Proof

Any element \(x := (x_1, \ldots , x_n)\) of \(\mathsf{T}M\) can be generated by the elements of (3.11) in the following way. First, generate the element \(y := (1, \ldots , 1)\) of arity \(n\) by composing \((1, 1)\) with itself \(n - 1\) times. Next, change each letter \(y_i\) of \(y\) by composing \(y\) with a sequence of generators of \(G\) to reach \(x_i\). This is possible since \(M\) is generated by \(G\).\(\square \)

Theorem 3.7

Let \((M, \bullet )\) be a monoid generated by a set \(G := \{g_1, g_2, \ldots \}\) of generators satisfying a set \(R\) of nontrivial relations. Then, any algebra \(S\) over the ns operad \(\mathsf{T}M\) is a set equipped with maps

$$\begin{aligned} \star : S \times S \rightarrow S \end{aligned}$$
(3.12)

and

$$\begin{aligned} \uparrow _g : S \rightarrow S, \qquad g \in G \end{aligned}$$
(3.13)

satisfying for all \(a, b, c \in S\), \(g \in G\), and all relations \(g_{i_1} \bullet \ldots \bullet g_{i_n} = g_{j_1} \bullet \ldots \bullet g_{j_m}\) of \(R\), the equalities

$$\begin{aligned} (a \star b) \star c&= a \star (b \star c),\end{aligned}$$
(3.14)
$$\begin{aligned} (a \star b) \uparrow _g&= a \uparrow _g \; \star \; b \uparrow _g,\end{aligned}$$
(3.15)
$$\begin{aligned} a \uparrow _{g_{i_1}} \ldots \; \uparrow _{g_{i_n}}&= a \uparrow _{g_{j_1}} \ldots \; \uparrow _{g_{j_m}}\!. \end{aligned}$$
(3.16)

Proof

Proving the statement of the theorem is equivalent to prove that the ns operad \(\mathsf{T}M\) admits the presentation by generators and relations obtained by traducing (3.12), (3.13), (3.14), (3.15), and (3.16) in operadic terms. Thereby, this ns operad \(\mathcal {P}\) is the quotient of the free operad generated by a binary generator \(\star \) and unary generators \(\uparrow _g\), \(g \in G\), submitted to the relations

$$\begin{aligned}&\star \circ _1 \star = \star \circ _2 \star ,\end{aligned}$$
(3.17)
$$\begin{aligned}&\uparrow _g \circ _1 \star = \star \circ [\uparrow _g, \uparrow _g], \qquad g \in G,\end{aligned}$$
(3.18)
$$\begin{aligned}&\uparrow _{g_{i_1}} \circ _1 \ldots \circ _1 \uparrow _{g_{i_n}} = \uparrow _{g_{j_1}} \circ _1 \ldots \circ _1 \uparrow _{g_{j_m}} \end{aligned}$$
(3.19)

for all relations \(g_{i_1} \bullet \ldots \bullet g_{i_n} = g_{j_1} \bullet \ldots \bullet g_{j_m}\) of \(R\).

Let \(\phi : \mathcal {P}\rightarrow \mathsf{T}M\) be ns operad morphism defined by \(\phi (\star ) := (1, 1)\) and \(\phi (\uparrow _g) := (g)\) for any \(g \in G\), where \(1\) denotes the unit of \(M\). This morphism is well-defined since the elements \((1, 1)\) and \((g)\) of \(\mathsf{T}M\) satisfy the above relations by replacing \(\star \) by \((1, 1)\) and \(\uparrow _g\) by \((g)\). Proposition 3.6 implies that \(\phi \) is surjective since, as a ns operad, \(\mathsf{T}M\) is generated by \((1, 1)\) and \((g)\), \(g \in G\).

Now, since the equivalence classes of \(\mathcal {P}\) are clearly in bijection with the elements of \(\mathsf{T}M\), this shows that \(\phi \) is an isomorphism.\(\square \)

4 Constructing operads

Through this section, we consider examples of applications of the functor \(\mathsf{T}\). We shall mainly consider, given a monoid \(M\), some suboperads of \(\mathsf{T}M\), symmetric or not, which have for all \(n \geqslant 1\) finitely many elements of arity \(n\).

For the most part of the constructed operads \(\mathcal {P}\), we shall establish for all arities \(n \geqslant 1\), bijections \(\phi : \mathcal {P}(n) \rightarrow \mathcal {C}_n\) between the elements of \(\mathcal {P}\) of arity \(n\) and elements of size \(n\) of a set \(\mathcal {C}:= \sqcup _{n \geqslant 1} \mathcal {C}_n\) of combinatorial objects. These bijections, in addition to showing that \(\mathcal {P}\) are operads involving the objects of \(\mathcal {C}\), allow us to define composition operations on \(\mathcal {C}\) by interpreting the partial composition maps of \(\mathcal {P}\) on the elements of \(\mathcal {C}\).

Moreover, we shall also establish presentations by generators and relations of the constructed ns operads by using the tools provided by Sect. 2.

4.1 Operads from the additive monoid

We shall denote by \(\mathbb {N}\) the additive monoid of integers, and for all \(\ell \geqslant 1\), by \(\mathbb {N}_\ell \) the quotient of \(\mathbb {N}\) consisting of the set \(\{0, 1, \ldots , \ell - 1\}\) with the addition modulo \(\ell \) as the operation of \(\mathbb {N}_\ell \).

Note that since, by Theorem 3.4, \(\mathsf{T}\) is a functor which respects surjective maps, \(\mathsf{T}\mathbb {N}_\ell \) is a quotient operad of \(\mathsf{T}\mathbb {N}\). Besides, since the monoids \(\mathbb {N}\) and \(\mathbb {N}_\ell \) are right cancellable, by Proposition 3.5, the operads \(\mathsf{T}\mathbb {N}\) and \(\mathsf{T}\mathbb {N}_\ell \) are basic, and since any suboperad of a basic operad is basic, all operads constructed in this section are basic.

The ns operads constructed in this section fit into the diagram of ns operads represented by Fig. 1. Table 1 summarizes some information about these ns operads.

Fig. 1
figure 1

The diagram of ns suboperads and quotients of \(\mathsf{T}\mathbb {N}\). Arrows \(\rightarrowtail \) (resp. \(\twoheadrightarrow \)) are injective (resp. surjective) ns operad morphisms

Table 1 Ground monoids, generators, first dimensions, and combinatorial objects involved in the ns suboperads and quotients of \(\mathsf{T}\mathbb {N}\)

4.1.1 Operads on endofunctions, parking functions, packed words, and permutations

Recall that an endofunction of size \(n\) is a word \(x\) of length \(n\) on the alphabet \(\{1, \ldots , n\}\). A parking function of size \(n\) is an endofunction \(x\) of size \(n\) such that the nondecreasing rearrangement \(y\) of \(x\) satisfies \(y_i \leqslant i\) for all \(i \in [n]\). A packed word of size \(n\) is an endofunction \(x\) of size \(n\) such that for any letter \(x_i \geqslant 2\) of \(x\), there is in \(x\) a letter \(x_j = x_i - 1\).

Note that neither the set of endofunctions nor the set of parking functions, packed words, and permutations are suboperads of \(\mathsf{T}\mathbb {N}\). Indeed, one has the following counterexample:

(4.1)

and, even if \(12\) is a permutation, \(134\) is not an endofunction.

Therefore, let us call a word \(x\) a twisted endofunction (resp. parking function, packed word, permutation) if the word \((x_1 + 1, x_2 + 1, \ldots , x_n + 1)\) is an endofunction (resp. parking function, packed word, permutation). For example, the word \(2300\) is a twisted endofunction since \(3411\) is an endofunction. Let us denote by \(\mathsf{End}\) (resp. \(\mathsf{PF}\), \(\mathsf{PW}\), \(\mathsf{Per}\)) the set of twisted endofunctions (resp. parking functions, packed words, permutations). Under this reformulation, one has the following result:

Proposition 4.1

The sets \(\mathsf{End}\), \(\mathsf{PF}\), and \(\mathsf{PW}\) form suboperads of \(\mathsf{T}\mathbb {N}\).

Proof

First, by definition of the partial composition map of \(\mathsf{T}\mathbb {N}\), the set of twisted endofunctions forms a suboperad of \(\mathsf{T}\mathbb {N}\).

Let \(x\) and \(y\) be two twisted parking functions (resp. packed words) and \(i \in [|x|]\). Since \(x\) and \(y\) have by definition at least one occurrence of \(0\), we have in \(\mathsf{T}\mathbb {N}\),

$$\begin{aligned} \mathrm{Alph }(x \circ _i y) = \mathrm{Alph }(x) \cup \{x_i + a : a \in \mathrm{Alph }(y)\}, \end{aligned}$$
(4.2)

where \(\mathrm{Alph }(u)\) is the set \(\{u_j : j \in [|u|]\}\). This, in addition to the fact that any permutation of a twisted parking function (resp. packed word) is still a twisted parking function (resp. packed word), shows that the partial composition maps of \(\mathsf{T}\mathbb {N}\) and the map \(\cdot \) are still well-defined in \(\mathsf{PF}\) (resp. \(\mathsf{PW}\)).\(\square \)

For example, we have in \(\mathsf{End}\) the following composition

(4.3)

and the following application of the map \(\cdot \)

$$\begin{aligned} 11210 \cdot 23514 = 12011. \end{aligned}$$
(4.4)

Note that \(\mathsf{End}\) is not a finitely generated operad. Indeed, the twisted endofunctions \(x\) of size \(n\) satisfying \(x_i := n - 1\) for all \(i \in [n]\) cannot be obtained by compositions involving elements of \(\mathsf{End}\) of arity smaller than \(n\). Similarly, \(\mathsf{PF}\) is not a finitely generated operad since the twisted parking functions \(x\) of size \(n\) satisfying \(x_i := 0\) for all \(i \in [n - 1]\) and \(x_n := n - 1\) cannot be obtained by compositions involving elements of \(\mathsf{PF}\) of arity smaller than \(n\).

However, the operad \(\mathsf{PW}\) is a finitely generated operad:

Proposition 4.2

The operad \(\mathsf{PW}\) is the suboperad of \(\mathsf{T}\mathbb {N}\) generated by the elements \(00\) and \(01\).

Proof

Let \(\mathcal {P}\) be the suboperad of \(\mathsf{T}\mathbb {N}\) generated by the elements \(00\) and \(01\), and let us show that \(\mathcal {P}= \mathsf{PW}\).

First, by Proposition 4.1, since \(00\) and \(01\) are twisted packed words, the elements of \(\mathcal {P}\) also are twisted packed words.

Now let \(x\) be a nondecreasing twisted packed word and let us show by induction on the size of \(x\) that \(x \in \mathcal {P}\). If \(|x| = 1\), since \(x\) is a twisted packed word, one has \(x = 0\) and since \(0\) is the unit of \(\mathsf{T}\mathbb {N}\), \(x \in \mathcal {P}\). Otherwise, let \(y\) be the prefix of size \(n - 1\) of \(x\). Since \(x\) is a nondecreasing word, there are two possibilities to express the last letter \(x_n\) of \(x\) from the letter \(x_{n - 1}\). If \(x_n = x_{n - 1}\), we have \(x = y \circ _{n - 1} 00\), and if \(x_n = x_{n - 1} + 1\), we have \(x = y \circ _{n - 1} 01\). Hence, since by the induction hypothesis \(\mathcal {P}\) contains \(y\), \(\mathcal {P}\) also contains \(x\). Finally, since any twisted packed word \(z\) can be obtained from a nondecreasing packed word \(x\) by permuting its letters, we have \(z = x \cdot \sigma \) for a certain permutation \(\sigma \) of \(\mathsf{As}(n)\), and hence, \(\mathcal {P}= \mathsf{PW}\).\(\square \)

Let \(\mathbb {K}\) be a field and let us from now consider that \(\mathsf{PW}\) is an operad in the category of \(\mathbb {K}\)-vector spaces, i.e., \(\mathsf{PW}\) is the free \(\mathbb {K}\)-vector space over the set of twisted packed words with partial composition maps and the map \(\cdot \) extended by linearity. For more details on operads in the category of vector spaces, we redirect the reader to [23].

Let \(I\) be the free \(\mathbb {K}\)-vector space over the set of twisted packed words having multiple occurrences of a same letter.

Proposition 4.3

The vector space \(I\) is an operadic ideal of \(\mathsf{PW}\). Moreover, the operadic quotient \(\mathsf{PW}/_I\) is the free vector space over the set of twisted permutations \(\mathsf{Per}\) and, for all twisted permutations \(x\) and \(y\), the partial composition map in \(\mathsf{Per}\) is expressed as

$$\begin{aligned} x \circ _i y = {\left\{ \begin{array}{ll} x \circ _i y &{} \hbox {if}\,x_i = |x|, \\ 0_\mathbb {K}&{} \hbox {otherwise,} \end{array}\right. } \end{aligned}$$
(4.5)

where \(0_\mathbb {K}\) is the null vector of \(\mathsf{Per}\) and the partial composition map \(\circ _i\) in the right-hand side of (4.5) is the partial composition map of \(\mathsf{PW}\).

Proof

Let \(x\) be a twisted packed word and \(y\) be a twisted packed word having multiple occurrences of a same letter. Since \(x\) and \(y\) have at least one occurrence of \(0\), any composition involving \(x\) and \(y\) also has multiple occurrences of a same letter. Moreover, for any permutation \(\sigma \) of \(\mathsf{As}\) of size \(|y|\), \(y \cdot \sigma \) also has multiple occurrences of a same letter. Hence, \(I\) is an operadic ideal of \(\mathsf{PW}\) and one can consider the operadic quotient \(\mathsf{PW}/_I\).

Since twisted packed words with no multiple occurrence of a same letter are twisted permutations, \(\mathsf{PW}/_I\) can be identified with the \(\mathbb {K}\)-vector space over the set of twisted permutations \(\mathsf{Per}\) and (4.5) follows from the fact that the composition \(x \circ _i y\) of two twisted permutations \(x\) and \(y\) is still a twisted permutation if and only if \(x_i\) is the greatest letter of \(x\).\(\square \)

Here are two examples of compositions in \(\mathsf{Per}\)

(4.6)
(4.7)

4.1.2 A ns operad on planar rooted trees

Let \(\mathsf{PRT}\) be the ns suboperad of \(\mathsf{T}\mathbb {N}\) generated by \(01\). The following table shows the first elements of \(\mathsf{PRT}\).

Arity

Elements of \(\mathsf{PRT}\)

\(1\)

\(0\)

\(2\)

\(01\)

\(3\)

\(011\), \(012\)

\(4\)

\(0111\), \(0112\), \(0121\), \(0122\), \(0123\)

\(5\)

\(01111\), \(01112\), \(01121\), \(01122\), \(01123\), \(01211\), \(01212\), \(01221\), \(01222\), \(01223\), \(01231\), \(01232\), \(01233\), \(01234\)

One has the following characterization of the elements of \(\mathsf{PRT}\):

Proposition 4.4

The elements of \(\mathsf{PRT}\) are exactly the words \(x\) on the alphabet \(\mathbb {N}\) satisfying \(x_1 = 0\) and \(1 \leqslant x_{i + 1} \leqslant x_i + 1\) for all \(i \in [|x| - 1]\).

Proof

Let us first show by induction on the length of the words that any word \(x\) of \(\mathsf{PRT}\) satisfies the statement. This is true when \(|x| = 1\). When \(|x| \geqslant 2\), by Lemma 2.1, there is an element \(y\) of \(\mathsf{PRT}\) of length \(n := |x| - 1\) and an integer \(i \in [n]\) such that \(x = y \circ _i 01\). We have

$$\begin{aligned} x = (y_1, \ldots , y_{i - 1}, y_i, y_i + 1, y_{i + 1}, \ldots , y_n). \end{aligned}$$
(4.8)

Since \(x_{i + 1} = x_i + 1\) and since, by the induction hypothesis, \(y\) satisfies the statement, \(x\) also satisfies it.

Let us now show by induction on the length of the words that \(\mathsf{PRT}\) contains any word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), since \(x_1 = 0\) and \(x_2 = 1\), \(x\) has a factor \(x_i x_{i + 1}\) where \(i\) is the greatest integer such that \(x_{i+1} = x_i + 1\). Now, by setting

$$\begin{aligned} y := (x_1, \ldots , x_i, x_{i+2}, \ldots , x_n), \end{aligned}$$
(4.9)

we have \(x = y \circ _i 01\), and, since \(i\) is maximal, if \(i + 2 \leqslant n\) we have \(x_{i+2} \leqslant x_{i+1}\). This implies that \(y\) satisfies the statement. By the induction hypothesis, \(\mathsf{PRT}\) contains \(y\) and, since \(x = y \circ _i 01\), \(\mathsf{PRT}\) also contains \(x\).\(\square \)

Recall that there are \(\frac{1}{n} \left( {\begin{array}{c}2n - 2\\ n - 1\end{array}}\right) \) planar rooted trees with \(n\) nodes. There is a bijection \(\phi _\mathsf{PRT}\) between the words of \(\mathsf{PRT}\) of arity \(n\) and planar rooted trees with \(n\) nodes.

To compute \(\phi _\mathsf{PRT}(x)\) where \(x\) is an element of \(\mathsf{PRT}\), iteratively insert the letters of \(x\) from left to right according to the following procedure. If \(|x| = 1\), then \(x = 0\) and \(\phi _\mathsf{PRT}(0)\) is the only planar rooted tree with one node. Otherwise, the insertion of a letter \(\mathtt{a}\geqslant 1\) into a planar rooted tree \(T\) consists in grafting in \(T\) a new node as the rightmost child of the last node of depth \(\mathtt{a}- 1\) for the depth-first traversal of \(T\).

The inverse bijection is computed as follows. Given a planar rooted tree \(T\) of size \(n\), one computes an element of \(\mathsf{PRT}\) of arity \(n\) by labelling each node of \(T\) by its depth and then, by reading its labels following a depth-first traversal of \(T\).

Since the elements of \(\mathsf{PRT}\) satisfy Proposition 4.4, \(\phi _\mathsf{PRT}\) is well-defined. Hence, we can regard the elements of arity \(n\) of \(\mathsf{PRT}\) as planar rooted trees with \(n\) nodes. Figure 2 shows an example of this bijection.

Fig. 2
figure 2

Interpretation of an element of the ns operad \(\mathsf{PRT}\) in terms of planar rooted trees via the bijection \(\phi _\mathsf{PRT}\). The nodes of the planar rooted tree in the middle are labeled by their depth

The bijection \(\phi _\mathsf{PRT}\) between elements of \(\mathsf{PRT}\) and planar rooted trees offers an alternative way to compute the composition of elements of \(\mathsf{PRT}\):

Proposition 4.5

Let \(S\) and \(T\) be two planar rooted trees and \(s\) be the \(i\)th node for the depth-first traversal of \(S\). The composition \(S \circ _i T\) in \(\mathsf{PRT}\) amounts to replace \(s\) by the root of \(T\) and graft the children of \(s\) as rightmost sons of the root of \(T\).

Proof

Let \(x \in \mathsf{PRT}(n)\) and \(y \in \mathsf{PRT}(m)\) such that \(S := \phi _\mathsf{PRT}(x)\) and \(T := \phi _\mathsf{PRT}(y)\). Let \(U := \phi _\mathsf{PRT}(x \circ _i y)\). By definition of \(\phi _\mathsf{PRT}\) and the partial composition maps of \(\mathsf{PRT}\)\(U\) is obtained by inserting the prefix of length \(i - 1\) of \(x\), then the letters of \(y\) incremented by \(x_i\), and finally, the suffix of length \(n - i\) of \(x\). Since by Proposition 4.4, \(y\) starts by \(0\), the nodes created by inserting the letters of \(y\) incremented by \(x_i\) are descendants of the node created by inserting \(x_i = y_1\). Moreover, the nodes corresponding to the letters of the suffix of length \(n - i\) of \(x\) have same parents as they have in \(T\). This implies the statement.\(\square \)

Figure 3 shows an example of composition in \(\mathsf{PRT}\).

Fig. 3
figure 3

Interpretation of the partial composition map of the ns operad \(\mathsf{PRT}\) in terms of planar rooted trees

Proposition 4.6

The ns operad \(\mathsf{PRT}\) is isomorphic to the free ns operad generated by one element of arity \(2\).

Proof

By the characterization of its elements given by Proposition 4.4 and the bijection \(\phi _\mathsf{PRT}\), there are as many elements in \(\mathsf{PRT}\) of arity \(n\) as there are of arity \(n\) of the free ns operad generated by one element of arity \(2\). These two ns operads are hence isomorphic.\(\square \)

Proposition 4.6 also says that \(\mathsf{PRT}\) is isomorphic to the magmatic operad and hence, that \(\mathsf{PRT}\) is a realization of the magmatic operad. This result is already known since in [25], Méndez and Yang point out that the species of parenthesizations (binary trees) and the species of planar rooted trees are isomorphic. This isomorphism implies that these species are also isomorphic as ns operads. Moreover, \(\mathsf{PRT}\) can be seen as a planar version of the non-associative permutative operad \(\mathsf{NAP}\) [25] (see also [19]) seen as a ns operad, which is an operad involving labeled non-planar rooted trees.

4.1.3 A ns operad on leafy trees with a fixed arity

Let \(k \geqslant 0\) be an integer and \(\mathsf{FCat^{(k)}}\) be the ns suboperad of \(\mathsf{T}\mathbb {N}\) generated by \(00\)\(01\), ..., \(0k\). The following tables, respectively, show the first elements of \(\mathsf{FCat^{(1)}}\) and \(\mathsf{FCat^{(2)}}\).

Arity

Elements of \(\mathsf{FCat^{(1)}}\)

\(1\)

\(0\)

\(2\)

\(00\), \(01\)

\(3\)

\(000\), \(001\), \(010\), \(011\), \(012\)

\(4\)

\(0000\), \(0001\), \(0010\), \(0011\), \(0012\), \(0100\), \(0101\), \(0110\), \(0111\), \(0112\), \(0120\), \(0121\), \(0122\), \(0123\)

Arity

Elements of \(\mathsf{FCat^{(2)}}\)

\(1\)

\(0\)

\(2\)

\(00\), \(01\), \(02\)

\(3\)

\(000\), \(001\), \(002\), \(010\), \(011\), \(012\), \(013\), \(020\), \(021\), \(022\), \(023\), \(024\)

\(4\)

\(0000\), \(000\)1, \(0002\), \(0010\), \(0011\), \(0012\), \(0013\), \(0020\), \(0021\), \(0022\), \(0023\), \(0024\), \(0100\), \(0101\), \(0102\), \(0110\), \(0111\), \(0112\), \(0113\), \(0120\), \(0121\), \(0122\), \(0123\), \(0124\), \(0130\), \(0131\), \(0132\), \(0133\), \(0134\), \(0135\), \(0200\), \(0201\), \(0202\), \(0210\), \(0211\), \(0212\), \(0213\), \(0220\), \(0221\), \(0222\), \(0223\), \(0224\), \(0230\), \(0231\), \(0232\), \(0233\), \(0234\), \(0235\), \(0240\), \(0241\), \(0242\), \(0243\), \(0244\), \(0245\), \(0246\)

It is immediate from the definition of \(\mathsf{FCat^{(k)}}\) that for any \(k \geqslant 0\), \(\mathsf{FCat^{(k)}}\) is a ns suboperad of \(\mathsf{FCat^{(k + 1)}}\). Hence, the ns operads \(\mathsf{FCat^{(k)}}\) form an increasing sequence (for inclusion) of ns operads. Note that \(\mathsf{FCat^{(0)}}\) is isomorphic to the associative commutative operad \(\mathsf{Com}\). Note also that since \(\mathsf{FCat^{(1)}}\) is generated by \(00\) and \(01\) and since \(\mathsf{PRT}\) is generated by \(01\)\(\mathsf{PRT}\) is a ns suboperad of \(\mathsf{FCat^{(1)}}\). Moreover, \(\mathsf{FCat^{(0)}}\) is a quotient of \(\mathsf{PRT}\) by the ns operadic congruence \(\equiv \) defined for all \(x, y \in \mathsf{PRT}(n)\) by \(x \equiv y\).

One has the following characterization of the elements of \(\mathsf{FCat^{(k)}}\):

Proposition 4.7

The elements of \(\mathsf{FCat^{(k)}}\) are exactly the words \(x\) on the alphabet \(\mathbb {N}\) satisfying \(x_1 = 0\) and \(0 \leqslant x_{i + 1} \leqslant x_i + k\) for all \(i \in [|x| - 1]\).

Proof

Let us first show by induction on the length of the words that any word \(x\) of \(\mathsf{FCat^{(k)}}\) satisfies the statement. This is true when \(|x| = 1\). When \(|x| \geqslant 2\), by Lemma 2.1, there is an element \(y\) of \(\mathsf{FCat^{(k)}}\) of length \(n := |x| - 1\), an integer \(i \in [n]\), and \(0 \leqslant h \leqslant k\) such that \(x = y \circ _i 0h\). We have

$$\begin{aligned} x = (y_1, \ldots , y_{i - 1}, y_i, y_i + h, y_{i + 1}, \ldots , y_n). \end{aligned}$$
(4.10)

Since \(x_{i + 1} = x_i + h\) and \(0 \leqslant h \leqslant k\), and since, by the induction hypothesis, \(y\) satisfies the statement, \(x\) also satisfies it.

Let us now show by induction on the length of the words that \(\mathsf{FCat^{(k)}}\) contains any word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), since \(x_1 = 0\) and \(0 \leqslant x_2 \leqslant k\), \(x\) has a factor \(x_i x_{i + 1}\) where \(i\) is the greatest integer such that \(x_i \leqslant x_{i + 1}\). Now, by setting \(h := x_{i + 1} - x_i\) and

$$\begin{aligned} y := (x_1, \ldots , x_i, x_{i + 2}, \ldots , x_n), \end{aligned}$$
(4.11)

we have \(x = y \circ _i 0h\). Since \(i\) is maximal, if \(i + 2 \leqslant n\) we have \(x_{i + 2} < x_{i + 1}\). This implies that \(y\) satisfies the statement. By the induction hypothesis, \(\mathsf{FCat^{(k)}}\) contains \(y\) and, since \(x = y \circ _i 0h\), \(\mathsf{FCat^{(k)}}\) also contains \(x\).\(\square \)

A \(k\) -leafy tree is a planar rooted tree such that each internal node has exactly \(k + 1\) children. The size \(|T|\) of a \(k\)-leafy tree \(T\) is the number of its internal nodes. It is well-known that there are \(\frac{1}{kn + 1}\left( {\begin{array}{c}kn + n\\ n\end{array}}\right) \) \(k\)-leafy trees of size \(n\). We say that an internal node \(x\) is smaller than an internal node \(y\) of \(T\) if, in the depth-first traversal of \(T\), \(x\) appears before \(y\). We also say that a \(k\)-leafy tree \(T\) is well-labeled if its root is labeled by \(0\), and, for each internal node \(x\) of \(T\) labeled by \(\mathtt{a}\), the children of \(x\) are labeled, from left to right, by \(\mathtt{a}+ k\), ..., \(\mathtt{a}+ 1\), \(\mathtt{a}\). There is a unique way to label a \(k\)-leafy tree so that it is well-labeled. There is a bijection \(\phi _\mathsf{FCat^{(k)}}\) between the words of \(\mathsf{FCat^{(k)}}\) of arity \(n\) and well-labeled \(k\)-leafy trees of size \(n\).

To compute \(\phi _\mathsf{FCat^{(k)}}(x)\) where \(x\) is an element of \(\mathsf{FCat^{(k)}}\), iteratively insert the letters of \(x\) from left to right according to the following procedure. If \(|x| = 1\), then \(x = 0\) and \(\phi _\mathsf{FCat^{(k)}}(x)\) is the only well-labeled \(k\)-leafy tree of size \(1\). Otherwise, the insertion of a letter \(\mathtt{a}\geqslant 0\) into a well-labeled \(k\)-leafy tree \(T\) consists in replacing a leaf of \(T\) by the \(k\)-leafy tree \(S\) of size \(1\) labeled by \(\mathtt{a}\) so that \(S\) is the child of the greatest internal node such that the obtained \(k\)-tree is still well-labeled.

The inverse bijection is computed as follows. Given a well-labeled \(k\)-leafy tree \(T\), one computes an element of \(\mathsf{FCat^{(k)}}\) of arity \(n\) by reading its labels following a depth-first traversal of \(T\).

Since the elements of \(\mathsf{FCat^{(k)}}\) satisfy Proposition 4.7, \(\phi _\mathsf{FCat^{(k)}}\) is well-defined. Hence, we can regard the elements of arity \(n\) of \(\mathsf{FCat^{(k)}}\) as \(k\)-leafy trees of size \(n\). Figure 4 shows an example of this bijection.

Fig. 4
figure 4

Interpretation of an element of the ns operad \(\mathsf{FCat^{(2)}}\) in terms of \(2\)-leafy trees via the bijection \(\phi _\mathsf{FCat^{(2)}}\). The \(2\)-leafy tree in the middle is well-labeled

The bijection \(\phi _\mathsf{FCat^{(k)}}\) between elements of \(\mathsf{FCat^{(k)}}\) and \(k\)-leafy trees offers an alternative way to compute the composition of elements of \(\mathsf{FCat^{(k)}}\):

Proposition 4.8

Let \(S\) and \(T\) be two \(k\)-leafy trees and \(s\) be the \(i\)th internal node for the depth-first traversal of \(S\). The composition \(S \circ _i T\) in \(\mathsf{FCat^{(k)}}\) amounts to replace \(s\) by the root of \(T\) and graft the children of \(s\) from right to left on the rightmost leaves of \(T\).

Proof

Let \(x \in \mathsf{FCat^{(k)}}(n)\) and \(y \in \mathsf{FCat^{(k)}}(m)\) such that \(S := \phi _{\mathsf{FCat^{(k)}}}(x)\) and \(T := \phi _{\mathsf{FCat^{(k)}}}(y)\). Let \(U := \phi _{\mathsf{FCat^{(k)}}}(x \circ _i y)\). By definition of \(\phi _{\mathsf{FCat^{(k)}}}\) and the partial composition maps of \(\mathsf{FCat^{(k)}}\)\(U\) is obtained by inserting the prefix of length \(i - 1\) of \(x\), then the letters of \(y\) incremented by \(x_i\), and finally, the suffix of length \(n - i\) of \(x\). Since by Proposition 4.7, \(y\) starts by \(0\), the internal nodes created by inserting the letters of \(y\) incremented by \(x_i\) are descendants of the internal node created by inserting \(x_i = y_1\). Since the last \(n - i\) letters of \(x \circ _i y\) are the same as the last \(n - i\) letters of \(x\), by definition of \(\phi _{\mathsf{FCat^{(k)}}}\), the children of the \(i\)th internal node of \(S\) are grafted in \(U\) from right to left on the rightmost leaves of \(T\). This implies the statement.\(\square \)

Figure 5 shows an example of composition in \(\mathsf{FCat^{(2)}}\).

Fig. 5
figure 5

Interpretation of the partial composition map of the ns operad \(\mathsf{FCat^{(2)}}\) in terms of \(2\)-leafy trees

The next theorem elucidates the structure of \(\mathsf{FCat^{(k)}}\):

Theorem 4.9

The ns operad \(\mathsf{FCat^{(k)}}\) admits the presentation

$$\begin{aligned} \mathsf{FCat^{(k)}} = \mathcal {F}\left( \left\{ \mathtt{a}_0, \ldots , \mathtt{a}_k\right\} \right) /_\equiv , \end{aligned}$$
(4.12)

where the \(\mathtt{a}_i\) are of arity \(2\) and \(\equiv \) is the ns operadic congruence generated by

$$\begin{aligned} \mathtt{a}_{i + j} \circ _1 \mathtt{a}_i \, \leftrightarrow \, \mathtt{a}_i \circ _2 \mathtt{a}_j, \qquad i, j \geqslant 0, i + j \leqslant k. \end{aligned}$$
(4.13)

Proof

First, note that by replacing \(\mathtt{a}_i\) by \(0i \in \mathsf{FCat^{(k)}}(2)\), we have \(\mathrm{ev }(x) = \mathrm{ev }(y)\) for the relation \(x \leftrightarrow y\) of the statement of the theorem. Indeed, this equivalence class is the one of the element \((0, i, i + j)\) of \(\mathsf{FCat^{(k)}}\).

Consider now the orientation of \(\leftrightarrow \) into the rewrite rule \(\mapsto \) defined by

(4.14)

This rewrite rule is terminating. Indeed, it is plain that for any rewriting \(T_0 \rightarrow T_1\), we have \(\mathrm{w }(T_0) < \mathrm{w }(T_1)\).

Moreover, the normal forms of \(\mapsto \) are all elements of \(\mathcal {F}\left( \left\{ \mathtt{a}_0, \ldots , \mathtt{a}_k\right\} \right) \) such that for each node \(x\) labeled by \(\mathtt{a}_i\) which has a left child \(y\) labeled by \(\mathtt{a}_j\), one has \(i < j\). This set \(\mathcal {S}\) of syntax trees admits the following regular specification

(4.15)

where \(\mathcal {S}_i\) is the set of such syntax trees with roots labeled by \(\mathtt{a}_i\). These sets satisfy the following regular specification

(4.16)

Hence, the generating series \(F(t)\) of \(\mathcal {S}\) and \(F_i(t)\) of \(\mathcal {S}_i\) satisfy

$$\begin{aligned} F(t) = t + \sum _{0 \leqslant i \leqslant k} F_i(t), \end{aligned}$$
(4.17)

and

$$\begin{aligned} F_i(t) = t F(t) + F(t) \sum _{i + 1 \leqslant j \leqslant k} F_j(t). \end{aligned}$$
(4.18)

By basic manipulations involving binomial coefficients, we obtain

$$\begin{aligned} F_i(t) = t F(t) \sum _{0 \leqslant j \leqslant k - i} \left( {\begin{array}{c}k - i\\ j\end{array}}\right) {F(t)}^j, \end{aligned}$$
(4.19)

and then,

$$\begin{aligned} F(t) = t \sum _{0 \leqslant j \leqslant k + 1} \left( {\begin{array}{c}k + 1\\ j\end{array}}\right) {F(t)}^j. \end{aligned}$$
(4.20)

The functional equation (4.20) is an alternative functional equation for the generating series of \(k\)-leafy trees. By Proposition 4.7, \(F(t)\) is also the Hilbert series of \(\mathsf{FCat^{(k)}}\).

Hence, by Lemma 2.2, \(\mathsf{FCat^{(k)}}\) admits the claimed presentation.\(\square \)

4.1.4 A ns operad on Schröder trees

Let \(\mathsf{Schr}\) be the ns suboperad of \(\mathsf{T}\mathbb {N}\) generated by \(00\), \(01\), and \(10\). The following table shows the first elements of \(\mathsf{Schr}\).

Arity

Elements of \(\mathsf{Schr}\)

\(1\)

\(0\)

\(2\)

\(00\), \(01\), \(10\)

\(3\)

\(000\), \(001\), \(010\), \(011\), \(012\), \(021\), \(100\), \(101\), \(110\), \(120\), \(210\)

\(4\)

\(0000\), \(0001\), \(0010\), \(0011\), \(0012\), \(0021\), \(0100\), \(0101\), \(0110\), \(0111\), \(0112\), \(0120\), \(0121\), \(0122\), \(0123\), \(0132\), \(0210\), \(0211\), \(0212\), \(0221\), \(0231\), \(0321\), \(1000\), \(1001\), \(1010\), \(1011\), \(1012\), \(1021\), \(1100\), \(1101\), \(1110\), \(1120\), \(1200\), \(1201\), \(1210\), \(1220\), \(1230\), \(1320\), \(2100\), \(2101\), \(2110\), \(2120\), \(2210\), \(2310\), \(3210\)

Since \(\mathsf{FCat^{(1)}}\) is generated by \(00\) and \(01\)\(\mathsf{FCat^{(1)}}\) is a ns suboperad of \(\mathsf{Schr}\). Moreover, since \(\mathsf{PW}\) is, by Proposition 4.2, generated as an operad by \(00\) and \(01\)\(\mathsf{Schr}\) is a ns suboperad of \(\mathsf{PW}\).

One has the following characterization of the elements of \(\mathsf{Schr}\):

Proposition 4.10

The elements of \(\mathsf{Schr}\) are exactly the words \(x\) on the alphabet \(\mathbb {N}\) having at least one occurrence of \(0\) for which for every letter \(\mathtt{b}\geqslant 1\) of \(x\), there exists a letter \(\mathtt{a}:= \mathtt{b}- 1\) such that \(x\) has a factor \(\mathtt{a}u \mathtt{b}\) or \(\mathtt{b}u \mathtt{a}\) where \(u\) is a word consisting in letters \(\mathtt{c}\) satisfying \(\mathtt{c}\geqslant \mathtt{b}\).

Proof

Let us first show by induction on the length of the words that any word \(x\) of \(\mathsf{Schr}\) satisfies the statement. This is true when \(|x| = 1\). When \(|x| \geqslant 2\), by Lemma 2.1, there is an element \(y\) of \(\mathsf{Schr}\) of length \(n := |x| - 1\), an integer \(i \in [n]\), and \(g \in \{00, 01, 10\}\) such that \(x = y \circ _i g\). Then,

$$\begin{aligned} x = (y_1, \ldots , y_{i - 1}, y_i + g_1, y_i + g_2, y_{i + 1}, \ldots , y_{n - 1}). \end{aligned}$$
(4.21)

Since by the induction hypothesis \(y\) satisfies the statement and \(x_i = y_i\) or \(x_{i + 1} = y_i\)\(x\) also satisfies the statement.

Let us now show by induction on the length of the words that \(\mathsf{Schr}\) contains any word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), let us observe that if \(x\) only consists in letters \(0\)\(\mathsf{Schr}\) contains \(x\) because \(x\) can be obtained by composing the generator \(00\) with itself. Hence, let us assume that \(x\) contains at least one letter different from \(0\). Set \(\mathtt{b}\) as the greatest letter of \(x\) and \(\mathtt{a}:= \mathtt{b}- 1\). Since \(\mathtt{b}\) is the greatest letter of \(x\), there is a factor \(x_i x_{i + 1}\) of \(x\) such that \(x_i x_{i + 1} \in \{\mathtt{b}\mathtt{b}, \mathtt{b}\mathtt{a}, \mathtt{a}\mathtt{b}\}\). Set

$$\begin{aligned} y := (x_1, \ldots , x_{i - 1}, \min \{x_i, x_{i + 1}\}, x_{i + 2}, \ldots , x_n), \end{aligned}$$
(4.22)

and \(g\) as the generator \(00\) if \(x_i = x_{i + 1}\), as \(01\) if \(x_i = x_{i + 1} - 1\), or as \(10\) when \(x_i = x_{i + 1} + 1\). Then, we have \(x = y \circ _i g\), and, since \(y\) is obtained from \(x\) by removing one of its greatest letter, \(y\) satisfies the statement. By the induction hypothesis, \(\mathsf{Schr}\) contains \(y\), and since \(x = y \circ _i g\), \(\mathsf{Schr}\) also contains \(x\).\(\square \)

A Schröder tree is a planar rooted tree such that no node has exactly one child. The size \(|T|\) of a Schröder tree \(T\) is its number of leaves. There is a bijection \(\phi _\mathsf{Schr}\) between the words of \(\mathsf{Schr}\) of arity \(n\) and Schröder trees of size \(n\).

To compute \(\phi _\mathsf{Schr}(x)\) where \(x\) is an element of \(\mathsf{Schr}\), factorize \(x\) as \(x = x^{(1)} \mathtt{a}\ldots \mathtt{a}x^{(\ell )}\) where \(\mathtt{a}\) is the smallest letter occurring in \(x\) and the \(x^{(i)}\) are factors of \(x\) without \(\mathtt{a}\). Then, set

(4.23)

where \(\epsilon \) denotes the empty word and \(\bigwedge (T_1, \ldots , T_\ell )\) is the Schröder tree consisting in a root that has \(T_1, \ldots , T_\ell \) as subtrees from left to right.

The inverse bijection is computed as follows. Given a Schröder tree \(T\), one computes an element of \(\mathsf{Schr}\) by considering each internal node \(s\) and two adjacent consecutive edges of \(s\) and by assigning to these the depth of \(s\). The element of \(\mathsf{Schr}\) is obtained by reading the labels from left to right.

Since the elements of \(\mathsf{Schr}\) satisfy Proposition 4.10, \(\phi _\mathsf{Schr}\) is well-defined. Figure 6 shows an example of this bijection.

Fig. 6
figure 6

Interpretation of an element of the ns operad \(\mathsf{Schr}\) in terms of Schröder trees via the bijection \(\phi _\mathsf{Schr}\)

Theorem 4.11

The ns operad \(\mathsf{Schr}\) admits the presentation

(4.24)

where , , and are of arity \(2\), and \(\equiv \) is the ns operadic congruence generated by

(4.25)
(4.26)
(4.27)
(4.28)
(4.29)
(4.30)
(4.31)

Proof

First, note that by replacing  by \(00 \in \mathsf{Schr}(2)\), by \(01 \in \mathsf{Schr}(2)\), and  by \(10 \in \mathsf{Schr}(2)\), we have \(\mathrm{ev }(x) = \mathrm{ev }(y)\) for the seven relations \(x \leftrightarrow y\) of the statement of the theorem. Indeed, then seven equivalence classes are, respectively, the ones of the elements \(000\), \(101\), \(010\), \(001\), \(100\), \(011\), and \(110\) of \(\mathsf{Schr}\).

Consider now the orientation of \(\leftrightarrow \) into the rewrite rule \(\mapsto \) defined by

(4.32)
(4.33)
(4.34)
(4.35)
(4.36)
(4.37)
(4.38)

This rewrite rule is terminating. Indeed, let \(T\) be an element of . By associating with \(T\) the pair \((k_T, \mathrm{w }(T))\) where \(k_T\) is the number of nodes labeled by  in \(T\), it is plain that for any rewriting \(T_0 \rightarrow T_1\), one has \(k_{T_0} < k_{T_1}\) or \(k_{T_0} = k_{T_1}\) and \(\mathrm{w }(T_0) < \mathrm{w }(T_1)\).

Moreover, the normal forms of \(\mapsto \) are all elements of  such that nodes labeled by  or  have no left child and nodes labeled by  have no right child labeled by . This set \(\mathcal {S}\) of syntax trees admits the following regular specification

(4.39)

Hence, the generating series \(F(t)\) of \(\mathcal {S}\) satisfies

$$\begin{aligned} F(t) = t + 3 t F(t) + 2 t {F(t)}^2, \end{aligned}$$
(4.40)

that is the generating series of Schröder trees. By Proposition 4.10, \(F(t)\) is also the Hilbert series of \(\mathsf{Schr}\).

Hence, by Lemma 2.2, \(\mathsf{Schr}\) admits the claimed presentation.\(\square \)

4.1.5 A ns operad on Motzkin words

Let \(\mathsf{Motz}\) be the ns suboperad of \(\mathsf{T}\mathbb {N}\) generated by \(00\) and \(010\). The following table shows the first elements of \(\mathsf{Motz}\).

Arity

Elements of \(\mathsf{Motz}\)

\(1\)

\(0\)

\(2\)

\(00\)

\(3\)

\(000\), \(010\)

\(4\)

\(0000\), \(0010\), \(0100\), \(0110\)

\(5\)

\(00000\), \(00010\), \(00100\), \(00110\), \(01000\), \(01010\), \(01100\), \(01110\), \(01210\)

\(6\)

\(000000\), \(000010\), \(000100\), \(000110\), \(001000\), \(001010\), \(001100\), \(001110\), \(001210\), \(010000\), \(010010\), \(010100\), \(010110\), \(011000\), \(011010\), \(011100\), \(011110\), \(011210\), \(012100\), \(012110\), \(012210\)

Since \(00\) and \(01\) generate \(\mathsf{FCat^{(1)}}\) and since \(010 = 00 \circ _1 01\), \(\mathsf{Motz}\) is a ns suboperad of \(\mathsf{FCat^{(1)}}\). Moreover, since \(\mathsf{FCat^{(0)}}\) is generated by \(00\), \(\mathsf{FCat^{(0)}}\) is a ns suboperad of \(\mathsf{Motz}\).

One has the following characterization of the elements of \(\mathsf{Motz}\):

Proposition 4.12

The elements of \(\mathsf{Motz}\) are exactly the words \(x\) on the alphabet \(\mathbb {N}\) which begin and end with \(0\) and satisfy \(|x_i - x_{i + 1}| \leqslant 1\) for all \(i \in [|x| - 1]\).

Proof

Let us first show by induction on the length of the words that every word \(x\) of \(\mathsf{Motz}\) satisfies the statement. This is true when \(|x| = 1\). When \(|x| \geqslant 2\), by Lemma 2.1, there is an element \(y\) of \(\mathsf{Motz}\) of length \(n < |x|\), an integer \(i \in [n]\), and \(g \in \{00, 010\}\) such that \(x = y \circ _i g\). If \(g = 00\), then one has

$$\begin{aligned} x = (y_1, \ldots , y_{i - 1}, y_i, y_i, y_{i + 1}, \ldots , y_n). \end{aligned}$$
(4.41)

Otherwise, we have \(g = 010\) and

$$\begin{aligned} x = (y_1, \ldots , y_{i - 1}, y_i, y_i + 1, y_i, y_{i + 1}, \ldots , y_n). \end{aligned}$$
(4.42)

Since by the induction hypothesis \(y\) satisfies the statement, it is immediate that in both cases, \(x\) also satisfies the statement.

Let us now show by induction on the length of the words that \(\mathsf{Motz}\) contains every word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), one has two cases to consider. If \(x\) contains a factor \(x_i x_{i + 1}\) such that \(x_i = x_{i + 1}\), by setting

$$\begin{aligned} y := (x_1, \ldots , x_i, x_{i + 2}, \ldots , x_n), \end{aligned}$$
(4.43)

we have \(x = y \circ _i 00\). Otherwise, let \(\mathtt{b}\) be the greatest letter of \(x\). Since \(x\) satisfies the statement, there is in \(x\) a factor \(x_i x_{i + 1} x_{i + 2}\) where \(x_{i + 1} = \mathtt{b}\) and \(x_i = x_{i + 2} = \mathtt{b}- 1\). By setting

$$\begin{aligned} y := (x_1, \ldots , x_i, x_{i + 3}, \ldots , x_n), \end{aligned}$$
(4.44)

we have \(x = y \circ _i 010\). Now, for both cases, since by the induction hypothesis, \(\mathsf{Motz}\) contains \(y\)\(\mathsf{Motz}\) also contains \(x\).\(\square \)

A Motzkin word is a word \(u\) on the alphabet \(\left\{ -1, 0, 1\right\} \) such that the sum of all letters of \(u\) is \(0\) and, for any prefix \(u'\) of \(u\), the sum of all letters of \(u'\) is a nonnegative integer. The size \(|u|\) of a Motzkin word \(u\) is its length plus one. In the sequel, we shall denote by \(\bar{1}\) the letter \(-1\). We can represent a Motzkin word \(u\) graphically by a Motzkin path that is the path in \(\mathbb {N}^2\) connecting the points \((0, 0)\) and \((n, 0)\) obtained by drawing a step \((1, -1)\) (resp. \((1, 0)\), \((1, 1)\)) for each letter \(\bar{1}\) (resp. \(0\), \(1\)) of \(u\). There is a bijection \(\phi _\mathsf{Motz}\) between the words of \(\mathsf{Motz}\) of arity \(n\) and Motzkin words of size \(n\).

To compute \(\phi _\mathsf{Motz}(x)\) where \(x\) is an element of \(\mathsf{Motz}(n)\), build the word \(u\) of length \(n - 1\) satisfying \(u_i := x_{i + 1} - x_i\) for all \(i \in [n - 1]\).

The inverse bijection is computed as follows. The element of \(\mathsf{Motz}\) which corresponds to a Motzkin word \(u\) is the word \(x\) such that \(x_i\) is the sum of the letters of the prefix \(u_1 \ldots u_{i - 1}\) of \(u\), for all \(i \in [n]\).

Since the elements of \(\mathsf{Motz}\) satisfy Proposition 4.12, \(\phi _\mathsf{Motz}\) is well-defined. Figure 7 shows an example of this bijection.

Fig. 7
figure 7

Interpretation of an element of the ns operad \(\mathsf{Motz}\) in terms of Motzkin words and Motzkin paths via the bijection \(\phi _\mathsf{Motz}\)

The bijection \(\phi _\mathsf{Motz}\) between elements of \(\mathsf{Motz}\) and Motzkin words offers an alternative way to compute the composition of elements of \(\mathsf{Motz}\):

Proposition 4.13

Let \(u\) and \(v\) be two Motzkin words where \(u\) is of size \(n\), and \(i \in [n]\) be an integer. Then the composition \(u \circ _i v\) in \(\mathsf{Motz}\) amounts to insert \(v\) at the \(i\)th position into \(u\).

Proof

Let \(y\) be the element of \(\mathsf{Motz}\) in bijection by \(\phi _\mathsf{Motz}\) with \(v\). The statement is a direct consequence of the fact that, by Proposition 4.12, \(y\) starts and ends by \(0\).\(\square \)

Figure 8 shows an example of composition in \(\mathsf{Motz}\).

Fig. 8
figure 8

Interpretation of the partial composition map of the ns operad \(\mathsf{Motz}\) in terms of Motzkin paths

Theorem 4.14

The ns operad \(\mathsf{Motz}\) admits the presentation

(4.45)

where  is of arity \(2\) of arity \(3\), and \(\equiv \) is the ns operadic congruence generated by

(4.46)
(4.47)
(4.48)
(4.49)

Proof

First, note that by replacing  by \(00 \in \mathsf{Motz}(2)\) and  by \(010 \in \mathsf{Motz}(3)\), we have \(\mathrm{ev }(x) = \mathrm{ev }(y)\) for the four relations \(x \leftrightarrow y\) of the statement of the theorem. Indeed, the four equivalence classes are, respectively, the ones of the elements \(000\), \(0010\), \(0100\), and \(01010\) of \(\mathsf{Motz}\).

Consider now the orientation of \(\leftrightarrow \) into the rewrite rule \(\mapsto \) defined by

(4.50)
(4.51)
(4.52)
(4.53)

This rewrite rule is terminating. Indeed, it is plain that for any rewriting \(T_0 \rightarrow T_1\), we have \(\mathrm{w }(T_0) < \mathrm{w }(T_1)\).

Moreover, the normal forms of \(\mapsto \) are all syntax trees of  which have no internal node with an internal node as leftmost child. This set \(\mathcal {S}\) of trees admits the following regular specification

(4.54)

Hence, the generating series \(F(t)\) of \(\mathcal {S}\) satisfies

$$\begin{aligned} F(t) = t + t F(t) + t {F(t)}^2, \end{aligned}$$
(4.55)

that is the generating series of Motzkin words. By Proposition 4.12, \(F(t)\) is also the Hilbert series of \(\mathsf{Motz}\).

Hence, by Lemma 2.2, \(\mathsf{Motz}\) admits the claimed presentation.\(\square \)

4.1.6 A ns operad on integer compositions

Let \(\mathsf{Comp}\) be the ns suboperad of \(\mathsf{T}\mathbb {N}_2\) generated by \(00\) and \(01\). The following table shows the first elements of \(\mathsf{Comp}\).

Arity

Elements of \(\mathsf{Comp}\)

\(1\)

\(0\)

\(2\)

\(00\), \(01\)

\(3\)

\(000\), \(001\), \(010\), \(011\)

\(4\)

\(0000\), \(0001\), \(0010\), \(0011\), \(0100\), \(0101\), \(0110\), \(0111\)

\(5\)

\(00000\), \(00001\), \(00010\), \(00011\), \(00100\), \(00101\), \(00110\), \(00111\), \(01000\), \(01001\), \(01010\), \(01011\), \(01100\), \(01101\), \(01110\), \(01111\)

Since \(\mathsf{FCat^{(1)}}\) is the ns suboperad of \(\mathsf{T}\mathbb {N}\) generated by \(00\) and \(01\), and since \(\mathsf{T}\mathbb {N}_2\) is a quotient of \(\mathsf{T}\mathbb {N}\)\(\mathsf{Comp}\) is a quotient of \(\mathsf{FCat^{(1)}}\). Moreover, \(\mathsf{FCat^{(0)}}\) is a quotient of \(\mathsf{Comp}\) by the ns operadic congruence \(\equiv \) defined for all \(x, y \in \mathsf{Comp}\) by \(x \equiv y\).

One has the following characterization of the elements of \(\mathsf{Comp}\):

Proposition 4.15

The elements of \(\mathsf{Comp}\) are exactly the words on the alphabet \(\{0, 1\}\) beginning by \(0\).

Proof

It is immediate, from the definition of \(\mathsf{Comp}\) and Lemma 2.1, that any element of this ns operad starts by \(0\) since its generators \(00\) and \(01\) all start by \(0\).

Let us now show by induction on the length of the words that \(\mathsf{Comp}\) contains any word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), let us observe that if \(x\) only consists of letters \(0\)\(\mathsf{Comp}\) contains \(x\) because \(x\) can be obtained by composing the generator \(00\) with itself. Otherwise, \(x\) has at least one occurrence of \(1\). Since its first letter is \(0\), there is in \(x\) a factor \(x_i x_{i + 1} = 01\). By setting

$$\begin{aligned} y := (x_1, \ldots , x_i, x_{i + 2}, \ldots , x_n), \end{aligned}$$
(4.56)

we have \(x = y \circ _i 01\). Since \(y\) satisfies the statement, by the induction hypothesis \(\mathsf{Comp}\) contains \(y\). Hence, \(\mathsf{Comp}\) also contains \(x\).\(\square \)

An integer composition is a sequence \(u_1 \ldots u_k\) of positive integers. The size \(|u|\) of an integer composition \(u\) is the sum of its letters. It is well-known that there are \(2^{n - 1}\) integer compositions of size \(n\). We shall represent an integer composition \(u := u_1 \ldots u_k\) by a ribbon diagram, that is the diagram in which each letter \(u_i\) of \(u\) is encoded by a column consisting in \(u_i\) boxes, and the column encoding the letter \(u_{i + 1}\) is attached on the right edge of the bottommost box of the column encoding \(u_i\), for any \(i \in [k - 1]\). The \(i\) th box of a ribbon diagram \(D\) is the \(i\)th encountered box by traversing \(D\) column by column from left to right and from top to bottom. The transpose of \(D\) is the ribbon diagram obtained by applying on \(D\) the reflection through the line passing by its first and its last boxes. There is a bijection \(\phi _\mathsf{Comp}\) between the words of \(\mathsf{Comp}\) of arity \(n\) and ribbon diagrams of integer compositions of size \(n\).

To compute \(\phi _\mathsf{Comp}(x)\) where \(x\) is an element of \(\mathsf{Comp}\), iteratively insert the letters of \(x\) from left to right according to the following procedure. If \(|x| = 1\), then \(x = 0\) and \(\phi _\mathsf{Comp}(0)\) is the only ribbon diagram consisting in one box. Otherwise, the insertion of a letter \(\mathtt{a}\) into \(D\) consists in adding a new box below (resp. to the right of) the right bottommost box of \(D\) if \(\mathtt{a}= 1\) (resp. \(\mathtt{a}= 0\)).

The inverse bijection is computed as follows. Given a ribbon diagram \(D\) of an integer composition of size \(n\), one computes an element of \(\mathsf{Comp}\) of arity \(n\) by labelling the first box of \(D\) by \(0\) and the \(i\)th box \(b\) by \(0\) if the \((i - 1)\)st box is on the left of \(b\) or by \(1\) otherwise, for any \(1 \leqslant i \leqslant n\). The corresponding element of \(\mathsf{Comp}\) is obtained by reading the labels of \(D\) from top to bottom and left to right.

Since the elements of \(\mathsf{Comp}\) satisfy Proposition 4.15, \(\phi _\mathsf{Comp}\) is well-defined. Hence, we can regard the elements of arity \(n\) of \(\mathsf{Comp}\) as ribbon diagrams with \(n\) boxes. Figure 9 shows an example of this bijection.

Fig. 9
figure 9

Interpretation of an element of the ns operad \(\mathsf{Comp}\) in terms of integer compositions via the bijection \(\phi _\mathsf{Comp}\). Boxes of the ribbon diagram in the middle are labeled

Encoding integer compositions by ribbon diagrams offers an alternative way to compute the composition of elements of \(\mathsf{Comp}\):

Proposition 4.16

Let \(C\) and \(D\) be two ribbon diagrams, \(i\) be an integer, and \(c\) be the \(i\)th box of \(C\). Then, the composition \(C \circ _i D\) in \(\mathsf{Comp}\) amounts to replace \(c\) by \(D\) if \(c\) is the upper box of its column, or to replace \(c\) by the transpose ribbon diagram of \(D\) otherwise.

Proof

Let \(x \in \mathsf{Comp}(n)\) and \(y \in \mathsf{Comp}(m)\) such that \(C := \phi _\mathsf{Comp}(x)\) and \(D := \phi _\mathsf{Comp}(y)\). Let \(E := \phi _\mathsf{Comp}(x \circ _i y)\). By definition of \(\phi _\mathsf{Comp}\) and the partial composition maps of \(\mathsf{Comp}\)\(E\) is obtained by inserting the prefix of length \(i - 1\) of \(x\), then the letters of \(y\) incremented by \(x_i\), and finally, the suffix of length \(n - i\) of \(x\). If \(c\) is the upper box of its column, then \(x_i = 0\), and by definition of \(\phi _\mathsf{Comp}\)\(E\) is obtained by replacing \(c\) by \(D\) in \(C\). Otherwise, \(c\) is not the upper box of its column, and then \(x_i = 1\). Immediately from the definition of \(\phi _\mathsf{Comp}\), for any word \(z\) on the alphabet \(\{0, 1\}\), the ribbon diagram \(\phi _\mathsf{Comp}(0z)\) is the transpose of \(\phi _\mathsf{Comp}(0 \bar{z})\) where \(\bar{z}\) is the complementary of \(z\). This implies the statement.\(\square \)

Figure 10 shows two examples of compositions in \(\mathsf{Comp}\).

Fig. 10
figure 10

Interpretation of the partial composition map of the ns operad \(\mathsf{Comp}\) in terms of ribbon diagrams

Theorem 4.17

The ns operad \(\mathsf{Comp}\) admits the presentation

(4.57)

where  and  are of arity \(2\), and \(\equiv \) is the ns operadic congruence generated by

(4.58)
(4.59)
(4.60)
(4.61)

Proof

First, note that by replacing  by \(00 \in \mathsf{Comp}(2)\) and  by \(01 \in \mathsf{Comp}(2)\), we have \(\mathrm{ev }(x) = \mathrm{ev }(y)\) for the four relations \(x \leftrightarrow y\) of the statement of the theorem. Indeed, the four equivalence classes are, respectively, the ones of the elements \(000\), \(001\), \(011\), and \(100\) of \(\mathsf{Comp}\).

Consider now the orientation of \(\leftrightarrow \) into the rewrite rule \(\mapsto \) defined by

(4.62)
(4.63)
(4.64)
(4.65)

This rewrite rule is terminating. Indeed, it is plain that for any rewriting \(T_0 \rightarrow T_1\), we have \(\mathrm{w }(T_0) < \mathrm{w }(T_1)\).

Moreover, the normal forms of \(\mapsto \) are all syntax trees of  which have no internal node with an internal node as leftmost child. Hence, the generating series \(F(t)\) of the normal forms of \(\mapsto \) is

$$\begin{aligned} F(t) = \sum _{n \geqslant 1} 2^{n - 1} t^n. \end{aligned}$$
(4.66)

By Proposition 4.15, \(F(t)\) is also the Hilbert series of \(\mathsf{Comp}\).

Hence, by Lemma 2.2, \(\mathsf{Comp}\) admits the claimed presentation.\(\square \)

4.1.7 A ns operad on directed animals

Let \(\mathsf{DA}\) be the ns suboperad of \(\mathsf{T}\mathbb {N}_3\) generated by \(00\) and \(01\). We shall here denote by \(\bar{1}\) the representative of the equivalence class of \(2\) in \(\mathbb {N}_3\). The following table shows the first elements of \(\mathsf{DA}\).

Arity

Elements of \(\mathsf{DA}\)

\(1\)

\(0\)

\(2\)

\(00\), \(01\)

\(3\)

\(000\), \(001\), \(010\), \(011\), \(01\bar{1} \)

\(4\)

\(0000\), \(0001\), \(0010\), \(0011\), \(001\bar{1} \), \(0100\), \(0101\), \(0110\), \(0111\), \(011\bar{1}\), \(01\bar{1} 0\), \(01\bar{1} 1\), \(01\bar{1} \bar{1}\)

\(5\)

\(00000\), \(00001\), \(00010\), \(00011\), \(0001\bar{1}\), \(00100\), \(00101\), \(00110\), \(00111\), \(0011\bar{1}\), \(001\bar{1}0\), \(001\bar{1}1\), \(001\bar{1}\bar{1}\), \(01000\), \(01001\), \(01010\), \(01011\), \(0101\bar{1}\), \(01100\), \(01101\), \(01110\), \(01111\), \(0111\bar{1}\), \(011\bar{1}0\), \(011\bar{1}1\), \(011\bar{1}\bar{1}\), \(01\bar{1}00\), \(01\bar{1}01\), \(01\bar{1}0\bar{1}\), \(01\bar{1}10\), \(01\bar{1}11\), \(01\bar{1}1\bar{1}\), \(01\bar{1}\bar{1}0\), \(01\bar{1}\bar{1}1\), \(01\bar{1}\bar{1}\bar{1}\)

Since \(\mathsf{FCat^{(1)}}\) is the ns suboperad of \(\mathsf{T}\mathbb {N}\) generated by \(00\) and \(01\), and since \(\mathsf{T}\mathbb {N}_3\) is a quotient of \(\mathsf{T}\mathbb {N}\), \(\mathsf{DA}\) is a quotient of \(\mathsf{FCat^{(1)}}\). Moreover, \(\mathsf{DA}\) is a quotient of \(\mathsf{FCat^{(0)}}\) by the ns operadic congruence \(\equiv \) defined for all \(x, y \in \mathsf{DA}\) by \(x \equiv y\).

Proposition 4.18

Let \(\phi _\mathsf{DA}: \mathsf{DA}(n) \rightarrow \left\{ \bar{1}, 0, 1\right\} ^{n - 1}\) be the mapping defined for any element \(x\) of arity \(n\) of \(\mathsf{DA}\) by

$$\begin{aligned} \phi _\mathsf{DA}(x) := (x_1 * x_2, x_2 * x_3, \ldots , x_{n - 1} * x_n), \end{aligned}$$
(4.67)

where \(x_i * x_{i + 1} := x_{i + 1} - x_i \mod 3\). Then, \(\phi _\mathsf{DA}\) is a bijection between the elements of arity \(n\) of \(\mathsf{DA}\) and prefixes of Motzkin words of length \(n - 1\).

Proof

Let us first show by induction on the length of the words that for any \(x \in \mathsf{DA}\), \(\phi _\mathsf{DA}(x)\) is a prefix of a Motzkin word of length \(|x| - 1\). This is true when \(|x| = 1\). When \(|x| \geqslant 2\), by Lemma 2.1, there is an element \(y\) of \(\mathsf{DA}\) of length \(n := |x| - 1\), an integer \(i \in [n]\), and \(g \in \{00, 01\}\) such that \(x = y \circ _i g\). We now have two cases depending on \(g\).

  • Case 1: If \(g = 00\), then

    $$\begin{aligned} x = (y_1, \ldots , y_i, y_i, y_{i + 1}, \ldots , y_n). \end{aligned}$$
    (4.68)

    By the induction hypothesis, \(\phi _\mathsf{DA}(y)\) is a prefix of a Motzkin word of length \(n-1\). Since \(x\) is obtained from \(y\) by duplicating its \(i\)th letter, \(\phi _\mathsf{DA}(x)\) is obtained from \(\phi _\mathsf{DA}(y)\) by inserting a \(0\) at an appropriate place. Hence, \(\phi _\mathsf{DA}(x)\) is a prefix of a Motzkin word of length \(n\).

  • Case 2: Otherwise, we have \(g = 01\) and then,

    $$\begin{aligned} x = (y_1, \ldots , y_i, y_i + 1, y_{i + 1}, \ldots , y_n), \end{aligned}$$
    (4.69)

    where \(+\) denotes the addition in \(\mathbb {N}_3\). We have now two sub-cases whether \(y_i\) is the last letter of \(y\).

    • Case 2.1: If it is the case, then \(x_{i + 1} = y_i + 1\) is the last letter of \(x\) and \(\phi _\mathsf{DA}(x)\) is obtained from \(\phi _\mathsf{DA}(y)\) by concatenating a \(1\) on the right. Hence, since by the induction hypothesis, \(\phi _\mathsf{DA}(y)\) is a prefix of a Motzkin word of length \(n - 1\), \(\phi _\mathsf{DA}(x)\) is a prefix of a Motzkin word of length \(n\).

    • Case 2.2: Otherwise, we have \(i < n\). We observe that \(\phi _\mathsf{DA}(x)\) is obtained from \(\phi _\mathsf{DA}(y)\) by replacing a letter \(0\) (resp. \(1\), \(\bar{1}\)) by a factor \(1\bar{1}\) (resp. \(10\), \(11\)) at an appropriate place. Hence, since by the induction hypothesis, \(\phi _\mathsf{DA}(y)\) is a prefix of a Motzkin word of length \(n - 1\), \(\phi _\mathsf{DA}(x)\) is a prefix of a Motzkin word of length \(n\).

Let us now show that \(\phi _\mathsf{DA}\) is a bijection between the elements of arity \(n\) of \(\mathsf{DA}\) and prefixes of Motzkin words of length \(n - 1\).

The injectivity of \(\phi _\mathsf{DA}\) is a direct consequence of the fact that, given an element \(x\) of \(\mathsf{DA}\) and a letter \(\mathtt{a}\in \{\bar{1}, 0, 1\}\), there is at most one letter \(\mathtt{b}\in \{\bar{1}, 0, 1\}\) such that \(\phi _\mathsf{DA}(x \mathtt{b}) = \phi _\mathsf{DA}(x) \mathtt{a}\).

Let us finally show that \(\phi _\mathsf{DA}\) is a surjection. We proceed by induction on the length of the words to construct for any prefix of a Motzkin word \(u\) an element \(x\) of \(\mathsf{DA}\) such that \(\phi _\mathsf{DA}(x) = u\). When \(u\) is the empty word, \(x := 0\) is an element of \(\mathsf{DA}(1)\) and since \(\phi _\mathsf{DA}(x)\) is the empty word, the property is satisfied. When \(n := |u| \geqslant 1\), one has two cases to consider depending on the last letter \(u_n\) of \(u\).

  • Case 1\('\): If \(u_n \in \{0, 1\}\), by the induction hypothesis, there is an element \(y\) of \(\mathsf{DA}(n)\) such that \(\phi _\mathsf{DA}(y) = u_1 \ldots u_{n - 1}\). Hence, by setting \(x := y \circ _n 0 u_n\), it follows, by definition of \(\phi _\mathsf{DA}\), that \(x\) is a preimage of \(u\) for \(\phi _\mathsf{DA}\).

  • Case 2\('\): Otherwise, we have \(u_n = \bar{1}\) and there is at least one occurrence of a \(1\) in \(u\). Hence, let \(i \in [n - 1]\) be the greatest integer such that \(u_i = 1\). We now have two sub-cases depending on the value of \(u_{i + 1}\).

    • Case 2\('\)1.: If \(u_{i + 1} = 0\), the word

      $$\begin{aligned} u' := u_1 \ldots u_i u_{i + 2} \ldots u_n \end{aligned}$$
      (4.70)

      is still a prefix of a Motzkin word. Then, by the induction hypothesis, there is an element \(y\) of \(\mathsf{DA}(n)\) such that \(\phi _\mathsf{DA}(y) = u'\). Hence, by setting \(x := y \circ _i 00\), it follows, by definition of \(\phi _\mathsf{DA}\), that \(x\) is a preimage of \(u\) for \(\phi _\mathsf{DA}\).

    • Case 2\('\).2: Otherwise, we have \(u_{i + 1} = \bar{1}\). Then, the word

      $$\begin{aligned} u' := u_1 \ldots u_{i - 1} 0 u_{i + 2} \ldots u_n \end{aligned}$$
      (4.71)

      is still a prefix of a Motzkin word. Then, by the induction hypothesis, there is an element \(y\) of \(\mathsf{DA}(n)\) such that \(\phi _\mathsf{DA}(y) = u'\). Hence by setting \(x := y \circ _i 01\), it follows, by definition of \(\phi _\mathsf{DA}\), that \(x\) is a preimage of \(u\) for \(\phi _\mathsf{DA}\).

We then have proved that \(\phi _\mathsf{DA}\) is well-defined, injective, and surjective. Hence, it is a bijection between elements of arity \(n\) of \(\mathsf{DA}\) and prefixes of Motzkin words of length \(n - 1\).\(\square \)

Here are two examples of images by \(\phi _\mathsf{DA}\) of elements of \(\mathsf{DA}\).

$$\begin{aligned} \phi _\mathsf{DA}(011\bar{1}\bar{1}0\bar{1}01)&= 10101\bar{1}11,\end{aligned}$$
(4.72)
$$\begin{aligned} \phi _\mathsf{DA}(010010101\bar{1}1)&= 1\bar{1}01\bar{1}1\bar{1}11\bar{1}. \end{aligned}$$
(4.73)

Recall that a directed animal is a subset \(A\) of \(\mathbb {N}^2\) such that \((0, 0) \in A\) and \((i, j) \in A\) with \(i \geqslant 1\) or \(j \geqslant 1\) implies \((i - 1, j) \in A\) or \((i, j - 1) \in A\). The size of a directed animal \(A\) is its cardinality. Figure 11 shows a directed animal.

Fig. 11
figure 11

A directed animal of size \(21\). The point \((0, 0)\) is the lowest and leftmost point

According to [15], there is a bijection \(\alpha \) between the set of prefixes of Motzkin words of length \(n - 1\) and the set of directed animals of size \(n\). Hence, by Proposition 4.18, the map \(\alpha \circ \phi _\mathsf{DA}\) is a bijection between the elements of \(\mathsf{DA}\) of arity \(n\) and directed animals of size \(n\) and moreover, \(\mathsf{DA}\) can be seen as a ns operad on directed animals.

Theorem 4.19

The ns operad \(\mathsf{DA}\) admits the presentation

where  and  are of arity \(2\), and \(\equiv \) is the ns operadic congruence generated by

(4.74)
(4.75)
(4.76)
(4.77)

Proof

First, note that by replacing  by \(00 \in \mathsf{DA}(2)\) and  by \(01 \in \mathsf{DA}(2)\), we have \(\mathrm{ev }(x) = \mathrm{ev }(y)\) for the four relations \(x \leftrightarrow y\) of the statement of the theorem. Indeed, the four equivalence classes are, respectively, the ones of the elements \(000\), \(001\), \(011\), and \(01\bar{1}0\) of \(\mathsf{DA}\).

Consider now the orientation of \(\leftrightarrow \) into the rewrite rule \(\mapsto \) defined by

(4.78)
(4.79)
(4.80)
(4.81)

This rewrite rule is terminating. Indeed, let \(T\) be a syntax tree of . By associating the pair \((-k_T, \mathrm{w }(T))\) with \(T\), where \(k_T\) is the sum, for all internal nodes \(x\) of \(T\) labeled by , of the number of internal nodes constituting the right subtree of \(x\), it is plain that for any rewriting \(T_0 \rightarrow T_1\), we have \(k_{T_0} < k_{T_1}\), or \(k_{T_0} = k_{T_1}\) and \(\mathrm{w }(T_0) < \mathrm{w }(T_1)\).

Moreover, the normal forms of \(\mapsto \) are all syntax trees of  such that no internal node labeled by  has a left child labeled by , no internal node labeled by  has a child labeled by , and no internal node labeled by  has a right child labeled by  which has a right child labeled by . This set \(\mathcal {S}\) of syntax trees admits the following regular specification

(4.82)

where \(\mathcal {T}\) is the set of syntax trees admitting the following regular specification

(4.83)

Hence, the generating series \(F(t)\) of \(\mathcal {S}\) satisfies

$$\begin{aligned} F(t) = \frac{1 - 3t - (1 - 2t -3t^2)^{1/2}}{6t - 2}, \end{aligned}$$
(4.84)

which is the generating function of directed animals. By Proposition 4.18, \(F(t)\) is also the Hilbert series of \(\mathsf{DA}\).

Hence, by Lemma 2.2, \(\mathsf{DA}\) admits the claimed presentation.\(\square \)

Since the nontrivial relation (4.77) has degree \(3\), the presentation of \(\mathsf{DA}\) exhibited by Theorem 4.19 is not quadratic. Moreover, \(\mathsf{DA}\) is not a quadratic ns operad since, as an exhaustive inspection can show, there is no quadratic ns operad generated by two generators of arity \(2\) which has the same dimensions as \(\mathsf{DA}\).

4.1.8 A ns operad on segmented integer compositions

Let \(\mathsf{SComp}\) be the ns suboperad of \(\mathsf{T}\mathbb {N}_3\) generated by \(00\), \(01\), and \(02\). The following table shows the first elements of \(\mathsf{SComp}\).

Arity

Elements of \(\mathsf{SComp}\)

\(1\)

\(0\)

\(2\)

\(00\), \(01\), \(02\)

\(3\)

\(000\), \(001\), \(002\), \(010\), \(011\), \(012\), \(020\), \(021\), \(022\)

\(4\)

\(0000\), \(0001\), \(0002\), \(0010\), \(0011\), \(0012\), \(0020\), \(0021\), \(0022\), \(0100\), \(0101\), \(0102\), \(0110\), \(0111\), \(0112\), \(0120\), \(0121\), \(0122\), \(0200\), \(0201\), \(0202\), \(0210\), \(0211\), \(0212\), \(0220\), \(0221\), \(0222\)

Since \(\mathsf{FCat^{(2)}}\) is the ns suboperad of \(\mathsf{T}\mathbb {N}\) generated by \(00\), \(01\), and \(02\), and since \(\mathsf{T}\mathbb {N}_3\) is a quotient of \(\mathsf{T}\mathbb {N}\), \(\mathsf{SComp}\) is a quotient of \(\mathsf{FCat^{(2)}}\). Moreover, since \(\mathsf{DA}\) is generated by \(00\) and \(01\)\(\mathsf{DA}\) is a ns suboperad of \(\mathsf{SComp}\).

One has the following characterization of the elements of \(\mathsf{SComp}\):

Proposition 4.20

The elements of \(\mathsf{SComp}\) are exactly the words on the alphabet \(\{0, 1, 2\}\) beginning with \(0\).

Proof

It is immediate, from the definition of \(\mathsf{SComp}\) and Lemma 2.1, that any element of this ns operad starts by \(0\) since its generators \(00\), \(01\), and \(02\) all start by \(0\).

Let us now show by induction on the length of the words that \(\mathsf{SComp}\) contains any word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), let us observe that if \(x\) only consists of letters \(0\), \(\mathsf{SComp}\) contains \(x\) because \(x\) can be obtained by composing the generator \(00\) with itself. Otherwise, \(x\) has at least one occurrence of a \(1\) or a \(2\). Since its first letter is \(0\), there is in \(x\) a factor \(x_i x_{i + 1} =: g\) such that \(g \in \{01, 02\}\). By setting

$$\begin{aligned} y := (x_1, \ldots , x_i, x_{i + 2}, \ldots , x_n), \end{aligned}$$
(4.85)

we have \(x = y \circ _i g\). Since \(y\) satisfies the statement, by the induction hypothesis \(\mathsf{SComp}\) contains \(y\). Hence, \(\mathsf{SComp}\) also contains \(x\).\(\square \)

A segmented integer composition is a sequence \((S_1, \ldots , S_\ell )\) of integers compositions. The size \(|S|\) of a segmented integer composition is the sum of the sizes of the integer compositions which constitute \(S\). It is well-known that there are \(3^{n - 1}\) segmented integer compositions of size \(n\). We shall represent a segmented integer composition \(S\) by a ribbon diagram, that is the diagram consisting of the sequence of the ribbon diagrams of the integer compositions that constitute \(S\). There is a bijection between the words of \(\mathsf{SComp}\) of arity \(n\) and ribbon diagrams of segmented compositions of size \(n\).

To compute \(\phi _\mathsf{SComp}(x)\) where \(x\) is an element of \(\mathsf{SComp}\), factorize \(x\) as \(x = 0 x^{(1)} \ldots 0 x^{(\ell )}\) such that for any \(i \in [\ell ]\), the factor \(x^{(i)}\) has no occurrence of \(0\), and compute the sequence \(\left( \phi _\mathsf{Comp}\left( 0\bar{x}^{(1)}\right) , \ldots , \phi _\mathsf{Comp}\left( 0\bar{x}^{(\ell )}\right) \right) \), where for any \(i \in [\ell ]\), \(\bar{x}^{(i)}\) is the word obtained from \(x^{(i)}\) by decreasing all letters.

The inverse bijection is computed as follows. Given a ribbon diagram \(S := (S_1, \ldots , S_\ell )\) of a segmented integer composition of size \(n\), one computes an element of \(\mathsf{SComp}\) of arity \(n\) by computing the sequence \(\left( u^{(1)}, \ldots , u^{(\ell )}\right) \) where for any \(i \in [|\ell |]\), \(u^{(i)}\) is the word of \(\mathsf{Comp}\) obtained by applying the inverse bijection of \(\phi _\mathsf{Comp}\) on \(u^{(i)}\), then by incrementing in each \(u^{(i)}\) all letters, excepted the first one, and finally by concatenating all words of the sequence.

Since the elements of \(\mathsf{SComp}\) satisfy Proposition 4.20, \(\phi _\mathsf{SComp}\) is well-defined. Figure 12 shows an example of this bijection.

Fig. 12
figure 12

Interpretation of an element of the operad \(\mathsf{SComp}\) in terms of a segmented composition via the bijection \(\phi _\mathsf{SComp}\). Boxes of the ribbon diagram in the middle are labeled

Theorem 4.21

The ns operad \(\mathsf{SComp}\) admits the presentation

(4.86)

where , , and are of arity \(2\), and \(\equiv \) is the ns operadic congruence generated by

(4.87)
(4.88)
(4.89)
(4.90)
(4.91)
(4.92)
(4.93)
(4.94)
(4.95)

Proof

First, note that by replacing  by \(00 \in \mathsf{SComp}(2)\), by \(01 \in \mathsf{SComp}(2)\), and  by \(02 \in \mathsf{SComp}(2)\), we have \(\mathrm{ev }(x) = \mathrm{ev }(y)\) for the nine relations \(x \leftrightarrow y\) of the statement of the theorem. Indeed, the nine equivalence classes are, respectively, the ones of the elements \(000\), \(001\), \(011\), \(010\), \(021\), \(020\), \(002\), \(012\), and \(022\).

Consider now the orientation of \(\leftrightarrow \) into the rewrite rule \(\mapsto \) defined by

(4.96)
(4.97)
(4.98)
(4.99)
(4.100)
(4.101)
(4.102)
(4.103)
(4.104)

This rewrite rule is terminating. Indeed, it is plain that for any rewriting \(T_0 \rightarrow T_1\), we have \(\mathrm{w }(T_0) < \mathrm{w }(T_1)\).

Moreover, the normal forms of \(\mapsto \) are all syntax trees of  such that each internal node has no internal node as left son. Hence, the generating series \(F(t)\) of the normal forms of \(\mapsto \) is

$$\begin{aligned} F(t) = \sum _{n \geqslant 1} 3^{n - 1} t^n. \end{aligned}$$
(4.105)

By Proposition 4.20, \(F(t)\) is also the Hilbert series of \(\mathsf{SComp}\).

Hence, by Lemma 2.2, \(\mathsf{SComp}\) admits the claimed presentation.\(\square \)

4.2 Operads from the multiplicative monoid

We shall denote by \(\mathbb {M}\) the multiplicative monoid of integers.

Note that the ns suboperad of \(\mathsf{T}\mathbb {M}\) generated by \(00\) and the ns suboperad of \(\mathsf{T}\mathbb {M}\) generated by \(11\) are both isomorphic to the associative commutative operad \(\mathsf{Com}\).

The operads constructed in this section fit into the diagram of ns operads represented by Fig. 13. Table 2 summarizes some information about these ns operads.

Fig. 13
figure 13

The diagram of ns suboperads and quotients of \(\mathsf{T}\mathbb {M}\). Arrows \(\rightarrowtail \) (resp. \(\twoheadrightarrow \)) are injective (resp. surjective) ns operad morphisms

Table 2 Ground monoids, generators, first dimensions, and combinatorial objects involved in the ns suboperads and quotients of \(\mathsf{T}\mathbb {M}\)

4.2.1 The diassociative operad

Let \(\mathsf{Di}\) be the ns suboperad of \(\mathsf{T}\mathbb {M}\) generated by \(01\) and \(10\). The following table shows the first elements of \(\mathsf{Di}\).

Arity

Elements of \(\mathsf{Di}\)

\(1\)

\(1\)

\(2\)

\(01\), \(10\)

\(3\)

\(001\), \(010\), \(100\)

\(4\)

\(0001\), \(0010\), \(0100\), \(1000\)

\(5\)

\(00001\), \(00010\), \(00100\), \(01000\), \(10000\)

\(6\)

\(000001\), \(000010\), \(000100\), \(001000\), \(010000\), \(100000\)

Note that \(\mathsf{Com}\) is a quotient of \(\mathsf{Di}\) by the ns operadic congruence \(\equiv \) defined for all \(x, y \in \mathsf{Di}(n)\) by \(x \equiv y\).

One has the following characterization of the elements of \(\mathsf{Di}\):

Proposition 4.22

The elements of \(\mathsf{Di}\) are exactly the words on the alphabet \(\{0, 1\}\) containing exactly one \(1\).

Proof

Let us first show by induction on the length of the words that every word \(x\) of \(\mathsf{Di}\) satisfies the statement. This is true when \(|x| = 1\) since \(1\) is the unit of \(\mathbb {M}\). When \(|x| \geqslant 2\), by Lemma 2.1, there is an element \(y\) of \(\mathsf{Di}\) of length \(n := |x| - 1\), an integer \(i \in [n]\), and \(g \in \{01, 10\}\) such that \(x = y \circ _i g\). In all cases, \(x\) is obtained from \(y\) by inserting a \(0\) at an appropriate position. Since, by the induction hypothesis, \(y\) satisfies the statement, \(x\) also satisfies the statement.

Let us now show by induction on the length of the words that \(\mathsf{Di}\) contains any word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), there is in \(x\) a factor \(x_i x_{i + 1} =: g\) such that \(g \in \{01, 10\}\). Assume without lost of generality that \(g = 01\). Then, by setting

$$\begin{aligned} y := (x_1, \ldots , x_{i - 1}, x_{i + 1}, \ldots , x_n), \end{aligned}$$
(4.106)

we have \(x = y \circ _i g\). Since \(y\) satisfies the statement, by the induction hypothesis \(\mathsf{Di}\) contains \(y\). Hence, \(\mathsf{Di}\) also contains \(x\).\(\square \)

Recall that the diassociative operad [20\(\mathsf{Dias}\) is the ns operad admitting the presentation

$$\begin{aligned} \mathsf{Dias}:= \mathcal {F}\left( \{\dashv , \vdash \}\right) /_\equiv , \end{aligned}$$
(4.107)

where \(\dashv \) and \(\vdash \) are of arity \(2\), and \(\equiv \) is the ns operadic congruence generated by

$$\begin{aligned}&\dashv \circ _1 \dashv \leftrightarrow \dashv \circ _2 \dashv \leftrightarrow \dashv \circ _2 \vdash ,\end{aligned}$$
(4.108)
$$\begin{aligned}&\vdash \circ _2 \vdash \leftrightarrow \vdash \circ _1 \vdash \leftrightarrow \vdash \circ _1 \dashv ,\end{aligned}$$
(4.109)
$$\begin{aligned}&\dashv \circ _1 \vdash \leftrightarrow \vdash \circ _2 \dashv . \end{aligned}$$
(4.110)

Proposition 4.23

The ns operads \(\mathsf{Di}\) and \(\mathsf{Dias}\) are isomorphic and the map

$$\begin{aligned} \phi : \mathsf{Dias}\rightarrow \mathsf{Di}\end{aligned}$$
(4.111)

satisfying \(\phi (\dashv ) = 10\) and \(\phi (\vdash ) = 01\) is an isomorphism.

Proof

By replacing each generator \(g\) of \(\mathsf{Dias}\) by \(\phi (g)\), the generators \(01\) and \(10\) of \(\mathsf{Di}\) satisfy the same relations as the generators \(\dashv \) and \(\vdash \) of \(\mathsf{Dias}\). Moreover, by Proposition 4.22, the Hilbert series of \(\mathsf{Di}\) is

$$\begin{aligned} F(t) = \sum _{n \geqslant 1} n t^n, \end{aligned}$$
(4.112)

which is also the Hilbert series of \(\mathsf{Dias}\). Then, there is no nontrivial relation of degree greater than two involving generators of \(\mathsf{Di}\).\(\square \)

Proposition 4.23 also shows that \(\mathsf{Di}\) is a realization of the diassociative operad.

4.2.2 The triassociative operad

Let \(\mathsf{Tr}\) be the ns suboperad of \(\mathsf{T}\mathbb {M}\) generated by \(01\), \(10\), and \(11\). The following table shows the first elements of \(\mathsf{Tr}\).

Arity

Elements of \(\mathsf{Tr}\)

\(1\)

\(1\)

\(2\)

\(01\), \(10\), \(11\)

\(3\)

\(001\), \(010\), \(011\), \(100\), \(101\), \(110\), \(111\)

\(4\)

\(0001\), \(0010\), \(0011\), \(0100\), \(0101\), \(0110\), \(0111\), \(1000\), \(1001\), \(1010\), \(1011\), \(1100\), \(1101\), \(1110\), \(1111\)

Since \(\mathsf{Di}\) is generated by \(01\) and \(10\)\(\mathsf{Di}\) is a ns suboperad of \(\mathsf{Tr}\).

One has the following characterization of the elements of \(\mathsf{Tr}\):

Proposition 4.24

The elements of \(\mathsf{Tr}\) are exactly the words on the alphabet \(\{0, 1\}\) containing at least one \(1\).

Proof

Let us first show by induction on the length of the words that every word \(x\) of \(\mathsf{Tr}\) satisfies the statement. This is true when \(|x| = 1\) since \(1\) is the unit of \(\mathbb {M}\). When \(|x| \geqslant 2\), by Lemma 2.1, there is an element \(y\) of \(\mathsf{Tr}\) of length \(n := |x| - 1\), an integer \(i \in [n]\), and \(g \in \{01, 10, 11\}\) such that \(x = y \circ _i g\). By the induction hypothesis, \(y\) contains at least one \(1\). Since all generators of \(\mathsf{Tr}\) contain at least one \(1\)\(x\) also contains at least one \(1\).

Let us now show by induction on the length of the words that \(\mathsf{Tr}\) contains any word \(x\) satisfying the statement. This is true when \(|x| = 1\). When \(n := |x| \geqslant 2\), there is in \(x\) a factor \(x_i x_{i + 1} =: g\) such that \(g \in \{01, 10, 11\}\). Then, by setting

$$\begin{aligned} y := (x_1, \ldots , x_{i - 1}, x_{i + 1}, \ldots , x_n) \end{aligned}$$
(4.113)

if \(g = 01\), or

$$\begin{aligned} y := (x_1, \ldots , x_i, x_{i + 2}, \ldots , x_n) \end{aligned}$$
(4.114)

if \(g \in \{10, 11\}\), we have \(x = y \circ _i g\). Since \(y\) satisfies the statement, by the induction hypothesis \(\mathsf{Tr}\) contains \(y\). Hence, \(\mathsf{Tr}\) also contains \(x\).\(\square \)

Recall that the triassociative operad [22\(\mathsf{Trias}\) is the ns operad admitting the presentation

$$\begin{aligned} \mathsf{Trias}:= \mathcal {F}(\{\dashv , \perp , \vdash \})/_\equiv , \end{aligned}$$
(4.115)

where \(\dashv \), \(\perp \), and \(\vdash \) are of arity \(2\), and \(\equiv \) is the ns operadic congruence generated by

$$\begin{aligned}&\dashv \circ _1 \vdash \leftrightarrow \vdash \circ _2 \dashv ,\end{aligned}$$
(4.116)
$$\begin{aligned}&\perp \circ _1 \perp \leftrightarrow \perp \circ _2 \perp ,\end{aligned}$$
(4.117)
$$\begin{aligned}&\dashv \circ _1 \perp \leftrightarrow \perp \circ _2 \dashv ,\end{aligned}$$
(4.118)
$$\begin{aligned}&\perp \circ _1 \dashv \leftrightarrow \perp \circ _2 \vdash ,\end{aligned}$$
(4.119)
$$\begin{aligned}&\perp \circ _1 \vdash \leftrightarrow \vdash \circ _2 \perp ,\end{aligned}$$
(4.120)
$$\begin{aligned}&\dashv \circ _1 \dashv \leftrightarrow \dashv \circ _2 \dashv \leftrightarrow \dashv \circ _2 \vdash \leftrightarrow \dashv \circ _2 \perp ,\end{aligned}$$
(4.121)
$$\begin{aligned}&\vdash \circ _2 \vdash \leftrightarrow \vdash \circ _1 \vdash \leftrightarrow \vdash \circ _1 \dashv \leftrightarrow \vdash \circ _1 \perp . \end{aligned}$$
(4.122)

Proposition 4.25

The ns operads \(\mathsf{Tr}\) and \(\mathsf{Trias}\) are isomorphic and the map

$$\begin{aligned} \phi : \mathsf{Trias}\rightarrow \mathsf{Tr}\end{aligned}$$
(4.123)

satisfying \(\phi (\dashv ) = 10\), \(\phi (\vdash ) = 01\), and \(\phi (\perp ) = 11\) is an isomorphism.

Proof

By replacing each generator \(g\) of \(\mathsf{Trias}\) by \(\phi (g)\), the generators \(01\)\(10\), and \(11\) of \(\mathsf{Tr}\) satisfy the same relations as the generators \(\dashv \)\(\vdash \), and \(\perp \) of \(\mathsf{Trias}\). Moreover, by Proposition 4.24, the Hilbert series of \(\mathsf{Tr}\) is

$$\begin{aligned} F(t) = \sum _{n \geqslant 1} (2^n - 1) t^n, \end{aligned}$$
(4.124)

which is also the Hilbert series of \(\mathsf{Trias}\). Then, there is no nontrivial relation of degree greater than two involving generators of \(\mathsf{Tr}\).\(\square \)

Proposition 4.25 also shows that \(\mathsf{Tr}\) is a realization of the triassociative operad.

5 Concluding remarks

We have presented the functorial construction \(\mathsf{T}\) producing an operad given a monoid. As we have seen, this construction is very rich from a combinatorial point of view since most of the obtained operads coming from usual monoids involve a wide range of combinatorial objects. There are various way to continue this work. Let us address here the main directions.

In the first place, it appears that we have somewhat neglected the fact that \(\mathsf{T}\) is a functor to operads and not only to ns ones. Indeed, except for the operads \(\mathsf{End}\), \(\mathsf{PF}\), \(\mathsf{PW}\), and \(\mathsf{Per}\), we only have regarded the obtained operads as ns ones. Computer experiments let us think that the dimensions of the operads \(\mathsf{PRT}\), \(\mathsf{FCat^{(2)}}\), \(\mathsf{Motz}\), \(\mathsf{DA}\) and \(\mathsf{SComp}\) seen as symmetric ones are, respectively, Sequences  A052882 , A050351 , A032181 , A101052 , and  A001047 of [28]. Bijections between elements of these operads and combinatorial objects enumerated by these sequences, together with presentations by generators and relations in this symmetric context, would be worthwhile.

Furthermore, we have considered \(\mathsf{T}\) only in the category of sets, i.e., it takes a monoid as input and constructs a set-operad as output. We can obviously extend the definition of \(\mathsf{T}\) over the category of vector spaces. In that event, \(\mathsf{T}\) would be a functor from the category of unital associative algebras to the category of operads in the category of vector spaces. It is thus natural to ask what operads \(\mathsf{T}\) produces in this category.

Another line of research is the following. It is well-known that the Koszul dual (see [12] for Koszul duality of operads) of the operads \(\mathsf{Dias}\) and \(\mathsf{Trias}\) are, respectively, the dendriform \(\mathsf{Dendr}\) [20] and the tridendriform \(\mathsf{TDendr}\) [22] operads. The tridendriform operad is a generalization of the dendriform operad and further generalizations were proposed, like the operads \(\mathsf{Quad}\) [1] and \(\mathsf{Ennea}\) [18]. Since the operads \(\mathsf{Di}\) and \(\mathsf{Tr}\), obtained from the \(\mathsf{T}\) construction, are respectively isomorphic to the operads \(\mathsf{Dias}\) and \(\mathsf{Trias}\), we can ask if there are generalizations of \(\mathsf{Di}\) and \(\mathsf{Tr}\) so that their Koszul duals provide generalizations of the operads \(\mathsf{Dendr}\) and \(\mathsf{TDendr}\).