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

[Merged by Bors] - feat(category_theory): full_of_surjective #14974

Closed
wants to merge 3 commits into from

Conversation

TwoFX
Copy link
Member

@TwoFX TwoFX commented Jun 26, 2022


Open in Gitpod

@TwoFX TwoFX added the awaiting-review The author would like community review of the PR label Jun 26, 2022
@urkud
Copy link
Member

urkud commented Jul 15, 2022

Why do you add two definitionally equal definitions? Also, I think that the new definition(s) should be mentioned in the module docstring.

More general question (definitely not for this PR): should we use a Type*-valued full, or a Prop-valued typeclass saying that map is surjective, then rely on lemmas instead of definitional equalities? Or sometimes you have different choices of preimage and one of them is better than others? In any case, this design choice should be explained in the module docstring. BTW, the link category_theory.equivalence in the module docstring is broken: it points to a definition, not a theorem.

@urkud urkud added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jul 15, 2022
@TwoFX
Copy link
Member Author

TwoFX commented Jul 15, 2022

@urkud I think that both (syntactic) statements are interesting on their own and before trying to prove the second one I didn't know that they are definitionally equal, so I added both. I can remove one of them if you want, but I think that it is plausible that someone needs one and doesn't immediately notice that it is definitionally equal to the other when looking for it.

Regarding the fact that full F is data: I think that this is mostly due to history, since the category_theory library used to have more data-carrying typeclasses like this than today (see for example #3995). There hasn't really been a need to change it so far, so I think it's fine to keep it like it is until someone feels that it should be refactored.

@TwoFX TwoFX added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jul 15, 2022
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@leanprover-community-bot-assistant leanprover-community-bot-assistant added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jul 27, 2022
bors bot pushed a commit that referenced this pull request Jul 27, 2022
@bors
Copy link

bors bot commented Jul 27, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(category_theory): full_of_surjective [Merged by Bors] - feat(category_theory): full_of_surjective Jul 27, 2022
@bors bors bot closed this Jul 27, 2022
@bors bors bot deleted the functor_from_surjective branch July 27, 2022 10:06
bottine pushed a commit to bottine/mathlib that referenced this pull request Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants