-
Notifications
You must be signed in to change notification settings - Fork 298
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(algebra/indicator_function): smul lemmas for functions #12059
Conversation
src/algebra/indicator_function.lean
Outdated
lemma indicator_const_smul_apply (s : set α) (r : M) (f : α → A) (x : α) : | ||
indicator s (λ x, r • f x) x = r • indicator s f x := |
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 the original name derives from:
lemma indicator_smul' (s : set α) (r : M) (f : α → A) (x : α) :
indicator s (r • f) x = r • indicator s f x :=
(which matches indicator_one'
and some other primed lemmas above)
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 don't understand your comment, because I can't locate the lemma indicator_smul'
you mention. But if you have suggestions for better names, I'll take your word on it because you're probably more familiar with this part of the library than I am.
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.
Apologies. My comment amounts to:
- We should have
indicator_smul'
as a lemma (it doesn't exist right now) - The difference between
indicator_mul
andindicator_mul'
suggests that the lemma this comment is on already has the expected name.
However, I don't see a better name for the new lemma than what you already have.
I think @urkud is more familiar than me, so I'm happy to defer to their opinion.
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.
It was named smul
because there was no other version. Am I right that the old lemma follows from the new lemma? Do we need the old lemma once we have the new one?
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.
The old lemmas indeed follow from the new ones, so I've exchanged their order in the file to golf their proofs. However, they are still needed in the library as rw
and simp
struggle with the function lemmas in the constant case. So, I am keeping them.
Thanks! |
And a few basic lemmas in `set/basic`.
Pull request successfully merged into master. Build succeeded: |
And a few basic lemmas in
set/basic
.