agda / agda-categories

A new Categories library for Agda
https://agda.github.io/agda-categories
MIT License
369 stars 67 forks source link

Remove Categories.Category.Equivalence #363

Open iwilare opened 1 year ago

iwilare commented 1 year ago

We were working on something that often requires isomorphism reasoning on categories (and, by extension, domains and codomains of functors).

Currently, there are two different versions of equivalence of Categories that can be conjured up.

This evidently creates problems, as one cannot use any kind of object isomorphism reasoning when using StrongEquivalence, and, viceversa, one cannot reason on particular properties of categories when Iso is used (e.g., op preserves isos). It would be desirable for it to only exist one "correct" way of doing things, so that existing/more general tools (such as some kind of general isomorphism reasoning on objects) can be used.

We propose the following as solution to these issues:

(Another useful step would be separating Morphism.Reasoning from Morphism.Reasoning.Iso: one refers to morphisms, the other one refers to objects. Something like Object.Reasoning.Iso?)

JacquesCarette commented 1 year ago

Doing this in small steps makes sense. Starting with Object.Reasoning.Iso seems like a good idea. Regarding the 3 steps of your proposed solution, I would think that doing them exactly backwards (i.e. first adapt the notions, then refactor away, then finally remove the definition of StrongEquivalence) will likely work best. Each small step is a valid refactor on its own.