Skip to content
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] - refactor(algebra/*): small API fixes #3157

Closed
wants to merge 4 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Jun 24, 2020

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.

Waiting for CI to see if I broke something.

…ally_ordered_comm_semiring`

* 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;
* 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 α]`;
* 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`;
* use proper instances for lemmas about multiplication in `with_top`, not
  just `canonically_ordered_comm_semiring` for everything;
* 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.
@urkud urkud added the awaiting-review The author would like community review of the PR label Jun 24, 2020
@semorrison
Copy link
Collaborator

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jun 25, 2020
bors bot pushed a commit that referenced this pull request Jun 25, 2020
## 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.
@bors
Copy link

bors bot commented Jun 25, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(algebra/*): small API fixes [Merged by Bors] - refactor(algebra/*): small API fixes Jun 25, 2020
@bors bors bot closed this Jun 25, 2020
@bors bors bot deleted the no-zero-div branch June 25, 2020 05:38
cipher1024 pushed a commit to cipher1024/mathlib that referenced this pull request Mar 15, 2022
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants