Category and Cartesian instances for polymorphic predicates#443
Category and Cartesian instances for polymorphic predicates#443AJChapman wants to merge 1 commit intoagda:masterfrom
Conversation
|
Note that I'm away at a conference right now, so won't be able to review in detail for another few days. Because PRED is essentially isomorphic to 'containers' which is also known as 'polynomial functors', we definitely want this. Though doing it atop 'containers' is likely the way to go. |
|
A better name for this would be Containers/Poly would have the maps going "backwards", EG: record _⇒_ (A B : PRED) : Set o where
constructor mk⇒
open PRED
field
{f} : U A → U B
imp : ∀ {u} → P B (f u) → P A u |
|
It might be worth doing |
|
Thanks for catching that I missed the orientation reversal. And yes, it probably is worth doing |
|
I don't yet know what it means. My category theory knowledge is quite limited. I'll read up on what a 'family fibration' is at the 1lab link @TOTBWF gave. I see that 1lab already has this implemented, so I can use their code as a guide. |
This is a new category in which the objects are predicates (wrapped in a
PREDrecord implicitly containing the underlying type and the predicate) and the morphisms map between these objects. This differs from thePredsinstance in Categories.Category.Instance.Preds in that the morphisms can change the underlying type as well as the predicate. I'm tentatively referring to this as 'polymorphic' to distinguish it from the existing instance.I'm not certain that this fits into this library, and if it does then maybe I need to break it apart into separate files for
PRED,PredsandPredsCartesian? I'd be happy to adapt it if you're interested, or just to get feedback on any of it as I'm fairly new to Agda and dependent types.