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

Commit 38ba6ba

Browse files
committed
chore(data/real/{e,}nnreal): a few lemmas (#5530)
* Rename `nnreal.le_of_forall_lt_one_mul_lt` to `nnreal.le_of_forall_lt_one_mul_le`, and similarly for `ennreal`. * Move the proof of the latter lemma to `topology/instances/ennreal`, prove it using continuity of multiplication. * Add `ennreal.le_of_forall_nnreal_lt`, `nnreal.lt_div_iff`, and `nnreal.mul_lt_of_lt_div`.
1 parent c82be35 commit 38ba6ba

File tree

4 files changed

+27
-19
lines changed

4 files changed

+27
-19
lines changed

src/data/real/ennreal.lean

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,23 +1039,12 @@ mul_comm a a⁻¹ ▸ mul_inv_cancel h0 ht
10391039
lemma mul_le_iff_le_inv {a b r : ennreal} (hr₀ : r ≠ 0) (hr₁ : r ≠ ∞) : (r * a ≤ b ↔ a ≤ r⁻¹ * b) :=
10401040
by rw [← @ennreal.mul_le_mul_left _ a _ hr₀ hr₁, ← mul_assoc, mul_inv_cancel hr₀ hr₁, one_mul]
10411041

1042-
lemma le_of_forall_lt_one_mul_lt : ∀{x y : ennreal}, (∀a<1, a * x ≤ y) → x ≤ y :=
1043-
forall_ennreal.2 $ and.intro
1044-
(assume r, forall_ennreal.2 $ and.intro
1045-
(assume q h, coe_le_coe.2 $ nnreal.le_of_forall_lt_one_mul_lt $ assume a ha,
1046-
begin rw [← coe_le_coe, coe_mul], exact h _ (coe_lt_coe.2 ha) end)
1047-
(assume h, le_top))
1048-
(assume r hr,
1049-
have ((1 / 2 : ℝ≥0) : ennreal) * ∞ ≤ r :=
1050-
hr _ (coe_lt_coe.2 ((@nnreal.coe_lt_coe (1/2) 1).1 one_half_lt_one)),
1051-
have ne : ((1 / 2 : ℝ≥0) : ennreal) ≠ 0,
1052-
begin
1053-
rw [(≠), coe_eq_zero],
1054-
refine zero_lt_iff_ne_zero.1 _,
1055-
show 0 < (1 / 2 : ℝ),
1056-
linarith,
1057-
end,
1058-
by rwa [mul_top, if_neg ne] at this)
1042+
lemma le_of_forall_nnreal_lt {x y : ennreal} (h : ∀ r : ℝ≥0, ↑r < x → ↑r ≤ y) : x ≤ y :=
1043+
begin
1044+
refine le_of_forall_ge_of_dense (λ r hr, _),
1045+
lift r to ℝ≥0 using ne_top_of_lt hr,
1046+
exact h r hr
1047+
end
10591048

10601049
lemma div_add_div_same {a b c : ennreal} : a / c + b / c = (a + b) / c :=
10611050
eq.symm $ right_distrib a b (c⁻¹)

src/data/real/nnreal.lean

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,17 @@ by rw [div_def, mul_comm, ← mul_le_iff_le_inv hr, mul_comm]
572572
lemma div_le_iff {a b r : ℝ≥0} (hr : r ≠ 0) : a / r ≤ b ↔ a ≤ b * r :=
573573
@div_le_iff ℝ _ a r b $ zero_lt_iff_ne_zero.2 hr
574574

575-
lemma le_of_forall_lt_one_mul_lt {x y : ℝ≥0} (h : ∀a<1, a * x ≤ y) : x ≤ y :=
575+
lemma lt_div_iff {a b r : ℝ≥0} (hr : r ≠ 0) : a < b / r ↔ a * r < b :=
576+
lt_iff_lt_of_le_iff_le (div_le_iff hr)
577+
578+
lemma mul_lt_of_lt_div {a b r : ℝ≥0} (h : a < b / r) : a * r < b :=
579+
begin
580+
refine (lt_div_iff $ λ hr, false.elim _).1 h,
581+
subst r,
582+
simpa using h
583+
end
584+
585+
lemma le_of_forall_lt_one_mul_le {x y : ℝ≥0} (h : ∀a<1, a * x ≤ y) : x ≤ y :=
576586
le_of_forall_ge_of_dense $ assume a ha,
577587
have hx : x ≠ 0 := zero_lt_iff_ne_zero.1 (lt_of_le_of_lt (zero_le _) ha),
578588
have hx' : x⁻¹ ≠ 0, by rwa [(≠), inv_eq_zero],

src/measure_theory/integration.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ begin
938938
refine le_antisymm _ (supr_lintegral_le _),
939939
rw [lintegral_eq_nnreal],
940940
refine supr_le (assume s, supr_le (assume hsf, _)),
941-
refine ennreal.le_of_forall_lt_one_mul_lt (assume a ha, _),
941+
refine ennreal.le_of_forall_lt_one_mul_le (assume a ha, _),
942942
rcases ennreal.lt_iff_exists_coe.1 ha with ⟨r, rfl, ha⟩,
943943
have ha : r < 1 := ennreal.coe_lt_coe.1 ha,
944944
let rs := s.map (λa, r * a),

src/topology/instances/ennreal.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,15 @@ continuous_iff_continuous_at.2 $ λ x, ennreal.continuous_at_const_mul (or.inl h
286286
protected lemma continuous_mul_const {a : ennreal} (ha : a ≠ ⊤) : continuous (λ x, x * a) :=
287287
continuous_iff_continuous_at.2 $ λ x, ennreal.continuous_at_mul_const (or.inl ha)
288288

289+
lemma le_of_forall_lt_one_mul_le {x y : ennreal} (h : ∀ a < 1, a * x ≤ y) : x ≤ y :=
290+
begin
291+
have : tendsto (* x) (𝓝[Iio 1] 1) (𝓝 (1 * x)) :=
292+
(ennreal.continuous_at_mul_const (or.inr one_ne_zero)).mono_left inf_le_left,
293+
rw one_mul at this,
294+
haveI : (𝓝[Iio 1] (1 : ennreal)).ne_bot := nhds_within_Iio_self_ne_bot' ennreal.zero_lt_one,
295+
exact le_of_tendsto this (eventually_nhds_within_iff.2 $ eventually_of_forall h)
296+
end
297+
289298
lemma infi_mul_left {ι} [nonempty ι] {f : ι → ennreal} {a : ennreal}
290299
(h : a = ⊤ → (⨅ i, f i) = 0 → ∃ i, f i = 0) :
291300
(⨅ i, a * f i) = a * ⨅ i, f i :=

0 commit comments

Comments
 (0)