# The Azimuth Project Blog - Meet the operads (changes)

Showing changes from revision #4 to #5: Added | Removed | Changed

By David A. Tanzer

An operad is a nice mathematical gadget for describing systems built from interconnected, nested subsystems. It consists of a system of ‘objects’ connected by ‘morphisms’, which are thought of as abstract operations on objects. Each morphism has$n$ inputs and one output: The morphisms may be connected into tree diagrams: The composition of a tree diagram is a morphism that represents the combined operation: #### 1. Definition

An operad $O$ consists of:

• A set of objects Ob($O$).
• For objects $X_1,...,X_n,Y$ , a morphisms_ set ofmorphisms $\phi: X_1,...,X_n \rightarrow Y$. The set of all morphisms of type $X_1,...,X_n \rightarrow Y$ is written $Hom_O(X_1,...,X_n$.
• For each object $X$, a designated identity morphism $\mathrm{Id}_X : X \to X$
• A composition function, which maps a “tree diagram” $T$ of morphisms into the morphism $C(T)$

The morphism $\phi: X_1,...,X_n \rightarrow Y$ is thought of as an abstract $n$-ary operation: Here is an example of a tree diagram:

$f: A,B \rightarrow X_1$
$g: C,D \rightarrow X_2$
$h: X_1,X_2 \rightarrow Y$

The head of the tree is $h$. The first child of $h$ is $f$. That is because the output of $f$ is the first input to $h$. Similarly, the second child of $h$ is $g$.

The composite morphism will map $A,B,C,D \rightarrow Y$.

##### 1.1 Associativity conditions

In the technical construction of an operad, the composition rule is defined just for two-level trees, such as the one above. Then, in order to ensure that it can be uniquely extended to a rule for all trees, the associativity condition is imposed as a requirement on the composition rule.

Equivalently, one could start by defining a composition rule for all tree diagrams. Then, the following associativity constraint would be imposed on the rule. Suppose you had a tree of morphisms $T$, with child trees $T_1,...,T_n$. Let $T'$ be the tree whose root is the same as $T$, with children $U_1,...U_n$, where $U_i$ is the composite of $T_i$. Then the composite of $T'$ must equal the composite of $T$.

In other words, the composite of a tree must equal composite obtained by first collapsing – through composition – each of the child subtrees.

##### 1.2 Identity conditions

The identity morphism $Id_A: A \rightarrow A$ for object $A$ is defined by the requirement that it is a ‘no-op’ with respect to composition.

This means the following. Suppose $T$ is a morphism tree, which contains $Id_A: A \rightarrow A$ as a subtree. Let $T'$ be the result of ‘splicing’ $Id_A$ out of the tree.

Then composite($T$) = composite($T'$).

Then it follows that the identity morphism for $A$ must be unique. For suppose that there were two identity morphisms $I_1,I_2$ for $A$. Consider the linear tree which chains $I_1$ into $I_2$. The result of splicing $I_1$ out of the chain is $I_2$, and the result of splicing $I_2$ out of the chain is $I_1$. By the identity requirement, these must be equal.

#### 2. The little n-cubes operad

We illustrate for $n=2$, which gives the ‘little squares’ operad.

##### 2.1 Definition of little squares

There is just a single object $\square$, which serves only as a placeholder.

The entire content of this operad consists of the morphisms from $\square_1,...,\square_n \rightarrow \square$.

Note: the subscript on $\square_i$ is only for counting purposes. They’re all the same object.

The morphisms are geometric arrangements.

Choose some fixed ‘outer square,’ which for concreteness we take to be the unit square.

Then a morphism $f_k: \square_1,...,\square_k \rightarrow \square$ is an arrangement of $k$ subsquares within the outer square.

##### 2.2 Composition within little squares

Now, can you picture the natural rule for composing a connected tree of arrangements into a composite arrangement?

(For a drawing, see Spivak’s slide number 8, “The first operad.”)

Here is the picture, painted with words.

Let $f$ be an arrangement of $k$ subsquares $s_1,..s_k$ within the unit square.

Let $w_i$ be the width of square $i$.

Suppose that we are given arrangements $g_1,...,g_k$ which we wish to compose into the structure given by $f$.

The interpretation of this will be to nest each $g_i$ as a sub-arrangement of $f$, installing it at the site of $s_i$.

$s_i$ will function as a frame for the installation of a scaled-down copies of the subsquares comprising $g_i$.

In particular, the subsquares of $g_i$ will get scaled down by the factor $w_i$ before being installed into the frame $s_i$.

So now, on our mental ‘workbench’ we have the unit square, subsquares $s_i$, and sub-subsquares (which have been scaled down).

The final composite is defined by discarding the intermediate subsquares $s_i$, and just retaining the outer unit square and the scaled down sub-subsquares.

##### 2.3 Example of composition

For example, let $f: \square \rightarrow \square_1,\square_2$ be the arrangement consisting of the lower left and upper right quarters of the unit square.

The consider the morphism tree consisting of $f$ at the root, with two children that are also $f$.

The composite of this tree will be the first iteration of recursively nesting $f$ within itself. It consists of four subsquares, each of length 0.25, arranged along the diagonal from the lower left to the upper right corners of the unit square.

#### 3. General spirit of operads

Little n-cubes is a “primordial operad” that clearly illustrates the general spirit and intent of a wide range of applications of operads.

Objects conceived as interfaces, and a morphism $X_1,...,X_n \rightarrow Y$ is conceived as an arrangement of the sub-interfaces $X_1,...,X_n$ within the enclosing interface $Y$.

Composition of morphisms is the operation of nesting arrangements and removing the intermediate interfaces.

A tree of connected morphisms can represent a decomposition of a system using a hierarchy of abstractions.

Composition of the morphisms gives the opposite process: concretization, to give an arrangement that explicitly includes all of the most granular components in the system.

For instance, an abstract design for a complex machine may include components like Fast Fourier Transform, Convolution, and so on. Operad morphisms can describe the decomposition of the system into subcomponents, along with their detailed interconnections (wiring, or software ‘plumbing’). In a hardware interpretation, the composition of the hierarchy of morphisms can yield a detailed circuit diagram comprising a large number of elementary logic gates.

There is much more to be said on this subject, which is both elegant and applied.

category: blog