I have sitting in front of me two 2-categories. On the left, I have the 2-category GPOID, whose:


* objects are groupoids;
* 1-morphisms are (left-principal?) bibundles;
* 2-morphisms are bibundle homomorphisms.


On the right, I have the 2-category ALG, whose:


* objects are algebras (over $\mathbb C$, say);
* 1-morphisms are (adjectives?) bimodules;
* 2-morphisms are bimodule homomorphisms.


And probably I should go through and add "in TOP" to every word on the left and "C-star" to every word on the right.


(I have the impression that ALG is two-equivalent to another category, which I will put on the far right, whose:


* objects are cocomplete VECT-enriched categories (with extra adjectives?);
* 1-morphisms are cocontinuous VECT-enriched functors;
* 2-morphisms are VECT-enriched natural transformations.


In one direction, the functor takes an algebra to its full category of modules. In the other direction, there might be extra adjectives needed, and I mean to appeal to the Mitchell embedding theorem; but I'm pretty sure an equivalence exists if I insist that every object on the far right comes with a cocontinuous faithful VECT-enriched functor to VECT, and my idea is that Mitchell says that every category admits such a functor.


So anyway, the point is that either category on the right or far right is a sort of "algebraic" category, as opposed to the more "geometric" category on the left.)


Then I've been told on numerous occasions that there is a close relationship between GPOID and ALG. See, for example, the discussion at [Geometric interpretation of group rings?](https://mathoverflow.net/questions/27375/) — in fact, it's reasonable to think of the present question as a follow-up on that one.


The relationship is something like the following. To each (locally compact Hausdorff) topological, say, groupoid, we can associate a C-star, say, algebra — the construction restricts in various special cases to: a (locally compact Hausdorff) topological space $X$ going to its algebra of continuous vanishing-at-infinity functions $C\_0(X)$; a finite group $G$ going to its group ring $\mathbb C G$; etc. The construction extends to 1- and 2-morphisms to build a (contra)functor. At least if I get all the adjectives right, the functor should be a two-equivalence.



> 
> **Question:** What's the precisification of what I have said above? What exactly is the two-functor from groupoids to algebras, and which adjectives make it into an equivalence of two-categories? Groupoids have natural "disjoint union" and "product" constructions; these presumably correspond to Cartesian product and tensor product (?!? that's not the coproduct in the category of algebras, but maybe in this two-category it is?) on the algebraic side?
> 
> 
> 


Let me end with an example to illustrate my confusion, which I brought up in [Op. cit.](https://mathoverflow.net/questions/27375/). Let $G$ be a finite abelian group; then it has a Pontryagin dual $\hat G$. Now, there is a canonical way to think of $G$ as a groupoid: it is the groupoid $\{\text{pt}\}//G$ with only one object and with $G$ many morphisms. If I'm not mistaken, the corresponding algebra should be the group algebra $\mathbb C G$. But $\mathbb C G$ is also the algebra $C\_0[\hat G]$ of functions on the *space* $\hat G$. And if there is one thing I am certain of, it is that the underlying space of $\hat G$ (a groupoid with no non-identity morphisms) and the one-object groupoid $\{\text{pt}\}//G$ are not equivalent as groupoids. And yet their "function algebras" are the same. So clearly I am confused.



What is the precise relationship between groupoid language and noncommutative algebra language?
I think the problem is that the left hand side is part of commutative geometry, while the right hand side is part of noncommutative geometry (regardless of whatever vague claims I may have made in my previous response). Groupoids (or stacks) certainly have interesting noncommutative aspects that are captured by the construction you discuss, but it's not an equivalence. More precisely, (an algebro-geometric version of) your construction attaches to a stack the category of (quasi)coherent sheaves (which is given by replacing algebras by their categories of modules as you suggest). However, one cannot hope to recover the stack from this category, as your finite group example shows: representations of a finite group are the same as (algebraic) vector bundles on BG, or on $\widehat G$, and these are certainly nonisomorphic.


In order to get something that can be an equivalence with appropriate adjectives, we need to change the right hand side into its commutative version: replace categories by tensor (symmetric monoidal) categories - ie remember that vector bundles/coherent sheaves have a tensor product. Now we're in a good situation: Tannakian theory tells us that in a variety of settings this construction is an equivalence. For example tensor of representations corresponds to tensor of vector bundles on BG, but has nothing to do with tensor of vector bundles on $\widehat G$. This is of course anathema to noncommutative geometers - vector bundles on a noncommutative space (modules for noncommutative rings) don't have tensor products. It's in this sense that the LHS is part of commutative geometry.


A nice formal way to say this is by looking at the adjoint functor to the functor from stacks to categories, or to symmetric monoidal categories, given by considering bundles/sheaves with or without tensor product. The first adjoint takes a category to the moduli stack of objects in it; the second is the Tannakian reconstruction functor, sending a tensor category to its "spectrum" (fiber functors over various rings). The first functor is very far from recovering a stack - the moduli stack of objects in a category of modules for a ring is much much bigger than the spectrum of the ring!


