-
Notifications
You must be signed in to change notification settings - Fork 546
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: lemmas about pure
for {List,Array,Vector}.{mapM,foldlM,foldrM,anyM,allM,findM?,findSomeM?}
#7356
Conversation
These are more general cases of the existing lemmas about `Id`.
changelog-library |
mapM
, foldlM
, and foldrM
pure
for mapM
, foldlM
, and foldrM
Mathlib CI status (docs):
|
pure
for mapM
, foldlM
, and foldrM
pure
for {List,Array,Vector}.{mapM,foldlM,foldrM,anyM,allM}
@@ -29,6 +29,12 @@ open Nat | |||
|
|||
/-! ### mapM -/ | |||
|
|||
@[simp] | |||
theorem mapM_pure [Monad m] [LawfulMonad m] {xs : Vector α n} (f : α → β) : |
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.
@kim-em, do you want this in Monadic
(which claims to only be about forIn
), or in Lemmas
which is where many other monadic lemmas are?
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.
Leave it in Monadic
for now. I'll need to rehome these lemmas sometime.
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.
Thanks for taking on the rehoming!
pure
for {List,Array,Vector}.{mapM,foldlM,foldrM,anyM,allM}
pure
for {List,Array,Vector}.{mapM,foldlM,foldrM,anyM,allM,findM?,findSomeM?}
This PR adds lemmas reducing monadic operations with
pure
to the non-monadic counterparts.