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(data/real/ennreal): golf, generalize #14996

Closed
wants to merge 8 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Jun 27, 2022

Add new lemmas

  • ennreal.bit0_strict_mono, ennreal.bit0_injective, ennreal.bit0_lt_bit0, ennreal.bit0_le_bit0, ennreal.bit0_top;
  • ennreal.bit1_strict_mono, ennreal.bit1_injective, ennreal.bit1_lt_bit1, ennreal.bit1_le_bit1, ennreal.bit1_top;
  • ennreal.div_eq_inv_mul, ennreal.of_real_mul';
  • filter.eventually.prod_nhds.

Generalize lemmas

  • Drop unneeded assumption in real.to_nnreal_bit0 and ennreal.of_real_bit0.

Rename lemmas

  • ennreal.mul_div_cancelennreal.div_mul_cancel, fixing a TODO;
  • prod_is_open.mem_nhdsprod_mem_nhds: there are no open sets in the statement.

Other changes

  • Golf some proofs.
  • Avoid non-final simps here and there.
  • Move mul_inv_cancel etc up to use them in other proofs.
  • Move some to_nnreal lemmas above to_real lemmas, use them in to_real lemmas.
  • Use to_dual in order_iso.inv_ennreal.

Open in Gitpod

@urkud urkud added the awaiting-review The author would like community review of the PR label Jun 27, 2022
src/data/real/ennreal.lean Outdated Show resolved Hide resolved
src/data/real/ennreal.lean Outdated Show resolved Hide resolved
Copy link
Collaborator

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+
Thanks!

bors bot pushed a commit that referenced this pull request Jul 5, 2022
## Add new lemmas

* `ennreal.bit0_strict_mono`, `ennreal.bit0_injective`, `ennreal.bit0_lt_bit0`, `ennreal.bit0_le_bit0`, `ennreal.bit0_top`;
* `ennreal.bit1_strict_mono`, `ennreal.bit1_injective`, `ennreal.bit1_lt_bit1`, `ennreal.bit1_le_bit1`, `ennreal.bit1_top`;
* `ennreal.div_eq_inv_mul`, `ennreal.of_real_mul'`;
* `filter.eventually.prod_nhds`.

## Generalize lemmas

* Drop unneeded assumption in `real.to_nnreal_bit0` and `ennreal.of_real_bit0`.

## Rename lemmas

* `ennreal.mul_div_cancel` → `ennreal.div_mul_cancel`, fixing a TODO;
* `prod_is_open.mem_nhds` → `prod_mem_nhds`: there are no open sets in the statement.

## Other changes

* Golf some proofs.
* Avoid non-final `simp`s here and there.
* Move `mul_inv_cancel` etc up to use them in other proofs.
* Move some `to_nnreal` lemmas above `to_real` lemmas, use them in `to_real` lemmas.
* Use `to_dual` in `order_iso.inv_ennreal`.
@leanprover-community-bot-assistant leanprover-community-bot-assistant 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 Jul 5, 2022
@bors
Copy link

bors bot commented Jul 5, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(data/real/ennreal): golf, generalize [Merged by Bors] - refactor(data/real/ennreal): golf, generalize Jul 5, 2022
@bors bors bot closed this Jul 5, 2022
@bors bors bot deleted the YK-ennreal-bit branch July 5, 2022 10:10
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

3 participants