Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(algebra/*): small API fixes (#3157)
## Changes to `canonically_ordered_comm_semiring` * in the definition of `canonically_ordered_comm_semiring` replace `mul_eq_zero_iff` with `eq_zero_or_eq_zero_of_mul_eq_zero`; the other implication is always true because of `[semiring]`; * add instance `canonically_ordered_comm_semiring.to_no_zero_divisors`; ## Changes to `with_top` * use `to_additive` for `with_top.has_one`, `with_top.coe_one` etc; * move `with_top.coe_ne_zero` to `algebra.ordered_group`; * add `with_top.has_add`, make `coe_add`, `coe_bit*` require only `[has_add α]`; * use proper instances for lemmas about multiplication in `with_top`, not just `canonically_ordered_comm_semiring` for everything; ## Changes to `associates` * merge `associates.mk_zero_eq` and `associates.mk_eq_zero_iff_eq_zero` into `associates.mk_eq_zero`; * drop `associates.mul_zero`, `associates.zero_mul`, `associates.zero_ne_one`, and `associates.mul_eq_zero_iff` in favor of typeclass instances; ## Misc changes * drop `mul_eq_zero_iff_eq_zero_or_eq_zero` in favor of `mul_eq_zero`; * drop `ennreal.mul_eq_zero` in favor of `mul_eq_zero` from instance.
- Loading branch information
Showing
13 changed files
with
120 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.