Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(algebra/group/with_one): make with_one and with_zero irreducible. #3883

Closed
wants to merge 5 commits into from

Conversation

kbuzzard
Copy link
Member


We make with_zero and with_one irreducible.

Arguments for: currently the simplifier will apply with_one lemmas to with_zero terms, causing "false positives" with the simp linter. Sometimes these are good (if the goal gets closed), but sometimes the goal state is in some sense corrupted. Making these irreducible stops this happening.

Arguments against: one will need to duplicate some API -- so far I didn't need to duplicate anything though because a lot was duplicated already.

I was surprised how little of mathlib this broke. If people are generally enthusiastic about the idea then we could also make with_top and with_bot irreducible.

This idea was suggested by Johan in #3716 (comment) .

Zulip chat: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.22bug.22.20in.20.60simp.60.3F/near/207319933

@bryangingechen bryangingechen changed the title feat:(algebra/group/with_one): make with_one and with_zero irreducible. feat(algebra/group/with_one): make with_one and with_zero irreducible. Aug 20, 2020
@kbuzzard kbuzzard added the awaiting-review The author would like community review of the PR label Aug 20, 2020
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.

LGTM, mod minor comments

src/algebra/group/with_one.lean Outdated Show resolved Hide resolved
src/algebra/group/with_one.lean Outdated Show resolved Hide resolved
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 20, 2020
kbuzzard and others added 2 commits August 22, 2020 00:24
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: Johan Commelin <johan@commelin.net>
@kbuzzard
Copy link
Member Author

Shall I do the same with with_top and with_bot?

@kbuzzard kbuzzard added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Aug 21, 2020
@jcommelin
Copy link
Member

If you have the energy (-; But maybe in another PR?

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 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 Aug 22, 2020
@bors
Copy link

bors bot commented Aug 22, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/group/with_one): make with_one and with_zero irreducible. [Merged by Bors] - feat(algebra/group/with_one): make with_one and with_zero irreducible. Aug 22, 2020
@bors bors bot closed this Aug 22, 2020
@bors bors bot deleted the irred-with-zero branch August 22, 2020 06:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

2 participants