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/set/function): do not use reducible #12377

Closed
wants to merge 1 commit into from

Conversation

gebner
Copy link
Member

@gebner gebner commented Mar 1, 2022

Reducible should only be used if the definition if it occurs as an explicit argument in a type class and must reduce during type class search, or if it is a type that should inherit instances. Propositions should only be reducible if they are trivial variants (< and > for example).

These reducible attributes here will cause issues in Lean 4. In Lean 4, the simplifier unfold reducible definitions in simp lemmas. This means that tagging an inj_on-theorem with @[simp] creates the simp lemma ?a = ?b (i.e. match anything).


Open in Gitpod

@gebner gebner added the awaiting-CI The author would like to see what CI has to say before doing more work. label Mar 1, 2022
@gebner
Copy link
Member Author

gebner commented Mar 1, 2022

See also leanprover-community/mathport#118

@gebner gebner added the mathport For compatibility with Lean 4 changes, to simplify porting label Mar 1, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Mar 1, 2022
@gebner gebner added the awaiting-review The author would like community review of the PR label Mar 1, 2022
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

@leanprover-community-bot-assistant leanprover-community-bot-assistant 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 Mar 3, 2022
bors bot pushed a commit that referenced this pull request Mar 3, 2022
Reducible should only be used if the definition if it occurs as an explicit argument in a type class and must reduce during type class search, or if it is a type that should inherit instances.  Propositions should only be reducible if they are trivial variants (`<` and `>` for example).

These reducible attributes here will cause issues in Lean 4.  In Lean 4, the simplifier unfold reducible definitions in simp lemmas.  This means that tagging an `inj_on`-theorem with `@[simp]` creates the simp lemma `?a = ?b` (i.e. match anything).
@bors
Copy link

bors bot commented Mar 3, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(data/set/function): do not use reducible [Merged by Bors] - fix(data/set/function): do not use reducible Mar 3, 2022
@bors bors bot closed this Mar 3, 2022
@bors bors bot deleted the inj_semired branch March 3, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mathport For compatibility with Lean 4 changes, to simplify porting 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