Skip to content

[Merged by Bors] - fix: remove @[reducible] attribute from Function.injective#375

Closed
dwrensha wants to merge 1 commit intoleanprover-community:masterfrom
dwrensha:injective-not-reducible
Closed

[Merged by Bors] - fix: remove @[reducible] attribute from Function.injective#375
dwrensha wants to merge 1 commit intoleanprover-community:masterfrom
dwrensha:injective-not-reducible

Conversation

@dwrensha
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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.

2 participants