Skip to content

[Merged by Bors] - feat(Data/Real/EReal): add inverse and division of ENNReals - #14224

Closed
pitmonticone wants to merge 26 commits into
masterfrom
pitmonticone/ERealDiv
Closed

pitmonticone wants to merge 26 commits into
masterfrom
pitmonticone/ERealDiv

Conversation

@pitmonticone

@pitmonticone pitmonticone commented Jun 28, 2024 •

Copy link
Copy Markdown
Member

This PR adds API for inverse and division of extended reals.

Co-authored-by: @D-Thomine


Open in Gitpod

@github-actions

github-actions Bot commented Jun 28, 2024 •

Copy link
Copy Markdown

PR summary cbbfb55dff

Import changes

No significant changes to the import graph


Declarations diff

+ antitone_div_right_of_nonpos
+ bot_div_of_neg_ne_bot
+ bot_div_of_pos_ne_top
+ coe_div
+ coe_inv
+ div_bot
+ div_div
+ div_eq_inv_mul
+ div_le_div_right_of_nonneg
+ div_le_div_right_of_nonpos
+ div_le_iff_le_mul
+ div_lt_div_right_of_neg
+ div_lt_div_right_of_pos
+ div_mul_cancel
+ div_nonneg
+ div_nonneg_of_nonpos_of_nonpos
+ div_nonpos_of_nonneg_of_nonpos
+ div_nonpos_of_nonpos_of_nonneg
+ div_right_distrib_of_nonneg
+ div_self
+ div_top
+ div_zero
+ instance : DivInvMonoid EReal where inv := EReal.inv
+ instance : DivInvOneMonoid EReal
+ instance : Inv (EReal) := ⟨EReal.inv⟩
+ inv
+ inv_bot
+ inv_inv
+ inv_neg
+ inv_neg_of_neg_ne_bot
+ inv_nonneg_of_nonneg
+ inv_nonpos_of_nonpos
+ inv_pos_of_pos_ne_top
+ inv_top
+ inv_zero
+ le_div_iff_mul_le
+ monotone_div_right_of_nonneg
+ mul_div
+ mul_div_cancel
+ mul_div_mul_cancel
+ mul_div_right
+ mul_inv
+ sign_mul_inv_abs
+ sign_mul_inv_abs'
+ strictAnti_div_right_of_neg
+ strictMono_div_right_of_pos
+ top_div_of_neg_ne_bot
+ top_div_of_pos_ne_top
+ zero_div

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

@pitmonticone
pitmonticone marked this pull request as ready for review June 28, 2024 12:49
@pitmonticone
pitmonticone marked this pull request as draft June 28, 2024 12:53

@sgouezel sgouezel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's a bad idea to define a non-homogeneous division on EReal → ENNReal → EReal. Instead, as I discussed with Damien, one should define an homogeneous division on EReal, first be defining an inverse function and then using (a, b) -> a * b⁻¹.

@pitmonticone
pitmonticone marked this pull request as ready for review June 28, 2024 13:03
@pitmonticone pitmonticone changed the title feat(Data/Real/EReal): add division by ENNReals feat(Data/Real/EReal): add inverse of ENNReals Jun 28, 2024
@pitmonticone pitmonticone changed the title feat(Data/Real/EReal): add inverse of ENNReals feat(Data/Real/EReal): add inverse and division of ENNReals Jun 28, 2024
@pitmonticone
pitmonticone requested a review from sgouezel June 28, 2024 13:39
@sgouezel sgouezel added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jun 28, 2024
@pitmonticone

Copy link
Copy Markdown
Member Author

Yes, I believe that is the new API in BET/TopologicalEntropy.

@D-Thomine can you confirm?

@pitmonticone pitmonticone added awaiting-review and removed awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. labels Jun 29, 2024
@pitmonticone
pitmonticone requested a review from sgouezel June 29, 2024 23:16
Co-Authored-By: Lorenzo Luccioli <[email protected]>

@sgouezel sgouezel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks very good. Minor tweaks are required about the naming of lemmas, though.

Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
Comment thread Mathlib/Data/Real/EReal.lean Resolved
@sgouezel sgouezel added awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. and removed awaiting-review labels Jun 30, 2024
Co-Authored-By: Lorenzo Luccioli <[email protected]>
@pitmonticone

Copy link
Copy Markdown
Member Author

I should have addressed all review comments.

Thank you very much @sgouezel for your review!

@pitmonticone pitmonticone added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. labels Jun 30, 2024
@pitmonticone
pitmonticone requested a review from sgouezel June 30, 2024 10:24
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 30, 2024
@sgouezel

Copy link
Copy Markdown
Contributor

bors r+
Thanks!

@github-actions github-actions Bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jun 30, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Jun 30, 2024
This PR adds API for inverse and division  of extended reals. 

Co-authored-by: @D-Thomine
@mathlib-bors

mathlib-bors Bot commented Jun 30, 2024

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Data/Real/EReal): add inverse and division of ENNReals [Merged by Bors] - feat(Data/Real/EReal): add inverse and division of ENNReals Jun 30, 2024
@mathlib-bors mathlib-bors Bot closed this Jun 30, 2024
@mathlib-bors
mathlib-bors Bot deleted the pitmonticone/ERealDiv branch June 30, 2024 14:30
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
This PR adds API for inverse and division  of extended reals. 

Co-authored-by: @D-Thomine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants