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(measure_theory/measurable_space): defining a measurable function on countably many pieces #11532
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
bors d+
@@ -571,6 +582,46 @@ begin | |||
exact measurable_set.Union (λ y, (hf y hs).prod (measurable_set_singleton y)) | |||
end | |||
|
|||
/-- A piecewise function on countably many pieces is measurable if all the data is measurable. -/ | |||
lemma measurable.find [measurable_space α] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a measurability
lemma? There are many hypothesis so the tactic is likely to be stuck after that, but at least it should suggest refine measurable.find _ _ _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works:
/-- A piecewise function on countably many pieces is measurable if all the data is measurable. -/
@[measurability]
lemma measurable.find {m : measurable_space α}
{f : ℕ → α → β} {p : ℕ → α → Prop} [∀ n, decidable_pred (p n)]
(hf : ∀ n, measurable (f n)) (hp : ∀ n, measurable_set {x | p n x}) (h : ∀ x, ∃ n, p n x) :
measurable (λ x, f (nat.find (h x)) x) :=
begin
have : measurable (λ (p : α × ℕ), f p.2 p.1) := measurable_from_prod_encodable (λ n, hf n),
exact this.comp (measurable.prod_mk measurable_id (measurable_find h hp)),
end
example {m : measurable_space α}
{f : ℕ → α → β} {p : ℕ → α → Prop} [∀ n, decidable_pred (p n)]
(hf : ∀ n, measurable (f n)) (hp : ∀ n, measurable_set {x | p n x}) (h : ∀ x, ∃ n, p n x) :
measurable (λ x, f (nat.find (h x)) x) :=
by measurability
And if I omit hp
in the example, it suggests Try this: refine measurable.find hf (λ (n : ℕ), _[n]) (λ (x : α), h x)
, which is not too bad.
✌️ sgouezel can now approve this pull request. To approve and merge a pull request, simply reply with |
Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
bors r+ |
… on countably many pieces (#11532) Also, remove `open_locale classical` in this file and add decidability assumptions where needed. And add a few isolated useful lemmas.
Pull request successfully merged into master. Build succeeded: |
Also, remove
open_locale classical
in this file and add decidability assumptions where needed. And add a few isolated useful lemmas.