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

Commit 48dc249

Browse files
committed
feat(measure_theory/measure): +1 version of Borel-Cantelli, drop an assumption (#9678)
* In all versions of Borel-Cantelli lemma, do not require that the sets are measurable. * Add +1 version. * Golf proofs.
1 parent 3f15148 commit 48dc249

File tree

1 file changed

+36
-33
lines changed

1 file changed

+36
-33
lines changed

src/measure_theory/measure/measure_space.lean

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -378,26 +378,30 @@ begin
378378
exact tendsto_at_top_infi (assume n m hnm, measure_mono $ hm hnm),
379379
end
380380

381-
/-- One direction of the **Borel-Cantelli lemma**: if (sᵢ) is a sequence of measurable sets such
382-
that ∑ μ sᵢ exists, then the limit superior of the sᵢ is a null set. -/
383-
lemma measure_limsup_eq_zero {s : ℕ → set α} (hs : ∀ i, measurable_set (s i))
384-
(hs' : ∑' i, μ (s i) ≠ ∞) : μ (limsup at_top s) = 0 :=
385-
begin
386-
simp only [limsup_eq_infi_supr_of_nat', set.infi_eq_Inter, set.supr_eq_Union],
387-
-- We will show that both `μ (⨅ n, ⨆ i, s (i + n))` and `0` are the limit of `μ (⊔ i, s (i + n))`
388-
-- as `n` tends to infinity. For the former, we use continuity from above.
389-
refine tendsto_nhds_unique
390-
(tendsto_measure_Inter (λ i, measurable_set.Union (λ b, hs (b + i))) _
391-
0, ne_top_of_le_ne_top hs' (measure_Union_le s)⟩) _,
392-
{ intros n m hnm x,
393-
simp only [set.mem_Union],
394-
exact λ ⟨i, hi⟩, ⟨i + (m - n), by simpa only [add_assoc, nat.sub_add_cancel hnm] using hi⟩ },
395-
{ -- For the latter, notice that, `μ (⨆ i, s (i + n)) ≤ ∑' s (i + n)`. Since the right hand side
396-
-- converges to `0` by hypothesis, so does the former and the proof is complete.
397-
exact (tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds
398-
(ennreal.tendsto_sum_nat_add (μ ∘ s) hs')
399-
(eventually_of_forall (by simp only [forall_const, zero_le]))
400-
(eventually_of_forall (λ i, measure_Union_le _))) }
381+
/-- One direction of the **Borel-Cantelli lemma**: if (sᵢ) is a sequence of sets such
382+
that `∑ μ sᵢ` is finite, then the limit superior of the `sᵢ` is a null set. -/
383+
lemma measure_limsup_eq_zero {s : ℕ → set α} (hs : ∑' i, μ (s i) ≠ ∞) : μ (limsup at_top s) = 0 :=
384+
begin
385+
-- First we replace the sequence `sₙ` with a sequence of measurable sets `tₙ ⊇ sₙ` of the same
386+
-- measure.
387+
set t : ℕ → set α := λ n, to_measurable μ (s n),
388+
have ht : ∑' i, μ (t i) ≠ ∞, by simpa only [t, measure_to_measurable] using hs,
389+
suffices : μ (limsup at_top t) = 0,
390+
{ have A : s ≤ t := λ n, subset_to_measurable μ (s n),
391+
-- TODO default args fail
392+
exact measure_mono_null (limsup_le_limsup (eventually_of_forall A) is_cobounded_le_of_bot
393+
is_bounded_le_of_top) this },
394+
-- Next we unfold `limsup` for sets and replace equality with an inequality
395+
simp only [limsup_eq_infi_supr_of_nat', set.infi_eq_Inter, set.supr_eq_Union,
396+
← nonpos_iff_eq_zero],
397+
-- Finally, we estimate `μ (⋃ i, t (i + n))` by `∑ i', μ (t (i + n))`
398+
refine le_of_tendsto_of_tendsto'
399+
(tendsto_measure_Inter (λ i, measurable_set.Union (λ b, measurable_set_to_measurable _ _)) _
400+
0, ne_top_of_le_ne_top ht (measure_Union_le t)⟩)
401+
(ennreal.tendsto_sum_nat_add (μ ∘ t) ht) (λ n, measure_Union_le _),
402+
intros n m hnm x,
403+
simp only [set.mem_Union],
404+
exact λ ⟨i, hi⟩, ⟨i + (m - n), by simpa only [add_assoc, nat.sub_add_cancel hnm] using hi⟩
401405
end
402406

403407
lemma measure_if {x : β} {t : set β} {s : set α} :
@@ -1556,20 +1560,19 @@ lemma self_mem_ae_restrict {s} (hs : measurable_set s) : s ∈ (μ.restrict s).a
15561560
by simp only [ae_restrict_eq hs, exists_prop, mem_principal, mem_inf_iff];
15571561
exact ⟨_, univ_mem, s, subset.rfl, (univ_inter s).symm⟩
15581562

1559-
/-- A version of the Borel-Cantelli lemma: if `sᵢ` is a sequence of measurable sets such that
1563+
/-- A version of the **Borel-Cantelli lemma**: if `pᵢ` is a sequence of predicates such that
1564+
`∑ μ {x | pᵢ x}` is finite, then the measure of `x` such that `pᵢ x` holds frequently as `i → ∞` (or
1565+
equivalently, `pᵢ x` holds for infinitely many `i`) is equal to zero. -/
1566+
lemma measure_set_of_frequently_eq_zero {p : ℕ → α → Prop} (hp : ∑' i, μ {x | p i x} ≠ ∞) :
1567+
μ {x | ∃ᶠ n in at_top, p n x} = 0 :=
1568+
by simpa only [limsup_eq_infi_supr_of_nat, frequently_at_top, set_of_forall, set_of_exists]
1569+
using measure_limsup_eq_zero hp
1570+
1571+
/-- A version of the **Borel-Cantelli lemma**: if `sᵢ` is a sequence of sets such that
15601572
`∑ μ sᵢ` exists, then for almost all `x`, `x` does not belong to almost all `sᵢ`. -/
1561-
lemma ae_eventually_not_mem {s : ℕ → set α} (hs : ∀ i, measurable_set (s i))
1562-
(hs' : ∑' i, μ (s i) ≠ ∞) : ∀ᵐ x ∂ μ, ∀ᶠ n in at_top, x ∉ s n :=
1563-
begin
1564-
refine measure_mono_null _ (measure_limsup_eq_zero hs hs'),
1565-
rw ←set.le_eq_subset,
1566-
refine le_Inf (λ t ht x hx, _),
1567-
simp only [le_eq_subset, not_exists, eventually_map, exists_prop, ge_iff_le, mem_set_of_eq,
1568-
eventually_at_top, mem_compl_eq, not_forall, not_not_mem] at hx ht,
1569-
rcases ht with ⟨i, hi⟩,
1570-
rcases hx i with ⟨j, ⟨hj, hj'⟩⟩,
1571-
exact hi j hj hj'
1572-
end
1573+
lemma ae_eventually_not_mem {s : ℕ → set α} (hs : ∑' i, μ (s i) ≠ ∞) :
1574+
∀ᵐ x ∂ μ, ∀ᶠ n in at_top, x ∉ s n :=
1575+
measure_set_of_frequently_eq_zero hs
15731576

15741577
section dirac
15751578
variable [measurable_space α]

0 commit comments

Comments
 (0)