Skip to content

Commit

Permalink
feat(order/liminf_limsup): define filter.blimsup, filter.bliminf (#…
Browse files Browse the repository at this point in the history
…16819)

Also characterise `cofinite.limsup` and `cofinite.liminf` for the lattice of sets.
  • Loading branch information
ocfnash committed Oct 13, 2022
1 parent 8b80caf commit 856cfd4
Show file tree
Hide file tree
Showing 14 changed files with 302 additions and 125 deletions.
2 changes: 1 addition & 1 deletion src/analysis/analytic/radius_liminf.lean
Expand Up @@ -27,7 +27,7 @@ variables (p : formal_multilinear_series 𝕜 E F)
/-- The radius of a formal multilinear series is equal to
$\liminf_{n\to\infty} \frac{1}{\sqrt[n]{∥p n∥}}$. The actual statement uses `ℝ≥0` and some
coercions. -/
lemma radius_eq_liminf : p.radius = liminf at_top (λ n, 1/((∥p n∥₊) ^ (1 / (n : ℝ)) : ℝ≥0)) :=
lemma radius_eq_liminf : p.radius = liminf (λ n, 1/((∥p n∥₊) ^ (1 / (n : ℝ)) : ℝ≥0)) at_top :=
begin
have : ∀ (r : ℝ≥0) {n : ℕ}, 0 < n →
((r : ℝ≥0∞) ≤ 1 / ↑(∥p n∥₊ ^ (1 / (n : ℝ))) ↔ ∥p n∥₊ * r ^ n ≤ 1),
Expand Down
5 changes: 3 additions & 2 deletions src/analysis/normed_space/spectrum.lean
Expand Up @@ -312,7 +312,7 @@ variables

/-- The `limsup` relationship for the spectral radius used to prove `spectrum.gelfand_formula`. -/
lemma limsup_pow_nnnorm_pow_one_div_le_spectral_radius (a : A) :
limsup at_top (λ n : ℕ, ↑∥a ^ n∥₊ ^ (1 / n : ℝ)) ≤ spectral_radius ℂ a :=
limsup (λ n : ℕ, ↑∥a ^ n∥₊ ^ (1 / n : ℝ)) at_top ≤ spectral_radius ℂ a :=
begin
refine ennreal.inv_le_inv.mp (le_of_forall_pos_nnreal_lt (λ r r_pos r_lt, _)),
simp_rw [inv_limsup, ←one_div],
Expand All @@ -321,7 +321,8 @@ begin
suffices h : (r : ℝ≥0∞) ≤ p.radius,
{ convert h,
simp only [p.radius_eq_liminf, ←norm_to_nnreal, norm_mk_pi_field],
refine congr_arg _ (funext (λ n, congr_arg _ _)),
congr,
ext n,
rw [norm_to_nnreal, ennreal.coe_rpow_def (∥a ^ n∥₊) (1 / n : ℝ), if_neg],
exact λ ha, by linarith [ha.2, (one_div_nonneg.mpr n.cast_nonneg : 0 ≤ (1 / n : ℝ))], },
{ have H₁ := (differentiable_on_inverse_one_sub_smul r_lt).has_fpower_series_on_ball r_pos,
Expand Down
12 changes: 6 additions & 6 deletions src/measure_theory/constructions/borel_space.lean
Expand Up @@ -1243,7 +1243,7 @@ end
-/
lemma measurable_liminf' {ι ι'} {f : ι → δ → α} {u : filter ι} (hf : ∀ i, measurable (f i))
{p : ι' → Prop} {s : ι' → set ι} (hu : u.has_countable_basis p s) (hs : ∀ i, (s i).countable) :
measurable (λ x, liminf u (λ i, f i x)) :=
measurable (λ x, liminf (λ i, f i x) u) :=
begin
simp_rw [hu.to_has_basis.liminf_eq_supr_infi],
refine measurable_bsupr _ hu.countable _,
Expand All @@ -1254,7 +1254,7 @@ end
-/
lemma measurable_limsup' {ι ι'} {f : ι → δ → α} {u : filter ι} (hf : ∀ i, measurable (f i))
{p : ι' → Prop} {s : ι' → set ι} (hu : u.has_countable_basis p s) (hs : ∀ i, (s i).countable) :
measurable (λ x, limsup u (λ i, f i x)) :=
measurable (λ x, limsup (λ i, f i x) u) :=
begin
simp_rw [hu.to_has_basis.limsup_eq_infi_supr],
refine measurable_binfi _ hu.countable _,
Expand All @@ -1265,14 +1265,14 @@ end
-/
@[measurability]
lemma measurable_liminf {f : ℕ → δ → α} (hf : ∀ i, measurable (f i)) :
measurable (λ x, liminf at_top (λ i, f i x)) :=
measurable (λ x, liminf (λ i, f i x) at_top) :=
measurable_liminf' hf at_top_countable_basis (λ i, to_countable _)

/-- `limsup` over `ℕ` is measurable. See `measurable_limsup'` for a version with a general filter.
-/
@[measurability]
lemma measurable_limsup {f : ℕ → δ → α} (hf : ∀ i, measurable (f i)) :
measurable (λ x, limsup at_top (λ i, f i x)) :=
measurable (λ x, limsup (λ i, f i x) at_top) :=
measurable_limsup' hf at_top_countable_basis (λ i, to_countable _)

end complete_linear_order
Expand Down Expand Up @@ -1900,10 +1900,10 @@ lemma measurable_of_tendsto_ennreal' {ι} {f : ι → α → ℝ≥0∞} {g : α
begin
rcases u.exists_seq_tendsto with ⟨x, hx⟩,
rw [tendsto_pi_nhds] at lim,
have : (λ y, liminf at_top (λ n, (f (x n) y : ℝ≥0∞))) = g :=
have : (λ y, liminf (λ n, (f (x n) y : ℝ≥0∞)) at_top) = g :=
by { ext1 y, exact ((lim y).comp hx).liminf_eq, },
rw ← this,
show measurable (λ y, liminf at_top (λ n, (f (x n) y : ℝ≥0∞))),
show measurable (λ y, liminf (λ n, (f (x n) y : ℝ≥0∞)) at_top),
exact measurable_liminf (λ n, hf (x n)),
end

Expand Down
14 changes: 7 additions & 7 deletions src/measure_theory/function/lp_space.lean
Expand Up @@ -1433,7 +1433,7 @@ variables [measurable_space E] [opens_measurable_space E] {R : ℝ≥0}

lemma ae_bdd_liminf_at_top_rpow_of_snorm_bdd {p : ℝ≥0∞}
{f : ℕ → α → E} (hfmeas : ∀ n, measurable (f n)) (hbdd : ∀ n, snorm (f n) p μ ≤ R) :
∀ᵐ x ∂μ, liminf at_top (λ n, (∥f n x∥₊ ^ p.to_real : ℝ≥0∞)) < ∞ :=
∀ᵐ x ∂μ, liminf (λ n, (∥f n x∥₊ ^ p.to_real : ℝ≥0∞)) at_top < ∞ :=
begin
by_cases hp0 : p.to_real = 0,
{ simp only [hp0, ennreal.rpow_zero],
Expand All @@ -1456,7 +1456,7 @@ end

lemma ae_bdd_liminf_at_top_of_snorm_bdd {p : ℝ≥0∞} (hp : p ≠ 0)
{f : ℕ → α → E} (hfmeas : ∀ n, measurable (f n)) (hbdd : ∀ n, snorm (f n) p μ ≤ R) :
∀ᵐ x ∂μ, liminf at_top (λ n, (∥f n x∥₊ : ℝ≥0∞)) < ∞ :=
∀ᵐ x ∂μ, liminf (λ n, (∥f n x∥₊ : ℝ≥0∞)) at_top < ∞ :=
begin
by_cases hp' : p = ∞,
{ subst hp',
Expand All @@ -1470,14 +1470,14 @@ begin
(ennreal.add_lt_top.2 ⟨ennreal.coe_lt_top, ennreal.one_lt_top⟩) },
filter_upwards [ae_bdd_liminf_at_top_rpow_of_snorm_bdd hfmeas hbdd] with x hx,
have hppos : 0 < p.to_real := ennreal.to_real_pos hp hp',
have : liminf at_top (λ n, (∥f n x∥₊ ^ p.to_real : ℝ≥0∞)) =
liminf at_top (λ n, (∥f n x∥₊ : ℝ≥0∞)) ^ p.to_real,
{ change liminf at_top (λ n, ennreal.order_iso_rpow p.to_real hppos (∥f n x∥₊ : ℝ≥0∞)) =
ennreal.order_iso_rpow p.to_real hppos (liminf at_top (λ n, (∥f n x∥₊ : ℝ≥0∞))),
have : liminf (λ n, (∥f n x∥₊ ^ p.to_real : ℝ≥0∞)) at_top =
(liminf (λ n, (∥f n x∥₊ : ℝ≥0∞)) at_top)^ p.to_real,
{ change liminf (λ n, ennreal.order_iso_rpow p.to_real hppos (∥f n x∥₊ : ℝ≥0∞)) at_top =
ennreal.order_iso_rpow p.to_real hppos (liminf (λ n, (∥f n x∥₊ : ℝ≥0∞)) at_top),
refine (order_iso.liminf_apply (ennreal.order_iso_rpow p.to_real _) _ _ _ _).symm;
is_bounded_default },
rw this at hx,
rw [← ennreal.rpow_one (liminf at_top (λ n, ∥f n x∥₊)), ← mul_inv_cancel hppos.ne.symm,
rw [← ennreal.rpow_one (liminf (λ n, ∥f n x∥₊) at_top), ← mul_inv_cancel hppos.ne.symm,
ennreal.rpow_mul],
exact ennreal.rpow_lt_top_of_nonneg (inv_nonneg.2 hppos.le) hx.ne,
end
Expand Down
18 changes: 9 additions & 9 deletions src/measure_theory/integral/lebesgue.lean
Expand Up @@ -1866,9 +1866,9 @@ lintegral_infi_ae h_meas (λ n, ae_of_all _ $ h_anti n.le_succ) h_fin

/-- Known as Fatou's lemma, version with `ae_measurable` functions -/
lemma lintegral_liminf_le' {f : ℕ → α → ℝ≥0∞} (h_meas : ∀n, ae_measurable (f n) μ) :
∫⁻ a, liminf at_top (λ n, f n a) ∂μ ≤ liminf at_top (λ n, ∫⁻ a, f n a ∂μ) :=
∫⁻ a, liminf (λ n, f n a) at_top ∂μ ≤ liminf (λ n, ∫⁻ a, f n a ∂μ) at_top :=
calc
∫⁻ a, liminf at_top (λ n, f n a) ∂μ = ∫⁻ a, ⨆n:ℕ, ⨅i≥n, f i a ∂μ :
∫⁻ a, liminf (λ n, f n a) at_top ∂μ = ∫⁻ a, ⨆n:ℕ, ⨅i≥n, f i a ∂μ :
by simp only [liminf_eq_supr_infi_of_nat]
... = ⨆n:ℕ, ∫⁻ a, ⨅i≥n, f i a ∂μ :
lintegral_supr'
Expand All @@ -1880,14 +1880,14 @@ calc

/-- Known as Fatou's lemma -/
lemma lintegral_liminf_le {f : ℕ → α → ℝ≥0∞} (h_meas : ∀n, measurable (f n)) :
∫⁻ a, liminf at_top (λ n, f n a) ∂μ ≤ liminf at_top (λ n, ∫⁻ a, f n a ∂μ) :=
∫⁻ a, liminf (λ n, f n a) at_top ∂μ ≤ liminf (λ n, ∫⁻ a, f n a ∂μ) at_top :=
lintegral_liminf_le' (λ n, (h_meas n).ae_measurable)

lemma limsup_lintegral_le {f : ℕ → α → ℝ≥0∞} {g : α → ℝ≥0∞}
(hf_meas : ∀ n, measurable (f n)) (h_bound : ∀n, f n ≤ᵐ[μ] g) (h_fin : ∫⁻ a, g a ∂μ ≠ ∞) :
limsup at_top (λn, ∫⁻ a, f n a ∂μ) ≤ ∫⁻ a, limsup at_top (λn, f n a) ∂μ :=
limsup (λn, ∫⁻ a, f n a ∂μ) at_top ≤ ∫⁻ a, limsup (λn, f n a) at_top ∂μ :=
calc
limsup at_top (λn, ∫⁻ a, f n a ∂μ) = ⨅n:ℕ, ⨆i≥n, ∫⁻ a, f i a ∂μ :
limsup (λn, ∫⁻ a, f n a ∂μ) at_top = ⨅n:ℕ, ⨆i≥n, ∫⁻ a, f i a ∂μ :
limsup_eq_infi_supr_of_nat
... ≤ ⨅n:ℕ, ∫⁻ a, ⨆i≥n, f i a ∂μ :
infi_mono $ assume n, supr₂_lintegral_le _
Expand All @@ -1900,7 +1900,7 @@ calc
refine (ae_all_iff.2 h_bound).mono (λ n hn, _),
exact supr_le (λ i, supr_le $ λ hi, hn i) }
end
... = ∫⁻ a, limsup at_top (λn, f n a) ∂μ :
... = ∫⁻ a, limsup (λn, f n a) at_top ∂μ :
by simp only [limsup_eq_infi_supr_of_nat]

/-- Dominated convergence theorem for nonnegative functions -/
Expand All @@ -1911,10 +1911,10 @@ lemma tendsto_lintegral_of_dominated_convergence
(h_lim : ∀ᵐ a ∂μ, tendsto (λ n, F n a) at_top (𝓝 (f a))) :
tendsto (λn, ∫⁻ a, F n a ∂μ) at_top (𝓝 (∫⁻ a, f a ∂μ)) :=
tendsto_of_le_liminf_of_limsup_le
(calc ∫⁻ a, f a ∂μ = ∫⁻ a, liminf at_top (λ (n : ℕ), F n a) ∂μ :
(calc ∫⁻ a, f a ∂μ = ∫⁻ a, liminf (λ (n : ℕ), F n a) at_top ∂μ :
lintegral_congr_ae $ h_lim.mono $ assume a h, h.liminf_eq.symm
... ≤ liminf at_top (λ n, ∫⁻ a, F n a ∂μ) : lintegral_liminf_le hF_meas)
(calc limsup at_top (λ (n : ℕ), ∫⁻ a, F n a ∂μ) ≤ ∫⁻ a, limsup at_top (λn, F n a) ∂μ :
... ≤ liminf (λ n, ∫⁻ a, F n a ∂μ) at_top : lintegral_liminf_le hF_meas)
(calc limsup (λ (n : ℕ), ∫⁻ a, F n a ∂μ) at_top ≤ ∫⁻ a, limsup (λn, F n a) at_top ∂μ :
limsup_lintegral_le hF_meas h_bound h_fin
... = ∫⁻ a, f a ∂μ : lintegral_congr_ae $ h_lim.mono $ λ a h, h.limsup_eq)

Expand Down
Expand Up @@ -1063,7 +1063,7 @@ lemma le_measure_compl_liminf_of_limsup_measure_le
begin
by_cases L_bot : L = ⊥,
{ simp only [L_bot, le_top,
(show liminf (λ i, μs i Eᶜ) = ⊤, by simp only [liminf, filter.map_bot, Liminf_bot])], },
(show liminf (λ i, μs i Eᶜ) = ⊤, by simp only [liminf, filter.map_bot, Liminf_bot])], },
haveI : L.ne_bot, from {ne' := L_bot},
have meas_Ec : μ Eᶜ = 1 - μ E,
{ simpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne, },
Expand Down Expand Up @@ -1094,7 +1094,7 @@ lemma limsup_measure_compl_le_of_le_liminf_measure
begin
by_cases L_bot : L = ⊥,
{ simp only [L_bot, bot_le,
(show limsup (λ i, μs i Eᶜ) = ⊥, by simp only [limsup, filter.map_bot, Limsup_bot])], },
(show limsup (λ i, μs i Eᶜ) = ⊥, by simp only [limsup, filter.map_bot, Limsup_bot])], },
haveI : L.ne_bot, from {ne' := L_bot},
have meas_Ec : μ Eᶜ = 1 - μ E,
{ simpa only [measure_univ] using measure_compl E_mble (measure_lt_top μ E).ne, },
Expand Down
14 changes: 7 additions & 7 deletions src/measure_theory/measure/hausdorff.lean
Expand Up @@ -514,7 +514,7 @@ lemma mk_metric_le_liminf_tsum {β : Type*} {ι : β → Type*} [∀ n, countabl
{l : filter β} (r : β → ℝ≥0∞) (hr : tendsto r l (𝓝 0)) (t : Π (n : β), ι n → set X)
(ht : ∀ᶠ n in l, ∀ i, diam (t n i) ≤ r n) (hst : ∀ᶠ n in l, s ⊆ ⋃ i, t n i)
(m : ℝ≥0∞ → ℝ≥0∞) :
mk_metric m s ≤ liminf l (λ n, ∑' i, m (diam (t n i))) :=
mk_metric m s ≤ liminf (λ n, ∑' i, m (diam (t n i))) l :=
begin
haveI : Π n, encodable (ι n) := λ n, encodable.of_countable _,
simp only [mk_metric_apply],
Expand All @@ -541,7 +541,7 @@ lemma mk_metric_le_liminf_sum {β : Type*} {ι : β → Type*} [hι : ∀ n, fin
{l : filter β} (r : β → ℝ≥0∞) (hr : tendsto r l (𝓝 0)) (t : Π (n : β), ι n → set X)
(ht : ∀ᶠ n in l, ∀ i, diam (t n i) ≤ r n) (hst : ∀ᶠ n in l, s ⊆ ⋃ i, t n i)
(m : ℝ≥0∞ → ℝ≥0∞) :
mk_metric m s ≤ liminf l (λ n, ∑ i, m (diam (t n i))) :=
mk_metric m s ≤ liminf (λ n, ∑ i, m (diam (t n i))) l :=
by simpa only [tsum_fintype] using mk_metric_le_liminf_tsum s r hr t ht hst m

/-!
Expand Down Expand Up @@ -571,7 +571,7 @@ lemma hausdorff_measure_le_liminf_tsum {β : Type*} {ι : β → Type*} [hι :
(d : ℝ) (s : set X)
{l : filter β} (r : β → ℝ≥0∞) (hr : tendsto r l (𝓝 0)) (t : Π (n : β), ι n → set X)
(ht : ∀ᶠ n in l, ∀ i, diam (t n i) ≤ r n) (hst : ∀ᶠ n in l, s ⊆ ⋃ i, t n i) :
μH[d] s ≤ liminf l (λ n, ∑' i, diam (t n i) ^ d) :=
μH[d] s ≤ liminf (λ n, ∑' i, diam (t n i) ^ d) l :=
mk_metric_le_liminf_tsum s r hr t ht hst _

/-- To bound the Hausdorff measure of a set, one may use coverings with maximum diameter tending
Expand All @@ -580,7 +580,7 @@ lemma hausdorff_measure_le_liminf_sum {β : Type*} {ι : β → Type*} [hι :
(d : ℝ) (s : set X)
{l : filter β} (r : β → ℝ≥0∞) (hr : tendsto r l (𝓝 0)) (t : Π (n : β), ι n → set X)
(ht : ∀ᶠ n in l, ∀ i, diam (t n i) ≤ r n) (hst : ∀ᶠ n in l, s ⊆ ⋃ i, t n i) :
μH[d] s ≤ liminf l (λ n, ∑ i, diam (t n i) ^ d) :=
μH[d] s ≤ liminf (λ n, ∑ i, diam (t n i) ^ d) l :=
mk_metric_le_liminf_sum s r hr t ht hst _

/-- If `d₁ < d₂`, then for any set `s` we have either `μH[d₂] s = 0`, or `μH[d₁] s = ∞`. -/
Expand Down Expand Up @@ -753,18 +753,18 @@ begin
... ≤ (a i : ℝ) + (⌊(x i - a i) * n⌋₊ + 1) / n :
add_le_add le_rfl ((div_le_div_right npos).2 (nat.lt_floor_add_one _).le) } },
calc μH[fintype.card ι] (set.pi univ (λ (i : ι), Ioo (a i : ℝ) (b i)))
≤ liminf at_top (λ (n : ℕ), ∑ (i : γ n), diam (t n i) ^ ↑(fintype.card ι)) :
≤ liminf (λ (n : ℕ), ∑ (i : γ n), diam (t n i) ^ ↑(fintype.card ι)) at_top :
hausdorff_measure_le_liminf_sum _ (set.pi univ (λ i, Ioo (a i : ℝ) (b i)))
(λ (n : ℕ), 1/(n : ℝ≥0∞)) A t B C
... ≤ liminf at_top (λ (n : ℕ), ∑ (i : γ n), (1/n) ^ (fintype.card ι)) :
... ≤ liminf (λ (n : ℕ), ∑ (i : γ n), (1/n) ^ (fintype.card ι)) at_top :
begin
refine liminf_le_liminf _ (by is_bounded_default),
filter_upwards [B] with _ hn,
apply finset.sum_le_sum (λ i _, _),
rw ennreal.rpow_nat_cast,
exact pow_le_pow_of_le_left' (hn i) _,
end
... = liminf at_top (λ (n : ℕ), ∏ (i : ι), (⌈((b i : ℝ) - a i) * n⌉₊ : ℝ≥0∞) / n) :
... = liminf (λ (n : ℕ), ∏ (i : ι), (⌈((b i : ℝ) - a i) * n⌉₊ : ℝ≥0∞) / n) at_top :
begin
simp only [finset.card_univ, nat.cast_prod, one_mul, fintype.card_fin,
finset.sum_const, nsmul_eq_mul, fintype.card_pi, div_eq_mul_inv, finset.prod_mul_distrib,
Expand Down
4 changes: 2 additions & 2 deletions src/measure_theory/measure/measure_space.lean
Expand Up @@ -503,13 +503,13 @@ end

/-- One direction of the **Borel-Cantelli lemma**: if (sᵢ) is a sequence of sets such
that `∑ μ sᵢ` is finite, then the limit superior of the `sᵢ` is a null set. -/
lemma measure_limsup_eq_zero {s : ℕ → set α} (hs : ∑' i, μ (s i) ≠ ∞) : μ (limsup at_top s) = 0 :=
lemma measure_limsup_eq_zero {s : ℕ → set α} (hs : ∑' i, μ (s i) ≠ ∞) : μ (limsup s at_top) = 0 :=
begin
-- First we replace the sequence `sₙ` with a sequence of measurable sets `tₙ ⊇ sₙ` of the same
-- measure.
set t : ℕ → set α := λ n, to_measurable μ (s n),
have ht : ∑' i, μ (t i) ≠ ∞, by simpa only [t, measure_to_measurable] using hs,
suffices : μ (limsup at_top t) = 0,
suffices : μ (limsup t at_top) = 0,
{ have A : s ≤ t := λ n, subset_to_measurable μ (s n),
-- TODO default args fail
exact measure_mono_null (limsup_le_limsup (eventually_of_forall (pi.le_def.mp A))
Expand Down

0 comments on commit 856cfd4

Please sign in to comment.