Solution (source code)

= Solution

A <monoidal category> consists of a category $\mathcal C$, a bifunctor $\otimes:\mathcal C\times\mathcal C\to\mathcal C$, a unit object $I$, and natural <isomorphisms> $a_{X,Y,Z}:(X\otimes Y)\otimes Z\to X\otimes(Y\otimes Z)$, $l_X:I\otimes X\to X$ and $r_X:X\otimes I\to X$. They satisfy the <pentagon identity for a monoidal category>
$$
a_{W,X,Y\otimes Z}a_{W\otimes X,Y,Z}=(1_W\otimes a_{X,Y,Z})a_{W,X\otimes Y,Z}(a_{W,X,Y}\otimes1_Z)
$$
and the <triangle identity for a monoidal category> $(1_X\otimes l_Y)a_{X,I,Y}=r_X\otimes1_Y$. These axioms make different coherent rebracketings and unit removals agree.

It defines a <bicategory> with one object $*$. The hom-category $\mathcal B(*,*)$ is $\mathcal C$; objects of $\mathcal C$ are its 1-cells and morphisms of $\mathcal C$ its 2-cells. Horizontal composition is the tensor bifunctor, the identity 1-cell is $I$, and the associator and unitors are the bicategorical coherence 2-cells. Vertical composition is composition of morphisms in $\mathcal C$, and the interchange law follows from bifunctoriality of $\otimes$. Conversely the hom-category of any one-object <bicategory> has exactly this monoidal structure. Thus \b[a monoidal category is precisely a one-object <bicategory>], not necessarily a strict one-object 2-category.