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

Basic properties of the flat modality #1078

Open
wants to merge 86 commits into
base: master
Choose a base branch
from

Conversation

fredrik-bakke
Copy link
Collaborator

@fredrik-bakke fredrik-bakke commented Mar 14, 2024

This is the replacement of #1005.

Proves a series of basic properties of the flat modality.

Summary

General properties

  • The universal property of flat discrete crisp types
  • The dependent universal property of flat discrete crisp types
  • Functoriality of flat
  • Flat is idempotent
  • A crisp type is crisply flat discrete if its counit has a crisp section

Left exactness of flat

  • Flat distributes over identity types
  • The crisp identity types of flat discrete crisp types are flat discrete
  • Flat distributes over dependent pair types
  • Flat distributes over product types
  • Flat distributes over pullbacks
  • Flat distributes over sequential limits
  • The unit type is flat discrete

Right exactness of flat

  • The empty type is flat discrete
  • The natural numbers are flat discrete
  • Flat distributes over coproduct types
  • Flat distributes over pushouts
  • Flat distributes over coequalizers
  • Flat distributes over sequential colimits

Notes

  • The constructor for the flat modality is renamed from cons-flat to intro-flat. This makes it easier to distinguish from counit-flat.
  • In the future, we will probably want to prove crisp-based-ind-Id from the existence of the sharp modality rather than postulating it. The same is true for the modal induction principle of the sharp modality.
  • This PR does some ground work with the sharp modality too.

@fredrik-bakke
Copy link
Collaborator Author

I am marking this PR as ready for review, as it is very close to finished. What I have in mind left to complete are a couple of sections of prose that I have specifically tagged with TODOs. While this PR is very low priority, would you at some point be willing to review this @EgbertRijke or perhaps even @VojtechStep?

@fredrik-bakke fredrik-bakke marked this pull request as ready for review March 19, 2024 21:52
Copy link
Collaborator

@EgbertRijke EgbertRijke left a comment

Choose a reason for hiding this comment

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

I have reviewed the changes to foundation, foundation-core, and elementary-number-theory so far, which seem to have little to do with basic properties of the flat modality. I will review the other changes later.

src/foundation-core/equivalences.lagda.md Outdated Show resolved Hide resolved
src/foundation-core/injective-maps.lagda.md Outdated Show resolved Hide resolved
src/foundation-core/retractions.lagda.md Outdated Show resolved Hide resolved
src/foundation/equivalences.lagda.md Outdated Show resolved Hide resolved
@EgbertRijke
Copy link
Collaborator

Would it be reasonable a separate PR for the changes not in modal-type-theory? Those changes seem quite useful to me and they can be merged today independently of the rest of the PR.

One way to do this is:

  • create a new branch from master in your clone

  • go into this new branch

  • use the following command to pull all the changes from a specific folder into your branch:

    git checkout flat-modality -- path/to/your/folder
    

    where path/to/your/folder ranges over the paths to elementary-number-theory, foundation, foundation-core, and `orthogonal-factorization-systems.

Note that this is only a suggestion. If you prefer to not create a separate pull request for these changes, that's ok with me too.

@fredrik-bakke
Copy link
Collaborator Author

Would it be reasonable a separate PR for the changes not in modal-type-theory? Those changes seem quite useful to me and they can be merged today independently of the rest of the PR.

One way to do this is:

  • create a new branch from master in your clone

  • go into this new branch

  • use the following command to pull all the changes from a specific folder into your branch:

    git checkout flat-modality -- path/to/your/folder
    

    where path/to/your/folder ranges over the paths to elementary-number-theory, foundation, foundation-core, and `orthogonal-factorization-systems.

Note that this is only a suggestion. If you prefer to not create a separate pull request for these changes, that's ok with me too.

Yes! I was thinking the same actually. 😅

@EgbertRijke
Copy link
Collaborator

Btw if there is a better way to do this, I would love to know. This was just the one way I know how to create a branch with changes from specific folders, but obviously my git skills are nowhere near as good as the git skills of you and Vojtech.

@fredrik-bakke
Copy link
Collaborator Author

Btw if there is a better way to do this, I would love to know. This was just the one way I know how to create a branch with changes from specific folders, but obviously my git skills are nowhere near as good as the git skills of you and Vojtech.

That's not true. I didn't for instance know how to do this before you instructed me just now.

@fredrik-bakke
Copy link
Collaborator Author

I am marking this PR as ready for review, as it is very close to finished. What I have in mind left to complete are a couple of sections of prose that I have specifically tagged with TODOs. While this PR is very low priority, would you at some point be willing to review this @EgbertRijke or perhaps even @VojtechStep?

I've added the missing explanations mentioned in this comment now.

EgbertRijke pushed a commit that referenced this pull request Mar 20, 2024
Extracts changes made in #1078 to parts of the library outside of
`modal-type-theory`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants