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: remove @[reducible] attribute from Function.injective #375

Closed

Conversation

dwrensha
Copy link
Member

@dwrensha dwrensha commented Aug 22, 2022

In mathlib3, function.injective is not reducible, so Function.injective should not be reducible here either.

To avoid errors in Order/Basic ("@[ext] attribute only applies to structures or lemmas proving x = y"), we need to adjust extAttribute too.

Fixes some problems seen in #372.

@dwrensha
Copy link
Member Author

I have low confidence about exactly what's going on in extAttribute. Maybe the other two instances of withReducible there should also be replaced with withDefault?

@gebner
Copy link
Member

gebner commented Aug 22, 2022

To avoid errors in Order/Basic

For the record, that's because lemmas like Function.injective PartialOrder.toPreorder are tagged @[ext]. We need to unfold injective to get to the equation.

Maybe the other two instances of withReducible there should also be replaced with withDefault?

No, they're fine. They're controlling reduction of something else, namely the type.

bors r+

bors bot pushed a commit that referenced this pull request Aug 22, 2022
In mathlib3, [`function.injective`](https://github.com/leanprover-community/lean/blob/4b58f26becf336a50cf037c3e2894b6f2938956e/library/init/function.lean#L73) is not reducible, so `Function.injective` should not be reducible here either.

To avoid errors in `Order/Basic` ("@[ext] attribute only applies to structures or lemmas proving x = y"), we need to adjust `extAttribute` too.

Fixes some problems seen in #372.
@bors
Copy link

bors bot commented Aug 22, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix: remove @[reducible] attribute from Function.injective [Merged by Bors] - fix: remove @[reducible] attribute from Function.injective Aug 22, 2022
@bors bors bot closed this Aug 22, 2022
@dwrensha dwrensha deleted the injective-not-reducible branch August 22, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants