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

Commit 1c6a317

Browse files
urkudjcommelinmergify[bot]
authored
feat(*): misc simple lemmas (#2036)
* feat(*): misc simple lemmas * +1 lemma * Rename `inclusion_range` to `range_inclusion` Co-Authored-By: Johan Commelin <johan@commelin.net> Co-authored-by: Johan Commelin <johan@commelin.net> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 603c7ba commit 1c6a317

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

src/analysis/normed_space/basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,10 @@ by simp only [dist_eq_norm, (norm_smul _ _).symm, smul_sub]
627627
lemma nnnorm_smul [normed_space α β] (s : α) (x : β) : nnnorm (s • x) = nnnorm s * nnnorm x :=
628628
nnreal.eq $ norm_smul s x
629629

630+
lemma nndist_smul [normed_space α β] (s : α) (x y : β) :
631+
nndist (s • x) (s • y) = nnnorm s * nndist x y :=
632+
nnreal.eq $ dist_smul s x y
633+
630634
variables {E : Type*} {F : Type*}
631635
[normed_group E] [normed_space α E] [normed_group F] [normed_space α F]
632636

src/data/set/basic.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,6 +1599,9 @@ lemma inclusion_injective {s t : set α} (h : s ⊆ t) :
15991599
function.injective (inclusion h)
16001600
| ⟨_, _⟩ ⟨_, _⟩ := subtype.ext.2 ∘ subtype.ext.1
16011601

1602+
lemma range_inclusion {s t : set α} (h : s ⊆ t) : range (inclusion h) = {x : t | (x:α) ∈ s} :=
1603+
ext $ λ ⟨x, hx⟩ , by simp [inclusion]
1604+
16021605
end inclusion
16031606

16041607
end set

src/order/filter/basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,10 @@ lemma comap_ne_bot_of_surj {f : filter β} {m : α → β}
10661066
(hf : f ≠ ⊥) (hm : function.surjective m) : comap m f ≠ ⊥ :=
10671067
comap_ne_bot_of_range_mem hf $ univ_mem_sets' hm
10681068

1069+
lemma comap_ne_bot_of_image_mem {f : filter β} {m : α → β} (hf : f ≠ ⊥)
1070+
{s : set α} (hs : m '' s ∈ f) : comap m f ≠ ⊥ :=
1071+
ne_bot_of_le_ne_bot (comap_inf_principal_ne_bot_of_image_mem hf hs) inf_le_left
1072+
10691073
@[simp] lemma map_eq_bot_iff : map m f = ⊥ ↔ f = ⊥ :=
10701074
by rw [←empty_in_sets_eq_bot, ←empty_in_sets_eq_bot]; exact id,
10711075
assume h, by simp only [h, eq_self_iff_true, map_bot]⟩

src/topology/metric_space/emetric_space.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@ instance prod.emetric_space_max [emetric_space β] : emetric_space (α × β) :=
415415
end,
416416
to_uniform_space := prod.uniform_space }
417417

418+
lemma prod.edist_eq [emetric_space β] (x y : α × β) :
419+
edist x y = max (edist x.1 y.1) (edist x.2 y.2) :=
420+
rfl
421+
418422
section pi
419423
open finset
420424
variables {π : β → Type*} [fintype β]
@@ -528,6 +532,10 @@ by simp [is_open_iff_nhds, mem_nhds_iff]
528532
theorem is_open_ball : is_open (ball x ε) :=
529533
is_open_iff.2 $ λ y, exists_ball_subset_ball
530534

535+
theorem is_closed_ball_top : is_closed (ball x ⊤) :=
536+
is_open_iff.2 $ λ y hy, ⟨⊤, ennreal.coe_lt_top, subset_compl_iff_disjoint.2 $
537+
ball_disjoint $ by { rw ennreal.top_add, exact le_of_not_lt hy }⟩
538+
531539
theorem ball_mem_nhds (x : α) {ε : ennreal} (ε0 : 0 < ε) : ball x ε ∈ 𝓝 x :=
532540
mem_nhds_sets is_open_ball (mem_ball_self ε0)
533541

0 commit comments

Comments
 (0)