A groupoid is a category in which all morphisms are invertible.(\*) The groupoids form a very nice subclass of categories. The inclusion of the groupoids into the 2-category of small categories admits both left and right (weak) adjoints. So you can localize (or *complete*) a category to a groupoid. If E denotes the free walking isomorphism, then the groupoids are precisely the categories which are local with respect to the inclusion of the free walking arrow (let's denote this as [1]) into E. 


I have been thinking a lot recently about a certain very nice class of categories, which in many ways is the antithesis of the groupoids. These are the categories X, such that a morphism is an isomorphism in X if and only if it is an identity. Let us call these categories *lean*.(\*\*) These too form a nice class of categories. The inclusion admits a left adjoint, and the lean categories are precisely those categories which are local for the projection from [1] to the terminal category pt. 


What is this left adjoint? (We'll denote it as L). It forms a certain quotient category. You can see it explicitly by taking your given category and forming the quotient where you identify all isomorphisms with identities. 


In some cases it is easy to work out what you get. For example if you have a groupoid X and you apply L, you get a discrete category (set) consisting of the components of X. 


More generally you have to be more careful. Quotienting out by just the isomorphisms is not compatible with the composition in your category, and so the result is not a category. To get the actual categorical quotient you have to quotient by additional things: compositional consequences of the initial equivalence relation. 


For example suppose that f,g,h are morphisms in your category X, where g and fgh are isomorphisms. Then for any lean category Y and any functor $X \to Y$, both g and fgh must map to identities in Y. Hence the composite fh must also map to an identity, even if it is not an isomorphism of X. It is not hard to construct an example where this happens. Nevertheless we can ask the following 



> 
> **Question**: Suppose that X is a category such that the lean quotient L(X) is a set (discrete category). Is X necessarily a groupoid?
> 
> 
> 


If true, I think this would give a very neat characterization of the groupoids. I have so far been unable to prove this result or come up with a counter example, but I feel I have been staring at the problem too long. It is enough to prove just the case that L(X) is just a single point. The above discussion shows that in general the quotient $X \to L(X)$ identifies things which are not isomorphisms, which suggests the answer is negative. A positive answer would have to somehow make use of the fact that *everything* is being identified. 


(\*) For this question when I speak of categories I mean small categories.


(\*\*) If anyone knows of a reference for these categories, I would be interested to know it. 



Characterizing Groupoids via Quotients?
I believe the following is an example of a category whose leanification is discrete but which is not a groupoid. It should be possible to simplify it. There may be details to work out. Let $B$ be the bicyclic monoid. It is generated by $a,b$ subject to the relations $ab=1$. (Note $ba\neq 1$). Let $K(B)$ be the Karoubi envelope of $B$. The objects of $K(B)$ are the idempotents of $B$, so $b^na^n$ with $n\geq 0$. An arrow is a triple $(e,m,f)\colon e\to f$ where $fme=m$. The product is $(f,n,g)(e,m,f)=(e,nm,g)$.


I claim $L(K(B))$ is the trivial category (1 object with only the identity morphism). First of all, it is easy to see that any two objects of $K(B)$ are isomorphic. Namely, 
$(b^ma^m,a^m,1)$ is an isomorphism of $b^ma^m$ with $1$ with inverse $(1,b^m,b^ma^m)$. So in $L(K(B))$ there is only one object. It is well known that every proper quotient of $B$ is a group. So it suffices to show the endomorphism monoid at $1$ collapses. Since $(1,b,ba)$ is the identity in $L(K(B))$ we observe that $(1,ba,1)=(ba,ba,1)(1,b,ba)(1,a,1)$ which is then equivalent to $(1,ba^2,1)$ in $L(K(B))$. Thus the endomorphism monoid at $1$ collapses to a group and hence to a point since automorphisms are trivial in $L(K(B))$. The same happens then to all other endomorphism monoids (as all objects isomorphics).


