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(deprecated/*): remove instances #4735

Closed
wants to merge 20 commits into from
Closed

Conversation

jcommelin
Copy link
Member

@jcommelin jcommelin commented Oct 22, 2020

Remove all instances constructing structures from is_* predicates, like for example:

instance subset.ring {S : set R} [is_subring S] : ring S :=
...

Co-Authored-By: Gabriel Ebner gebner@gebner.org


@jcommelin jcommelin added the awaiting-review The author would like community review of the PR label Oct 22, 2020
@gebner
Copy link
Member

gebner commented Oct 22, 2020

I think lowering the instance priority for whole files is the wrong way to fix this issue. We should only lower the priority of a single instance, and understand what caused this issue in the first place. Ideally there'd also be a linter.

Do you have an MWE?

@jcommelin
Copy link
Member Author

Re MWE, see the test file.
Note that the problem goes away if you remove any of the following three ingredients:

  • change unit -> R to a module like M
  • change L.subtype to some hom f
  • remove the tensor_product.map L.subtype, and just ask for injectivity of L.subtype.

@jcommelin
Copy link
Member Author

We deprecated these files because we realised that these things shouldn't use the typeclass system. So I think it makes sense to actually lower the priority for the entire file.

@gebner
Copy link
Member

gebner commented Oct 22, 2020

Ok, didn't look too closely at the file names. I'm still a bit uneasy, because we'll probably still have timeouts in type-class searches that should fail (lowering the priority typically doesn't help here).

If we're going to remove the files soon anyhow, then I won't bother debugging this.

@jcommelin
Copy link
Member Author

jcommelin commented Oct 22, 2020

I don't think these files will go away... 😢
What should happen, is that someone refactors these files so that they are all about semibundled structures, instead of classes. But that refactor is very painful. I tried it and failed.

@gebner gebner changed the title chore(deprecated/*): lower instance priorities fix(deprecated/*): remove instances Oct 22, 2020
@urkud
Copy link
Member

urkud commented Oct 23, 2020

LGTM

@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Oct 23, 2020
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Oct 23, 2020
jcommelin and others added 2 commits October 23, 2020 10:34
Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@ChrisHughes24
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 Oct 23, 2020
bors bot pushed a commit that referenced this pull request Oct 23, 2020
Remove all instances constructing structures from `is_*` predicates, like for example:
```lean
instance subset.ring {S : set R} [is_subring S] : ring S :=
...
```

Co-Authored-By: Gabriel Ebner <gebner@gebner.org>



Co-authored-by: Gabriel Ebner <gebner@gebner.org>
@bors
Copy link

bors bot commented Oct 23, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(deprecated/*): remove instances [Merged by Bors] - fix(deprecated/*): remove instances Oct 23, 2020
@bors bors bot closed this Oct 23, 2020
@bors bors bot deleted the crazy branch October 23, 2020 13:03
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

5 participants