Documentation

Mathlib.Data.Set.Lattice

The set lattice #

This file is a collection of results on the complete atomic Boolean algebra structure of Set α. Notation for the complete lattice operations can be found in Mathlib/Order/SetNotation.lean.

Main declarations #

Naming convention #

In lemma names,

Notation #

Complete lattice and complete Boolean algebra instances #

theorem Set.mem_iUnion₂ {γ : Type u_3} {ι : Sort u_5} {κ : ι → Sort u_8} {x : γ} {s : (i : ι) → κ i → Set γ} :
x ∈ ⋃ (i : ι), ⋃ (j : κ i), s i j ↔ ∃ (i : ι) (j : κ i), x ∈ s i j
theorem Set.mem_iInter₂ {γ : Type u_3} {ι : Sort u_5} {κ : ι → Sort u_8} {x : γ} {s : (i : ι) → κ i → Set γ} :
x ∈ ⋂ (i : ι), ⋂ (j : κ i), s i j ↔ ∀ (i : ι) (j : κ i), x ∈ s i j
theorem Set.mem_iUnion_of_mem {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} {a : α} (i : ι) (ha : a ∈ s i) :
a ∈ ⋃ (i : ι), s i
theorem Set.mem_iUnion₂_of_mem {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} {a : α} {i : ι} (j : κ i) (ha : a ∈ s i j) :
a ∈ ⋃ (i : ι), ⋃ (j : κ i), s i j
theorem Set.mem_iInter_of_mem {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} {a : α} (h : ∀ (i : ι), a ∈ s i) :
a ∈ ⋂ (i : ι), s i
theorem Set.mem_iInter₂_of_mem {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} {a : α} (h : ∀ (i : ι) (j : κ i), a ∈ s i j) :
a ∈ ⋂ (i : ι), ⋂ (j : κ i), s i j

Union and intersection over an indexed family of sets #

theorem Set.iUnion_congr_Prop {α : Type u_1} {p q : Prop} {f₁ : p → Set α} {f₂ : q → Set α} (pq : p ↔ q) (f : ∀ (x : q), f₁ ⋯ = f₂ x) :
iUnion f₁ = iUnion f₂
theorem Set.iInter_congr_Prop {α : Type u_1} {p q : Prop} {f₁ : p → Set α} {f₂ : q → Set α} (pq : p ↔ q) (f : ∀ (x : q), f₁ ⋯ = f₂ x) :
iInter f₁ = iInter f₂
theorem Set.iUnion_plift_up {α : Type u_1} {ι : Sort u_5} (f : PLift ι → Set α) :
⋃ (i : ι), f { down := i } = ⋃ (i : PLift ι), f i
theorem Set.iUnion_plift_down {α : Type u_1} {ι : Sort u_5} (f : ι → Set α) :
⋃ (i : PLift ι), f i.down = ⋃ (i : ι), f i
theorem Set.iInter_plift_up {α : Type u_1} {ι : Sort u_5} (f : PLift ι → Set α) :
⋂ (i : ι), f { down := i } = ⋂ (i : PLift ι), f i
theorem Set.iInter_plift_down {α : Type u_1} {ι : Sort u_5} (f : ι → Set α) :
⋂ (i : PLift ι), f i.down = ⋂ (i : ι), f i
theorem Set.iUnion_eq_if {α : Type u_1} {p : Prop} [Decidable p] (s : Set α) :
⋃ (_ : p), s = if p then s else ∅
theorem Set.iUnion_eq_dif {α : Type u_1} {p : Prop} [Decidable p] (s : p → Set α) :
⋃ (h : p), s h = if h : p then s h else ∅
theorem Set.iInter_eq_if {α : Type u_1} {p : Prop} [Decidable p] (s : Set α) :
⋂ (_ : p), s = if p then s else univ
theorem Set.iInf_eq_dif {α : Type u_1} {p : Prop} [Decidable p] (s : p → Set α) :
⋂ (h : p), s h = if h : p then s h else univ
theorem Set.exists_set_mem_of_union_eq_top {β : Type u_2} {ι : Type u_12} (t : Set ι) (s : ι → Set β) (w : ⋃ i ∈ t, s i = ⊤) (x : β) :
∃ i ∈ t, x ∈ s i
theorem Set.nonempty_of_union_eq_top_of_nonempty {α : Type u_1} {ι : Type u_12} (t : Set ι) (s : ι → Set α) (H : Nonempty α) (w : ⋃ i ∈ t, s i = ⊤) :
theorem Set.nonempty_of_nonempty_iUnion {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} (h_Union : (⋃ (i : ι), s i).Nonempty) :
theorem Set.nonempty_of_nonempty_iUnion_eq_univ {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} [Nonempty α] (h_Union : ⋃ (i : ι), s i = univ) :
theorem Set.setOf_exists {β : Type u_2} {ι : Sort u_5} (p : ι → β → Prop) :
{x : β | ∃ (i : ι), p i x} = ⋃ (i : ι), {x : β | p i x}
theorem Set.setOf_forall {β : Type u_2} {ι : Sort u_5} (p : ι → β → Prop) :
{x : β | ∀ (i : ι), p i x} = ⋂ (i : ι), {x : β | p i x}
theorem Set.iUnion_subset {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} {t : Set α} (h : ∀ (i : ι), s i ⊆ t) :
⋃ (i : ι), s i ⊆ t
theorem Set.iUnion₂_subset {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} {t : Set α} (h : ∀ (i : ι) (j : κ i), s i j ⊆ t) :
⋃ (i : ι), ⋃ (j : κ i), s i j ⊆ t
theorem Set.subset_iInter {β : Type u_2} {ι : Sort u_5} {t : Set β} {s : ι → Set β} (h : ∀ (i : ι), t ⊆ s i) :
t ⊆ ⋂ (i : ι), s i
theorem Set.subset_iInter₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : Set α} {t : (i : ι) → κ i → Set α} (h : ∀ (i : ι) (j : κ i), s ⊆ t i j) :
s ⊆ ⋂ (i : ι), ⋂ (j : κ i), t i j
@[simp]
theorem Set.iUnion_subset_iff {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} {t : Set α} :
⋃ (i : ι), s i ⊆ t ↔ ∀ (i : ι), s i ⊆ t
theorem Set.iUnion₂_subset_iff {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} {t : Set α} :
⋃ (i : ι), ⋃ (j : κ i), s i j ⊆ t ↔ ∀ (i : ι) (j : κ i), s i j ⊆ t
@[simp]
theorem Set.subset_iInter_iff {α : Type u_1} {ι : Sort u_5} {s : Set α} {t : ι → Set α} :
s ⊆ ⋂ (i : ι), t i ↔ ∀ (i : ι), s ⊆ t i
theorem Set.subset_iInter₂_iff {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : Set α} {t : (i : ι) → κ i → Set α} :
s ⊆ ⋂ (i : ι), ⋂ (j : κ i), t i j ↔ ∀ (i : ι) (j : κ i), s ⊆ t i j
theorem Set.subset_iUnion {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) (i : ι) :
s i ⊆ ⋃ (i : ι), s i
theorem Set.iInter_subset {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) (i : ι) :
⋂ (i : ι), s i ⊆ s i
theorem Set.iInter_subset_iUnion {α : Type u_1} {ι : Sort u_5} [Nonempty ι] {s : ι → Set α} :
⋂ (i : ι), s i ⊆ ⋃ (i : ι), s i
theorem Set.subset_iUnion₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} (i : ι) (j : κ i) :
s i j ⊆ ⋃ (i' : ι), ⋃ (j' : κ i'), s i' j'
theorem Set.iInter₂_subset {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} (i : ι) (j : κ i) :
⋂ (i : ι), ⋂ (j : κ i), s i j ⊆ s i j
theorem Set.subset_iUnion_of_subset {α : Type u_1} {ι : Sort u_5} {s : Set α} {t : ι → Set α} (i : ι) (h : s ⊆ t i) :
s ⊆ ⋃ (i : ι), t i

This rather trivial consequence of subset_iUnion is convenient with apply, and has i explicit for this purpose.

theorem Set.iInter_subset_of_subset {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} {t : Set α} (i : ι) (h : s i ⊆ t) :
⋂ (i : ι), s i ⊆ t

This rather trivial consequence of iInter_subset is convenient with apply, and has i explicit for this purpose.

theorem Set.subset_iUnion₂_of_subset {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : Set α} {t : (i : ι) → κ i → Set α} (i : ι) (j : κ i) (h : s ⊆ t i j) :
s ⊆ ⋃ (i : ι), ⋃ (j : κ i), t i j

This rather trivial consequence of subset_iUnion₂ is convenient with apply, and has i and j explicit for this purpose.

theorem Set.iInter₂_subset_of_subset {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} {t : Set α} (i : ι) (j : κ i) (h : s i j ⊆ t) :
⋂ (i : ι), ⋂ (j : κ i), s i j ⊆ t

This rather trivial consequence of iInter₂_subset is convenient with apply, and has i and j explicit for this purpose.

theorem Set.iUnion_mono {α : Type u_1} {ι : Sort u_5} {s t : ι → Set α} (h : ∀ (i : ι), s i ⊆ t i) :
⋃ (i : ι), s i ⊆ ⋃ (i : ι), t i
theorem Set.iUnion_mono'' {α : Type u_1} {ι : Sort u_5} {s t : ι → Set α} (h : ∀ (i : ι), s i ⊆ t i) :
theorem Set.iUnion₂_mono {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s t : (i : ι) → κ i → Set α} (h : ∀ (i : ι) (j : κ i), s i j ⊆ t i j) :
⋃ (i : ι), ⋃ (j : κ i), s i j ⊆ ⋃ (i : ι), ⋃ (j : κ i), t i j
theorem Set.iInter_mono {α : Type u_1} {ι : Sort u_5} {s t : ι → Set α} (h : ∀ (i : ι), s i ⊆ t i) :
⋂ (i : ι), s i ⊆ ⋂ (i : ι), t i
theorem Set.iInter_mono'' {α : Type u_1} {ι : Sort u_5} {s t : ι → Set α} (h : ∀ (i : ι), s i ⊆ t i) :
theorem Set.iInter₂_mono {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s t : (i : ι) → κ i → Set α} (h : ∀ (i : ι) (j : κ i), s i j ⊆ t i j) :
⋂ (i : ι), ⋂ (j : κ i), s i j ⊆ ⋂ (i : ι), ⋂ (j : κ i), t i j
theorem Set.iUnion_mono' {α : Type u_1} {ι : Sort u_5} {ι₂ : Sort u_7} {s : ι → Set α} {t : ι₂ → Set α} (h : ∀ (i : ι), ∃ (j : ι₂), s i ⊆ t j) :
⋃ (i : ι), s i ⊆ ⋃ (i : ι₂), t i
theorem Set.iUnion₂_mono' {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} {κ : ι → Sort u_8} {κ' : ι' → Sort u_11} {s : (i : ι) → κ i → Set α} {t : (i' : ι') → κ' i' → Set α} (h : ∀ (i : ι) (j : κ i), ∃ (i' : ι') (j' : κ' i'), s i j ⊆ t i' j') :
⋃ (i : ι), ⋃ (j : κ i), s i j ⊆ ⋃ (i' : ι'), ⋃ (j' : κ' i'), t i' j'
theorem Set.iInter_mono' {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} {s : ι → Set α} {t : ι' → Set α} (h : ∀ (j : ι'), ∃ (i : ι), s i ⊆ t j) :
⋂ (i : ι), s i ⊆ ⋂ (j : ι'), t j
theorem Set.iInter₂_mono' {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} {κ : ι → Sort u_8} {κ' : ι' → Sort u_11} {s : (i : ι) → κ i → Set α} {t : (i' : ι') → κ' i' → Set α} (h : ∀ (i' : ι') (j' : κ' i'), ∃ (i : ι) (j : κ i), s i j ⊆ t i' j') :
⋂ (i : ι), ⋂ (j : κ i), s i j ⊆ ⋂ (i' : ι'), ⋂ (j' : κ' i'), t i' j'
theorem Set.iUnion₂_subset_iUnion {α : Type u_1} {ι : Sort u_5} (κ : ι → Sort u_12) (s : ι → Set α) :
⋃ (i : ι), ⋃ (x : κ i), s i ⊆ ⋃ (i : ι), s i
theorem Set.iInter_subset_iInter₂ {α : Type u_1} {ι : Sort u_5} (κ : ι → Sort u_12) (s : ι → Set α) :
⋂ (i : ι), s i ⊆ ⋂ (i : ι), ⋂ (x : κ i), s i
theorem Set.iUnion_setOf {α : Type u_1} {ι : Sort u_5} (P : ι → α → Prop) :
⋃ (i : ι), {x : α | P i x} = {x : α | ∃ (i : ι), P i x}
theorem Set.iInter_setOf {α : Type u_1} {ι : Sort u_5} (P : ι → α → Prop) :
⋂ (i : ι), {x : α | P i x} = {x : α | ∀ (i : ι), P i x}
theorem Set.iUnion_congr_of_surjective {α : Type u_1} {ι : Sort u_5} {ι₂ : Sort u_7} {f : ι → Set α} {g : ι₂ → Set α} (h : ι → ι₂) (h1 : Function.Surjective h) (h2 : ∀ (x : ι), g (h x) = f x) :
⋃ (x : ι), f x = ⋃ (y : ι₂), g y
theorem Set.iInter_congr_of_surjective {α : Type u_1} {ι : Sort u_5} {ι₂ : Sort u_7} {f : ι → Set α} {g : ι₂ → Set α} (h : ι → ι₂) (h1 : Function.Surjective h) (h2 : ∀ (x : ι), g (h x) = f x) :
⋂ (x : ι), f x = ⋂ (y : ι₂), g y
theorem Set.iUnion_congr {α : Type u_1} {ι : Sort u_5} {s t : ι → Set α} (h : ∀ (i : ι), s i = t i) :
⋃ (i : ι), s i = ⋃ (i : ι), t i
theorem Set.iInter_congr {α : Type u_1} {ι : Sort u_5} {s t : ι → Set α} (h : ∀ (i : ι), s i = t i) :
⋂ (i : ι), s i = ⋂ (i : ι), t i
theorem Set.iUnion₂_congr {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s t : (i : ι) → κ i → Set α} (h : ∀ (i : ι) (j : κ i), s i j = t i j) :
⋃ (i : ι), ⋃ (j : κ i), s i j = ⋃ (i : ι), ⋃ (j : κ i), t i j
theorem Set.iInter₂_congr {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s t : (i : ι) → κ i → Set α} (h : ∀ (i : ι) (j : κ i), s i j = t i j) :
⋂ (i : ι), ⋂ (j : κ i), s i j = ⋂ (i : ι), ⋂ (j : κ i), t i j
theorem Set.BijOn.iUnion_comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set β} {t : Set γ} {f : β → γ} (g : γ → Set α) (hf : BijOn f s t) :
⋃ x ∈ s, g (f x) = ⋃ y ∈ t, g y
theorem Set.BijOn.iInter_comp {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set β} {t : Set γ} {f : β → γ} (g : γ → Set α) (hf : BijOn f s t) :
⋂ x ∈ s, g (f x) = ⋂ y ∈ t, g y
theorem Set.BijOn.iUnion_congr {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set β} {t : Set γ} (f : β → Set α) (g : γ → Set α) {h : β → γ} (h1 : BijOn h s t) (h2 : ∀ (x : β), g (h x) = f x) :
⋃ x ∈ s, f x = ⋃ y ∈ t, g y
theorem Set.BijOn.iInter_congr {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set β} {t : Set γ} (f : β → Set α) (g : γ → Set α) {h : β → γ} (h1 : BijOn h s t) (h2 : ∀ (x : β), g (h x) = f x) :
⋂ x ∈ s, f x = ⋂ y ∈ t, g y
theorem Set.iUnion_const {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) :
⋃ (x : ι), s = s
theorem Set.iInter_const {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) :
⋂ (x : ι), s = s
theorem Set.iUnion_eq_const {α : Type u_1} {ι : Sort u_5} [Nonempty ι] {f : ι → Set α} {s : Set α} (hf : ∀ (i : ι), f i = s) :
⋃ (i : ι), f i = s
theorem Set.iInter_eq_const {α : Type u_1} {ι : Sort u_5} [Nonempty ι] {f : ι → Set α} {s : Set α} (hf : ∀ (i : ι), f i = s) :
⋂ (i : ι), f i = s
@[simp]
theorem Set.compl_iUnion {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) :
(⋃ (i : ι), s i)ᶜ = ⋂ (i : ι), (s i)ᶜ
theorem Set.compl_iUnion₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : (i : ι) → κ i → Set α) :
(⋃ (i : ι), ⋃ (j : κ i), s i j)ᶜ = ⋂ (i : ι), ⋂ (j : κ i), (s i j)ᶜ
@[simp]
theorem Set.compl_iInter {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) :
(⋂ (i : ι), s i)ᶜ = ⋃ (i : ι), (s i)ᶜ
theorem Set.compl_iInter₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : (i : ι) → κ i → Set α) :
(⋂ (i : ι), ⋂ (j : κ i), s i j)ᶜ = ⋃ (i : ι), ⋃ (j : κ i), (s i j)ᶜ
theorem Set.iUnion_eq_compl_iInter_compl {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) :
⋃ (i : ι), s i = (⋂ (i : ι), (s i)ᶜ)ᶜ
theorem Set.iInter_eq_compl_iUnion_compl {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) :
⋂ (i : ι), s i = (⋃ (i : ι), (s i)ᶜ)ᶜ
theorem Set.inter_iUnion {β : Type u_2} {ι : Sort u_5} (s : Set β) (t : ι → Set β) :
s ∩ ⋃ (i : ι), t i = ⋃ (i : ι), s ∩ t i
theorem Set.iUnion_inter {β : Type u_2} {ι : Sort u_5} (s : Set β) (t : ι → Set β) :
(⋃ (i : ι), t i) ∩ s = ⋃ (i : ι), t i ∩ s
theorem Set.iUnion_union_distrib {β : Type u_2} {ι : Sort u_5} (s t : ι → Set β) :
⋃ (i : ι), s i ∪ t i = (⋃ (i : ι), s i) ∪ ⋃ (i : ι), t i
theorem Set.iInter_inter_distrib {β : Type u_2} {ι : Sort u_5} (s t : ι → Set β) :
⋂ (i : ι), s i ∩ t i = (⋂ (i : ι), s i) ∩ ⋂ (i : ι), t i
theorem Set.union_iUnion {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) (t : ι → Set β) :
s ∪ ⋃ (i : ι), t i = ⋃ (i : ι), s ∪ t i
theorem Set.iUnion_union {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) (t : ι → Set β) :
(⋃ (i : ι), t i) ∪ s = ⋃ (i : ι), t i ∪ s
theorem Set.inter_iInter {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) (t : ι → Set β) :
s ∩ ⋂ (i : ι), t i = ⋂ (i : ι), s ∩ t i
theorem Set.iInter_inter {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) (t : ι → Set β) :
(⋂ (i : ι), t i) ∩ s = ⋂ (i : ι), t i ∩ s
theorem Set.insert_iUnion {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (x : β) (t : ι → Set β) :
insert x (⋃ (i : ι), t i) = ⋃ (i : ι), insert x (t i)
theorem Set.union_iInter {β : Type u_2} {ι : Sort u_5} (s : Set β) (t : ι → Set β) :
s ∪ ⋂ (i : ι), t i = ⋂ (i : ι), s ∪ t i
theorem Set.iInter_union {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) (t : Set β) :
(⋂ (i : ι), s i) ∪ t = ⋂ (i : ι), s i ∪ t
theorem Set.insert_iInter {β : Type u_2} {ι : Sort u_5} (x : β) (t : ι → Set β) :
insert x (⋂ (i : ι), t i) = ⋂ (i : ι), insert x (t i)
theorem Set.iUnion_sdiff {β : Type u_2} {ι : Sort u_5} (s : Set β) (t : ι → Set β) :
(⋃ (i : ι), t i) \ s = ⋃ (i : ι), t i \ s
@[deprecated Set.iUnion_sdiff (since := "2026-06-03")]
theorem Set.iUnion_diff {β : Type u_2} {ι : Sort u_5} (s : Set β) (t : ι → Set β) :
(⋃ (i : ι), t i) \ s = ⋃ (i : ι), t i \ s

Alias of Set.iUnion_sdiff.

theorem Set.sdiff_iUnion {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) (t : ι → Set β) :
s \ ⋃ (i : ι), t i = ⋂ (i : ι), s \ t i
@[deprecated Set.sdiff_iUnion (since := "2026-06-03")]
theorem Set.diff_iUnion {β : Type u_2} {ι : Sort u_5} [Nonempty ι] (s : Set β) (t : ι → Set β) :
s \ ⋃ (i : ι), t i = ⋂ (i : ι), s \ t i

Alias of Set.sdiff_iUnion.

theorem Set.sdiff_iInter {β : Type u_2} {ι : Sort u_5} (s : Set β) (t : ι → Set β) :
s \ ⋂ (i : ι), t i = ⋃ (i : ι), s \ t i
@[deprecated Set.sdiff_iInter (since := "2026-06-03")]
theorem Set.diff_iInter {β : Type u_2} {ι : Sort u_5} (s : Set β) (t : ι → Set β) :
s \ ⋂ (i : ι), t i = ⋃ (i : ι), s \ t i

Alias of Set.sdiff_iInter.

theorem Set.iUnion_symmDiff_subset {α : Type u_1} {ι : Sort u_5} {s : Set α} [Nonempty ι] {f : ι → Set α} :
symmDiff (⋃ (n : ι), f n) s ⊆ ⋃ (n : ι), symmDiff (f n) s
theorem Set.symmDiff_iUnion_subset {α : Type u_1} {ι : Sort u_5} {s : Set α} [Nonempty ι] {f : ι → Set α} :
symmDiff s (⋃ (n : ι), f n) ⊆ ⋃ (n : ι), symmDiff s (f n)
theorem Set.iUnion_symmDiff_iUnion_subset {α : Type u_1} {ι : Sort u_5} {f g : ι → Set α} :
symmDiff (⋃ (n : ι), f n) (⋃ (n : ι), g n) ⊆ ⋃ (n : ι), symmDiff (f n) (g n)
theorem Set.sUnion_symmDiff_subset {α : Type u_1} {s : Set α} {S : Set (Set α)} (hS : S.Nonempty) :
symmDiff (⋃₀ S) s ⊆ ⋃₀ ((fun (x : Set α) => symmDiff x s) '' S)
theorem Set.symmDiff_sUnion_subset {α : Type u_1} {s : Set α} {S : Set (Set α)} (hS : S.Nonempty) :
symmDiff s (⋃₀ S) ⊆ ⋃₀ ((fun (x : Set α) => symmDiff s x) '' S)
theorem Set.sUnion_symmDiff_sUnion_subset {α : Type u_1} {S T : Set (Set α)} (hS : S.Nonempty) (hT : T.Nonempty) :
symmDiff (⋃₀ S) (⋃₀ T) ⊆ ⋃₀ image2 (fun (x1 x2 : Set α) => symmDiff x1 x2) S T
theorem Set.iUnion_inter_subset {ι : Sort u_12} {α : Type u_13} {s t : ι → Set α} :
⋃ (i : ι), s i ∩ t i ⊆ (⋃ (i : ι), s i) ∩ ⋃ (i : ι), t i
theorem Set.iUnion_inter_of_monotone {ι : Type u_12} {α : Type u_13} [Preorder ι] [IsDirectedOrder ι] {s t : ι → Set α} (hs : Monotone s) (ht : Monotone t) :
⋃ (i : ι), s i ∩ t i = (⋃ (i : ι), s i) ∩ ⋃ (i : ι), t i
theorem Set.iUnion_inter_of_antitone {ι : Type u_12} {α : Type u_13} [Preorder ι] [IsCodirectedOrder ι] {s t : ι → Set α} (hs : Antitone s) (ht : Antitone t) :
⋃ (i : ι), s i ∩ t i = (⋃ (i : ι), s i) ∩ ⋃ (i : ι), t i
theorem Set.iInter_union_of_monotone {ι : Type u_12} {α : Type u_13} [Preorder ι] [IsCodirectedOrder ι] {s t : ι → Set α} (hs : Monotone s) (ht : Monotone t) :
⋂ (i : ι), s i ∪ t i = (⋂ (i : ι), s i) ∪ ⋂ (i : ι), t i
theorem Set.iInter_union_of_antitone {ι : Type u_12} {α : Type u_13} [Preorder ι] [IsDirectedOrder ι] {s t : ι → Set α} (hs : Antitone s) (ht : Antitone t) :
⋂ (i : ι), s i ∪ t i = (⋂ (i : ι), s i) ∪ ⋂ (i : ι), t i
theorem Set.iUnion_iInter_subset {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} {s : ι → ι' → Set α} :
⋃ (j : ι'), ⋂ (i : ι), s i j ⊆ ⋂ (i : ι), ⋃ (j : ι'), s i j

An equality version of this lemma is iUnion_iInter_of_monotone in Data.Set.Finite.

theorem Set.iUnion_option {α : Type u_1} {ι : Type u_12} (s : Option ι → Set α) :
⋃ (o : Option ι), s o = s none ∪ ⋃ (i : ι), s (some i)
theorem Set.iInter_option {α : Type u_1} {ι : Type u_12} (s : Option ι → Set α) :
⋂ (o : Option ι), s o = s none ∩ ⋂ (i : ι), s (some i)
theorem Set.iUnion_dite {α : Type u_1} {ι : Sort u_5} (p : ι → Prop) [DecidablePred p] (f : (i : ι) → p i → Set α) (g : (i : ι) → ¬p i → Set α) :
(⋃ (i : ι), if h : p i then f i h else g i h) = (⋃ (i : ι), ⋃ (h : p i), f i h) ∪ ⋃ (i : ι), ⋃ (h : ¬p i), g i h
theorem Set.iUnion_ite {α : Type u_1} {ι : Sort u_5} (p : ι → Prop) [DecidablePred p] (f g : ι → Set α) :
(⋃ (i : ι), if p i then f i else g i) = (⋃ (i : ι), ⋃ (_ : p i), f i) ∪ ⋃ (i : ι), ⋃ (_ : ¬p i), g i
theorem Set.iInter_dite {α : Type u_1} {ι : Sort u_5} (p : ι → Prop) [DecidablePred p] (f : (i : ι) → p i → Set α) (g : (i : ι) → ¬p i → Set α) :
(⋂ (i : ι), if h : p i then f i h else g i h) = (⋂ (i : ι), ⋂ (h : p i), f i h) ∩ ⋂ (i : ι), ⋂ (h : ¬p i), g i h
theorem Set.iInter_ite {α : Type u_1} {ι : Sort u_5} (p : ι → Prop) [DecidablePred p] (f g : ι → Set α) :
(⋂ (i : ι), if p i then f i else g i) = (⋂ (i : ι), ⋂ (_ : p i), f i) ∩ ⋂ (i : ι), ⋂ (_ : ¬p i), g i

Unions and intersections indexed by Prop #

theorem Set.iInter_false {α : Type u_1} {s : False → Set α} :
theorem Set.iUnion_false {α : Type u_1} {s : False → Set α} :
@[simp]
theorem Set.iInter_true {α : Type u_1} {s : True → Set α} :
@[simp]
theorem Set.iUnion_true {α : Type u_1} {s : True → Set α} :
@[simp]
theorem Set.iInter_exists {α : Type u_1} {ι : Sort u_5} {p : ι → Prop} {f : Exists p → Set α} :
⋂ (x : Exists p), f x = ⋂ (i : ι), ⋂ (h : p i), f ⋯
@[simp]
theorem Set.iUnion_exists {α : Type u_1} {ι : Sort u_5} {p : ι → Prop} {f : Exists p → Set α} :
⋃ (x : Exists p), f x = ⋃ (i : ι), ⋃ (h : p i), f ⋯
@[simp]
theorem Set.iUnion_empty {α : Type u_1} {ι : Sort u_5} :
⋃ (x : ι), ∅ = ∅
@[simp]
theorem Set.iInter_univ {α : Type u_1} {ι : Sort u_5} :
⋂ (x : ι), univ = univ
@[simp]
theorem Set.iUnion_eq_empty {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} :
⋃ (i : ι), s i = ∅ ↔ ∀ (i : ι), s i = ∅
@[simp]
theorem Set.iInter_eq_univ {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} :
⋂ (i : ι), s i = univ ↔ ∀ (i : ι), s i = univ
@[simp]
theorem Set.nonempty_iUnion {α : Type u_1} {ι : Sort u_5} {s : ι → Set α} :
(⋃ (i : ι), s i).Nonempty ↔ ∃ (i : ι), (s i).Nonempty
theorem Set.nonempty_biUnion {α : Type u_1} {β : Type u_2} {t : Set α} {s : α → Set β} :
(⋃ i ∈ t, s i).Nonempty ↔ ∃ i ∈ t, (s i).Nonempty
theorem Set.iUnion_nonempty_index {α : Type u_1} {β : Type u_2} (s : Set α) (t : s.Nonempty → Set β) :
⋃ (h : s.Nonempty), t h = ⋃ (x : α), ⋃ (h : x ∈ s), t ⋯
@[simp]
theorem Set.iInter_iInter_eq_left {α : Type u_1} {β : Type u_2} {b : β} {s : (x : β) → x = b → Set α} :
⋂ (x : β), ⋂ (h : x = b), s x h = s b ⋯
@[simp]
theorem Set.iInter_iInter_eq_right {α : Type u_1} {β : Type u_2} {b : β} {s : (x : β) → b = x → Set α} :
⋂ (x : β), ⋂ (h : b = x), s x h = s b ⋯
@[simp]
theorem Set.iUnion_iUnion_eq_left {α : Type u_1} {β : Type u_2} {b : β} {s : (x : β) → x = b → Set α} :
⋃ (x : β), ⋃ (h : x = b), s x h = s b ⋯
@[simp]
theorem Set.iUnion_iUnion_eq_right {α : Type u_1} {β : Type u_2} {b : β} {s : (x : β) → b = x → Set α} :
⋃ (x : β), ⋃ (h : b = x), s x h = s b ⋯
theorem Set.iInter_or {α : Type u_1} {p q : Prop} (s : p ∨ q → Set α) :
⋂ (h : p ∨ q), s h = (⋂ (h : p), s ⋯) ∩ ⋂ (h : q), s ⋯
theorem Set.iUnion_or {α : Type u_1} {p q : Prop} (s : p ∨ q → Set α) :
⋃ (h : p ∨ q), s h = (⋃ (i : p), s ⋯) ∪ ⋃ (j : q), s ⋯
theorem Set.iUnion_and {α : Type u_1} {p q : Prop} (s : p ∧ q → Set α) :
⋃ (h : p ∧ q), s h = ⋃ (hp : p), ⋃ (hq : q), s ⋯
theorem Set.iInter_and {α : Type u_1} {p q : Prop} (s : p ∧ q → Set α) :
⋂ (h : p ∧ q), s h = ⋂ (hp : p), ⋂ (hq : q), s ⋯
theorem Set.iUnion_comm {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} (s : ι → ι' → Set α) :
⋃ (i : ι), ⋃ (i' : ι'), s i i' = ⋃ (i' : ι'), ⋃ (i : ι), s i i'
theorem Set.iInter_comm {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} (s : ι → ι' → Set α) :
⋂ (i : ι), ⋂ (i' : ι'), s i i' = ⋂ (i' : ι'), ⋂ (i : ι), s i i'
theorem Set.iUnion_sigma {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : Sigma γ → Set β) :
⋃ (ia : Sigma γ), s ia = ⋃ (i : α), ⋃ (a : γ i), s ⟨i, a⟩
theorem Set.iUnion_sigma' {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : (i : α) → γ i → Set β) :
⋃ (i : α), ⋃ (a : γ i), s i a = ⋃ (ia : Sigma γ), s ia.fst ia.snd
theorem Set.iInter_sigma {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : Sigma γ → Set β) :
⋂ (ia : Sigma γ), s ia = ⋂ (i : α), ⋂ (a : γ i), s ⟨i, a⟩
theorem Set.iInter_sigma' {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : (i : α) → γ i → Set β) :
⋂ (i : α), ⋂ (a : γ i), s i a = ⋂ (ia : Sigma γ), s ia.fst ia.snd
theorem Set.iUnion₂_comm {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} {κ : ι → Sort u_8} {κ' : ι' → Sort u_11} (s : (i : ι) → κ i → (i' : ι') → κ' i' → Set α) :
⋃ (i : ι), ⋃ (j : κ i), ⋃ (i' : ι'), ⋃ (j' : κ' i'), s i j i' j' = ⋃ (i' : ι'), ⋃ (j' : κ' i'), ⋃ (i : ι), ⋃ (j : κ i), s i j i' j'
theorem Set.iInter₂_comm {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} {κ : ι → Sort u_8} {κ' : ι' → Sort u_11} (s : (i : ι) → κ i → (i' : ι') → κ' i' → Set α) :
⋂ (i : ι), ⋂ (j : κ i), ⋂ (i' : ι'), ⋂ (j' : κ' i'), s i j i' j' = ⋂ (i' : ι'), ⋂ (j' : κ' i'), ⋂ (i : ι), ⋂ (j : κ i), s i j i' j'
@[simp]
theorem Set.biUnion_and {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} (p : ι → Prop) (q : ι → ι' → Prop) (s : (x : ι) → (y : ι') → p x ∧ q x y → Set α) :
⋃ (x : ι), ⋃ (y : ι'), ⋃ (h : p x ∧ q x y), s x y h = ⋃ (x : ι), ⋃ (hx : p x), ⋃ (y : ι'), ⋃ (hy : q x y), s x y ⋯
@[simp]
theorem Set.biUnion_and' {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} (p : ι' → Prop) (q : ι → ι' → Prop) (s : (x : ι) → (y : ι') → p y ∧ q x y → Set α) :
⋃ (x : ι), ⋃ (y : ι'), ⋃ (h : p y ∧ q x y), s x y h = ⋃ (y : ι'), ⋃ (hy : p y), ⋃ (x : ι), ⋃ (hx : q x y), s x y ⋯
@[simp]
theorem Set.biInter_and {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} (p : ι → Prop) (q : ι → ι' → Prop) (s : (x : ι) → (y : ι') → p x ∧ q x y → Set α) :
⋂ (x : ι), ⋂ (y : ι'), ⋂ (h : p x ∧ q x y), s x y h = ⋂ (x : ι), ⋂ (hx : p x), ⋂ (y : ι'), ⋂ (hy : q x y), s x y ⋯
@[simp]
theorem Set.biInter_and' {α : Type u_1} {ι : Sort u_5} {ι' : Sort u_6} (p : ι' → Prop) (q : ι → ι' → Prop) (s : (x : ι) → (y : ι') → p y ∧ q x y → Set α) :
⋂ (x : ι), ⋂ (y : ι'), ⋂ (h : p y ∧ q x y), s x y h = ⋂ (y : ι'), ⋂ (hy : p y), ⋂ (x : ι), ⋂ (hx : q x y), s x y ⋯
@[simp]
theorem Set.iUnion_iUnion_eq_or_left {α : Type u_1} {β : Type u_2} {b : β} {p : β → Prop} {s : (x : β) → x = b ∨ p x → Set α} :
⋃ (x : β), ⋃ (h : x = b ∨ p x), s x h = s b ⋯ ∪ ⋃ (x : β), ⋃ (h : p x), s x ⋯
@[simp]
theorem Set.iInter_iInter_eq_or_left {α : Type u_1} {β : Type u_2} {b : β} {p : β → Prop} {s : (x : β) → x = b ∨ p x → Set α} :
⋂ (x : β), ⋂ (h : x = b ∨ p x), s x h = s b ⋯ ∩ ⋂ (x : β), ⋂ (h : p x), s x ⋯
theorem Set.iUnion_sum {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : α ⊕ β → Set γ} :
⋃ (x : α ⊕ β), s x = (⋃ (x : α), s (Sum.inl x)) ∪ ⋃ (x : β), s (Sum.inr x)
theorem Set.iInter_sum {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : α ⊕ β → Set γ} :
⋂ (x : α ⊕ β), s x = (⋂ (x : α), s (Sum.inl x)) ∩ ⋂ (x : β), s (Sum.inr x)
theorem Set.iUnion_psigma {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : PSigma γ → Set β) :
⋃ (ia : PSigma γ), s ia = ⋃ (i : α), ⋃ (a : γ i), s ⟨i, a⟩
theorem Set.iUnion_psigma' {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : (i : α) → γ i → Set β) :
⋃ (i : α), ⋃ (a : γ i), s i a = ⋃ (ia : PSigma γ), s ia.fst ia.snd

A reversed version of iUnion_psigma with a curried map.

theorem Set.iInter_psigma {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : PSigma γ → Set β) :
⋂ (ia : PSigma γ), s ia = ⋂ (i : α), ⋂ (a : γ i), s ⟨i, a⟩
theorem Set.iInter_psigma' {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (s : (i : α) → γ i → Set β) :
⋂ (i : α), ⋂ (a : γ i), s i a = ⋂ (ia : PSigma γ), s ia.fst ia.snd

A reversed version of iInter_psigma with a curried map.

Bounded unions and intersections #

theorem Set.mem_biUnion {α : Type u_1} {β : Type u_2} {s : Set α} {t : α → Set β} {x : α} {y : β} (xs : x ∈ s) (ytx : y ∈ t x) :
y ∈ ⋃ x ∈ s, t x

A specialization of mem_iUnion₂.

theorem Set.mem_biInter {α : Type u_1} {β : Type u_2} {s : Set α} {t : α → Set β} {y : β} (h : ∀ x ∈ s, y ∈ t x) :
y ∈ ⋂ x ∈ s, t x

A specialization of mem_iInter₂.

theorem Set.subset_biUnion_of_mem {α : Type u_1} {β : Type u_2} {s : Set α} {u : α → Set β} {x : α} (xs : x ∈ s) :
u x ⊆ ⋃ x ∈ s, u x

A specialization of subset_iUnion₂.

theorem Set.biInter_subset_of_mem {α : Type u_1} {β : Type u_2} {s : Set α} {t : α → Set β} {x : α} (xs : x ∈ s) :
⋂ x ∈ s, t x ⊆ t x

A specialization of iInter₂_subset.

theorem Set.biInter_subset_biUnion {α : Type u_1} {β : Type u_2} {s : Set α} (hs : s.Nonempty) {t : α → Set β} :
⋂ x ∈ s, t x ⊆ ⋃ x ∈ s, t x
theorem Set.biUnion_subset_biUnion_left {α : Type u_1} {β : Type u_2} {s s' : Set α} {t : α → Set β} (h : s ⊆ s') :
⋃ x ∈ s, t x ⊆ ⋃ x ∈ s', t x
theorem Set.biInter_subset_biInter_left {α : Type u_1} {β : Type u_2} {s s' : Set α} {t : α → Set β} (h : s' ⊆ s) :
⋂ x ∈ s, t x ⊆ ⋂ x ∈ s', t x
theorem Set.biUnion_mono {α : Type u_1} {β : Type u_2} {s s' : Set α} {t t' : α → Set β} (hs : s' ⊆ s) (h : ∀ x ∈ s, t x ⊆ t' x) :
⋃ x ∈ s', t x ⊆ ⋃ x ∈ s, t' x
theorem Set.biInter_mono {α : Type u_1} {β : Type u_2} {s s' : Set α} {t t' : α → Set β} (hs : s ⊆ s') (h : ∀ x ∈ s, t x ⊆ t' x) :
⋂ x ∈ s', t x ⊆ ⋂ x ∈ s, t' x
theorem Set.biUnion_eq_iUnion {α : Type u_1} {β : Type u_2} (s : Set α) (t : (x : α) → x ∈ s → Set β) :
⋃ (x : α), ⋃ (h : x ∈ s), t x h = ⋃ (x : ↑s), t ↑x ⋯
theorem Set.biInter_eq_iInter {α : Type u_1} {β : Type u_2} (s : Set α) (t : (x : α) → x ∈ s → Set β) :
⋂ (x : α), ⋂ (h : x ∈ s), t x h = ⋂ (x : ↑s), t ↑x ⋯
@[simp]
theorem Set.biUnion_const {α : Type u_1} {β : Type u_2} {s : Set α} (hs : s.Nonempty) (t : Set β) :
⋃ a ∈ s, t = t
@[simp]
theorem Set.biInter_const {α : Type u_1} {β : Type u_2} {s : Set α} (hs : s.Nonempty) (t : Set β) :
⋂ a ∈ s, t = t
theorem Set.iUnion_subtype {α : Type u_1} {β : Type u_2} (p : α → Prop) (s : { x : α // p x } → Set β) :
⋃ (x : { x : α // p x }), s x = ⋃ (x : α), ⋃ (hx : p x), s ⟨x, hx⟩
theorem Set.iInter_subtype {α : Type u_1} {β : Type u_2} (p : α → Prop) (s : { x : α // p x } → Set β) :
⋂ (x : { x : α // p x }), s x = ⋂ (x : α), ⋂ (hx : p x), s ⟨x, hx⟩
theorem Set.biInter_empty {α : Type u_1} {β : Type u_2} (u : α → Set β) :
⋂ x ∈ ∅, u x = univ
theorem Set.biInter_univ {α : Type u_1} {β : Type u_2} (u : α → Set β) :
⋂ x ∈ univ, u x = ⋂ (x : α), u x
@[simp]
theorem Set.biUnion_self {α : Type u_1} (s : Set α) :
⋃ x ∈ s, s = s
@[simp]
theorem Set.iUnion_nonempty_self {α : Type u_1} (s : Set α) :
⋃ (_ : s.Nonempty), s = s
theorem Set.biInter_singleton {α : Type u_1} {β : Type u_2} (a : α) (s : α → Set β) :
⋂ x ∈ {a}, s x = s a
theorem Set.biInter_union {α : Type u_1} {β : Type u_2} (s t : Set α) (u : α → Set β) :
⋂ x ∈ s ∪ t, u x = (⋂ x ∈ s, u x) ∩ ⋂ x ∈ t, u x
theorem Set.biInter_insert {α : Type u_1} {β : Type u_2} (a : α) (s : Set α) (t : α → Set β) :
⋂ x ∈ insert a s, t x = t a ∩ ⋂ x ∈ s, t x
theorem Set.biInter_pair {α : Type u_1} {β : Type u_2} (a b : α) (s : α → Set β) :
⋂ x ∈ {a, b}, s x = s a ∩ s b
theorem Set.biInter_inter {ι : Type u_12} {α : Type u_13} {s : Set ι} (hs : s.Nonempty) (f : ι → Set α) (t : Set α) :
⋂ i ∈ s, f i ∩ t = (⋂ i ∈ s, f i) ∩ t
theorem Set.inter_biInter {ι : Type u_12} {α : Type u_13} {s : Set ι} (hs : s.Nonempty) (f : ι → Set α) (t : Set α) :
⋂ i ∈ s, t ∩ f i = t ∩ ⋂ i ∈ s, f i
theorem Set.biUnion_empty {α : Type u_1} {β : Type u_2} (s : α → Set β) :
⋃ x ∈ ∅, s x = ∅
theorem Set.biUnion_univ {α : Type u_1} {β : Type u_2} (s : α → Set β) :
⋃ x ∈ univ, s x = ⋃ (x : α), s x
theorem Set.biUnion_singleton {α : Type u_1} {β : Type u_2} (a : α) (s : α → Set β) :
⋃ x ∈ {a}, s x = s a
@[simp]
theorem Set.biUnion_of_singleton {α : Type u_1} (s : Set α) :
⋃ x ∈ s, {x} = s
theorem Set.biUnion_union {α : Type u_1} {β : Type u_2} (s t : Set α) (u : α → Set β) :
⋃ x ∈ s ∪ t, u x = (⋃ x ∈ s, u x) ∪ ⋃ x ∈ t, u x
@[simp]
theorem Set.iUnion_coe_set {α : Type u_12} {β : Type u_13} (s : Set α) (f : ↑s → Set β) :
⋃ (i : ↑s), f i = ⋃ (i : α), ⋃ (h : i ∈ s), f ⟨i, h⟩
@[simp]
theorem Set.iInter_coe_set {α : Type u_12} {β : Type u_13} (s : Set α) (f : ↑s → Set β) :
⋂ (i : ↑s), f i = ⋂ (i : α), ⋂ (h : i ∈ s), f ⟨i, h⟩
theorem Set.biUnion_insert {α : Type u_1} {β : Type u_2} (a : α) (s : Set α) (t : α → Set β) :
⋃ x ∈ insert a s, t x = t a ∪ ⋃ x ∈ s, t x
theorem Set.biUnion_pair {α : Type u_1} {β : Type u_2} (a b : α) (s : α → Set β) :
⋃ x ∈ {a, b}, s x = s a ∪ s b
theorem Set.inter_iUnion₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : Set α) (t : (i : ι) → κ i → Set α) :
s ∩ ⋃ (i : ι), ⋃ (j : κ i), t i j = ⋃ (i : ι), ⋃ (j : κ i), s ∩ t i j
theorem Set.iUnion₂_inter {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : (i : ι) → κ i → Set α) (t : Set α) :
(⋃ (i : ι), ⋃ (j : κ i), s i j) ∩ t = ⋃ (i : ι), ⋃ (j : κ i), s i j ∩ t
theorem Set.union_iInter₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : Set α) (t : (i : ι) → κ i → Set α) :
s ∪ ⋂ (i : ι), ⋂ (j : κ i), t i j = ⋂ (i : ι), ⋂ (j : κ i), s ∪ t i j
theorem Set.iInter₂_union {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : (i : ι) → κ i → Set α) (t : Set α) :
(⋂ (i : ι), ⋂ (j : κ i), s i j) ∪ t = ⋂ (i : ι), ⋂ (j : κ i), s i j ∪ t
theorem Set.mem_sUnion_of_mem {α : Type u_1} {x : α} {t : Set α} {S : Set (Set α)} (hx : x ∈ t) (ht : t ∈ S) :
theorem Set.notMem_of_notMem_sUnion {α : Type u_1} {x : α} {t : Set α} {S : Set (Set α)} (hx : x ∉ ⋃₀ S) (ht : t ∈ S) :
x ∉ t
theorem Set.sInter_subset_of_mem {α : Type u_1} {S : Set (Set α)} {t : Set α} (tS : t ∈ S) :
theorem Set.subset_sUnion_of_mem {α : Type u_1} {S : Set (Set α)} {t : Set α} (tS : t ∈ S) :
theorem Set.subset_sUnion_of_subset {α : Type u_1} {s : Set α} (t : Set (Set α)) (u : Set α) (h₁ : s ⊆ u) (h₂ : u ∈ t) :
theorem Set.sUnion_subset {α : Type u_1} {S : Set (Set α)} {t : Set α} (h : ∀ t' ∈ S, t' ⊆ t) :
@[simp]
theorem Set.sUnion_subset_iff {α : Type u_1} {s : Set (Set α)} {t : Set α} :
⋃₀ s ⊆ t ↔ ∀ t' ∈ s, t' ⊆ t
theorem Set.sUnion_mono_subsets {α : Type u_1} {s : Set (Set α)} {f : Set α → Set α} (hf : ∀ (t : Set α), t ⊆ f t) :

sUnion is monotone under taking a subset of each set.

theorem Set.sUnion_mono_supsets {α : Type u_1} {s : Set (Set α)} {f : Set α → Set α} (hf : ∀ (t : Set α), f t ⊆ t) :

sUnion is monotone under taking a superset of each set.

theorem Set.subset_sInter {α : Type u_1} {S : Set (Set α)} {t : Set α} (h : ∀ t' ∈ S, t ⊆ t') :
@[simp]
theorem Set.subset_sInter_iff {α : Type u_1} {S : Set (Set α)} {t : Set α} :
t ⊆ ⋂₀ S ↔ ∀ t' ∈ S, t ⊆ t'
theorem Set.sUnion_subset_sUnion {α : Type u_1} {S T : Set (Set α)} (h : S ⊆ T) :
theorem Set.sInter_subset_sInter {α : Type u_1} {S T : Set (Set α)} (h : S ⊆ T) :
@[simp]
theorem Set.sUnion_empty {α : Type u_1} :
@[simp]
theorem Set.sInter_empty {α : Type u_1} :
@[simp]
theorem Set.sUnion_singleton {α : Type u_1} (s : Set α) :
@[simp]
theorem Set.sInter_singleton {α : Type u_1} (s : Set α) :
@[simp]
theorem Set.sUnion_eq_empty {α : Type u_1} {S : Set (Set α)} :
⋃₀ S = ∅ ↔ ∀ s ∈ S, s = ∅
@[simp]
theorem Set.sInter_eq_univ {α : Type u_1} {S : Set (Set α)} :
⋂₀ S = univ ↔ ∀ s ∈ S, s = univ
theorem Set.subset_powerset_iff {α : Type u_1} {s : Set (Set α)} {t : Set α} :
theorem Set.sUnion_powerset_gc {α : Type u_1} :
GaloisConnection (fun (x : Set (Set α)) => ⋃₀ x) fun (x : Set α) => 𝒫 x

⋃₀ and 𝒫 form a Galois connection.

def Set.sUnionPowersetGI {α : Type u_1} :
GaloisInsertion (fun (x : Set (Set α)) => ⋃₀ x) fun (x : Set α) => 𝒫 x

⋃₀ and 𝒫 form a Galois insertion.

Equations
Instances For
    theorem Set.sUnion_mem_empty_univ {α : Type u_1} {S : Set (Set α)} (h : S ⊆ {∅, univ}) :

    If all sets in a collection are either ∅ or Set.univ, then so is their union.

    @[simp]
    theorem Set.nonempty_sUnion {α : Type u_1} {S : Set (Set α)} :
    (⋃₀ S).Nonempty ↔ ∃ s ∈ S, s.Nonempty
    theorem Set.Nonempty.of_sUnion {α : Type u_1} {s : Set (Set α)} (h : (⋃₀ s).Nonempty) :
    theorem Set.Nonempty.of_sUnion_eq_univ {α : Type u_1} [Nonempty α] {s : Set (Set α)} (h : ⋃₀ s = univ) :
    theorem Set.sUnion_union {α : Type u_1} (S T : Set (Set α)) :
    theorem Set.sInter_union {α : Type u_1} (S T : Set (Set α)) :
    @[simp]
    theorem Set.sUnion_insert {α : Type u_1} (s : Set α) (T : Set (Set α)) :
    @[simp]
    theorem Set.sInter_insert {α : Type u_1} (s : Set α) (T : Set (Set α)) :
    @[simp]
    theorem Set.sUnion_sdiff_singleton_empty {α : Type u_1} (s : Set (Set α)) :
    @[deprecated Set.sUnion_sdiff_singleton_empty (since := "2026-06-03")]
    theorem Set.sUnion_diff_singleton_empty {α : Type u_1} (s : Set (Set α)) :

    Alias of Set.sUnion_sdiff_singleton_empty.

    @[simp]
    theorem Set.sInter_sdiff_singleton_univ {α : Type u_1} (s : Set (Set α)) :
    @[deprecated Set.sInter_sdiff_singleton_univ (since := "2026-06-03")]
    theorem Set.sInter_diff_singleton_univ {α : Type u_1} (s : Set (Set α)) :

    Alias of Set.sInter_sdiff_singleton_univ.

    theorem Set.sUnion_pair {α : Type u_1} (s t : Set α) :
    ⋃₀ {s, t} = s ∪ t
    theorem Set.sInter_pair {α : Type u_1} (s t : Set α) :
    ⋂₀ {s, t} = s ∩ t
    @[simp]
    theorem Set.sUnion_image {α : Type u_1} {β : Type u_2} (f : α → Set β) (s : Set α) :
    ⋃₀ (f '' s) = ⋃ a ∈ s, f a
    @[simp]
    theorem Set.sInter_image {α : Type u_1} {β : Type u_2} (f : α → Set β) (s : Set α) :
    ⋂₀ (f '' s) = ⋂ a ∈ s, f a
    @[simp]
    theorem Set.sUnion_image2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : α → β → Set γ) (s : Set α) (t : Set β) :
    ⋃₀ image2 f s t = ⋃ a ∈ s, ⋃ b ∈ t, f a b
    @[simp]
    theorem Set.sInter_image2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : α → β → Set γ) (s : Set α) (t : Set β) :
    ⋂₀ image2 f s t = ⋂ a ∈ s, ⋂ b ∈ t, f a b
    @[simp]
    theorem Set.sUnion_range {β : Type u_2} {ι : Sort u_5} (f : ι → Set β) :
    ⋃₀ range f = ⋃ (x : ι), f x
    @[simp]
    theorem Set.sInter_range {β : Type u_2} {ι : Sort u_5} (f : ι → Set β) :
    ⋂₀ range f = ⋂ (x : ι), f x
    theorem Set.iUnion_eq_univ_iff {α : Type u_1} {ι : Sort u_5} {f : ι → Set α} :
    ⋃ (i : ι), f i = univ ↔ ∀ (x : α), ∃ (i : ι), x ∈ f i
    theorem Set.iUnion₂_eq_univ_iff {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} :
    ⋃ (i : ι), ⋃ (j : κ i), s i j = univ ↔ ∀ (a : α), ∃ (i : ι) (j : κ i), a ∈ s i j
    theorem Set.sUnion_eq_univ_iff {α : Type u_1} {c : Set (Set α)} :
    ⋃₀ c = univ ↔ ∀ (a : α), ∃ b ∈ c, a ∈ b
    theorem Set.iInter_eq_empty_of_eq_empty {α : Type u_1} {ι : Sort u_5} {i : ι} {f : ι → Set α} (h : f i = ∅) :
    ⋂ (j : ι), f j = ∅
    theorem Set.iInter_eq_empty_iff {α : Type u_1} {ι : Sort u_5} {f : ι → Set α} :
    ⋂ (i : ι), f i = ∅ ↔ ∀ (x : α), ∃ (i : ι), x ∉ f i
    theorem Set.iInter₂_eq_empty_iff {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} :
    ⋂ (i : ι), ⋂ (j : κ i), s i j = ∅ ↔ ∀ (a : α), ∃ (i : ι) (j : κ i), a ∉ s i j
    theorem Set.sInter_eq_empty_iff {α : Type u_1} {c : Set (Set α)} :
    ⋂₀ c = ∅ ↔ ∀ (a : α), ∃ b ∈ c, a ∉ b
    @[simp]
    theorem Set.nonempty_iInter {α : Type u_1} {ι : Sort u_5} {f : ι → Set α} :
    (⋂ (i : ι), f i).Nonempty ↔ ∃ (x : α), ∀ (i : ι), x ∈ f i
    theorem Set.nonempty_iInter₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} :
    (⋂ (i : ι), ⋂ (j : κ i), s i j).Nonempty ↔ ∃ (a : α), ∀ (i : ι) (j : κ i), a ∈ s i j
    @[simp]
    theorem Set.nonempty_sInter {α : Type u_1} {c : Set (Set α)} :
    (⋂₀ c).Nonempty ↔ ∃ (a : α), ∀ b ∈ c, a ∈ b
    theorem Set.compl_sUnion {α : Type u_1} (S : Set (Set α)) :
    theorem Set.compl_sInter {α : Type u_1} (S : Set (Set α)) :
    theorem Set.inter_empty_of_inter_sUnion_empty {α : Type u_1} {s t : Set α} {S : Set (Set α)} (hs : t ∈ S) (h : s ∩ ⋃₀ S = ∅) :
    s ∩ t = ∅
    theorem Set.range_sigma_eq_iUnion_range {α : Type u_1} {β : Type u_2} {γ : α → Type u_12} (f : Sigma γ → β) :
    range f = ⋃ (a : α), range fun (b : γ a) => f ⟨a, b⟩
    theorem Set.iUnion_eq_range_sigma {α : Type u_1} {β : Type u_2} (s : α → Set β) :
    ⋃ (i : α), s i = range fun (a : (i : α) × ↑(s i)) => ↑a.snd
    theorem Set.iUnion_eq_range_psigma {β : Type u_2} {ι : Sort u_5} (s : ι → Set β) :
    ⋃ (i : ι), s i = range fun (a : (i : ι) ×' ↑(s i)) => ↑a.snd
    theorem Set.iUnion_image_preimage_sigma_mk_eq_self {ι : Type u_12} {σ : ι → Type u_13} (s : Set (Sigma σ)) :
    ⋃ (i : ι), Sigma.mk i '' Sigma.mk i ⁻¹' s = s
    theorem Set.Sigma.univ {α : Type u_1} (X : α → Type u_12) :
    Set.univ = ⋃ (a : α), range (Sigma.mk a)
    theorem Set.sUnion_mono {α : Type u_1} {S T : Set (Set α)} (h : S ⊆ T) :

    Alias of Set.sUnion_subset_sUnion.

    theorem Set.sInter_mono {α : Type u_1} {S T : Set (Set α)} (h : S ⊆ T) :

    Alias of Set.sInter_subset_sInter.

    theorem Set.iUnion_subset_iUnion_const {α : Type u_1} {ι : Sort u_5} {ι₂ : Sort u_7} {s : Set α} (h : ι → ι₂) :
    ⋃ (x : ι), s ⊆ ⋃ (x : ι₂), s
    @[simp]
    theorem Set.iUnion_singleton_eq_range {α : Type u_1} {β : Type u_2} (f : α → β) :
    ⋃ (x : α), {f x} = range f
    theorem Set.iUnion_insert_eq_range_union_iUnion {β : Type u_2} {ι : Type u_12} (x : ι → β) (t : ι → Set β) :
    ⋃ (i : ι), insert (x i) (t i) = range x ∪ ⋃ (i : ι), t i
    theorem Set.iUnion_of_singleton (α : Type u_12) :
    ⋃ (x : α), {x} = univ
    theorem Set.iUnion_of_singleton_coe {α : Type u_1} (s : Set α) :
    ⋃ (i : ↑s), {↑i} = s
    theorem Set.sUnion_eq_biUnion {α : Type u_1} {s : Set (Set α)} :
    ⋃₀ s = ⋃ i ∈ s, i
    theorem Set.sInter_eq_biInter {α : Type u_1} {s : Set (Set α)} :
    ⋂₀ s = ⋂ i ∈ s, i
    theorem Set.sUnion_eq_iUnion {α : Type u_1} {s : Set (Set α)} :
    ⋃₀ s = ⋃ (i : ↑s), ↑i
    theorem Set.sInter_eq_iInter {α : Type u_1} {s : Set (Set α)} :
    ⋂₀ s = ⋂ (i : ↑s), ↑i
    @[simp]
    theorem Set.iUnion_of_empty {α : Type u_1} {ι : Sort u_5} [IsEmpty ι] (s : ι → Set α) :
    ⋃ (i : ι), s i = ∅
    @[simp]
    theorem Set.iInter_of_empty {α : Type u_1} {ι : Sort u_5} [IsEmpty ι] (s : ι → Set α) :
    ⋂ (i : ι), s i = univ
    theorem Set.union_eq_iUnion {α : Type u_1} {s₁ s₂ : Set α} :
    s₁ ∪ s₂ = ⋃ (b : Bool), bif b then s₁ else s₂
    theorem Set.inter_eq_iInter {α : Type u_1} {s₁ s₂ : Set α} :
    s₁ ∩ s₂ = ⋂ (b : Bool), bif b then s₁ else s₂
    theorem Set.sInter_union_sInter {α : Type u_1} {S T : Set (Set α)} :
    ⋂₀ S ∪ ⋂₀ T = ⋂ p ∈ S ×ˢ T, p.1 ∪ p.2
    theorem Set.sUnion_inter_sUnion {α : Type u_1} {s t : Set (Set α)} :
    ⋃₀ s ∩ ⋃₀ t = ⋃ p ∈ s ×ˢ t, p.1 ∩ p.2
    theorem Set.biUnion_iUnion {α : Type u_1} {β : Type u_2} {ι : Sort u_5} (s : ι → Set α) (t : α → Set β) :
    ⋃ x ∈ ⋃ (i : ι), s i, t x = ⋃ (i : ι), ⋃ x ∈ s i, t x
    theorem Set.biInter_iUnion {α : Type u_1} {β : Type u_2} {ι : Sort u_5} (s : ι → Set α) (t : α → Set β) :
    ⋂ x ∈ ⋃ (i : ι), s i, t x = ⋂ (i : ι), ⋂ x ∈ s i, t x
    theorem Set.sUnion_iUnion {α : Type u_1} {ι : Sort u_5} (s : ι → Set (Set α)) :
    ⋃₀ ⋃ (i : ι), s i = ⋃ (i : ι), ⋃₀ s i
    theorem Set.sInter_iUnion {α : Type u_1} {ι : Sort u_5} (s : ι → Set (Set α)) :
    ⋂₀ ⋃ (i : ι), s i = ⋂ (i : ι), ⋂₀ s i
    theorem Set.iUnion_range_eq_sUnion {α : Type u_12} {β : Type u_13} (C : Set (Set α)) {f : (s : ↑C) → β → ↑↑s} (hf : ∀ (s : ↑C), Function.Surjective (f s)) :
    (⋃ (y : β), range fun (s : ↑C) => ↑(f s y)) = ⋃₀ C
    theorem Set.iUnion_range_eq_iUnion {α : Type u_1} {β : Type u_2} {ι : Sort u_5} (C : ι → Set α) {f : (x : ι) → β → ↑(C x)} (hf : ∀ (x : ι), Function.Surjective (f x)) :
    (⋃ (y : β), range fun (x : ι) => ↑(f x y)) = ⋃ (x : ι), C x
    theorem Set.iUnion_sumElim {α : Type u_1} {ι : Type u_12} {σ : Type u_13} (s : ι → Set α) (t : σ → Set α) :
    ⋃ (x : ι ⊕ σ), Sum.elim s t x = (⋃ (x : ι), s x) ∪ ⋃ (x : σ), t x
    theorem Set.union_distrib_iInter_left {α : Type u_1} {ι : Sort u_5} (s : ι → Set α) (t : Set α) :
    t ∪ ⋂ (i : ι), s i = ⋂ (i : ι), t ∪ s i
    theorem Set.union_distrib_iInter₂_left {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : Set α) (t : (i : ι) → κ i → Set α) :
    s ∪ ⋂ (i : ι), ⋂ (j : κ i), t i j = ⋂ (i : ι), ⋂ (j : κ i), s ∪ t i j
    theorem Set.union_distrib_iInter_right {α : Type u_1} {ι : Sort u_5} (s : ι → Set α) (t : Set α) :
    (⋂ (i : ι), s i) ∪ t = ⋂ (i : ι), s i ∪ t
    theorem Set.union_distrib_iInter₂_right {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} (s : (i : ι) → κ i → Set α) (t : Set α) :
    (⋂ (i : ι), ⋂ (j : κ i), s i j) ∪ t = ⋂ (i : ι), ⋂ (j : κ i), s i j ∪ t
    theorem Set.biUnion_lt_eq_iUnion {α : Type u_1} {β : Type u_2} [LT α] [NoMaxOrder α] {s : α → Set β} :
    ⋃ (n : α), ⋃ (m : α), ⋃ (_ : m < n), s m = ⋃ (n : α), s n
    theorem Set.biUnion_le_eq_iUnion {α : Type u_1} {β : Type u_2} [Preorder α] {s : α → Set β} :
    ⋃ (n : α), ⋃ (m : α), ⋃ (_ : m ≤ n), s m = ⋃ (n : α), s n
    theorem Set.biInter_lt_eq_iInter {α : Type u_1} {β : Type u_2} [LT α] [NoMaxOrder α] {s : α → Set β} :
    ⋂ (n : α), ⋂ (m : α), ⋂ (_ : m < n), s m = ⋂ (n : α), s n
    theorem Set.biInter_le_eq_iInter {α : Type u_1} {β : Type u_2} [Preorder α] {s : α → Set β} :
    ⋂ (n : α), ⋂ (m : α), ⋂ (_ : m ≤ n), s m = ⋂ (n : α), s n
    theorem Set.biUnion_gt_eq_iUnion {α : Type u_1} {β : Type u_2} [LT α] [NoMinOrder α] {s : α → Set β} :
    ⋃ (n : α), ⋃ (m : α), ⋃ (_ : m > n), s m = ⋃ (n : α), s n
    theorem Set.biUnion_ge_eq_iUnion {α : Type u_1} {β : Type u_2} [Preorder α] {s : α → Set β} :
    ⋃ (n : α), ⋃ (m : α), ⋃ (_ : m ≥ n), s m = ⋃ (n : α), s n
    theorem Set.biInter_gt_eq_iInf {α : Type u_1} {β : Type u_2} [LT α] [NoMinOrder α] {s : α → Set β} :
    ⋂ (n : α), ⋂ (m : α), ⋂ (_ : m > n), s m = ⋂ (n : α), s n
    theorem Set.biInter_ge_eq_iInf {α : Type u_1} {β : Type u_2} [Preorder α] {s : α → Set β} :
    ⋂ (n : α), ⋂ (m : α), ⋂ (_ : m ≥ n), s m = ⋂ (n : α), s n
    theorem Set.biUnion_le {α : Type u_1} {ι : Type u_12} [PartialOrder ι] (s : ι → Set α) (i : ι) :
    ⋃ (j : ι), ⋃ (_ : j ≤ i), s j = (⋃ (j : ι), ⋃ (_ : j < i), s j) ∪ s i
    theorem Set.biInter_le {α : Type u_1} {ι : Type u_12} [PartialOrder ι] (s : ι → Set α) (i : ι) :
    ⋂ (j : ι), ⋂ (_ : j ≤ i), s j = (⋂ (j : ι), ⋂ (_ : j < i), s j) ∩ s i
    theorem Set.biUnion_ge {α : Type u_1} {ι : Type u_12} [PartialOrder ι] (s : ι → Set α) (i : ι) :
    ⋃ (j : ι), ⋃ (_ : j ≥ i), s j = s i ∪ ⋃ (j : ι), ⋃ (_ : j > i), s j
    theorem Set.biInter_ge {α : Type u_1} {ι : Type u_12} [PartialOrder ι] (s : ι → Set α) (i : ι) :
    ⋂ (j : ι), ⋂ (_ : j ≥ i), s j = s i ∩ ⋂ (j : ι), ⋂ (_ : j > i), s j
    theorem Set.pi_def {α : Type u_1} {π : α → Type u_12} (i : Set α) (s : (a : α) → Set (π a)) :
    i.pi s = ⋂ a ∈ i, Function.eval a ⁻¹' s a
    theorem Set.univ_pi_eq_iInter {α : Type u_1} {π : α → Type u_12} (t : (i : α) → Set (π i)) :
    univ.pi t = ⋂ (i : α), Function.eval i ⁻¹' t i
    theorem Set.pi_sdiff_pi_subset {α : Type u_1} {π : α → Type u_12} (i : Set α) (s t : (a : α) → Set (π a)) :
    i.pi s \ i.pi t ⊆ ⋃ a ∈ i, Function.eval a ⁻¹' (s a \ t a)
    @[deprecated Set.pi_sdiff_pi_subset (since := "2026-06-03")]
    theorem Set.pi_diff_pi_subset {α : Type u_1} {π : α → Type u_12} (i : Set α) (s t : (a : α) → Set (π a)) :
    i.pi s \ i.pi t ⊆ ⋃ a ∈ i, Function.eval a ⁻¹' (s a \ t a)

    Alias of Set.pi_sdiff_pi_subset.

    theorem Set.iUnion_univ_pi {α : Type u_1} {π : α → Type u_12} {ι : α → Type u_13} (t : (a : α) → ι a → Set (π a)) :
    (⋃ (x : (a : α) → ι a), univ.pi fun (a : α) => t a (x a)) = univ.pi fun (a : α) => ⋃ (j : ι a), t a j
    theorem Set.biUnion_univ_pi {α : Type u_1} {π : α → Type u_12} {ι : α → Type u_13} (s : (a : α) → Set (ι a)) (t : (a : α) → ι a → Set (π a)) :
    (⋃ x ∈ univ.pi s, univ.pi fun (a : α) => t a (x a)) = univ.pi fun (a : α) => ⋃ j ∈ s a, t a j
    theorem Set.pi_iUnion_eq_iInter_pi {α : Type u_1} {π : α → Type u_12} {α' : Type u_13} (s : α' → Set α) (t : (a : α) → Set (π a)) :
    (⋃ (i : α'), s i).pi t = ⋂ (i : α'), (s i).pi t
    theorem Set.directedOn_iUnion {α : Type u_1} {ι : Sort u_5} {r : α → α → Prop} {f : ι → Set α} (hd : Directed (fun (x1 x2 : Set α) => x1 ⊆ x2) f) (h : ∀ (x : ι), DirectedOn r (f x)) :
    DirectedOn r (⋃ (x : ι), f x)
    theorem Set.directedOn_sUnion {α : Type u_1} {r : α → α → Prop} {S : Set (Set α)} (hd : DirectedOn (fun (x1 x2 : Set α) => x1 ⊆ x2) S) (h : ∀ x ∈ S, DirectedOn r x) :
    theorem Function.Surjective.iUnion_comp {α : Type u_1} {ι : Sort u_5} {ι₂ : Sort u_7} {f : ι → ι₂} (hf : Surjective f) (g : ι₂ → Set α) :
    ⋃ (x : ι), g (f x) = ⋃ (y : ι₂), g y
    theorem Function.Surjective.iInter_comp {α : Type u_1} {ι : Sort u_5} {ι₂ : Sort u_7} {f : ι → ι₂} (hf : Surjective f) (g : ι₂ → Set α) :
    ⋂ (x : ι), g (f x) = ⋂ (y : ι₂), g y

    Disjoint sets #

    @[simp]
    theorem Set.disjoint_iUnion_left {α : Type u_1} {t : Set α} {ι : Sort u_12} {s : ι → Set α} :
    Disjoint (⋃ (i : ι), s i) t ↔ ∀ (i : ι), Disjoint (s i) t
    @[simp]
    theorem Set.disjoint_iUnion_right {α : Type u_1} {t : Set α} {ι : Sort u_12} {s : ι → Set α} :
    Disjoint t (⋃ (i : ι), s i) ↔ ∀ (i : ι), Disjoint t (s i)
    theorem Set.disjoint_iUnion₂_left {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : (i : ι) → κ i → Set α} {t : Set α} :
    Disjoint (⋃ (i : ι), ⋃ (j : κ i), s i j) t ↔ ∀ (i : ι) (j : κ i), Disjoint (s i j) t
    theorem Set.disjoint_iUnion₂_right {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} {s : Set α} {t : (i : ι) → κ i → Set α} :
    Disjoint s (⋃ (i : ι), ⋃ (j : κ i), t i j) ↔ ∀ (i : ι) (j : κ i), Disjoint s (t i j)
    @[simp]
    theorem Set.disjoint_sUnion_left {α : Type u_1} {S : Set (Set α)} {t : Set α} :
    Disjoint (⋃₀ S) t ↔ ∀ s ∈ S, Disjoint s t
    @[simp]
    theorem Set.disjoint_sUnion_right {α : Type u_1} {s : Set α} {S : Set (Set α)} :
    Disjoint s (⋃₀ S) ↔ ∀ t ∈ S, Disjoint s t
    theorem Set.biUnion_compl_eq_of_pairwise_disjoint_of_iUnion_eq_univ {α : Type u_1} {ι : Type u_12} {Es : ι → Set α} (Es_union : ⋃ (i : ι), Es i = univ) (Es_disj : Pairwise fun (i j : ι) => Disjoint (Es i) (Es j)) (I : Set ι) :
    (⋃ i ∈ I, Es i)ᶜ = ⋃ i ∈ Iᶜ, Es i

    Intervals #

    theorem Set.nonempty_iInter_Iic_iff {α : Type u_1} {ι : Sort u_5} [Preorder α] {f : ι → α} :
    (⋂ (i : ι), Iic (f i)).Nonempty ↔ BddBelow (range f)
    theorem Set.nonempty_iInter_Ici_iff {α : Type u_1} {ι : Sort u_5} [Preorder α] {f : ι → α} :
    (⋂ (i : ι), Ici (f i)).Nonempty ↔ BddAbove (range f)
    theorem Set.Ici_iSup {α : Type u_1} {ι : Sort u_5} [CompleteLattice α] (f : ι → α) :
    Ici (⨆ (i : ι), f i) = ⋂ (i : ι), Ici (f i)
    theorem Set.Iic_iInf {α : Type u_1} {ι : Sort u_5} [CompleteLattice α] (f : ι → α) :
    Iic (⨅ (i : ι), f i) = ⋂ (i : ι), Iic (f i)
    theorem Set.Ici_iSup₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} [CompleteLattice α] (f : (i : ι) → κ i → α) :
    Ici (⨆ (i : ι), ⨆ (j : κ i), f i j) = ⋂ (i : ι), ⋂ (j : κ i), Ici (f i j)
    theorem Set.Iic_iInf₂ {α : Type u_1} {ι : Sort u_5} {κ : ι → Sort u_8} [CompleteLattice α] (f : (i : ι) → κ i → α) :
    Iic (⨅ (i : ι), ⨅ (j : κ i), f i j) = ⋂ (i : ι), ⋂ (j : κ i), Iic (f i j)
    theorem Set.Ici_sSup {α : Type u_1} [CompleteLattice α] (s : Set α) :
    Ici (sSup s) = ⋂ a ∈ s, Ici a
    theorem Set.Iic_sInf {α : Type u_1} [CompleteLattice α] (s : Set α) :
    Iic (sInf s) = ⋂ a ∈ s, Iic a
    theorem Set.biUnion_sdiff_biUnion_subset {α : Type u_1} {β : Type u_2} (t : α → Set β) (s₁ s₂ : Set α) :
    (⋃ x ∈ s₁, t x) \ ⋃ x ∈ s₂, t x ⊆ ⋃ x ∈ s₁ \ s₂, t x
    @[deprecated Set.biUnion_sdiff_biUnion_subset (since := "2026-06-03")]
    theorem Set.biUnion_diff_biUnion_subset {α : Type u_1} {β : Type u_2} (t : α → Set β) (s₁ s₂ : Set α) :
    (⋃ x ∈ s₁, t x) \ ⋃ x ∈ s₂, t x ⊆ ⋃ x ∈ s₁ \ s₂, t x

    Alias of Set.biUnion_sdiff_biUnion_subset.

    def Set.sigmaToiUnion {α : Type u_1} {β : Type u_2} (t : α → Set β) (x : (i : α) × ↑(t i)) :
    ↑(⋃ (i : α), t i)

    If t is an indexed family of sets, then there is a natural map from Σ i, t i to ⋃ i, t i sending ⟨i, x⟩ to x.

    Equations
    Instances For
      theorem Set.sigmaToiUnion_surjective {α : Type u_1} {β : Type u_2} (t : α → Set β) :
      noncomputable def Set.sigmaEquiv {α : Type u_1} {β : Type u_2} (s : α → Set β) (hs : ∀ (b : β), ∃! i : α, b ∈ s i) :
      (i : α) × ↑(s i) ≃ β

      Equivalence from the disjoint union of a family of sets forming a partition of β, to β itself.

      Equations
      Instances For
        noncomputable def Set.unionEqSigmaOfDisjoint {α : Type u_1} {β : Type u_2} {t : α → Set β} (h : Pairwise (Function.onFun Disjoint t)) :
        ↑(⋃ (i : α), t i) ≃ (i : α) × ↑(t i)

        Equivalence between a disjoint union and a dependent sum.

        Equations
        Instances For
          @[simp]
          theorem Set.coe_unionEqSigmaOfDisjoint_symm_apply {α : Type u_12} {β : Type u_13} {t : α → Set β} (h : Pairwise (Function.onFun Disjoint t)) (x : (i : α) × ↑(t i)) :
          @[simp]
          theorem Set.coe_snd_unionEqSigmaOfDisjoint {α : Type u_12} {β : Type u_13} {t : α → Set β} (h : Pairwise (Function.onFun Disjoint t)) (x : ↑(⋃ (i : α), t i)) :
          ↑((unionEqSigmaOfDisjoint h) x).snd = ↑x
          theorem Set.iUnion_ge_eq_iUnion_nat_add {α : Type u_1} (u : ℕ → Set α) (n : ℕ) :
          ⋃ (i : ℕ), ⋃ (_ : i ≥ n), u i = ⋃ (i : ℕ), u (i + n)
          theorem Set.iInter_ge_eq_iInter_nat_add {α : Type u_1} (u : ℕ → Set α) (n : ℕ) :
          ⋂ (i : ℕ), ⋂ (_ : i ≥ n), u i = ⋂ (i : ℕ), u (i + n)
          theorem Monotone.iUnion_nat_add {α : Type u_1} {f : ℕ → Set α} (hf : Monotone f) (k : ℕ) :
          ⋃ (n : ℕ), f (n + k) = ⋃ (n : ℕ), f n
          theorem Antitone.iInter_nat_add {α : Type u_1} {f : ℕ → Set α} (hf : Antitone f) (k : ℕ) :
          ⋂ (n : ℕ), f (n + k) = ⋂ (n : ℕ), f n
          @[simp]
          theorem Set.iUnion_iInter_ge_nat_add {α : Type u_1} (f : ℕ → Set α) (k : ℕ) :
          ⋃ (n : ℕ), ⋂ (i : ℕ), ⋂ (_ : i ≥ n), f (i + k) = ⋃ (n : ℕ), ⋂ (i : ℕ), ⋂ (_ : i ≥ n), f i
          theorem Set.union_iUnion_nat_succ {α : Type u_1} (u : ℕ → Set α) :
          u 0 ∪ ⋃ (i : ℕ), u (i + 1) = ⋃ (i : ℕ), u i
          theorem Set.inter_iInter_nat_succ {α : Type u_1} (u : ℕ → Set α) :
          u 0 ∩ ⋂ (i : ℕ), u (i + 1) = ⋂ (i : ℕ), u i
          theorem Set.iUnion_le_nat :
          ⋃ (n : ℕ), {i : ℕ | i ≤ n} = univ
          theorem iSup_iUnion {α : Type u_1} {β : Type u_2} {ι : Sort u_5} [CompleteLattice β] (s : ι → Set α) (f : α → β) :
          ⨆ a ∈ ⋃ (i : ι), s i, f a = ⨆ (i : ι), ⨆ a ∈ s i, f a
          theorem iInf_iUnion {α : Type u_1} {β : Type u_2} {ι : Sort u_5} [CompleteLattice β] (s : ι → Set α) (f : α → β) :
          ⨅ a ∈ ⋃ (i : ι), s i, f a = ⨅ (i : ι), ⨅ a ∈ s i, f a
          theorem sSup_iUnion {β : Type u_2} {ι : Sort u_5} [CompleteLattice β] (t : ι → Set β) :
          sSup (⋃ (i : ι), t i) = ⨆ (i : ι), sSup (t i)
          theorem sSup_sUnion {β : Type u_2} [CompleteLattice β] (s : Set (Set β)) :
          sSup (⋃₀ s) = ⨆ t ∈ s, sSup t
          theorem sInf_sUnion {β : Type u_2} [CompleteLattice β] (s : Set (Set β)) :
          sInf (⋃₀ s) = ⨅ t ∈ s, sInf t
          theorem iSup_sUnion {α : Type u_1} {β : Type u_2} [CompleteLattice β] (S : Set (Set α)) (f : α → β) :
          ⨆ x ∈ ⋃₀ S, f x = ⨆ s ∈ S, ⨆ x ∈ s, f x
          theorem iInf_sUnion {α : Type u_1} {β : Type u_2} [CompleteLattice β] (S : Set (Set α)) (f : α → β) :
          ⨅ x ∈ ⋃₀ S, f x = ⨅ s ∈ S, ⨅ x ∈ s, f x
          theorem forall_sUnion {α : Type u_1} {S : Set (Set α)} {p : α → Prop} :
          (∀ x ∈ ⋃₀ S, p x) ↔ ∀ s ∈ S, ∀ x ∈ s, p x
          theorem exists_sUnion {α : Type u_1} {S : Set (Set α)} {p : α → Prop} :
          (∃ x ∈ ⋃₀ S, p x) ↔ ∃ s ∈ S, ∃ x ∈ s, p x