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/sum): Add trivial simp lemmas #5112

Closed
wants to merge 2 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser added easy < 20s of review time. See the lifecycle page for guidelines. awaiting-review The author would like community review of the PR labels Nov 25, 2020
@fpvandoorn
Copy link
Member

Given the objections on Zulip, the @[simp] attributes should probably be removed (except for elim_inl_inr). Other than that LGTM

@sum.elim α β _ inl inr = id :=
funext $ λ x, sum.cases_on x (λ _, rfl) (λ _, rfl)

lemma comp_elim {α β γ δ : Sort*} (f : γ → δ) (g : α → γ) (h : β → γ):
Copy link
Member

Choose a reason for hiding this comment

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

This would also be fine as a simp lemma, but I'm not sure if we actually want this to always simplify to the right-hand side.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I left this one out because the decision of which way to simplify felt subjective.

@eric-wieser
Copy link
Member Author

@gebner, do you agree with @fpvandoorn that only elim_inl_inr is safe to mark simp?

@gebner
Copy link
Member

gebner commented Nov 26, 2020

Yes. The only one I'm a bit antsy about is elim_comp_inl_inr but on closer inspection I don't think it would cause any problems.

@gebner
Copy link
Member

gebner commented Nov 26, 2020

bors r+

@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 Nov 26, 2020
@eric-wieser
Copy link
Member Author

eric-wieser commented Nov 26, 2020

Wait, now I'm confused. @fpvandoorn is asking me to remove the simp from everything but elim_inl_inr. Did you mean to type bors d+, or did you conclude these were all safe after all?

@gebner
Copy link
Member

gebner commented Nov 26, 2020

Ah, missed that comment.

bors r-
bors d=fpvandoorn

@bors
Copy link

bors bot commented Nov 26, 2020

✌️ fpvandoorn can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@bors
Copy link

bors bot commented Nov 26, 2020

Canceled.

@gebner
Copy link
Member

gebner commented Nov 26, 2020

I think all of them are safe tbh.

@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR and removed ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) labels Nov 26, 2020
@fpvandoorn
Copy link
Member

My comment was based on Gabriel's remark that the simp lemmas could be dangerous (and their limited use). If Gabriel is happy with them, so am I.

bors merge

bors bot pushed a commit that referenced this pull request Nov 26, 2020
@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 Nov 26, 2020
@bors
Copy link

bors bot commented Nov 26, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(data/sum): Add trivial simp lemmas [Merged by Bors] - chore(data/sum): Add trivial simp lemmas Nov 26, 2020
@bors bors bot closed this Nov 26, 2020
@bors bors bot deleted the eric-wieser/sum-lemmas branch November 26, 2020 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy < 20s of review time. See the lifecycle page for guidelines. 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