maxsnew / cubical-categorical-logic

Extensions to the cubical stdlib category theory for categorical logic/type theory
MIT License
21 stars 5 forks source link

Modular Formulation of Preorders, Posets, HeytAlg, etc #32

Closed GenericMonkey closed 6 months ago

GenericMonkey commented 1 year ago

Issue raised in the first pass of creating a Hyperdoctrine. In order to modularly be able to scale the definition of a hyperdoctrine to other target categories we should refactor the construction with:

maxsnew commented 1 year ago

Additionally shouldn't a lot of this go under Cubical.Preorders instead of Cubical.Categories ?

GenericMonkey commented 1 year ago

Reopening this after our discussion about how to redesign the order theory stuff.

Recapping for convienence. Currently we have:

We've chatted a bit about reformatting this hierarchy, so I'm reopening this issue to track. A couple ideas I remember us chatting about:

I removed the isSet requirement in IsPreorder and defined isUnivalent by basically copying the record from the Cubical.Categories.Category definition, and was able to prove the analogous PathToOrderEquiv and isSet proofs. A few issues this brought up:

maxsnew commented 1 year ago

Some thoughts:

Should we make POSET a primitive category with objects Σ[ P ∈ Preorder ] isUnivalent P? Yes I think so

Since we are basically reusing proofs about Categories (and will end up doing the same thing for meets, joins, heyting implication down the line), is it worth defining Preorders as thin categories? or are the degenerate notions of these concepts still useful to have independently? I don't think we should define Preorders to be thin categories, but we should prove that they are Iso and similarly monotone functions are iso to functors etc and try to reuse the work on universal properties in categories as much as possible.

maxsnew commented 6 months ago

I've completely changed my mind about this now that I have more experience. We should just define a preorder/poset to be a category/univalent category that hasPropHoms.