EDIT: My question is not about what categorical duality is. I generally understand the idea, but my problem is that for every theorem, finding the dual theorem requires us to think about what it means, so that we can translate it into the opposite category by reversing the arrows. I am looking for a concrete set of "algebraic manipulations" that lets us take a statement to its dual, without understanding what anything means. In the example of negating a logical statement (in the final paragraph of the question), we can swap the symbols around without knowing what $P$ is, and more generally without understanding what things mean.
Duality is very important in category theory, but as far as I have seen, statements that "follow by duality" are often taken to be obvious, even though in reality there are lots of details to be checked. People seem to follow some informal procedure of replacing all instances of "left" with "right", "right" with "left", "limit" with "colimit" and so on.
This is reminiscent of the method for negating logical statements. For example, the statement $(\forall x, \exists y: P(x,y))$ has negation $(\exists x:\forall y, \neg P(x,y))$. We can obtain this negation by swapping $(\forall)$ with $(\exists)$, $(:)$ with $(,)$, and $(P)$ with $(\neg P)$. The set of rules for converting a statement of this form is well-known and easy to implement. It is also completely rigorous because we can actually prove in general that the rules apply.
Is there a similar set of rules for converting categorical statements into their duals?
Inductive definition of duality operator $\_{}˘$
Here is a fragment of the categorial language,
Then, we can define the dual $e ˘$ of an expression $e$ as follows.
By induction (over the possible fragement of terms), one can show that this operator is self-inverse: $e ˘ ˘ = e$.
Example 1: Duality switches arrow argument positions
Then, we can apply these rules as follows: For any morphism expression $f$,
Example 2: Duality flips terminals and initials
Duality is functorial
Moreover, notice that
_˘ : ⟶is an identity-on-objects functor ;-)