-
Notifications
You must be signed in to change notification settings - Fork 67
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
[WIP] Preadditive Categories #249
base: master
Are you sure you want to change the base?
Conversation
992caac
to
56d37bc
Compare
Ugh, moved to a new computer and git config is messed up. Will fix |
Nice work! I noticed the other day that we have CMon-enriched categories in the library:
They are formalised in a similar way (by hand rather than via enrichment). Clearly they are related, so maybe the definition of preadditive categories should include the one for CMon-enriched ones? Or at least we should define a forgetful functor from one to the other. Similarly for the proof that these are equivalent to enriched categories, maybe the corresponding notions of tensor products could share some definitions/code. WDYT? |
56d37bc
to
ad98503
Compare
So I noticed the Communitive Monoid Enriched stuff when I was writing this, but there is one reason that I didn't include the definition in Now, this is part of a much larger design discussion, but my feelings these days is that most things like With that in mind, perhaps a type that captures this sort of "enrichment by hand over some algebraic structure" could be useful. I'm not 100% what it would look like, but it's food for thought. |
I think the current convention — which is also the one used by the stdlib — is to have both an unbundled/property version ( |
Very cool stuff. I will do a careful review soon. [The code is very clean, but we might as well optimize it even more while it's still under development.] Right now, I'll just comment on the various things that have already been discussed. First: my attempt at CMon-enriched was partial. I'm trying to do tangent categories and the like, and was working incrementally and more or less directly from the sources. I'm not sure if 'my' way of doing it is good for scalability. We definitely should try to get these two to line up (i.e. use the same conventions), and I'm entirely willing to change mine if I made some sub-optimal choices. So yeah, if we can come up with a decent way to encode "enriched by hand over some algebraic structure", that would be grand. Second: yes, we're moving to provide both bundled and unbundled versions. They have pros and cons, and it feels like a false choice to have to choose. It's just not that much work to provide both, and ends up way more useful in the end. Third: I continue to prefer lots of small PRs over large ones. Even if the PRs have dependencies. So the (great!) infrastructure work in this PR should have been (can still be?) split. That work can be merged in much more quickly. The stuff that needs more careful consideration can then wait a bit longer, without stopping all progress. |
Sorry for dropping these big PRs, It is a bad habit! I'll spin of the biproduct + reasoning combinators into separate PRs. |
No worries, I easily drift into that too. I then have to go back and do some git magic to fix my own bad habits. |
Global |
…s into abelian-categories
@TOTBWF I know this is rather an old, partial PR, and that you're working more on 1lab right now, but it would be nice to get some closure on this one (and I mean that in let's get it pulled in, not let's just close it!). Anything I can do to prod that along? |
To be honest I had totally forgotten about this! I'll try and get this over the finish line next week! |
I guess "next week" didn't really happen... is there a chance this will get completed? |
Description
This PR implements Preadditive categories, in the style of Borceux1. We also prove some properties, the most interesting of which surrounds biproducts. Traditional definitions of biproducts often require some sort of enrichment, or at the very least zero objects. However, recent developments by Karvonen2 have provided an excellent definition that works without any sort extra structure, and coincides perfectly with older definitions when the enrichment is present.
Notes
Instead of defining Preadditive Categories as Ab-Enriched, we do the enrichment "by hand". This is done mainly to keep
Preadditve
(and in the future,Additive
andAbelian
) as structures over a category, rather than over an enriched one. This will allow us to show that theCategory
instances for Abelian Groups and modules over a Ring arePreadditive
, rather than having to build a parallel instance that is Ab-Enriched.Todos
1: Borceux, Handbook of Categorical Algebra, Volume 2, Definition 1.2.1
2: Karvonen, Biproducts without pointedness
https://arxiv.org/abs/1801.06488