-
Notifications
You must be signed in to change notification settings - Fork 139
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
Beefing up adjunctions. #873
base: master
Are you sure you want to change the base?
Conversation
Copying from a comment in the code:
|
I would very much welcome suggestions on how to better hide the increased generality for users only interested in ordinary adjunctions. |
How about splitting it up into two files, |
Is that a good programming pattern? It would mean that an adjunction relative over the identity functor is not an adjunction. Remarks on this particular case:
On a higher level, since |
Currently, I think that content-wise my current definition of ordinary adjunctions aligns pretty well with the original one, and should support a fair extent of backwards compatibility. However, I ran into issues with Agda's module system:
As a result, I get significant opening boilerplate in the section "Proofs of equivalence" in When I have more time, I will create issues for these matters / clarify the one that I have already created. (Done.) |
@JacquesCarette pointed out this paper in relation to the sort of problems we're facing here, though I haven't yet distilled what we should learn from it. |
Quoting @maxsnew:
Yes, I considered going this far but I was afraid it would be too alienating to most users interested in the more well-known instances you're listing. |
I think alienation is not a problem, if you just provide an example everyone knows. Without too much thought, I can imagine the following to be a good way set things up:
Disclaimer: I don't know my way around the categories-part of the library, so maybe that's already done somewhere else, for a different notion of universal property. |
I guess a fully representable functor can be used to show that a thing with a universal property always exists, e.g.
I think I still need the ad hoc variant for individual instances:
But yes, if there's a consensus among the few people who are around here that deriving simple concepts from more general concepts is a good library development pattern, then I might commit something along these lines (perhaps after reading Jacques Carette's paper). |
My opinion on "good library development patterns":
The basic difference is between users, for whom we want the bar to be low, and library developers, whose overall workload we want to minimize. What gets squeezed in the middle is the 'user' who wishes to use a library to learn things... they might be forced to learn a lot more than they intended if they're trying to understand the proofs. |
One of the nice things about representables is that they subsume these cases as well. I.e., a category C has all products when the profunctor ((C x C)^o x C -> Set)
Is representable, and to say a particular pair of objects
is representable. |
And I agree with Felix's plan. More concretely, we can define representable profunctor in some module and prove some "Yoneda facts":
Then for particular UMPs we would define their own module with a "pedestrian" definition, and a "slick" definition using representability and prove they are equivalent. In my experience the pedestrian definition is just explicitly describing the universal morphism so this might not be as hard as it sounds. We can then transport general proofs about representables to the pedestrian formulation. |
Well ok but it seems more useful to define a representable profunctor as one that has an ad hoc representation for every object, In a specific case: it is more useful to define a global Kan extension as a local Kan extension everywhere, Or: it is more useful to define having all limits of a given shape as having a limit for every diagram, What does UMP stand for? |
"universal mapping property" (quick edit: I haven't reviewed the PR so don't have anything useful to say on its contents, but I saw the question on discord) |
You can show that for a fixed profunctor R : C^o x D -> Set that the following are equivalent:
And since a profunctor is the same as a functor R : D -> Psh(C), by (2) above this reduces representable profunctors to being point-wise representable presheaves. So you can use either as the basic notion, it's a matter of taste. I simply prefer representable profunctors because they generalize to arbitrary pro-arrow equipments, which is the setting I'm most familiar with and generalizes to enriched/indexed category theory where presheaf categories don't necessarily exist. But I admit that's not a strong argument for preferring them to representable presheaves as the basic notion in this library. Edit: remove the naturality constraint which as @anuyts points out doesn’t make sense |
Oh right, I actually proved 2 => 1 in the current pull request (the module |
@anuyts: Is this intentionally left in draft state? |
@felixwellen Yes, I'll consider what to do with this later. |
Generalize/factor definition of adjunction (as natural bijection) to include ad hoc (per-object) and relative adjoints.