-
Notifications
You must be signed in to change notification settings - Fork 297
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(algebra/monoid_algebra/basic): add int_cast
to monoid_algebra
instances
#15779
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.
LGTM, although the timeout is worrying. Let's wait for the PR this depends on before moving forward.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
This PR/issue depends on: |
@@of_irreducible_map _ _ _ (is_local_ring_hom_expand R hp.bot_lt) hf | ||
let _ := is_local_ring_hom_expand R hp.bot_lt in by exactI of_irreducible_map ↑(expand R p) hf |
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.
Any idea what happened here?
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.
not really sure, but the typechecking has been crazy brittle with int_cast
and stuff: for some further examples that bewilder me, look at this and its fix [and no, deinstancing the comm_semiring
instance didn't help at all]
e: the error isn't obvious, it's https://github.com/leanprover-community/mathlib/runs/7601089733?check_suite_focus=true and the only way I managed to fix it without just undoing my changes was by using refine
like 5 times to define that function (and the equivalent version for mv_polynomial
further down the file)
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.
Either way, I guess this is nicer because it avoids an @
@@ -173,6 +173,9 @@ rfl | |||
/-- `polynomial.algebra_of_algebra` is consistent with `algebra_nat`. -/ | |||
example [comm_semiring R] : (polynomial.algebra_of_algebra : algebra ℕ R[X]) = algebra_nat := rfl | |||
|
|||
/-- `polynomial.algebra_of_algebra` is consistent with `algebra_int`. -/ | |||
example [ring R] : (polynomial.algebra_of_algebra : algebra ℤ R[X]) = algebra_int _ := 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.
I guess the line above only needs semiring R
then, my mistake.
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.
bors d+
✌️ ericrbg can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
… instances (#15779) Note that this reshuffles how some instances are created to ensure that they get the `int_cast` field. Co-authored-by: Eric Rodriguez <37984851+ericrbg@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
int_cast
to monoid_algebra
instancesint_cast
to monoid_algebra
instances
… instances (#15779) Note that this reshuffles how some instances are created to ensure that they get the `int_cast` field. Co-authored-by: Eric Rodriguez <37984851+ericrbg@users.noreply.github.com>
… instances (#15779) Note that this reshuffles how some instances are created to ensure that they get the `int_cast` field. Co-authored-by: Eric Rodriguez <37984851+ericrbg@users.noreply.github.com>
Note that this reshuffles how some instances are created to ensure that they get the
int_cast
field.monomial_fun
to remove diamonds #15778