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] - chore(data/set/basic): simp attribute on mem_range_self #3260

Closed
wants to merge 1 commit into from

Conversation

sgouezel
Copy link
Collaborator

@sgouezel sgouezel commented Jul 1, 2020


I thought for a long time that mem_range would fire before this one, and make it unusable by simp, but it turns out it's not the case (contrary to other lemmas with the same flavor: in

@[simp] theorem mem_image (f : α → β) (s : set α) (y : β) :
  y ∈ f '' s ↔ ∃ x, x ∈ s ∧ f x = y := iff.rfl

theorem mem_image_of_mem (f : α → β) {x : α} {a : set α} (h : x ∈ a) : f x ∈ f '' a :=
⟨_, h, rfl⟩

one can not put a simp attribute on the second lemma. I am not sure I understand the difference between the two situations, by the way).

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉

bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Jul 1, 2020
@bors
Copy link

bors bot commented Jul 1, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(data/set/basic): simp attribute on mem_range_self [Merged by Bors] - chore(data/set/basic): simp attribute on mem_range_self Jul 1, 2020
@bors bors bot closed this Jul 1, 2020
@bors bors bot deleted the simp_mem_range branch July 1, 2020 11:09
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

2 participants