3

I have been reading about this principle of duality in category theory. Although I understand the main idea, I am curious to know how one can formalize this. The form of duality I have been given is

Theorem (Duality). For every Well-Formed Formula $\phi$ in the language of category theory, $\mathsf{dual}(\phi)$ holds in category $\mathfrak{C}$ if and only if $\phi$ holds in the opposite category $\mathfrak{C}^{\mathsf{op}}$.

As an exmaple, I tried to obtain the definition of an $F$-coalgebra from that of an $F$-algebta. For this, let us consider the definitions of $F$-algebra and $F$-coalgebra in category theory

Definition 1 ($F$-Algebra). Suppose $F: \mathfrak{C} \to \mathfrak{C}$ is a functor over the category $\mathfrak{C}$. An $F$-algebra is a pair $(A, \alpha)$ where $A \in \mathsf{obj}(\mathfrak{C})$ and $\alpha: F(A) \to_{\mathfrak{C}} A$.

Definition 2 ($F$-Coalgebra). Suppose $F: \mathfrak{C} \to \mathfrak{C}$ is a functor over the category $\mathfrak{C}$. An $F$-coalgebra is a pair $(A, \alpha)$ where $A \in \mathsf{obj}(\mathfrak{C})$ and $\alpha: A \to_{\mathfrak{C}} F(A)$.

Here are my questions.

  1. What is this language of category theory? Is this referring to a formal language? If YES, is it a first order language? How $\mathsf{dual}$ is defined in such a context?

  2. What does it mean for a WFF to hold in a category? Does it mean that there is a model which is somehow related to this category? Can I view the theorem as something like

Theorem. For every $\phi \in \mathsf{FRM}_{\mathfrak{L}}$, $\mathfrak{C} \vDash \mathsf{dual}(\phi)$ if and only if $\mathfrak{C}^{\mathsf{op}} \vDash \phi$.

  1. How should I derive Definition 2 from Definition 1 in a rigorous way using the above theorem? So, I am looking for a mechanical way as above theorem suggest to show that
  • @MartinBrandenburg: I am new to the subject. I did the search and looked over a few books, but none of them answered my questions. Could you kindly write a detailed answer. I also saw a post by you, which is somehow related to my question but there is no answer for it too. – Hosein Rahnama Feb 12 '25 at 17:14
  • 3
    It is really not necessary to go into this level of detail. To take the dual you just reverse the direction of every arrow, that's it, the core idea is very simple. – Qiaochu Yuan Feb 12 '25 at 17:46
  • @QiaochuYuan: Yep, you are right but formalizing it seems not easy to me at least. I think that an outline of a formal treatment would be helpful too. – Hosein Rahnama Feb 12 '25 at 17:50
  • 1
    Formalising it is precisely what is not easy. (The first order language of categories is much too weak to capture all the applications of this principle.) Better to get used to dualisation in practice first. – Zhen Lin Feb 13 '25 at 04:21
  • @ZhenLin: Thanks for the guide. I have added a formalized version (see 2) to the question. Is this at least a good guess, which works for some cases? – Hosein Rahnama Feb 13 '25 at 10:26
  • 1
    It's not wrong, but it's also much too limited for real applications, which will involve multiple "variable" categories as well as "constant" categories, not to mention functors between them etc. Even for your question about algebras and coalgebras it is too weak – you need a "variable" endofunctor too. – Zhen Lin Feb 13 '25 at 11:48
  • @ZhenLin: Yeah, that's a good point. So, how should I apply the principle in this case? I read in Joy of Cats that a standard way for obtaining dual statements is to replace every occurence of $\mathfrak{C}$ with $\mathfrak{C}^{\mathsf{op}}$. Then, obtain the logical equivalent of this new statement by using the definition of $\mathfrak{C}^{\mathsf{op}}$. Could you kindly write an answer in this vein to obtain the definition of coaglebra from that of an algebra? – Hosein Rahnama Feb 13 '25 at 12:24
  • 1
    A Higher-Order Calculus for Categories may be of interest. – Naïm Camille Favier Feb 13 '25 at 12:28
  • @NaïmFavier: Thank Naïm, I will take a look at that. – Hosein Rahnama Feb 13 '25 at 12:42