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(tactic/lint/simp): only head-beta reduce, don't whnf #4237

Closed
wants to merge 3 commits into from

Conversation

gebner
Copy link
Member

@gebner gebner commented Sep 24, 2020

This is necessary to accept simp lemmas like injective reverse.


See #4222 for motivation.

I don't know if this will break anything.



-- However injectivity lemmas can still be marked simp,
-- even though injective is reducible and unfolds to a bad simp lemma:
Copy link
Member

Choose a reason for hiding this comment

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

What do you mean by "bad" here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Bad in the sense of the simp_var_head linter (which this file tests). If you unfold injective f, then you get ∀ x y, f x = f y → x = y where the left-hand side x is a variable. This is bad because the simplifier code doesn't support this, and the linter makes sure we don't mark it as a simp lemma.

This lemma can never fire anyhow because of the `a ∈ s` condition, where
`a` does not occur on the lhs.
@gebner gebner added the awaiting-review The author would like community review of the PR label Sep 24, 2020
@robertylewis
Copy link
Member

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 Sep 25, 2020
bors bot pushed a commit that referenced this pull request Sep 25, 2020
This is necessary to accept simp lemmas like `injective reverse`.
@bors
Copy link

bors bot commented Sep 25, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(tactic/lint/simp): only head-beta reduce, don't whnf [Merged by Bors] - fix(tactic/lint/simp): only head-beta reduce, don't whnf Sep 25, 2020
@bors bors bot closed this Sep 25, 2020
@bors bors bot deleted the simp-lint-normalize branch September 25, 2020 12: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

3 participants