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): prove measurability of rpow for ennreal #5026

Closed
wants to merge 9 commits into from

Conversation

RemyDegenne
Copy link
Collaborator

Prove measurability of rpow for an ennreal argument.
Also shorten the proof in the real case.


@RemyDegenne RemyDegenne added the awaiting-review The author would like community review of the PR label Nov 17, 2020
@RemyDegenne RemyDegenne 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 Nov 17, 2020
@RemyDegenne RemyDegenne 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 Nov 17, 2020
@fpvandoorn fpvandoorn 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 Nov 17, 2020
@RemyDegenne
Copy link
Collaborator Author

I removed all the subtypes and use only ite.
That 60 lines proof turned into 10 + a short lemma. Thanks @fpvandoorn !

@RemyDegenne RemyDegenne 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 Nov 18, 2020
src/analysis/special_functions/pow.lean Outdated Show resolved Hide resolved
Comment on lines 1452 to 1463
begin
refine ennreal.measurable_of_measurable_nnreal_prod _ _,
{ change measurable (λ (p : ℝ≥0 × ℝ), ↑(p.fst) ^ p.snd),
simp_rw ennreal.coe_rpow_def,
refine measurable.ite _ measurable_const nnreal.measurable_rpow.ennreal_coe,
exact is_measurable.inter (measurable_fst (is_measurable_singleton 0))
(measurable_snd is_measurable_Iio), },
{ change measurable (λ (x : ℝ), (⊤ : ennreal) ^ x),
simp_rw ennreal.top_rpow_def,
refine measurable.ite is_measurable_Ioi measurable_const _,
exact measurable.ite (is_measurable_singleton 0) measurable_const measurable_const, },
end
Copy link
Member

Choose a reason for hiding this comment

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

If you want, you can simplify the proof further like this: (but feel free to keep the old version if you think that is more readable)

Suggested change
begin
refine ennreal.measurable_of_measurable_nnreal_prod _ _,
{ change measurable (λ (p : ℝ≥0 × ℝ), ↑(p.fst) ^ p.snd),
simp_rw ennreal.coe_rpow_def,
refine measurable.ite _ measurable_const nnreal.measurable_rpow.ennreal_coe,
exact is_measurable.inter (measurable_fst (is_measurable_singleton 0))
(measurable_snd is_measurable_Iio), },
{ change measurable (λ (x : ℝ), (⊤ : ennreal) ^ x),
simp_rw ennreal.top_rpow_def,
refine measurable.ite is_measurable_Ioi measurable_const _,
exact measurable.ite (is_measurable_singleton 0) measurable_const measurable_const, },
end
begin
refine ennreal.measurable_of_measurable_nnreal_prod _ _,
{ simp_rw ennreal.coe_rpow_def,
refine measurable_const.ite _ nnreal.measurable_rpow.ennreal_coe,
exact (measurable_fst (is_measurable_singleton 0)).inter (measurable_snd is_measurable_Iio), },
{ simp_rw ennreal.top_rpow_def,
refine measurable_const.ite is_measurable_Ioi _,
exact measurable_const.ite (is_measurable_singleton 0) measurable_const, },
end

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 don't like the fact that this way to write measurable.ite does not respect the order of the arguments. But that lemma was so close to measurable.piecewise that I did not want to call it is_measurable.ite . Maybe I should?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But if I call it is_measurable.ite it suggests that the result is an is_measurable statement, so I won't change it. I will leave those measurable.ite _ _ _ as they are (I removed the change lines though).

Copy link
Member

Choose a reason for hiding this comment

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

I like the current name better than is_measurable.ite. It seems fine to not use the projection notation here.

@fpvandoorn fpvandoorn 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 Nov 18, 2020
RemyDegenne and others added 2 commits November 18, 2020 22:01
Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
@RemyDegenne RemyDegenne 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 Nov 18, 2020
@fpvandoorn
Copy link
Member

LGTM

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 Nov 18, 2020
bors bot pushed a commit that referenced this pull request Nov 18, 2020
… ennreal (#5026)

Prove measurability of rpow for an ennreal argument.
Also shorten the proof in the real case.



Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
@bors
Copy link

bors bot commented Nov 19, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(analysis/special_functions/pow): prove measurability of rpow for ennreal [Merged by Bors] - feat(analysis/special_functions/pow): prove measurability of rpow for ennreal Nov 19, 2020
@bors bors bot closed this Nov 19, 2020
@bors bors bot deleted the measurable_rpow_ennreal branch November 19, 2020 01:49
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