Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(data/real/ennreal): add ennreal.to_(nn)real_inv and ennreal.to_(nn)real_div #9144

Closed
wants to merge 1 commit into from

Conversation

RemyDegenne
Copy link
Collaborator


Open in Gitpod

@@ -1489,6 +1505,12 @@ lemma to_real_prod {ι : Type*} {s : finset ι} {f : ι → ℝ≥0∞} :
(∏ i in s, f i).to_real = ∏ i in s, (f i).to_real :=
to_real_hom.map_prod _ _

lemma to_real_inv (a : ℝ≥0∞) : (a⁻¹).to_real = (a.to_real)⁻¹ :=
by { simp_rw ennreal.to_real, norm_cast, exact to_nnreal_inv a, }
Copy link
Member

Choose a reason for hiding this comment

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

Can you prove this with monoid_with_zero_hom.map_inv'? I'm pretty sure to_real_hom can be promoted to that stronger type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ennreal doesn't have the required instance: failed to synthesize type class instance for group_with_zero ℝ≥0∞

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I mean that I can indeed promote to_nnreal_hom to a monoid_with_zero_hom, but I cannot use map_inv'

@sgouezel
Copy link
Collaborator

bors r+
Thanks!

@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 Sep 11, 2021
bors bot pushed a commit that referenced this pull request Sep 11, 2021
@bors
Copy link

bors bot commented Sep 11, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/real/ennreal): add ennreal.to_(nn)real_inv and ennreal.to_(nn)real_div [Merged by Bors] - feat(data/real/ennreal): add ennreal.to_(nn)real_inv and ennreal.to_(nn)real_div Sep 11, 2021
@bors bors bot closed this Sep 11, 2021
@bors bors bot deleted the to_real_inv branch September 11, 2021 21:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

3 participants