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] - fix(data/list/basic): Ensure that ball_cons actually works as a simp lemma #4281

Closed
wants to merge 5 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Sep 26, 2020

The LHS of the simp lemma list.ball_cons (aka list.forall_mem_cons) is not in simp-normal form, as list.mem_cons_iff rewrites it.
This adds a new simp lemma which is the form that list.mem_cons_iff rewrites it to.


https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Case-bashing.20.60list.2Epairwise.60.20with.20.60simp.60/near/211276203

First commit is #4279

…lemma

The LHS of ball_cons (aka forall_mem_cons) is not in simp-normal form, as `mem_cons_iff` rewrites it.
This adds a new simp lemma which is the form that `mem_cons_iff` rewrites it to.
@eric-wieser eric-wieser added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Sep 26, 2020
@eric-wieser eric-wieser changed the title bug(data/list/basic): Ensure that ball_cons actually works as a simp lemma bug(data/list/basic): Ensure that ball_cons actually works as a simp lemma (deps: #4279) Sep 26, 2020
@digama0
Copy link
Member

digama0 commented Sep 26, 2020

I think we don't need list.forall_mem_cons' any more with this new simp lemma in place.

@digama0 digama0 changed the title bug(data/list/basic): Ensure that ball_cons actually works as a simp lemma (deps: #4279) fix(data/list/basic): Ensure that ball_cons actually works as a simp lemma (deps: #4279) Sep 26, 2020
@eric-wieser
Copy link
Member Author

eric-wieser commented Sep 26, 2020

I agree, although there are a few places that refer to it directly by name. If CI passes on this one, I'll come back and:

  • Move the lemma to a better file, since its no longer about lists at all
  • Fix all callers of list.forall_mem_cons' to use other lemmas

I'm expecting the worst given the behavior of lemmas in #4143, which is a similar sort of change.

@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 26, 2020
@eric-wieser eric-wieser removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Sep 26, 2020
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 26, 2020
@eric-wieser eric-wieser changed the title fix(data/list/basic): Ensure that ball_cons actually works as a simp lemma (deps: #4279) fix(data/list/basic): Ensure that ball_cons actually works as a simp lemma Sep 26, 2020
@eric-wieser eric-wieser added the awaiting-review The author would like community review of the PR label Sep 26, 2020
Copy link
Collaborator

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

LGTM

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 Sep 28, 2020
bors bot pushed a commit that referenced this pull request Sep 28, 2020
…lemma (#4281)

The LHS of the simp lemma `list.ball_cons` (aka `list.forall_mem_cons`) is not in simp-normal form, as `list.mem_cons_iff` rewrites it.
This adds a new simp lemma which is the form that `list.mem_cons_iff` rewrites it to.
@bors
Copy link

bors bot commented Sep 28, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(data/list/basic): Ensure that ball_cons actually works as a simp lemma [Merged by Bors] - fix(data/list/basic): Ensure that ball_cons actually works as a simp lemma Sep 28, 2020
@bors bors bot closed this Sep 28, 2020
@bors bors bot deleted the eric-wieser/forall_eq_or_imp branch September 28, 2020 17:22
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