# Affine spaces as algebras for an operad?

(at.algebraic-topology because I don't know who else thinks about operads)

Let $A$ be an affine space, i.e. a torsor over (the abelian group underlying) a vector space $V$ over a field $K$. Then for any $a_1,\dotsc,a_n \in A$ and any $\lambda_1,\dotsc,\lambda_n\in K$ with $\sum \lambda_i = 1$, we can form the weighted average $$\lambda_1 a_1 + \dotsb + \lambda_n a_n \in A.$$ I'm trying to work out exactly what structure this exhibits on $A$.

Let's let $Pr_K(n) \subset K^n$ denote the subset of probability vectors, i.e. $n$-tuples which sum to 1. I believe this forms an operad: the map $$Pr_K(n)\times Pr_K(i_1) \times \dotsb \times Pr_K(i_n) \to Pr_K(i_1 + \dotsb + i_n)$$ sends $$\langle \{\lambda_j\}_{j=1}^n; v_1,\dotsc, v_n\rangle \mapsto \lambda_1 v_1 \mathbin| \dotsb \mathbin| \lambda_n v_n$$ where by $|$ I mean "concatenate these tuples". Then I think $A$ should be an algebra over the operad $Pr_K$.

Is this correct? Is it written down somewhere? What's the standard name for this operad? Can you do anything with this perspective?

• It feels more natural to me to describe this structure as an algebraic theory, or more formally as a Lawvere theory. It feels weird to me to describe it as an operad because I have no idea what algebras over it in non-cartesian monoidal categories ought to look like. – Qiaochu Yuan Jan 25 '17 at 5:34
• @QiaochuYuan Affine Lawvere theories have been investigated in the paper by Isbell, Klun and Schanuel – მამუკა ჯიბლაძე Jan 25 '17 at 7:21
• For $K=\mathbb{R}$ the suboperad of positive $n$-tuples in $Pr_{\mathbb{R}}$ forms a natural suboperad of the little intervals operad (where the little intervals exhaust the big interval). – Gabriel C. Drummond-Cole Jan 25 '17 at 10:43
• The distinction between classical operads and cartesian operads that I describe in my answer is that in algebraic theories presented with operads you cannot insert "dummy variables". This means that you will not be able to identify affine combinations like $a x + b y$ and $a x + b y + 0 z$ since all identities in an operad need to have exactly the same set of variables on both sides. – Karol Szumiło Jan 25 '17 at 13:09

In order to present affine spaces in this fashion you need a variation of operads called clones or cartesian operads (which eventually are equivalent to Lawvere theories). You can find some references on nLab.

A clone is like a symmetric operad, but with all maps between finite sets acting not just bijections. However, it is more convenient to phrase the definition as follows. A clone is a functor $C \colon \mathsf{FinSet} \to \mathsf{Set}$ equipped with a family of substitution operators, i.e. for each pair of finite sets $S$ and $T$ we specify a function $(C S)^T \times C T \to C S$ and distinguish projection operations $\pi_s \in C S$ for each $s \in S$. These are supposed to satisfy some axioms (see below).

I will call the clone for affine spaces $\mathbb{A}$. (And I will refrain from using vocabulary from probability theory, this would go better with convex spaces.) For each $S$, $\mathbb{A} S$ is the set of formal affine combinations of elements of $S$, functoriality of $\mathbb{A}$ is given by grouping coefficients of points together when they are identified by a function between finite sets. Substitution operations evaluate affine combinations of affine combinations. If I have a combination $b \in \mathbb{A} T$ and a family $a \colon T \to \mathbb{A}S$, I will denote the resulting substitution by $a \bullet b \in \mathbb{A}S$. (It is really just a shorthand for $s \mapsto \sum_{t \in T} a_{t, s} b_t$.) Moreover, $\pi_s = e_s$ is the trivial combination with coefficient $1$ at $s$ and $0$ elsewhere.

We can now give the following definition. An affine space is a set $E$ equipped with operations $E^S \times \mathbb{A}S \to E$, $(x , a) \mapsto x \bullet a$ subject to the following axioms.

1. For every finite set $S$ and all $x \colon S \to E$ and $s \in S$, $x \bullet e_s = x_s$.
2. For every pair of finite sets $S$ and $T$ and all $x \colon S \to E$, $a \colon T \to \mathbb{A} S$ and $b \in \mathbb{A} T$, $x \bullet (a \bullet b) = (x \bullet a) \bullet b$.
3. For every function between finite sets $\phi \colon S \to S'$ and all $x \colon S' \to E$ and $a \in \mathbb{A} S$, $(x \phi) \bullet a = x \bullet (\phi a)$.

In particular, $\mathbb{A} T$ for a fixed $T$ carries a standard structure of an affine space given by the structure maps of $\mathbb{A}$. In this case, the axioms specialize to some standard facts about formal affine combinations and they are in fact the same as axioms saying that $\mathbb{A}$ is a clone in the first place. This way you can recover the full definition of a clone which I neglected to write down above.

For $K=\mathbb{R}$, the positive part of your operad (mentioned in Gabriel's comment), and its algebras have been discussed by Tom Leinster and others in connection to entropy. See, for example,