How to construct an opposite morphism? I have a general question, but I will start specifically by trying to conceptualize (or rather, represent) the category $Set^{op}$. Now it has been stated in one answer that, given a function in $Set$ $$f:\{0,1\}\longrightarrow \{0\},$$
the opposite morphism in $Set^{op}$ is just "the very same arrow" $f^{op}:\{0\}\longrightarrow \{0,1\}$. But, in fact, there are at least two functions here:
(1) $0\mapsto 0$
(2) $0\mapsto 1$
Now this would appear to suggest that there is no bijection between $Hom_{Set}(\{0,1\},\{0\})$ and $Hom_{Set^{op}}(\{0\},\{0,1\})$, since there is only one unique $f$ and two functions in the opposite direction. The lack of bijection would contradict the very notion of an opposite category. I see at least two ways out:


*

*$f^{op}$ is not a function and it is a map sending $0$ to both $0,1$, its entire codomain. Now $f^{op}$ is a multifunction, or the inverse relation of $f$ given by $f^{op}=\{(0,0),(0,1)\}$.

*$f^{op}$ is the unique Boolean homomorphism $f^{op}:\wp(\{0\})\longrightarrow \wp(\{0,1\})$ sending $\emptyset\mapsto\emptyset,\{0\}\mapsto\{0,1\}$, since the powerset $\wp(\{0\})$ is isomorphic to the initial Boolean algebra.


The second solution arises from the dual equivalence between complete atomic Boolean algebras and $Set^{op}$, as pointed out in a different answer. However, both solutions seem correct.
EDIT: It appears I originally stated a trivial question. Perhaps more appropriately, is there an algorithm for constructing the opposite morphism? That is, given a definition of $f$ in terms of elements of its domain and codomain (necessarily sets, possibly with additional structure), can we give an explicit definition of $f^{op}$ in terms of those sets, their elements, and possibly additional structure?
The reason the first solution appeals to me is that the identity of both sets is kept: we don't need to move to powersets, or Boolean algebras, etc. Similarly, I am wondering whether there is in general a way to keep the identity of objects (as suggested by the very definition of opposite category) when representing the opposite category.
 A: Given a category $\mathcal{C}$, the opposite category $\mathcal{C}^{\mathrm{op}}$ is defined by:


*

*The objects of $\mathcal{C}^{\mathrm{op}}$ are the objects of $\mathcal{C}$;

*Given objects $A$ and $B$, the set of morphisms $A \to B$ in $\mathcal{C}^{\mathrm{op}}$ is defined to be equal to the set of morphisms $B \to A$ in $\mathcal{C}$, with composition and identity defined accordingly.


In the case $\mathcal{C}=\mathbf{Set}$, this means that


*

*The objects of $\mathbf{Set}^{\mathrm{op}}$ are sets;

*Given sets $A$ and $B$, a morphism $A \to B$ in $\mathbf{Set}^{\mathrm{op}}$ is a function $B \to A$.


In your specific example, the function $\{ 0, 1 \} \to \{ 0 \}$ is a morphism $\{ 0 \} \to \{ 0, 1 \}$ in $\mathbf{Set}^{\mathrm{op}}$, and likewise any morphism $\{ 0 \} \to \{ 0, 1 \}$ is a function $\{ 0, 1 \} \to \{ 0 \}$.
Thus, the algorithm you seek is very simple: the bijection
$$\mathrm{Hom}_{\mathbf{Set}}(\{0,1\},\{0\}) \to \mathrm{Hom}_{\mathbf{Set}^{\mathrm{op}}}(\{0\},\{0,1\})$$
is simply the identity! More generally, as explained above, we have $\mathrm{Hom}_{\mathcal{C}}(A,B) = \mathrm{Hom}_{\mathcal{C}^{\mathrm{op}}}(B,A)$.
Your confusion seems to be that you want morphisms $A \to B$ in $\mathbf{Set}^{\mathrm{op}}$ to be functions-of-some-kind with codomain $A$ (or something related to $A$) and codomain $B$ (or something related to $B$). This is not the case; morphisms $A \to B$ in $\mathbf{Set}^{\mathrm{op}}$ are simply functions $B \to A$. That's what $^{\mathrm{op}}$ means.
The confusion is understandable, since the notation "$\to$" is overloaded.
A: The question I believe you are trying to ask is

How can I make $\mathbf{Set}^\mathrm{op}$ a concrete category?

That is, you want to know

Is there a faithful functor $U : \mathbf{Set}^\mathrm{op} \to \mathbf{Set}$?

Henceforth, for clarity I will write $X^\mathrm{op}$ to denote the set $X$ when considered as an object of $\mathbf{Set}^\mathrm{op}$, and similarly for morphisms.
Such a $U$ satisfying $U(X^\mathrm{op}) = X$ cannot exist, even if we remove the requirement that $U$ be faithful. The simplest proof is that if $f$ is the unique function $\varnothing \to 1$, then $U(f^\mathrm{op})$ would be a function $1 \to \varnothing$, but no such function exists.
Taking $U$ to be the contravariant power set functor is the usual way to make $\mathbf{Set}^\mathrm{op}$  a concrete category.

But really, I think you're missing the point. Usually, given a category $C$, our interest in the opposite category $C^\mathrm{op}$ comes from one of two motivations:


*

*We are in a setting that is literally just turning the arrows around. For example, a contravariant functor $C \to D$ is best described as an ordinary functor $C^\mathrm{op} \to D$

*The category $C^\mathrm{op}$ itself has some interesting structure which we study because it contributes new insights, rather than because we want to torture the structure of $C$.


Some examples of the latter:


*

*Your example of identifying $\mathrm{Set}^{\mathrm{op}}$ with the category of complete atomic boolean algebras.

*$\mathbf{CRing}^\mathrm{op} \equiv \mathbf{AffSch}$; that is, the opposite category to the category of commutative rings is precisely the category of affine schemes. The study of algebraic geometry makes great use of both perspectives, that the objects of $\mathbf{CRing}$ look like algebraic structures and the objects of $\mathbf{AffSch}$ look like geometric spaces.

*$\mathbf{Loc}^\mathrm{op} \equiv \mathbf{Frame}$; that is, the opposite category of the category of locales is the category of frames. Locale theory, or "point-free topology" gets a lot of mileage out of the fact that both categories look like categories of lattices, but in different ways.



For any small category $C$, it turns out that there is a canonical way to make $C$ a concrete category and a canonical way to make $C^\mathrm{op}$ a concrete category.
The faithful functor $U : C \to \mathbf{Set}$ is given by:


*

*For an object $X$, $U(X)$ is the set of all arrows of $C$ with codomain $X$

*For an arrow $f : X \to Y$, the function $U(f) : U(X) \to U(Y)$ is given by composition with $f$. That is, it sends $g$ to $f \circ g$.


The faithful functor $V : C^\mathrm{op} \to \mathbf{Set}$ is given by:


*

*For an object $X$, $V(X)$ is the set of all arrows of $C$ with domain $X$

*For an arrow $f : X \to Y$, the function $V(f) : V(Y) \to V(X)$ is given by composition with $f$. That is, it sends $g$ to $g \circ f$.


We can restrict the sets of arrows we use; for example, the identity functor $\mathbf{Set} \to \mathbf{Set}$ is naturally isomorphic to the functor $U$ given by:


*

*For an object $X$, $U(X)$ is the set of all functions with codomain $X$ and domain $1$

*For an arrow $f$, $U(f)$ is the function given by composition with $f$


and the powerset functor $\mathbf{Set}^\mathrm{op} \to \mathbf{Set}$ is naturally isomorphic to the functor $V$ given by


*

*For an object $X$, $V(X)$ is the set of all functions with domain $X$ and codomain $2$

*For an arrow $f$, $V(f)$ is the function given by composition with $f$


To see the connection, recall that there is a natural isomorphism between "Functions $X \to 2$" and "Subsets of $X$".
