[Merged by Bors] - perf: shortcut instances for Semiring#39719
[Merged by Bors] - perf: shortcut instances for Semiring#39719JovanGerb wants to merge 5 commits into
Semiring#39719Conversation
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
|
!bench |
PR summary 4fb7e69768Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
Benchmark results for 4fb7e69 against 5032702 are in. There are significant results. @JovanGerb
Medium changes (14✅, 1🟥)
Small changes (111✅, 11🟥) Too many entries to display here. View the full report on radar instead. |
SemiringSemiring
| gcd_dvd_right := gcd_dvd_right | ||
| dvd_gcd := dvd_gcd | ||
| gcd_mul_lcm a b := by rw [EuclideanDomain.gcd_mul_lcm] | ||
| gcd_mul_lcm a b := by rw [EuclideanDomain.gcd_mul_lcm]; rfl |
There was a problem hiding this comment.
This is now needed due to a bug in with_reducible rfl: it doesn't bump the transparency when unifying instance arguments, so it fails, and we need to add rfl.
|
|
||
| omit [CommSemiring R] in | ||
| theorem Int.smul_eq_mul {n n' : ℤ} {r : R} [CommRing R] (hr : n = r) (hn : n' = n) (a : R) : | ||
| theorem Int.smul_eq_mul {R} {n n' : ℤ} {r : R} [CommRing R] (hr : n = r) (hn : n' = n) (a : R) : |
There was a problem hiding this comment.
omitting instance arguments is very flaky, and now stopped working due to the slightly different synthesis order.
| [apply] ring_nf | ||
| Remaining subgoals: | ||
| ⊢ a /ₚ u₁ + b /ₚ u₁ = (a + b) /ₚ u₁ |
There was a problem hiding this comment.
This ring_nf suggestion by hint was silly, as it clearly doesn't do anything. So it going away is arguably a good thing.
|
bors r+ |
|
Pull request successfully merged into master. Build succeeded: |
SemiringSemiring
This PR adds shortcut instances that make sure synthesis using `Semiring` doesn't go through the other ring-like classes. This matches the new definition of `Semiring`.
This PR adds shortcut instances that make sure synthesis using `Semiring` doesn't go through the other ring-like classes. This matches the new definition of `Semiring`.
…40153) This PR adds another shortcut instance for Semiring that I had missed in leanprover-community#39719, because I assumed that it had already been tagged as an instance automatically.
This PR adds shortcut instances that make sure synthesis using
Semiringdoesn't go through the other ring-like classes. This matches the new definition ofSemiring.