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/mv_polynomial): add missing decidable_eq
arguments to lemmas
#18848
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking care of this! It touches quite a few files so let's get this merged quickly.
bors d+
|
||
lemma degree_of_def [decidable_eq σ] (n : σ) (p : mv_polynomial σ R) : | ||
p.degree_of n = p.degrees.count n := | ||
by convert rfl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't convert rfl
just the same as congr
?
by convert rfl | |
by congr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this doesn't work.
✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with |
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
…leanprover-community/mathlib into eric-wieser/mv_poly-basic-deceq
bors merge |
…as (#18848) This does not change the type of any definitions; the effect of this PR is to make the *statement* of the lemmas syntactically more general. To ensure this catches them all, this removes `open_locale classical` from the beginning of every file in `data/mv_polynomial` and `ring_theory/mv_polynomial`. For definitions which bake in a `classical.dec_eq` assumption, this adds a lemma proven by `convert rfl` that unfolds them to a version with an arbitrary `decidable_eq` instance, following a pattern established elsewhere. Unlike previous refactors of this style this doesn't seemed to have helped any downstream proofs much.
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
decidable_eq
arguments to lemmasdecidable_eq
arguments to lemmas
This is currently just a placeholder
I've been someone sloppy about forward-porting the exact mathport here; a lot of the `classical` additions result in the whole proof being indented, which IMO just adds noise to the diff. What's important is that: * `open Classical` is removed from all the same files * `[DecidableEq _]` is added in the same position to all the same lemmas. In theory mathport will detect if we mess this up, so it's not essential to catch this in review. The linter will tell us if it is added unnecessarily, and the build will fail if is not added someewhere it is needed; so only the argument order is at risk of being wrong. * The new `foo_def` lemmas are all added in `variables.lean`
…mmunity#4007) I've been someone sloppy about forward-porting the exact mathport here; a lot of the `classical` additions result in the whole proof being indented, which IMO just adds noise to the diff. What's important is that: * `open Classical` is removed from all the same files * `[DecidableEq _]` is added in the same position to all the same lemmas. In theory mathport will detect if we mess this up, so it's not essential to catch this in review. The linter will tell us if it is added unnecessarily, and the build will fail if is not added someewhere it is needed; so only the argument order is at risk of being wrong. * The new `foo_def` lemmas are all added in `variables.lean`
This does not change the type of any definitions; the effect of this PR is to make the statement of the lemmas syntactically more general.
To ensure this catches them all, this removes
open_locale classical
from the beginning of every file indata/mv_polynomial
andring_theory/mv_polynomial
.For definitions which bake in a
classical.dec_eq
assumption, this adds a lemma proven byconvert rfl
that unfolds them to a version with an arbitrarydecidable_eq
instance, following a pattern established elsewhere.Unlike previous refactors of this style this doesn't seemed to have helped any downstream proofs much.
Unlike #18791, this does not:
data/polynomial
; I will do that in a separate PRdecidable_eq
to anydef
s; this is a much bigger change and not something worth exploring before the port is done