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/monad/kleisli): add Kleisli category of a monad #4542
Conversation
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.
LGTM
@semorrison Would you please also take a look?
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.
Sorry, I've been quite busy. I should have given these name suggestions earlier.
If you fix them, feel free to merge afterwards.
bors d+
namespace adjunction | ||
|
||
/-- The left adjoint of the adjunction which induces the monad `T`. -/ | ||
@[simps] def F_T : C ⥤ kleisli T := |
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.
@[simps] def F_T : C ⥤ kleisli T := | |
@[simps] def to_kleisli : C ⥤ kleisli T := |
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.
alternatively maybe free
?
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.
alternatively, maybe free
?
end } | ||
|
||
/-- The right adjoint of the adjunction which induces the monad `T`. -/ | ||
@[simps] def U_T : kleisli T ⥤ C := |
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.
@[simps] def U_T : kleisli T ⥤ C := | |
@[simps] def from_kleisli : kleisli T ⥤ C := |
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.
and here underlying
or forget
?
✌️ b-mehta can now approve this pull request. To approve and merge a pull request, simply reply with |
src/category_theory/monad/types.lean
Outdated
begin | ||
unfold_projs, | ||
ext, | ||
dsimp, |
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 dsimp
can be removed.
I also think using the names |
I don't like the |
I should say that I don't really have any strong opinions regarding the names. I just tend to think of the Kleisli category as related to the free objects in the Eilenberg-Moore category (via the comparison functor). |
Yes, modulo the renaming, LGTM. |
Thanks for the suggestions all! |
bors r+ |
Already running a review |
Hmm, weird error message from |
…4542) Adds the Kleisli category of a monad, and shows the Kleisli category for a lawful control monad is equivalent to the Kleisli category of its category-theoretic version. Following discussion at https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/kleisli.20vs.20kleisli. I'd appreciate suggestions for names more sensible than the ones already there.
Might be because I accidentally closed and reopened? Thanks for sorting it! |
No problem! Yeah, I would have expected |
Pull request successfully merged into master. Build succeeded: |
Adds the Kleisli category of a monad, and shows the Kleisli category for a lawful control monad is equivalent to the Kleisli category of its category-theoretic version.
Following discussion at https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/kleisli.20vs.20kleisli.
I'd appreciate suggestions for names more sensible than the ones already there.
Coauthored by @Vtec234