Are dagger categories truly evil?
I will have another go at arguing that dagger-categories are not evil.
Let’s look at a simpler case first. Consider the property “$1 \in X$” on sets. As a property of abstract sets, this is evil: it’s not invariant under isomorphism, e.g. any iso $\{1,2\} \cong \{2,3\}$.
But it is manifestly non-evil as a property of, say, “sets equipped with an injection to $\mathbb{N}$”. Looking at this gives a non-evil structure on abstract sets: “an injection $i : X \to \mathbb{N}$, such that $1 \in \mathrm{im}\ i$”.
Ah (you may say) so if this is non-evil, it can’t reflect our original idea correctly: it would have to transfer along that $\{1,2\} \cong \{2,3\}$. But that’s not such a clear-cut complaint. As a structure on abstract sets, it does transfer along that isomorphism. But we were thinking of them from the start not just as abstract sets, but as subsets of $\mathbb{N}$, i.e. as already equipped implicitly with injections to $\mathbb{N}$. Considered as such, one of them contains $1$ and the other doesn’t; and there’s no isomorphism between them which commutes with those injections.
Summing up: “containing 1” is certainly non-evil as a property of “sets with a mono to $\mathbb{N}$”. This induces a non-evil property/structure on abstract sets which you may or may not agree matches our original idea, because it requires considering different monos to $\mathbb{N}$ besides the ones we were already (implicitly) thinking of.
Now, back to dagger-categories. It seems reasonable that dagger-categories are evil when regarded as structure on categories. The post by Peter Selinger linked by Simon Henry argues this quite persuasively: proving a specific no-go theorem, showing there can exist no notion of dagger-structure satisfying certain desirable properties.
However, structure on categories is not the only way to look at dagger-categories. They can instead be seen as structure on “pairs of categories connected by a faithful and essentially surjective functor $i : \mathbf{C}_u \to \mathbf{C}$”. (Full definition below.)
You may be thinking: this can’t be right, because it induces a non-evil structure on categories (“equip with a fully faithful inclusion from some other category, and then the dagger-structure”) which would violate Selinger’s no-go argument. However, it doesn’t: this structure doesn’t allow a definition of unitary maps in the sense Selinger’s argument assumes. Given $A, B \in \mathbf{C}_u$, we can say a map $iA \to iB$ is unitary if it’s the image of some map $A \to B$. But given just $A, B \in \mathbf{C}$, this unitariness isn’t well-defined for $f : A \to B$; different ways of expressing $A$ as $iA'$ and $B$ as $iB'$ might give different answers as to whether $f$ is unitary.
Expressed in this form, transferring the “weak dagger structure” on $\mathbf{fdHilb}$ along the equivalence to $\mathbf{fdVect}$ yields a weak dagger structure where the functor $i$ is not injective on objects. Selinger’s argument shows that something like this is unavoidable.
Summing up again: dagger-structure is certainly not evil when viewed as a structure on “categories with a distinguished faithful, ess. surj. inclusion”. This gives a definition of weak dagger structure as a non-evil structure on categories, which you may or may not accept, because it requires us to loosen up our original expectation that the “subcategory” of unitary maps should be literally bijective on objects, i.e. to go beyond the kind of “subcategories” we were originally thinking of.
Full definition: a weak dagger category may be taken to consist of:
- a category $\newcommand{\C}{\mathbf{C}}\C$;
- a groupoid $\C_u$, with a faithful and essentially surjective functor $i : \C_u \to \C$;
- a functor $\dagger : \newcommand{\op}{\mathrm{op}}\C^\op \to \C$;
- a natural isomorphism $\varphi : \dagger \cdot i^\op \cong i \cdot (-)^{-1} : \C_u^\op \to \C$;
- a natural isomorphism $\psi : \dagger \cdot \dagger^\op \cong 1_\C$;
- such that for all $A \in \C_u$, $\psi_{iA} = \varphi_A (\varphi_{A}^\dagger)^{-1} : (iA)^{\dagger \dagger} \to iA$, or equivalently, as natural transformations, $\psi \cdot i = (\varphi \cdot (-)^{-1})(\dagger \cdot \varphi^\op)^{-1} : \dagger \cdot \dagger^\op \cdot i \to i$;
- and such that for any $A, B \in \C_u$, the image of $\C_u(A,B) \to \C(iA,iB)$ consists of all $u$ such that $\varphi_A \cdot u^\dagger \cdot \varphi_B^{-1}$ is a 2-sided inverse for $u$.
Given this, I claim:
- each component is “non-evil” as structure on the earlier components (this can be made precise as a lifting property for forgetful functors between 2-categories);
- strict dagger categories are precisely weak dagger categories such that $i$ is bijective on objects and $\varphi_A = 1_{iA}$ for all $A \in \C_u$;
- given any weak dagger cat with $i$ bijective on objects, one can modify $\dagger$, $\varphi$, and $\psi$ to obtain a strict dagger-structure, equivalent to the original, with the equivalence acting trivially on $\C$, $\C_u$, and $i$;
- therefore, given a category $\C$ equipped with a distinguished all-objects subgroupoid $\C_u$, “strict dagger structures on $\C$ with unitaries $\C_u$” correspond to “weak dagger structures on $\C_u \to \C$”; so strict dagger structure is non-evil as a structure on “cats with a distinguished all-objects subgroupoid”;
- if we drop the last component of the definition, we similarly get a non-evil structure of “strict dagger structures on $\C$ with unitaries including at least $\C_u$”;
- given any weak dagger cat $\C$, there is an equivalent strict one, with the same unitary category $\C_u$, but with new ambient category given by the objects of $\C_u$ with the morphisms of $\C$. So overall, weak dagger categories do not give us anything essentially different from strict ones.
(I’m pretty sure that I’m remembering most of the ideas here from somewhere, but I can’t find where. The nearest I can find is this post by Mike Shulman on that same categories list thread. Better references very welcome.)
John Pardon's invariant version of $\dagger$-category is very good, but unfortunately it does not capture the examples. Specifically the category of Hilbert spaces doesn't have this structure.
There is a problem in making the isomorphisms such as $s \circ \dagger_* \cong t$ natural. Such a natural isomorphism gives component morphisms $$\phi_y: y^\dagger \cong y$$ for each object $y \in \mathcal{C}$ (well more correctly for each object of the arrow category $Fun(\Delta^1, \mathcal{C})_{isom}$, but we can restrict to identity arrows).
The point is that in order for this to be natural certain squares have to commute.
Suppose that we have a morphism in $Fun(\Delta^1, \mathcal{C})_{isom}$. Such a morphism is a commutative square in $\mathcal{C}$ where the sides are isomorphisms. Applying the functor $t$ to this square gives us an isomorphism in $\mathcal{C}$: $$h: y \to y'$$ Applying the functor $s \circ \dagger_*$ gives us $$ (h^\dagger)^{-1}: y^\dagger \to (y')^\dagger $$ Note that we had to take an inverse here, which is why we had to restrict to the invertible morphisms between arrows in the first place.
In particular let's look at squares (i.e morphisms of $Fun(\Delta^1, \mathcal{C})_{isom}$) which go from $id_y$ to $id_y$. Then we see that in this case $h: y \cong y$ is an automorphism (and determines the square). Naturality gives us the equation: $$(h^\dagger)^{-1} = \phi_y^{-1} \circ h \circ \phi_y$$ So this means that taking dagger-inverse of automorphisms is implemented by conjugating by a fixed isomorphism!
This is not satisfied by the category of Hilbert spaces, the main example. In that case $\dagger$ is actually the identity on all objects, but there is no possible choice of $\phi_y$ that works. Such a $\phi_y$ would have to commute with all unitary endomorphisms, and hence has to be a multiple of the identity. But then the above equation would mean that every invertible morphism was already unitary, a contradiction. So the category of Hilbert spaces does not support the proposed, manifestly invariant (i.e. non-evil), notion.
In my opinion, dagger categories are not evil, but they are not categories with extra structure (in the ordinary sense) either. (I think this is what Qiaochu Yuan meant in his comment.) More specifically, I wouldn't think of $\dagger$ as a functor. Let me give a comparison.
In some parallel universe, people started to study "ategories", before they studied categories. Ategories are like categories, but without composition. That is, a small ategory $\mathcal{A}$ consists of a set of objects $\operatorname{ob} \mathcal{A}$ and a set of morphisms $\operatorname{mor} \mathcal{A}$ with source and target maps $s, t\colon \operatorname{mor} \mathcal{A} \to \operatorname{ob} \mathcal{A}$.
Now, suddenly people start to consider the composition of morphisms, $-\circ-\colon \operatorname{mor} \mathcal{A} \times_{s,t} \operatorname{mor} \mathcal{A} \to \operatorname{mor} \mathcal{A}$. And they demand that $g \circ f$ has the same source object like $f$, on the nose! How dare they, that's an evil concept! Maybe some other people try to find a weakened version of composition, but they fail, or their results are not as satisfying as they expected.
The point is, that doesn't have to think of a category as an ategory with an extra piece of global structure. One should think of the morphisms as a set $\mathcal{A}(X,Y)$ for any two objects $X, Y \in \operatorname{ob} \mathcal{A}$, and of the composition as a map $-\circ_{X,Y,Z}-\colon \mathcal{A}(Y,Z) \times \mathcal{A}(X,Y) \to \mathcal{A}(X,Z)$ for every triple of objects $X,Y,Z \in \operatorname{ob} \mathcal{A}$.
This comparison might be quite artificial, I admit. But let's try and translate the lesson to dagger structures.
Definition: A small dagger category $\mathcal{C}$ consists of:
- A set $\operatorname{ob} \mathcal{C}$
- $\forall X,Y \in \operatorname{ob} \mathcal{C}$, a set $\mathcal{C}(X,Y)$
- $\forall X,Y,Z \in \operatorname{ob} \mathcal{C}$, a map $-\circ_{X,Y,Z}-\colon \mathcal{A}(Y,Z) \times \mathcal{A}(X,Y) \to \mathcal{A}(X,Z)$
- $\forall X \in \operatorname{ob} \mathcal{C}$, an element $1_X \in \mathcal{A}(X,X)$
- $\forall X,Y \in \operatorname{ob} \mathcal{C}$, a map $\dagger_{X,Y}\colon \mathcal{C}(X,Y) \to \mathcal{C}(Y,X)$
- satisfying certain axioms which you all know.
Dagger categories generalise involutive monoids in the same way groupoids generalise groups.
Bottom line: In my opinion, dagger structures are the same kind of structure as "composition structures". The natural definition is pointwise and the equality on objects arises as a typing constraint. It just so happens that one can see them as functors as well, and that definition is then evil. But the natural definition is perfectly fine, and the terminology "evil" does not apply.