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] - feat(subtype): standardize #3204

Closed
wants to merge 4 commits into from
Closed

Conversation

fpvandoorn
Copy link
Member

Add simp lemma from x.val to coe x
Use correct ext/ext_iff naming scheme
Use coe in more places in the library


@fpvandoorn
Copy link
Member Author

There are some cases where it got better:

  • there were some ext, rw subtype.ext, ext sequences that now become ext.
  • there were some places where simp did more

There are some places where it got worse:

  • On types defined as subtypes, the coercion doesn't work, but simp still simplifies val into the coercion. That is not ideal. That means I had to add [-subtype.val_eq_coe] to simp sometimes.

I changed subtype.val to coe in a lot of places, but of course only in places near an error, definitely not everywhere. I expect a bunch of linter failures of the form LHS is not in normal form.

@fpvandoorn fpvandoorn added WIP Work in progress awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Jun 27, 2020
@fpvandoorn
Copy link
Member Author

There were only few linter errors.

@kappelmann: I had to remove some simp lemmas in continued fractions, because they went in the other direction (simplifying from coercion to subtype.val). I think they were unused, though.

add extensionality lemma and ext_iff
simplify x.1 to coe x
@fpvandoorn
Copy link
Member Author

Trying to rebase on this branch (which will probably need to go through a couple of iterations of fixes): https://github.com/leanprover-community/mathlib/compare/subtype_rebase

@fpvandoorn
Copy link
Member Author

I think there are no more errors here. I would appreciate a quick merge, as this PR is likely to break quickly.

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

@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 Jun 28, 2020
bors bot pushed a commit that referenced this pull request Jun 28, 2020
Add simp lemma from x.val to coe x
Use correct ext/ext_iff naming scheme
Use coe in more places in the library
@bors
Copy link

bors bot commented Jun 28, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(subtype): standardize [Merged by Bors] - feat(subtype): standardize Jun 28, 2020
@bors bors bot closed this Jun 28, 2020
@bors bors bot deleted the subtype branch June 28, 2020 07:12
cipher1024 pushed a commit to cipher1024/mathlib that referenced this pull request Mar 15, 2022
Add simp lemma from x.val to coe x
Use correct ext/ext_iff naming scheme
Use coe in more places in the library
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

2 participants