Skip to content

Displayed Category Constructions #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 17, 2024
Merged

Conversation

stschaef
Copy link
Contributor

@stschaef stschaef commented Mar 1, 2024

Meant to be the first thrust of #1106 code as we separate that large hunk of code into modular and manageable PRs

Here we add the following things to reason about displayed categories

  • displayed full subcategories
  • displayed preorders
  • displayed terminal category
  • displaying a category D over a category C
  • displayed opposite category and opposite functor
  • introduction principles to define functors into certain classes of displayed categories. Such as the displayed total category and when a displayed category has prop hom sets
  • the left adjoint to reindexing

@felixwellen
Copy link
Collaborator

@ecavallo @mortberg does anyone have any idea why the CI is not running? Might be because @stschaef is first-time contributor, but usually there appears some button to run the CI...

@mortberg
Copy link
Collaborator

mortberg commented Mar 1, 2024

@ecavallo @mortberg does anyone have any idea why the CI is not running? Might be because @stschaef is first-time contributor, but usually there appears some button to run the CI...

Indeed, very strange. I see no button either...

@ecavallo
Copy link
Collaborator

ecavallo commented Mar 1, 2024

Same here, I don't know the problem.

@stschaef
Copy link
Contributor Author

stschaef commented Mar 1, 2024

Could it be that I'm merging in a branch with a name that isn't master

(isProp→isSet (isPropHomP _ _ _ _))
(Cᴰ .isSetHomᴰ)

-- Examples of ∃F instantiated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I'd at least try to demonstrate to y'all that this construction does indeed generalize what we'd discussed in #1106

These examples can probably be removed though

@ecavallo
Copy link
Collaborator

ecavallo commented Mar 1, 2024

Now the button to run CI appeared. Not sure what changed, but I clicked it.

@stschaef
Copy link
Contributor Author

stschaef commented Mar 1, 2024

Now the button to run CI appeared. Not sure what changed, but I clicked it.

I pushed another commit to fix a naming typo. Seems like that did the trick

Copy link
Collaborator

@maxsnew maxsnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly starting some discussions about naming/library structure.

@@ -0,0 +1,173 @@
{-# OPTIONS --safe #-}
--
module Cubical.Categories.Displayed.AdjointToReindex where
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjoint isn't specific enough. It's the left adjoint. (I'm not sure if the right adjoint always exists or if it requires a Conduche condition.)

This could also be called dependent sum, though I think that's confusing because to me a dependent sum is the special case where F is a projection.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, having a right adjoint is exactly being Conduché.

g ⋆⟨ C ⟩ h ,
F-seq g h ◁ (λ i → p i ⋆⟨ D ⟩ q i) ,
(Cᴰ._⋆ᴰ_ gᴰ hᴰ)
⋆IdLᴰ ∃F {d}{d'}{g}{c , pc , xc}{c' , pc' , xc'} (f , p , x) =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,65 @@
-- | Full subcategories (not necessarily prop) viewed as displayed categories.
{-# OPTIONS --safe #-}
module Cubical.Categories.Displayed.Constructions.FullSubcategory where
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't like "Full subcategory" we could call this FullyFaithful because every displayed cat where Fst is fully faithful is equivalent to one of this form. We should also consider removing Cubical.Categories.Constructions.FullSubcategory and replacing it by this. But there is some univalent stuff in there now that would have to be ported

λ f g → cong {x = f ⋆⟨ ∫C Cᴰ ⟩ g} fst refl

-- Functor into the total category
module TotalCategory {D : Category ℓD ℓD'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a named module? The analogs of this, e.g., Data.Sum.elim are not in named modules, you just tend to have to import the module as Sum to use them without name clashes.

@@ -157,3 +172,56 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'}
∫F .F-hom (_ , fᴰ) = _ , Fᴰ.F-homᴰ fᴰ
∫F .F-id = ΣPathP (_ , Fᴰ.F-idᴰ)
∫F .F-seq _ _ = ΣPathP (_ , (Fᴰ.F-seqᴰ _ _))

-- Projections out of the total category
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a different file. I think we should move ∫C to Displayed.TotalCategory or Displayed.TotalCategory.Base and this can be in that or Displayed.TotalCategory.Properties

intro .F-seq f g = ΣPathP (F .F-seq f g , Fᴰ .F-seqᴰ _ _)

-- Projection out of the displayed total category
module _ {C : Category ℓC ℓC'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here as above, should be in a different file.


open Functor

Preorderᴰ→FstFaithful : isFaithful (Fst {Cᴰ = Preorderᴰ→Catᴰ})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just FstFaithful?

@stschaef stschaef requested review from jpoiret and maxsnew March 11, 2024 19:50
Copy link
Collaborator

@maxsnew maxsnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more naming/moving things around. Then it should be good to go IMO

Copy link
Collaborator

@maxsnew maxsnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @jpoiret @felixwellen and/or @ecavallo this is ready for review

@stschaef
Copy link
Contributor Author

stschaef commented Apr 8, 2024

Whitespace is fixed, and the left adjoint has been moved. Should be ready for review

@maxsnew
Copy link
Collaborator

maxsnew commented May 2, 2024

@felixwellen anything we can do to move this along?

@felixwellen felixwellen self-assigned this May 4, 2024
Copy link
Collaborator

@felixwellen felixwellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good to me - I just have a couple of documentation/naming comments.

@felixwellen felixwellen merged commit 2ae8464 into agda:master May 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants