feat: mark forIn_pure_yield lemmas simp#7433
Merged
kim-em merged 2 commits intoleanprover:masterfrom Mar 14, 2025
Merged
Conversation
This means that `simp` works in monads other than `Id`.
Contributor
Author
|
changelog-library |
|
Mathlib CI status (docs):
|
forIn_pure_yield lemmas simpforIn_pure_yield lemmas simp
Collaborator
|
Should we worry about this having a rather unspecific simp discrimination tree key? Or is it worthy trying this on every forIn loop? |
Contributor
Author
|
The existing lemmas already have this problem: import Lean
/--
info: @Eq
_
(@forIn' _ (List _) _ _ _ _ _ _ _ <other>)
(@List.foldlM _ _ _ (@Subtype _ (@Membership.mem _ (List _) _ _)) <other> _ (@List.attach _ _))
-/
#guard_msgs in
#discr_tree_key List.forIn'_yield_eq_foldlM -- already `simp`
/--
info: @Eq
_
(@forIn' _ (List _) _ _ _ _ _ _ _ <other>)
(@pure _ _ _ (@List.foldl _ (@Subtype _ (@Membership.mem _ (List _) _ _)) <other> _ (@List.attach _ _)))
-/
#guard_msgs in
#discr_tree_key List.forIn'_pure_yield_eq_foldl -- `simp` in this PR |
Collaborator
|
Thanks for checking |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes
simpable to simplify basicforloops in monads other thanId.This is some prework for #7352, where the
Idlemmas will be deprecated.