An important structure possessed by the 2-category $\mathrm{Cat}$ is the duality involution $(-{)}^{\mathrm{op}}:{\mathrm{Cat}}^{\mathrm{co}}\to \mathrm{Cat}$. Here we consider what the important properties of this involution are that should be generalized to other 2-categories.
The most obvious property of $(-{)}^{\mathrm{op}}$ is that it is coherently self-inverse. To state this formally, let $J$ be the walking isomorphism $(0\stackrel{\cong}{\to}1)$, considered as a 3-category with only identity 2-cells and 3-cells. Thus, a (pseudo) functor from $J$ to any 3-category $T$ can be considered an “internal adjoint (bi)equivalence in $T$.” If $T$ is a 3-category, let ${C}^{3\mathrm{op}}$ denote the 3-cell dual of $T$; note that ${J}^{3\mathrm{op}}\cong J$ and that $(-{)}^{\mathrm{co}}$ is a functor $2\mathrm{Cat}\to 2{\mathrm{Cat}}^{3\mathrm{op}}$. Finally, let $\tau :J\to J\cong {J}^{3\mathrm{op}}$ be the evident involution that switches $0$ and $1$.
A 2-contravariant involution (hereafter merely an involution) on a 2-category $K$ is functor $W:J\to 2\mathrm{Cat}$ such that $W(0)=K$ and the square
commutes (on the nose).
We write $(-{)}^{o}:K\to {K}^{\mathrm{co}}$ (or equivalently ${K}^{\mathrm{co}}\to K$) for the functor $W(0\to 1)$; the rest of the data of $W$ simply says that $((-{)}^{o}{)}^{o}\cong \mathrm{Id}$ in a coherent way.
Any (2,1)-category $K$ admits a canonical involution that is the identity on objects and morphisms and sends each 2-cell to its inverse.
Let $C$ be a 2-category equipped with an involution and let $K=[C,\mathrm{Cat}]$. Then $K$ has a canonical induced involution defined by
Conversely, if $C$ is Cauchy-complete, then ${C}^{\mathrm{op}}$ can be identified with the full subcategory of indecomposable projectives in $K$, and thus an involution on $K$ induces an involution on $C$.
Thus, in particular, any (2,1)-truncated 2-presheaf 2-topos admits a canonical involution. However, in general a 2-category that admits an involution will admit many involutions.
For any 2-category $K$, the 2-category $\mathrm{Inv}(K)$ of involutions on $K$, if nonempty, is a torsor for the 3-group $\mathrm{Aut}(K)$ of (covariant) automorphisms of $K$.
Easy.
In particular, any automorphism of a (2,1)-category $C$ induces an involution on $[C,\mathrm{Cat}]$.
As observed by WeberYS2T, experience suggests that the most important additional property of the involution $(-{)}^{\mathrm{op}}$ on $\mathrm{Cat}$ is that fibrations over $A$ can be identified with opfibrations over ${A}^{\mathrm{op}}$, since both are equivalent to functors ${A}^{\mathrm{op}}\to \mathrm{Cat}$. So it is reasonable to consider, together with an involution $(-{)}^{o}$ on a 2-category $K$, a family of equivalences $\mathrm{Fib}(X)\simeq \mathrm{Opf}({X}^{o})$.
The next question is what additional properties should be required of such a family. The following definition is provisional, but I believe whatever eventual definition we settle on should allow the construction of all the data given below.
A duality involution on a 2-category $K$ is an involution $(-{)}^{o}$ together with the following data.
Equivalences of 2-categories
which are natural in $X$ (that is, $V$ is a natural equivalence between functors ${K}^{\mathrm{coop}}\to 2\mathrm{Cat}$),
An equivalence between ${V}_{1}:\mathrm{Fib}(1)\simeq \mathrm{Opf}({1}^{o})$ and the composite $\mathrm{Fib}(1)\simeq K\simeq \mathrm{Opf}(1)\simeq \mathrm{Opf}({1}^{o})$ (note ${1}^{o}\simeq 1$ since $(-{)}^{o}$ is an equivalence).
For any pullback square
in which all the displayed maps are fibrations, an invertible modification between the two composites
and
An invertible modification filling the square
which commutes with the previous two equivalences.
Perhaps there should also be some coherence data and axioms relating these data to each other.
The first two data should be fairly self-explanatory, but the third datum may seem quite complicated. In fact, it requires some thought to see that the two displayed composites are even well-defined. Note first that since $P=A{\times}_{X}B$, by naturality of $V$ we have ${V}_{B}P\simeq {B}^{o}{\times}_{{X}^{o}}{V}_{X}A$, and thus ${V}_{X}^{-1}{V}_{B}P\simeq {V}_{X}^{-1}{B}^{o}{\times}_{X}A$. Also, ${P}^{o}\simeq {B}^{o}{\times}_{{X}^{o}}{A}^{o}$, so again by naturality ${V}_{A}^{-1}{P}^{o}\simeq {V}_{X}^{-1}{B}^{o}{\times}_{X}A$. Thus ${V}_{X}^{-1}{V}_{B}P\simeq {V}_{A}^{-1}{P}^{o}$, and the final two equivalences in each displayed composite are instances of the theorem on iterated fibrations. One way to think about this datum is as sort of an “inclusion-exclusion” property for reversal of arrows.
We call the final datum commutation of opposites. To explain it, observe that because $(-{)}^{o}$ is a 2-contravariant involution, we automatically have equivalences ${\mathrm{Fib}}_{K}(X)\simeq {\mathrm{Fib}}_{{K}^{\mathrm{co}}}({X}^{o})={\mathrm{Opf}}_{K}({X}^{o}{)}^{\mathrm{co}}$ (these are the vertical maps in the displayed square). In $\mathrm{Cat}$, this equivalence corresponds to composing a functor ${A}^{\mathrm{op}}\to \mathrm{Cat}$ with $(-{)}^{\mathrm{op}}:\mathrm{Cat}\to \mathrm{Cat}$ as well as reinterpreting it as an opfibration. Commutation of opposites then says that this operation commutes with $V$.
One immediate application of commutation of opposites is to deduce a version of the third datum for a pullback square of opfibrations, by passage along the equivalences $\mathrm{Fib}(X)\simeq \mathrm{Opf}({X}^{o}{)}^{\mathrm{co}}$. We will see others below.
If $K$ is a (2,1)-category, then its canonical involution extends to a canonical duality involution, since $\mathrm{Fib}(X)\simeq K/X\simeq \mathrm{Opf}(X)$.
If $C$ is a (2,1)-category, then the canonical involution on $K=[C,\mathrm{Cat}]$ extends in a natural way to a duality involution. This does not seem to be the case if $C$ is merely a 2-category equipped with an involution.
The 3-group $\mathrm{Aut}(K)$ also acts on the 2-category $\mathrm{DualInv}(K)$ of duality involutions on $K$; the action is free but (seemingly) no longer necessarily transitive. However, I do not know an example of two inequivalent duality involutions having the same underlying involution (as would be necessary for non-transitivity).
The differences between Definition 2 and the definition of WeberYS2T are threefold.
Of course, since any equivalence of 2-categories preserves discrete objects, our definition implies an equivalence $\mathrm{DFib}(X)\simeq \mathrm{DOpf}({X}^{o})$. More surprisingly, it turns out that the seemingly stronger two-sided version is a consequence of our definition.
If $K$ is equipped with a duality involution, then we have natural equivalences $\mathrm{Fib}(A\times B,C)\simeq \mathrm{Fib}(A,{B}^{o}\times C)$.
We first construct an equivalence $\mathrm{Opf}(A\times B)\simeq \mathrm{Fib}(A,{B}^{o})$. Note that since $\mathrm{Fib}(1)\simeq \mathrm{Opf}({1}^{o})$ is the identity, naturality implies that ${V}_{A}(A\times B)\simeq {A}^{o}\times B$. Also, since $(-{)}^{o}$ is an equivalence, and products in $K$ are the same as products in ${K}^{\mathrm{co}}$, we have $(A\times B{)}^{o}\simeq {A}^{o}\times {B}^{o}$. Now we have the composite equivalence (using the theorem on iterated fibrations):
Note that there is also another equivalence
but the second and third data in the definition of a duality involution supply a canonical equivalence between these composites, so it doesn’t matter which we use. Finally, for the general case, we simply apply this twice:
This gives our desired equivalence.
Note, though, that this proof crucially requires that the duality involution come with an equivalence $\mathrm{Fib}(X)\simeq \mathrm{Opf}({X}^{o})$, and not merely $\mathrm{DFib}(X)\simeq \mathrm{DOpf}({X}^{o})$.
Commutation of opposites, which we have not yet used, is necessary for the following important, and perhaps also surprising, result: duality involutions are preserved by (fibrational) slicing.
Any duality involution on $K$ induces a duality involution on each fibrational slice ${\mathrm{Fib}}_{K}(X)$ and ${\mathrm{Opf}}_{K}(X)$.
We define $(-{)}^{{o}_{X}}:\mathrm{Fib}(X{)}^{\mathrm{co}}\to \mathrm{Fib}(X)$ to be the composite
To show that $(-{)}^{{o}_{X}}$ is an involution, we verify
Here we use commutation of opposites in $K$ to commute $(-{)}^{o}$ past ${V}_{X}$. We now define
to be the composite
It is easy to see that ${V}_{{1}_{X}}^{X}\simeq {V}_{X}^{-1}\circ {V}_{X}\simeq 1$, and to construct the pullback-commutation equivalence. Finally, we construct commutation of opposites in $\mathrm{Fib}(X)$ as the composite
The case of $\mathrm{Opf}(X)$ is dual.
We saw above that in general, a 2-category admitting an involution or duality involution will admit many. One way to get rid of some of these spurious involutions is to require that $(-{)}^{o}$ fix groupoidal objects, as is clearly the case for the involution of $\mathrm{Cat}$ and the “canonical” involutions of (2,1)-truncated 2-presheaf 2-toposes.
Note that any involution takes groupoidal objects to groupoidal objects.
An involution $(-{)}^{o}$ on $K$ fixes groupoids it it restricts to the canonical involution on $\mathrm{gpd}(K)$, i.e. if ${X}^{o}\simeq X$ coherently whenever $X$ is groupoidal.
If $K$ is a regular $n$-category having enough groupoids, then it admits, up to equivalence, at most one involution that fixes groupoids. If $K$ is also $n$-exact, then it admits exactly one such involution.
Suppose that $(-{)}^{o}$ is an involution on $K$ that fixes groupoids. Then for any $A$ and any groupoidal $X$, we have
Now given $B$ as well, with an eso $p:X\to B$ where $X$ is groupoidal, any morphism $B\to {A}^{o}$ is determined by a map $X\to {A}^{o}$ with an action by $\mathrm{ker}(p)$. But $\mathrm{ker}(p)=(p/p)$ is also groupoidal, so morphisms $B\to {A}^{o}$ are completely determined by morphisms to $A$ out of groupoidal objects. Thus, by the Yoneda lemma, any two values of ${A}^{o}$ must be canonically isomorphic.
Now suppose $K$ is exact, and let $p:X\to A$ be an eso where $X$ is groupoidal. Then its kernel $(p/p)$ is also groupoidal, and so $\mathrm{ker}(p)$ is a homwise-discrete category in $\mathrm{gpd}(K)$. Thus we can consider its opposite, which is also a homwise-discrete category in $\mathrm{gpd}(K)$. In general, the opposite of a 2-congruence in a 2-category will not be a 2-congruence, since the condition of being a two-sided fibration is not preserved. But in a (2,1)-category such as $\mathrm{gpd}(K)$, this extra condition is automatic, so this opposite of is also a 2-congruence in $\mathrm{gpd}(K)$ (and, in fact, an $n$-congruence when $K$ is an $n$-category). Thus, since $K$ is $n$-exact, this opposite has a quotient, which we call ${A}^{o}$. It is straightforward to verify that this defines an involution on $K$ that fixes groupoids.
Of course, the only interesting values of $n$ in the above lemma are 2 and (1,2), since any groupoid-fixing involution on a (2,1)-category is equivalent to the canonical one. Of particular note is that any (2,1)-truncated Grothendieck 2-topos admits a unique groupoid-fixing involution.
In fact, this groupoid-fixing involution should also extend to a duality involution. For when $K$ is $n$-exact, the functor $\mathrm{Opf}:{K}^{\mathrm{op}}\to 2\mathrm{Cat}$ ought to be a 3-sheaf? (a 2-stack). This means that if $p:X\to A$ is an eso with $X$ groupoidal, then $\mathrm{Opf}(A)$ can be reconstructed from $\mathrm{Opf}(X)$ and $\mathrm{Opf}(p/p)$ with descent data. Similarly, $\mathrm{Fib}:{K}^{\mathrm{coop}}\to 2\mathrm{Cat}$ should also be a 3-sheaf, and so $\mathrm{Fib}(A)$ can be recovered from $\mathrm{Fib}(X)$ and $\mathrm{Fib}(p/p)$ with “op-descent data.” But since $X$ is groupoidal, $\mathrm{Opf}(X)\simeq \mathrm{Fib}(X)$, and likewise for $(p/p)$. Therefore, descent data for $\mathrm{ker}(p)$ over $\mathrm{Opf}(X)$, which determines an object of $\mathrm{Opf}(A)$, is the same as op-descent data for the opposite of $\mathrm{ker}(p)$ over $\mathrm{Fib}(X)$, which determines an object of $\mathrm{Fib}({A}^{o})$. This gives the equivalence $\mathrm{Opf}(A)\simeq \mathrm{Fib}({A}^{o})$.
Alternately, there is also a stronger theorem that if $K$ is 2-exact with enough groupoids, then it is equivalent to a particular 2-category of internal categories and anafunctors in the (2,1)-category $\mathrm{gpd}(K)$ (more precisely, it is the 2-exact completion of $\mathrm{gpd}(K)$). And it is fairly easy to see, by its construction, that this 2-category has a duality involution, just as the 2-category of internal categories in any 1-category does.
Modulo the action of automorphisms, these are the only examples of duality involutions that I know. I do not know an example of a duality involution on a 2-category that does not have enough groupoids.
Now, since a duality involution on $K$ extends to a duality involution on ${\mathrm{Fib}}_{K}(X)$ and ${\mathrm{Opf}}_{K}(X)$, it is natural to strengthen the notion of groupoid-fixing so that it carries over to fibrational slices. We write $\mathrm{GFib}(X)=\mathrm{gpd}(\mathrm{Fib}(X))$ and similarly $\mathrm{GOpf}(X)$.
A duality involution $(-{)}^{o}$ on $K$ fixes groupoids locally if we have a equivalence modification between ${V}_{X}:\mathrm{GFib}(X)\to \mathrm{GOpf}({X}^{o})$ and the composite $\mathrm{GFib}(X)\stackrel{(-{)}^{o}}{\to}\mathrm{GOpf}({X}^{o}{)}^{\mathrm{co}}\simeq \mathrm{GOpf}({X}^{o})$.
The latter equivalence $\mathrm{GOpf}({X}^{o}{)}^{\mathrm{co}}\simeq \mathrm{GOpf}({X}^{o})$ is the canonical involution on the (2,1)-category $\mathrm{GOpf}({X}^{o})$. Taking $X=1$, together with the second condition in the definition of a duality involution, this implies that $(-{)}^{o}$ fixes groupoids in the previous sense. Moreover, we have:
If $(-{)}^{o}$ is a duality involution that fixes groupoids locally, then the induced duality involutions on $\mathrm{Fib}(X)$ and $\mathrm{Opf}(X)$ also fix groupoids locally.
For a fibration $A\to X$, on ${\mathrm{Fib}}_{\mathrm{Fib}(X)}(A)$ we have $(-{)}^{{o}_{X}}={V}_{X}^{-1}\circ (-{)}^{o}$ and ${V}_{A}^{X}={V}_{X}^{-1}\circ {V}_{A}$, so the equivalence between $(-{)}^{o}$ and ${V}_{A}$ in $K$ induces one between $(-{)}^{{o}_{X}}$ and ${V}_{A}^{X}$ in $\mathrm{Fib}(X)$.
Now, suppose that $(-{)}^{o}$ is a duality involution that fixes groupoids locally. Then for any $A$ and $B$, the pullback-commutation datum shows that the composite equivalence
derived from Theorem 1 is equivalent to ${V}_{A\times {B}^{o}}$. But if we restrict to groupoidal fibrations, then
is equivalent to $(-{)}^{o}$. Together with commutation of opposites, this implies that the canonical equivalence
is, up to equivalence, simply given by $(-{)}^{o}$. In particular, since $(-{)}^{o}$ preserves powers, the canonical equivalence
takes ${A}^{2}$ to $({A}^{o}{)}^{2}$. In the 2-internal logic, this corresponds to the statement that ”${\mathrm{hom}}_{A}(x,y)\cong {\mathrm{hom}}_{{A}^{o}}(y,x)$,” which is certainly an expected part of the behavior of opposite categories. Of course, for this it suffices that $(-{)}^{o}$ fix discretes locally, which has the evident definition.
Another natural requirement is that when $X$ is groupoidal, ${V}_{X}$ should be equivalent to the composite
Note that this includes the second datum in the definition of a duality involution as a special case, since $1$ is groupoidal. There seems no reason for this condition to be stable under slicing, but it could be stabilized.