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] - feat(analysis/special_functions/pow): add nnreal variant of rpow_pos #11619

Closed
wants to merge 4 commits into from

Conversation

Ruben-VandeVelde
Copy link
Collaborator

This matches the lemma for ennreal.


Open in Gitpod

@Ruben-VandeVelde Ruben-VandeVelde added the awaiting-review The author would like community review of the PR label Jan 23, 2022
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jan 24, 2022
Ruben-VandeVelde and others added 3 commits January 24, 2022 11:37
Co-authored-by: Johan Commelin <johan@commelin.net>
@Ruben-VandeVelde Ruben-VandeVelde added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jan 24, 2022
@Ruben-VandeVelde
Copy link
Collaborator Author

Not sure if this is worth it:

 lemma ennreal.rpow_pos {p : ℝ} {x : ℝ≥0∞} (hx_pos : 0 < x) (hx_ne_top : x ≠ ⊤) : 0 < x^p :=
 begin
-  cases lt_or_le 0 p with hp_pos hp_nonpos,
-  { exact rpow_pos_of_nonneg hx_pos (le_of_lt hp_pos), },
-  { rw [←neg_neg p, rpow_neg, inv_pos],
-    exact rpow_ne_top_of_nonneg (by simp [hp_nonpos]) hx_ne_top, },
+  lift x to ℝ≥0 using hx_ne_top,
+  rw [ennreal.coe_pos] at hx_pos,
+  rw [ennreal.coe_rpow_of_ne_zero hx_pos.ne', ennreal.coe_pos],
+  exact nnreal.rpow_pos hx_pos,
 end

@jcommelin
Copy link
Member

I think it doesn't matter too much.

Let's get this merged.

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 Jan 24, 2022
bors bot pushed a commit that referenced this pull request Jan 24, 2022
@bors
Copy link

bors bot commented Jan 24, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(analysis/special_functions/pow): add nnreal variant of rpow_pos [Merged by Bors] - feat(analysis/special_functions/pow): add nnreal variant of rpow_pos Jan 24, 2022
@bors bors bot closed this Jan 24, 2022
@bors bors bot deleted the nnreal.rpow_pos branch January 24, 2022 16:59
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