# Operad

In mathematics, an operad is a structure that consists of abstract operations, each one having a fixed finite number of inputs (arguments) and one output, as well as a specification of how to compose these operations. Given an operad $O$, one defines an algebra over $O$ to be a set together with concrete operations on this set which behave just like the abstract operations of $O$. For instance, there is a Lie operad $L$ such that the algebras over $L$ are precisely the Lie algebras; in a sense $L$ abstractly encodes the operations that are common to all Lie algebras. An operad is to its algebras as a group is to its group representations.

## History

Operads originate in algebraic topology; they were introduced to characterize iterated loop spaces by J. Michael Boardman and Rainer M. Vogt in 1968 and by J. Peter May in 1972.
Martin Markl, Steve Shnider, and Jim Stasheff write in their book on operads:
    "The name operad and the formal definition appear first in the early 1970's in J. Peter May's "The Geometry of Iterated Loop Spaces", but a year or more earlier, Boardman and Vogt described the same concept under the name categories of operators in standard form, inspired by PROPs and PACTs of Adams and Mac Lane. In fact, there is an abundance of prehistory. Weibel [Wei] points out that the concept first arose a century ago in A.N. Whitehead's "A Treatise on Universal Algebra", published in 1898."
The word "operad" was created by May as a portmanteau of "operations" and "monad" (and also because his mother was an opera singer).
Interest in operads was considerably renewed in the early 90s when, based on early insights of Maxim Kontsevich, Victor Ginzburg and Mikhail Kapranov discovered that some duality phenomena in rational homotopy theory could be explained using Koszul duality of operads. Operads have since found many applications, such as in deformation quantization of Poisson manifolds, the Deligne conjecture, or graph homology in the work of Maxim Kontsevich and Thomas Willwacher.

## Intuition

Suppose $X$ is a set and for $n\in \mathbb {N}$ we define
    $P(n):=\{f\colon X^{n}\to X\}$,
the set of all functions from the cartesian product of $n$ copies of $X$ to $X$.
We can compose these functions: given $f\in P(n)$, $f_{1}\in P(k_{1}),\ldots ,f_{n}\in P(k_{n})$, the function
    $f\circ (f_{1},\ldots ,f_{n})\in P(k_{1}+\cdots +k_{n})$
is defined as follows: given $k_{1}+\cdots +k_{n}$ arguments from $X$, we divide them into $n$ blocks, the first one having $k_{1}$ arguments, the second one $k_{2}$ arguments, etc., and then apply $f_{1}$ to the first block, $f_{2}$ to the second block, etc. We then apply $f$ to the list of $n$ values obtained from $X$ in such a way.
We can also permute arguments, i.e. we have a right action $*$ of the symmetric group $S_{n}$ on $P(n)$, defined by
    $(f*s)(x_{1},\ldots ,x_{n})=f(x_{s^{-1}(1)},\ldots ,x_{s^{-1}(n)})$
for $f\in P(n)$, $s\in S_{n}$ and $x_{1},\ldots ,x_{n}\in X$.
The definition of a symmetric operad given below captures the essential properties of these two operations $\circ$ and $*$.

## Definition
### Non-symmetric operad

A non-symmetric operad (sometimes called an operad without permutations, or a non-$\Sigma$ or plain operad) consists of the following:
* a sequence $(P(n))_{n\in \mathbb {N} }$ of sets, whose elements are called $n$-ary operations,
* an element $1$ in $P(1)$ called the identity,
* for all positive integers $n$, k$_1$, …, k$_n${\textstyle k_{1}, \ldots , k_{n}}, a composition function
    ${\begin{aligned}\circ :P(n)\times P(k_{1})\times \cdots \times P(k_{n})&\to P(k_{1}+\cdots +k_{n})\\(\theta ,\theta _{1},\ldots ,\theta _{n})&\mapsto \theta \circ (\theta _{1},\ldots ,\theta _{n}),\end{aligned}}$
satisfying the following coherence axioms:
* identity: $\theta \circ (1,\ldots ,1)=\theta =1\circ \theta$
* associativity:
       ${\begin{aligned}&\theta \circ {\Big\theta _{1}\circ (\theta _{1,1},\ldots ,\theta _{1,k_{1}}),\ldots ,\theta _{n}\circ (\theta _{n,1},\ldots ,\theta _{n,k_{n}}){\Big )}\\=&{\Big\theta \circ (\theta _{1},\ldots ,\theta _{n}){\Big )}\circ (\theta _{1,1},\ldots ,\theta _{1,k_{1}},\ldots ,\theta _{n,1},\ldots ,\theta _{n,k_{n}})\end{aligned}}$

### Symmetric operad

A symmetric operad (often just called operad) is a non-symmetric operad $P$ as above, together with a right action of the symmetric group $S_{n}$ on $P(n)$ for $n\in \mathbb {N}$, denoted by $*$ and satisfying
* equivariance: given a permutation $t\in S_{n}$,
       $(\theta *t)\circ (\theta _{1},\ldots ,\theta _{n})=(\theta \circ (\theta _{t^{-1}(1)},\ldots ,\theta _{t^{-1}(n)}))*t'$
       (where $t'$ on the right hand side refers to the element of $S_{k_{1}+\dots +k_{n}}$ that acts on the set $\{1,2,\dots ,k_{1}+\dots +k_{n}\}$ by breaking it into $n$ blocks, the first of size $k_{1}$, the second of size $k_{2}$, through the $n$th block of size $k_{n}$, and then permutes these $n$ blocks by $t$, keeping each block intact)
    and given $n$ permutations $s_{i}\in S_{k_{i}}$,
       $\theta \circ (\theta _{1}*s_{1},\ldots ,\theta _{n}*s_{n})=(\theta \circ (\theta _{1},\ldots ,\theta _{n}))*(s_{1},\ldots ,s_{n})$
       (where $(s_{1},\ldots ,s_{n})$ denotes the element of $S_{k_{1}+\dots +k_{n}}$ that permutes the first of these blocks by $s_{1}$, the second by $s_{2}$, etc., and keeps their overall order intact).
The permutation actions in this definition are vital to most applications, including the original application to loop spaces.

### Morphisms

A morphism of operads $f:P\to Q$ consists of a sequence
    $(f_{n}:P(n)\to Q(n))_{n\in \mathbb {N} }$
that:
* preserves the identity: $f(1)=1$
* preserves composition: for every n-ary operation $\theta$ and operations $\theta _{1},\ldots ,\theta _{n}$,
       $f(\theta \circ (\theta _{1},\ldots ,\theta _{n}))=f(\theta )\circ (f(\theta _{1}),\ldots ,f(\theta _{n}))$
* preserves the permutation actions: $f(x*s)=f(x)*s$.
Operads therefore form a category denoted by ${\mathsf {Oper}}$.

### In other categories

So far operads have only been considered in the category of sets. More generally, it is possible to define operads in any symmetric monoidal category C . In that case, each $P(n)$ is an object of C, the composition $\circ$ is a morphism $P(n)\otimes P(k_{1})\otimes \cdots \otimes P(k_{n})\to P(k_{1}+\cdots +k_{n})$ in C (where $\otimes$ denotes the tensor product of the monoidal category), and the actions of the symmetric group elements are given by isomorphisms in C.
A common example is the category of topological spaces and continuous maps, with the monoidal product given by the cartesian product. In this case, a topological operad is given by a sequence of spaces (instead of sets) $\{P(n)\}_{n\geq 0}$. The structure maps of the operad (the composition and the actions of the symmetric groups) are then assumed to be continuous. The result is called a topological operad. Similarly, in the definition of a morphism of operads, it would be necessary to assume that the maps involved are continuous.
Other common settings to define operads include, for example, modules over a commutative ring, chain complexes, groupoids (or even the category of categories itself), coalgebras, etc.

### Algebraist definition

Given a commutative ring R we consider the category $R{\text{-}}{\mathsf {Mod}}$ of modules over R. An operad over R can be defined as a monoid object $(T,\gamma ,\eta )$ in the monoidal category of endofunctors on $R{\text{-}}{\mathsf {Mod}}$ (it is a monad) satisfying some finiteness condition.
For example, a monoid object in the category of "polynomial endofunctors" on $R{\text{-}}{\mathsf {Mod}}$ is an operad. Similarly, a symmetric operad can be defined as a monoid object in the category of $\mathbb {S}$-objects, where $\mathbb {S}$ means a symmetric group. A monoid object in the category of combinatorial species is an operad in finite sets.
An operad in the above sense is sometimes thought of as a generalized ring. For example, Nikolai Durov defines his generalized rings as monoid objects in the monoidal category of endofunctors on ${\textbf {Set}}$ that commute with filtered colimits. This is a generalization of a ring since each ordinary ring R defines a monad $\Sigma _{R}:{\textbf {Set}}\to {\textbf {Set}}$ that sends a set X to the underlying set of the free R-module $R^{(X)}$ generated by X.

## Understanding the axioms
### Associativity axiom

"Associativity" means that composition of operations is associative (the function $\circ$ is associative), analogous to the axiom in category theory that $f\circ (g\circ h)=(f\circ g)\circ h$; it does not mean that the operations themselves are associative as operations. Compare with the associative operad, below.
Associativity in operad theory means that expressions can be written involving operations without ambiguity from the omitted compositions, just as associativity for operations allows products to be written without ambiguity from the omitted parentheses.
For instance, if $\theta$ is a binary operation, which is written as $\theta (a,b)$ or $(ab)$. So that $\theta$ may or may not be associative.
Then what is commonly written $((ab)c)$ is unambiguously written operadically as $\theta \circ (\theta ,1)$ . This sends $(a,b,c)$ to $(ab,c)$ (apply $\theta$ on the first two, and the identity on the third), and then the $\theta$ on the left "multiplies" $ab$ by $c$. This is clearer when depicted as a tree:
which yields a 3-ary operation:
However, the expression $(((ab)c)d)$ is a priori ambiguous: it could mean $\theta \circ ((\theta ,1)\circ ((\theta ,1),1))$, if the inner compositions are performed first, or it could mean $(\theta \circ (\theta ,1))\circ ((\theta ,1),1)$, if the outer compositions are performed first (operations are read from right to left). Writing $x=\theta ,y=(\theta ,1),z=((\theta ,1),1)$, this is $x\circ (y\circ z)$ versus $(x\circ y)\circ z$. That is, the tree is missing "vertical parentheses":
If the top two rows of operations are composed first (puts an upward parenthesis at the $(ab)c\ \ d$ line; does the inner composition first), the following results:
which then evaluates unambiguously to yield a 4-ary operation. As an annotated expression:
    $\theta _{(ab)c\cdot d}\circ ((\theta _{ab\cdot c},1_{d})\circ ((\theta _{a\cdot b},1_{c}),1_{d}))$
If the bottom two rows of operations are composed first (puts a downward parenthesis at the $ab\quad c\ \ d$ line; does the outer composition first), following results:
which then evaluates unambiguously to yield a 4-ary operation:
The operad axiom of associativity is that these yield the same result, and thus that the expression $(((ab)c)d)$ is unambiguous.

### Identity axiom

The identity axiom (for a binary operation) can be visualized in a tree as:
meaning that the three operations obtained are equal: pre- or post- composing with the identity makes no difference. As for categories, $1\circ 1=1$ is a corollary of the identity axiom.

## Examples
### Endomorphism operad in sets and operad algebras

The most basic operads are the ones given in the section on "Intuition", above. For any set $X$, we obtain the endomorphism operad ${\mathcal {End}}_{X}$ consisting of all functions $X^{n}\to X$. These operads are important because they serve to define operad algebras. If ${\mathcal {O}}$ is an operad, an operad algebra over ${\mathcal {O}}$ is given by a set $X$ and an operad morphism ${\mathcal {O}}\to {\mathcal {End}}_{X}$. Intuitively, such a morphism turns each "abstract" operation of ${\mathcal {O}}(n)$ into a "concrete" $n$-ary operation on the set $X$. An operad algebra over ${\mathcal {O}}$ thus consists of a set $X$ together with concrete operations on $X$ that follow the rules abstractely specified by the operad ${\mathcal {O}}$.

### Endomorphism operad in vector spaces and operad algebras

If k is a field, we can consider the category of finite-dimensional vector spaces over k; this becomes a monoidal category using the ordinary tensor product over k. We can then define endomorphism operads in this category, as follows. Let V be a finite-dimensional vector space The endomorphism operad ${\mathcal {End}}_{V}=\{{\mathcal {End}}_{V}(n)\}$ of V consists of
* ${\mathcal {End}}_{V}(n)$ = the space of linear maps $V^{\otimes n}\to V$,
* (composition) given $f\in {\mathcal {End}}_{V}(n)$, $g_{1}\in {\mathcal {End}}_{V}(k_{1})$, ..., $g_{n}\in {\mathcal {End}}_{V}(k_{n})$, their composition is given by the map $V^{\otimes k_{1}}\otimes \cdots \otimes V^{\otimes k_{n}}\ {\overset {g_{1}\otimes \cdots \otimes g_{n}}{\longrightarrow }}\ V^{\otimes n}\ {\overset {f}{\to }}\ V$,
* (identity) The identity element in ${\mathcal {End}}_{V}(1)$ is the identity map $\operatorname {id} _{V}$,
* (symmetric group action) $S_{n}$ operates on ${\mathcal {End}}_{V}(n)$ by permuting the components of the tensors in $V^{\otimes n}$.
If ${\mathcal {O}}$ is an operad, a k-linear operad algebra over ${\mathcal {O}}$ is given by a finite-dimensional vector space V over k and an operad morphism ${\mathcal {O}}\to {\mathcal {End}}_{V}$; this amounts to specifying concrete multilinear operations on V that behave like the operations of ${\mathcal {O}}$. (Notice the analogy between operads&operad algebras and rings&modules: a module over a ring R is given by an abelian group M together with a ring homomorphism $R\to \operatorname {End} (M)$.)
Depending on applications, variations of the above are possible: for example, in algebraic topology, instead of vector spaces and tensor products between them, one uses (reasonable) topological spaces and cartesian products between them.

### "Little something" operads

The little 2-disks operad is a topological operad where $P(n)$ consists of ordered lists of n disjoint disks inside the unit disk of $\mathbb {R} ^{2}$ centered at the origin. The symmetric group acts on such configurations by permuting the list of little disks. The operadic composition for little disks is illustrated in the accompanying figure to the right, where an element $\theta \in P(3)$ is composed with an element $(\theta _{1},\theta _{2},\theta _{3})\in P(2)\times P(3)\times P(4)$ to yield the element $\theta \circ (\theta _{1},\theta _{2},\theta _{3})\in P(9)$ obtained by shrinking the configuration of $\theta _{i}$ and inserting it into the i-th disk of $\theta$, for $i=1,2,3$.
Analogously, one can define the little n-disks operad by considering configurations of disjoint n-balls inside the unit ball of $\mathbb {R} ^{n}$.
Originally the little n-cubes operad or the little intervals operad (initially called little n-cubes PROPs) was defined by Michael Boardman and Rainer Vogt in a similar way, in terms of configurations of disjoint axis-aligned n-dimensional hypercubes (n-dimensional intervals) inside the unit hypercube. Later it was generalized by May to the little convex bodies operad, and "little disks" is a case of "folklore" derived from the "little convex bodies".

### Rooted trees

In graph theory, rooted trees form a natural operad. Here, $P(n)$ is the set of all rooted trees with n leaves, where the leaves are numbered from 1 to n. The group $S_{n}$ operates on this set by permuting the leaf labels. Operadic composition $T\circ (S_{1},\ldots ,S_{n})$ is given by replacing the i-th leaf of $T$ by the root of the i-th tree $S_{i}$, for $i=1,\ldots ,n$, thus attaching the n trees to $T$ and forming a larger tree, whose root is taken to be the same as the root of $T$ and whose leaves are numbered in order.

### Swiss-cheese operad

The Swiss-cheese operad is a two-colored topological operad defined in terms of configurations of disjoint n-dimensional disks inside a unit n-semidisk and n-dimensional semidisks, centered at the base of the unit semidisk and sitting inside of it. The operadic composition comes from gluing configurations of "little" disks inside the unit disk into the "little" disks in another unit semidisk and configurations of "little" disks and semidisks inside the unit semidisk into the other unit semidisk.
The Swiss-cheese operad was defined by Alexander A. Voronov. It was used by Maxim Kontsevich to formulate a Swiss-cheese version of Deligne's conjecture on Hochschild cohomology. Kontsevich's conjecture was proven partly by Po Hu, Igor Kriz, and Alexander A. Voronov and then fully by Justin Thomas.

### Associative operad

Another class of examples of operads are those capturing the structures of algebraic structures, such as associative algebras, commutative algebras and Lie algebras. Each of these can be exhibited as a finitely presented operad, in each of these three generated by binary operations.
For example, the associative operad is a symmetric operad generated by a binary operation $\psi$, subject only to the condition that
    $\psi \circ (\psi ,1)=\psi \circ (1,\psi ).$
This condition corresponds to associativity of the binary operation $\psi$; writing $\psi (a,b)$ multiplicatively, the above condition is $(ab)c=a(bc)$. This associativity of the operation should not be confused with associativity of composition which holds in any operad; see the axiom of associativity, above.
In the associative operad, each $P(n)$ is given by the symmetric group $S_{n}$, on which $S_{n}$ acts by right multiplication. The composite $\sigma \circ (\tau _{1},\dots ,\tau _{n})$ permutes its inputs in blocks according to $\sigma$, and within blocks according to the appropriate $\tau _{i}$.
The algebras over the associative operad are precisely the semigroups: sets together with a single binary associative operation. The k-linear algebras over the associative operad are precisely the associative k-algebras.

### Terminal symmetric operad

The terminal symmetric operad is the operad which has a single n-ary operation for each n, with each $S_{n}$ acting trivially. The algebras over this operad are the commutative semigroups; the k-linear algebras are the commutative associative k-algebras.

### Operads from the braid groups

Similarly, there is a non-$\Sigma$ operad for which each $P(n)$ is given by the Artin braid group $B_{n}$. Moreover, this non-$\Sigma$ operad has the structure of a braided operad, which generalizes the notion of an operad from symmetric to braid groups.

### Linear algebra

In linear algebra, real vector spaces can be considered to be algebras over the operad $\mathbb {R} ^{\infty }$ of all linear combinations. This operad is defined by $\mathbb {R} ^{\infty }(n)=\mathbb {R} ^{n}$ for $n\in \mathbb {N}$, with the obvious action of $S_{n}$ permuting components, and composition ${\vec {x}}\circ ({\vec {y_{1}}},\ldots ,{\vec {y_{n}}})$ given by the concatentation of the vectors $x^{(1)}{\vec {y_{1}}},\ldots ,x^{(n)}{\vec {y_{n}}}$, where ${\vec {x}}=(x^{(1)},\ldots ,x^{(n)})\in \mathbb {R} ^{n}$. The vector ${\vec {x}}=(2,3,-5,0,\dots )$ for instance represents the operation of forming a linear combination with coefficients 2,3,-5,0,...
This point of view formalizes the notion that linear combinations are the most general sort of operation on a vector space – saying that a vector space is an algebra over the operad of linear combinations is precisely the statement that all possible algebraic operations in a vector space are linear combinations. The basic operations of vector addition and scalar multiplication are a generating set for the operad of all linear combinations, while the linear combinations operad canonically encodes all possible operations on a vector space.
Similarly, affine combinations, conical combinations, and convex combinations can be considered to correspond to the sub-operads where the terms of the vector ${\vec {x}}$ sum to 1, the terms are all non-negative, or both, respectively. Graphically, these are the infinite affine hyperplane, the infinite hyper-octant, and the infinite simplex. This formalizes what is meant by $\mathbb {R} ^{n}$ being or the standard simplex being model spaces, and such observations as that every bounded convex polytope is the image of a simplex. Here suboperads correspond to more restricted operations and thus more general theories.

### Commutative-ring operad and Lie operad

The commutative-ring operad is an operad whose algebras are the commutative rings. It is defined by $P(n)=\mathbb {Z} [x_{1},\ldots ,x_{n}]$, with the obvious action of $S_{n}$ and operadic composition given by substituting polynomials (with renumbered variables) for variables. A similar operad can be defined whose algebras are the associative, commutative algebras over some fixed base field. The Koszul-dual of this operad is the Lie operad (whose algebras are the Lie algebras), and vice versa.

## Free Operads

Typical algebraic constructions (e.g., free algebra construction) can be extended to operads. Let $\mathbf {Set} ^{S_{n}}$ denote the category whose objects are sets on which the group $S_{n}$ acts. Then there is a forgetful functor ${\mathsf {Oper}}\to \prod _{n\in \mathbb {N} }\mathbf {Set} ^{S_{n}}$, which simply forgets the operadic composition. It is possible to construct a left adjoint $\Gamma :\prod _{n\in \mathbb {N} }\mathbf {Set} ^{S_{n}}\to {\mathsf {Oper}}$ to this forgetful functor (this is the usual definition of free functor). Given a collection of operations E, $\Gamma (E)$ is the free operad on E.
Like a group or a ring, the free construction allows to express an operad in terms of generators and relations. By a free representation of an operad ${\mathcal {O}}$, we mean writing ${\mathcal {O}}$ as a quotient of a free operad ${\mathcal {F}}=\Gamma (E)$ where E describes generators of ${\mathcal {O}}$ and the kernel of the epimorphism ${\mathcal {F}}\to {\mathcal {O}}$ describes the relations.
A (symmetric) operad ${\mathcal {O}}=\{{\mathcal {O}}(n)\}$ is called quadratic if it has a free presentation such that $E={\mathcal {O}}(2)$ is the generator and the relation is contained in $\Gamma (E)(3)$.

## Clones

Clones are the special case of operads that are also closed under identifying arguments together ("reusing" some data). Clones can be equivalently defined as operads that are also a minion (or clonoid).

## Operads in homotopy theory

In Stasheff (2004), Stasheff writes:
    Operads are particularly important and useful in categories with a good notion of "homotopy", where they play a key role in organizing hierarchies of higher homotopies.