Both David Ben-Zvi and Jeffrey Giansiracusa have given excellent answers, so I will only fill in some bits that with Douglas Rizzolo we worked through based on their suggestions.
Moreover, for the purposes of this answer, I will avoid almost all analysis questions. So although I think I know how to say some of what I want to say more generally, I will take as my "geometric" category the category $\text{FinSet}$ of finite sets.
The final disclaimer is that I will not mention the "inverse" map: rather than groupoids, I will describe the construction for category objects; rather than Hopf algebras, I will have bialgebras; there will not be a C-star structure. Nevertheless, I will use the shorthand of "groupoid"/"Hopf"/... in place of "category object"/"bialgebra"/...
Groupoid algebras
So, abusing language, a groupoid is a finite set $C_0$, a finite set $C_1$, maps $i: C_0 \to C_1$ and $s,t: C_1 \to C_0$ such that $s\circ i = t\circ i = \operatorname{id}$, and a composition map $m: C_1 \underset{C_0}\times C_1 \to C_1$ satisfying a number of equations. The short-hand way to say all this is to say "algebra in the category of spans from $C_0$ to $C_0$". I will denote a generic groupoid by $C = \{C_1 \rightrightarrows C_0\}$. I have worked through precisely three examples:
- Any set $M$ is a groupoid $M = \{M \rightrightarrows M\}$, where all maps are identities.
- Any group $G$ is a groupoid $\text{pt}/G = \{G \rightrightarrows \text{pt}\}$, where the maps are the only thing they can be.
- The "equivalence relation" groupoid $n/n = \{n^2 \rightrightarrows n\}$ has $n$ objects and for each pair of objects a unique morphism. It is equivalent to $\text{pt}$.
Fix a field $\mathbb K$, and let $\text{FinVect}$ denote the category of finite-dimensional $\mathbb K$-vector spaces. Recall the "linearization" functor $\mathbb K: \text{FinSet} \to \text{FinVect}$, which takes a set $S$ to the vector space $\mathbb KS$, which has $S$ as a (distinguished) basis. This functor preserves colimits (being adjoint to $\text{forget}$) and takes products to tensor products.
For any groupoid $C = \{C_1 \rightrightarrows C_0\}$, we define the algebra of functions on $C$ to be the vector space $\mathbb K C_1$, with the multiplication determined by the multiplication in $C$. More precisely, if $a,b \in C_1$ are basis elements, we set their multiplication in $\mathbb K C_1$ to be: $$ab = \begin{cases} ab \in C_1, & s(a) = t(b), \\ 0 ,& \text{otherwise.} \end{cases}$$
In the three examples above:
- The "algebra of functions on $M$" is the algebra of functions $M \to \mathbb K$ with pointwise multiplication.
- The "algebra of functions on $\text{pt}/G$" is the "group algebra" $\mathbb K G$.
- The "algebra of functions on $n/n$" is the matrix algebra $\operatorname{Mat}(n,\mathbb K)$. It is Morita equivalent to $\mathbb K$.
A "vector bundle" or "sheaf" on a groupoid $C$ is precisely a representation of $\mathbb KC_1$. My earlier objection was that as algebras, if $G$ is abelian with Pontryagin dual $\hat G$, then as algebras the algebras of functions on $\text{pt}/G$ and on $\hat G$ are the same, when these are different as sheaves.
Hopfish structure
David Ben-Zvi hinted that what distinguishes the algebras of functions over $\text{pt}/G$ and $\hat G$ is the tensor structure on their categories of sheaves. The following notion is due to Xiang Tang, Alan Weinstein, and Chenchang Zhu, Hopfish algebras, 2008, arXiv:math/0510421v2. (Actually, they decategorify, considering only isomorphism classes of bimodules; I will describe the correct version, which is presumably the version they secretly wanted but were afraid to write about. Also, I will continue to ignore antipodes.) A hopfish algebra is:
- A $\mathbb K$-algebra $A$,
- a bimodule ${_A \Delta _{A\otimes A}}$,
- and an "associativity" isomorphism ${_A \Delta_{A\otimes A}} \underset{A\otimes A}\otimes ({_A A _A} \otimes {_A \Delta_{A\otimes A}}) \overset{\phi}\to {_A \Delta_{A\otimes A}} \underset{A\otimes A}\otimes ( {_A \Delta_{A\otimes A}}\otimes{_A A _A} )$,
- such that $\phi$ satisfies a pentagon.
Coining some words, a hopfish algebra is commutatish if there is an isomorphism ${_A \Delta _{A\otimes A}} \to {_A \Delta^{\rm flip} _{A\otimes A}}$, where ${_A \Delta^{\rm flip} _{A\otimes A}}$ is the module $\Delta$ with the action by the two $A$s on the right flipped, which is an involution and satisfies (with $\phi$) two hexagons.
The idea is the following. If $A$ is an algebra so that the category $_A\operatorname{mod}$ of left $A$-modules has a $\mathbb K$-linear cocontinuous monoidal structure, then this structure makes $A$ hopfish. Given a hopfish structure, the corresponding monoidal structure is: $$_A\bigl((_A X) \underset{\Delta}\otimes (_AY) \bigr) \overset{\rm def}= {_A \Delta _{A\otimes A}} \underset{A\otimes A}\otimes ({_AX}\underset{\mathbb K}\otimes {_AY})$$
The three examples above are naturally hopfish.
- Any commutative ring $R$ is hopfish, with the bimodule given as the "comodulation" of the multiplication map $R \otimes R \to R$ (an algebra homomorphism iff $R$ is commutative), i.e. the bimodule is $_R R _{R\otimes R}$, where the right action is obvious and the left action is "multiply and act". When $R$ is the algebra of functions on a set $M$, then the corresponding monoidal structure on sheaves is the "pointwise" or "fiber-by-fiber" tensor product.
- A group algebra $\mathbb K G$ is hopfish with the bimodule given by the "modulation" of the "duplication" algebra homomorphism $\mathbb K G \to \mathbb K G \otimes \mathbb K G$ given on a basis by $g \mapsto g\otimes g$. I.e. the bimodule is $_{\mathbb K G} {\mathbb K G \otimes \mathbb K G} _{\mathbb K G \otimes \mathbb K G}$, where the left action is obvious and the right action is given by the duplication homomorphism. The corresponding monoidal structure on sheaves is the usual tensor structure on $G$-representations.
- Hopfish structures are designed to be well-behaved under Morita equivalence. The Morita equivalence between $\operatorname{Mat}(n,\mathbb K)$ and $\mathbb K$ is given by $\mathbb K^{\oplus n}$ with the obvious actions. Pushing the hopfish structure on $\mathbb K$ through this Morita equivalence gives the bimodule: $$_{\operatorname{Mat}(n)} {\operatorname{Mat}(n\times n^2)} _{\operatorname{Mat}(n^2) = \operatorname{Mat}(n) \otimes \operatorname{Mat}(n)}$$
In fact, all three examples follow from a general construction that I will now describe.
Let $C = \{C_1 \rightrightarrows C_0\}$ be a groupoid and $A = \mathbb K C_1$ the corresponding algebra of functions. As a vector space, $\Delta = \mathbb K ( C_1 { \underset{^t{C_0}^t}\times} C_1)$ is spanned by pairs $(g,h)$ of morphisms with the same target. Identifying the basis of $A\otimes A$ as all pairs of morphisms $(x,y)$, the bimodule structure is:
$$ a \cdot (g,h) \cdot (x,y) = (agx,ahy) $$
with the convention that if any multiplication is non-composable, the whole pair is $0$. This determines an action. The associativity isomorphism comes from identifying both sides with the space spanned by triples of arrows with the same target. This hopfish algebra is always commutatish, by switching $(g,h) \mapsto (h,g)$.
In cartoons, $\mathbb K C_0 = \{\bullet\}$, $\mathbb K C_1 = \{\leftarrow\}$, and $\Delta = \{ \rightarrow \bullet \leftarrow\}$.
Extending to a 2-functor
Let $C = \{ C_1 \rightrightarrows C_0\}$ be a groupoid. A left $C$-set is a functor $C \to \text{FinSet}$, or more precisely an arrow $C_0 \leftarrow S$ and an action $C_1 \underset{C_0}\times S \to S$ satisfying an obvious square. If $C,D$ are two groupoids, a bibundle is a diagram $C_0 \leftarrow S \rightarrow D_0$ with commuting actions $C_1 \underset{C_0}\times S \underset{D_0}\times D \to S$.
It should be pretty much clear that if $S$ is a left $C$-set, then $\mathbb K S$ is a left $\mathbb K C_1$-module, and similar on the right, so that linearization takes bibundles to bimodules. Moreover, it should be clear that $\mathbb K : \underset{C_0}\times \to \underset{\mathbb K C_1}\otimes$, and that morphisms of bibundles go to morphisms of bimodules. Thus, linearization is a 2-functor from $\text{Gpoid}$ to $\text{Alg}$. In fact, it lands within the sub-2-category of commutatish hopfish algebras.
In particular, the hopfish algebra corresponding to a groupoid, considered up to Morita equivalence, gives an invariant of the stack represented by said groupoid.
Further questions
There are largely two issues that I would like to understand in the construction.
- If our groupoids consist of topological spaces, then taking "linear combinations of points" may not be the right thing, as it ignores the topology. But it is no longer correct to identify, as vector spaces, $\mathbb K S$ with the algebra of, say, continuous functions on $S$. In particular, if $G$ is a compact Lie group, then the algebra of functions on $\text{pt}/G$ should be some "convolution algebra" for $G$, and in particular the elements of the convolution algebra are not functions, but rather distributions. I don't know how to say such words when I move far away from manifolds, but presumably the C-star algebraists do.
- Nowhere did I use the antipode. In Op. Cit., defining what I have called a "Hopfish algebra" (what they call "sesquialgebra") takes a page, whereas the antipode takes most of the paper. The antipode must also come into play to define the $*$-involution in the C-star approach.
Finally, the question arises:
- Is the functor from groupoids to commutative Hopfish algebras the right 2-notion of "full and faithful"? I.e. it is a complete invariant of stacks? I.e. is a stack recoverable from its commutatish Hopfish algebra up to Morita? Is a morphism of stacks recoverable from a morphism of algebras? Etc.
- What is the essential image of the functor described above? Is every commutative Hopfish algebra Morita-equivalent to one coming from a groupoid? Does every bimodule thereof come from a bibundle? The second is doubtful; the first is more promising.