Skip to content
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

Sites, sheaves and sheafification as a QIT #1031

Merged
merged 59 commits into from
Nov 21, 2023

Conversation

MatthiasHu
Copy link
Contributor

This PR provides a definition of a coverage on a category (turning it into a site) and formulates the sheaf condition (amalgamation property) for presheaves on such a site. Furthermore, the sheafification of a presheaf on a site is constructed by means of a quotient inductive type (QIT), and the appropriate universal property is shown.

(patch : ⟨ cov ⟩) →
restrict (patchArr cov patch) (amalgamate cover fam) ≡ fst fam patch

F : Presheaf C (ℓ-max (ℓ-max (ℓ-max (ℓ-max ℓ ℓ') ℓcov) ℓpat) ℓP)
Copy link

Choose a reason for hiding this comment

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

Should this not have a more descriptive name, like sheafification?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The exposed name is Sheafification.F. Do you think it should still be called sheafification inside the named module Sheafification?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you don't expect/want people to open the module Sheafification? If you had a coverage J in context, it could be convenient to write open Sheafification J and then for any presheaf P write sheafification P instead of Sheafification.F J P. In that case it would probably be best to make F⟅_⟆ private.

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 think I actually went for a named module precisely to give users the option to open it with arguments (either just J or both J and P). So let's go with sheafification and isSheafSheafification, right?

Copy link
Contributor Author

@MatthiasHu MatthiasHu Nov 18, 2023

Choose a reason for hiding this comment

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

Side remark: I can think of the following notations for sheafification in the literature, which seem not very helpful either.

  • $a$ (for "associated sheaf functor") [MacLane, Moerdijk: Sheaves in Geometry an Logic]
  • $i^*$ (because it is the inverse image part of the geometric morphism $i$ from sheaves to presheaves)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it would probably be best to make F⟅_⟆ private.

That also makes all the constructors of the HIT private, unfortunately. At least I can't find a way to mark only the name ⟨F⟅_⟆⟩ as private.

So I guess I should rename it to ⟨sheafification⟅_⟆⟩.

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 replaced all Fs now (that stood for a sheafification). Good like that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, looks good to me, but it is of course a purely stylistic matter. There are instances of both in the library, named modules with short names, like f for a certain function, and named modules with terms that have essentially the same name as the module (intended to opened). I don't want to advocate too heavily for one of the options, but if everyone is happy now, we can leave things as they are, I would say.

@mzeuner mzeuner mentioned this pull request Oct 23, 2023
Copy link
Contributor

@mzeuner mzeuner left a comment

Choose a reason for hiding this comment

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

Great stuff, looking forward to use it. I only had some stylistic comments.

Cubical/Categories/Site/Sheaf.agda Outdated Show resolved Hide resolved
Cubical/Categories/Site/Sieve.agda Outdated Show resolved Hide resolved
(patch : ⟨ cov ⟩) →
restrict (patchArr cov patch) (amalgamate cover fam) ≡ fst fam patch

F : Presheaf C (ℓ-max (ℓ-max (ℓ-max (ℓ-max ℓ ℓ') ℓcov) ℓpat) ℓP)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you don't expect/want people to open the module Sheafification? If you had a coverage J in context, it could be convenient to write open Sheafification J and then for any presheaf P write sheafification P instead of Sheafification.F J P. In that case it would probably be best to make F⟅_⟆ private.

@MatthiasHu
Copy link
Contributor Author

MatthiasHu commented Nov 18, 2023

@mzeuner I think I handled everything now!

@mzeuner
Copy link
Contributor

mzeuner commented Nov 20, 2023

I think the PR is ready to be merged @mortberg @felixwellen

@felixwellen
Copy link
Collaborator

Nice!
Please rebase onto/merge master...

@MatthiasHu
Copy link
Contributor Author

Note to my future self: it would probably have been smarter to split this PR into two (1. sites, 2. sheafification). :-)

@felixwellen felixwellen self-assigned this Nov 21, 2023
@felixwellen
Copy link
Collaborator

Looks good to me (just skimming - two people already looked at it).

@felixwellen felixwellen merged commit bd6f5de into agda:master Nov 21, 2023
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.

4 participants