15

It is well known that function composition is associative. Is the converse true? Is any associative operation essentially expressible as function composition? If not, what's an interesting example of an associative operation that is not expressible as function composition?

xyz
  • 462
  • 2
    Stated more formally, if $$ is an associative binary operation on a set $X$, then is there a set $Y$ and a one-to-one homomorphism $(X,)\to(Y^Y,\circ)$ (where $Y^Y$ is the set of all functions $Y\to Y$ and $\circ$ is function composition). – anon Aug 04 '16 at 19:55
  • 4
    If you like associativity and abstractions of functions, then you will love category theory. – Chill2Macht Aug 04 '16 at 20:07
  • 1
    Since no one's mentioned it, if you ask this analogous question about groups rather than just associative operations, you get Cayley's theorem - that is, all groups act like a set of bijections under composition. – Milo Brandt Aug 05 '16 at 04:13

3 Answers3

27

Whenever $*$ is an associative operation on a set $X$, each $x\in X$ gives rise to a function $$ f_x : X\to X : y \mapsto x * y $$ And we then have for all $x$ and $y$, $$ f_x \circ f_y = f_{x*y} $$

In other words, $f_{(-)}$ is a semigroup homomorphism from $(X,{*})$ to $(X^X,{\circ})$.

Now, $f_{(-)}$ is not necessarily injective. It will be if $*$ has an identity element, however. And if there is no identity element for $*$, we can of course add one artificially before we start.

Thus,

Every semigroup (set with an associative operation) is isomorphic to a semigroup where the composition is function composition.


All of the above assumes that $*$ is an operation on a set. If we have an associative operation on a proper class (such as, for example, ordinal addition, or union of arbitrary sets), then the above construction doesn't work. And ordinals under addition cannot be represented as endofunctions on a single set under composition -- no set has enough functions on it to give each ordinal a representative, even before we start speaking about composition.


Similarly, in category theory (which studies operations where $a*b$ isn't necessarily defined for all $a$ and $b$, but which are still associative "whenever it makes sense"), every small category is concretizable (that is, isomorphic to a subcategory of the category of sets and functions), by an extension of the above construction.

  • 1
    I knew the construction but somehow had thought before that $x \mapsto f_{x}$ was an embedding, and didn't realize the identity element was necessary. +1 for making me aware of that. – Caleb Stanford Aug 04 '16 at 22:22
  • 3
    @6005: It's not necessary, just sufficient. The problem you want to avoid is having distinct $x$ and $y$ such that $xz = yz$ for all $z$. An identity is an easy way to ensure that –  Aug 04 '16 at 23:27
  • @Hurkyl Thanks. I meant "necessary" in the sense that it's necessary in the proof in order to obtain the result. But it was ambiguous wording I suppose. – Caleb Stanford Aug 05 '16 at 00:15
  • 1
    @Paul: I don't understand your objection against adjoining an identity element; can you elaborate? Given $(X,)$, select some $\bot\notin T$, and consider the operation $$f(x,y) = \begin{cases} x & \text{if }y=\bot \ y & \text{if }x=\bot \ xy & \text{otherwise} \end{cases}$$ Then $f$ is associative, $(X\cup{\bot}, f)$ is a semigroup that extends $X$, $\bot$ is an identity, and nothing has collapsed. – hmakholm left over Monica Aug 05 '16 at 07:51
  • You're right, I didn't realize that two different elements with identical left action, no longer have identical left action, once the new identity element is introduced. – xyz Aug 05 '16 at 08:21
4

Assume we have a set $X$ and an associative binary operation $*$ on it. Let $\bar X=X\cup\{\perp\}$ where $\perp$ is a symbol $\notin X$. Let $Y=\bar X^{\bar X}$ be the set of maps from $\bar X$ to itself. Of course $Y$ is a monoid under function composition.

We have a map $\Phi\colon X\to Y$, given by $$\Phi(x)\colon z\mapsto\begin{cases}x&\text{if }z=\perp\\x*z&\text{otherwise}\end{cases} $$ Note that $\Phi$ is injective because of the $\perp$ case. Note that $$(\Phi(a)\circ\Phi(b))(z)=\begin{cases}\Phi(a)(b)=a*b&\text{if }z=\perp\\a*(b*z)&\text{otherwise}\end{cases} $$ Because of the associativity of $*$, we see that $$\Phi(a)\circ\Phi(b)=\Phi(a*b),$$ i.e., $\Phi$ is an injective monoid homomorphism from $X$ to $Y$. In other words, we can identify the elements of $X$ with certain functions in such a way that $*$ becomes function composition.

3

Note that any operation $\star :S\times S\to S$ is equivalent to a function $f: S\times S\to S$ defined by $a\star b=f(a, b)$. We could even denote $f:=\star$, so the difference between $\star(a, b) $ and $a\star b$ is purely notation based (known as prefix vs infix notation respectively).

For a given associative operation $\star$, we have that $$a\star (b\star c) =(a\star b) \star c\iff f(a, f(b, c)) =f(f(a, b), c)$$

In this way, each binary operation $\star: S\times S\to S$ being associative can be thought of being similar to function composition being associative. Also, the operation being from $S\times S\to S$ is important to the above. If there's some form of associativity that doesn't depend on this, you may get another answer.