Commit 2020-06-25 04:35 8f04a92a
View on Github →refactor(algebra/*): small API fixes (#3157)
Changes to canonically_ordered_comm_semiring
- in the definition of canonically_ordered_comm_semiringreplacemul_eq_zero_iffwitheq_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_additiveforwith_top.has_one,with_top.coe_oneetc;
- move with_top.coe_ne_zerotoalgebra.ordered_group;
- add with_top.has_add, makecoe_add,coe_bit*require only[has_add α];
- use proper instances for lemmas about multiplication in with_top, not justcanonically_ordered_comm_semiringfor everything;
Changes to associates
- merge associates.mk_zero_eqandassociates.mk_eq_zero_iff_eq_zerointoassociates.mk_eq_zero;
- drop associates.mul_zero,associates.zero_mul,associates.zero_ne_one, andassociates.mul_eq_zero_iffin favor of typeclass instances;
Misc changes
- drop mul_eq_zero_iff_eq_zero_or_eq_zeroin favor ofmul_eq_zero;
- drop ennreal.mul_eq_zeroin favor ofmul_eq_zerofrom instance.