Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

sgouezel
Copy link
Collaborator

And a few basic lemmas in set/basic.


Open in Gitpod

@sgouezel sgouezel added the awaiting-review The author would like community review of the PR label Feb 15, 2022
Comment on lines 270 to 271
lemma indicator_const_smul_apply (s : set α) (r : M) (f : α → A) (x : α) :
indicator s (λ x, r • f x) x = r • indicator s f x :=
Copy link
Member

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)

Copy link
Collaborator Author

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.

Copy link
Member

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 and indicator_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.

Copy link
Member

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?

Copy link
Collaborator Author

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.

src/data/set/basic.lean Outdated Show resolved Hide resolved
@urkud
Copy link
Member

urkud commented Feb 18, 2022

Thanks!
bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Feb 18, 2022
bors bot pushed a commit that referenced this pull request Feb 18, 2022
@bors
Copy link

bors bot commented Feb 18, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/indicator_function): smul lemmas for functions [Merged by Bors] - feat(algebra/indicator_function): smul lemmas for functions Feb 18, 2022
@bors bors bot closed this Feb 18, 2022
@bors bors bot deleted the indicator_smul branch February 18, 2022 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants