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
feat(category_theory/shapes): basic shapes of cones and conversions #611
feat(category_theory/shapes): basic shapes of cones and conversions #611
Conversation
39145ff
to
82cede0
Compare
I've just rebased this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks fine. But I don't have as clear a vision of what the end result of the implementation of the limits library should look like as others might have. I would say, let's get this merged and see how it works. We don't have too many users, so we can still refactor after we have more experience.
What do you think, @rwbarton? |
I haven't had a chance to look at this in depth. I'm okay with the plan of merging something along these lines with the idea that it may change substantially in the future. I'm especially unsure that in the long run we really want two different notions I think we should also take a look at prior art in other category theory libraries, for example the Lean 2 category theory library (e.g. 1, 2). |
@fpvandoorn Can you comment on your experience developing the category lib in Lean2? |
I'm not sure what kind of things you want to know. I remember that it was a lot of work with 1-2 people to build a category library (it was mostly me and Jakob von Raumer, @javra), especially since we didn't have a clear goal in sight. Therefore the library has many rough edges and is very incomplete. It was fun to build parts of a category theory library, though, especially since some things in category theory work quite differently in HoTT. I like how the category theory library in Lean 3 does more with automation. There were quite some diagram chases which we had to write out explicitly, which are done by a single tactic in Lean 3. There are various other differences, for example we used bundled categories ( About limits, I remember one trick which was neat, namely what we called a "sparse category". It's a special case of the free category, where you cannot compose any of the given morphisms. So basically it just adds identity morphisms. Instances include many of the "walking structures": like the shape of pullbacks, pushouts and (co)equalizers. If you have more specific questions, I'm happy to answer them. |
I remember that some tricks we used are also mentioned in this paper by Gross, Chlipala, and Spivak. Especially making the the category definition symmetric (section 3.1 of the paper) was quite helpful. |
Oh yes, that was useful to make |
But we don't have eta for records... |
Not having eta for records prevents the trick from working in all cases, but it still does whenever the the category is an application of the constructor, which happens from time to time when you write the library. I guess, as @fpvandoorn said, the benefits are much smaller than in HoTT, but it might still result in cleaner terms. |
f623d34
to
1ed7ad1
Compare
I'm not sure of the consequence of formalabstracts incorporating this into their codebase. I'm still hopeful that we can merge this. I would like to be able to add more stuff to the category theory library, but I'm mostly stalled on this decision. |
Once this PR is merged here we will remove it from our repository. |
Just rebased onto master; travis had been getting sad. |
Err... this PR seems to be stranded off on some strange repository leanprover-fork/mathlib-backup. I'm going to close and reopen a new one. |
Some helper methods for building and decomposing cones of various standard shapes.
TO CONTRIBUTORS:
Make sure you have:
If this PR is related to a discussion on Zulip, please include a link in the discussion.
For reviewers: code review check list