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

Commit 22ec295

Browse files
committed
chore(data/set): lemmas about disjoint (#10148)
1 parent 69189d4 commit 22ec295

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/data/set/intervals/disjoint.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ variables [preorder α] {a b c : α}
3636
@[simp] lemma Ico_disjoint_Ico_same {a b c : α} : disjoint (Ico a b) (Ico b c) :=
3737
λ x hx, not_le_of_lt hx.1.2 hx.2.1
3838

39+
@[simp] lemma Ici_disjoint_Iic : disjoint (Ici a) (Iic b) ↔ ¬(a ≤ b) :=
40+
by rw [set.disjoint_iff_inter_eq_empty, Ici_inter_Iic, Icc_eq_empty_iff]
41+
42+
@[simp] lemma Iic_disjoint_Ici : disjoint (Iic a) (Ici b) ↔ ¬(b ≤ a) :=
43+
disjoint.comm.trans Ici_disjoint_Iic
44+
3945
end preorder
4046

4147
section linear_order

src/data/set/lattice.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,14 @@ theorem disjoint_image_image {f : β → α} {g : γ → α} {s : set β} {t : s
15011501
(h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c) : disjoint (f '' s) (g '' t) :=
15021502
by rintro a ⟨⟨b, hb, eq⟩, c, hc, rfl⟩; exact h b hb c hc eq
15031503

1504+
lemma disjoint_image_of_injective {f : α → β} (hf : injective f) {s t : set α}
1505+
(hd : disjoint s t) : disjoint (f '' s) (f '' t) :=
1506+
disjoint_image_image $ λ x hx y hy, hf.ne $ λ H, set.disjoint_iff.1 hd ⟨hx, H.symm ▸ hy⟩
1507+
1508+
lemma disjoint_preimage {s t : set β} (hd : disjoint s t) (f : α → β) :
1509+
disjoint (f ⁻¹' s) (f ⁻¹' t) :=
1510+
λ x hx, hd hx
1511+
15041512
lemma preimage_eq_empty {f : α → β} {s : set β} (h : disjoint s (range f)) :
15051513
f ⁻¹' s = ∅ :=
15061514
by simpa using h.preimage f

0 commit comments

Comments
 (0)