-
Notifications
You must be signed in to change notification settings - Fork 197
biproducts #2016
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
base: master
Are you sure you want to change the base?
biproducts #2016
Conversation
Some of the comments in #1929 that aren't marked as resolved are about the file Biproducts.v. Have they been addressed here? (I haven't had time to take a look at this PR yet, but will do so soon.) |
@jdchristensen I don't remember. I will take a closer look ASAP. |
I'll reproduce the outstanding comments here so we can address them in one place:
I'll write down and use these lemmas. They can probably appear in Coproducts.v. I need to think a bit more about the rest of the comments.
|
@jdchristensen I haven't been able to make progress with the comments that we had, perhaps I no longer understand what needs to be done. Would you be able to take another look at this and give a fresh review, that should allow us to make some progress on this. I would like to get this merged eventually, so that we can make room for the other abelian cat stuff. |
@Alizter It will take me some time to remember the context here. I might have time tomorrow, but if not, it will likely be next week. |
I'm about to (finally) review this again. Is it ok if I rebase this (or at least merge master into it) before I do so? |
That's fine with me @jdchristensen |
0009e18
to
899955b
Compare
I squashed the previous commits into a single commit, adjusted the result so it builds with current master, and pushed that as a single commit. Then I pushed small commits which make some minor fixes here and there. A couple of small changes also improved many of the slow I spoke to @ThomatoTomato today, and we discussed ways that Biproducts.v could be adjusted to make many things smoother. The main idea is to make the smart constructor (or something like it) the main definition of a biproduct. In this version, instead of having separate coproduct and product objects, there is just a single object. There will be instances showing that this object is both a coproduct and a product, so many of the lemmas about biproducts can be skipped, since we can just apply the results about (co)products. It should also be trivial to show that this data gives a biproduct in the opposite category, and moreover this proof will likely be definitionally involutive. What is currently the definition of Biproduct would instead be a different constructor. A second thing that will likely be helpful is to add (As an aside, I think the new definition can drop the @ThomatoTomato is willing to try to tackle this reorganization. Is that ok with you @Alizter? |
@jdchristensen That sounds good to me. |
@ThomatoTomato I think it's possible to get some of the benefits mentioned above without doing a major restructuring, so I think this makes a good first goal. The idea is to (1) use the instance At this point, you wouldn't yet change the definition of After that, we can decide on the next steps. |
(2) has now been completed. In the first commit we add a result that let us transfer (co)product structures along equivalences in a category. Typeclass search tricks itself into looking for a different goal than what we want, so the second commit tweaks the priorities of typeclass search. In the final commit we remove wrappers for the coproduct. It was still not successfull at infering every parameter, so at some places we need to tell it what the diagram is. Binary biproducts still keep making wrappers. So a next step would be to keep simplifying. However, it looks like adding We've also added a couple of new tricks to the main library. Would it be wise to rebase this on master? |
Thanks. I'll take a look soon. About rebasing, I guess |
@@ -113,27 +70,28 @@ Proof. | |||
* exact (cat_pr_in_ne i j np). | |||
Defined. | |||
|
|||
(** A biproduct is a product. *) |
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 don't understand why this comment is here. biproduct_product
is a field of the Biproduct
record, so by definition a biproduct is a product.
This is looking good. I've just pushed some changes. Feel free to rebase and to then continue with the next step, probably IsProduct and IsCoproduct. (Github is having problems, so my two commits aren't appearing here. When they do, feel free to continue.) |
My commits show up in @Alizter 's repo: master...Alizter:HoTT:ps/rr/biproducts Hopefully github will show them in this PR soon. |
@ThomatoTomato Ok, the commits are here now. See comments above, where I didn't tag you. |
09878a5
to
2fac555
Compare
I'll see if I can find some time this week to take a closer look. |
@Alizter Thomas is starting to do the next step, which is to change WildCat/Products.v to split the class The dual changes will be made to Coproducts.v. Because of instances, I think nothing else in the library will be forced to change, but some places might find it convenient to use the Does this all sound reasonable to you? Cc: @ThomatoTomato |
@jdchristensen That sounds good to me. |
In this PR we define what we mean by a category having biproducts. We prove standard lemmas, monoidal structure, funtoriality results and duality.
cc @ThomatoTomato you might want to take a look at this since it is directly part of the abelian category formalization in #1929.