File: Mathlib/Data/Set/Sigma.lean

full_name: Set.range_sigmaMk
code: @[simp]
theorem range_sigmaMk (i : ι) : range (Sigma.mk i : α i → Sigma α) = Sigma.fst ⁻¹' {i} 
goal: Set.range (Sigma.mk i) = Sigma.fst ⁻¹' {i}

full_name: Set.preimage_image_sigmaMk_of_ne
code: theorem preimage_image_sigmaMk_of_ne (h : i ≠ j) (s : Set (α j)) :
    Sigma.mk i ⁻¹' (Sigma.mk j '' s) = ∅ 
goal: Sigma.mk i ⁻¹' (Sigma.mk j '' s) = ∅

full_name: Set.image_sigmaMk_preimage_sigmaMap_subset
code: theorem image_sigmaMk_preimage_sigmaMap_subset {β : ι' → Type*} (f : ι → ι')
    (g : ∀ i, α i → β (f i)) (i : ι) (s : Set (β (f i))) :
    Sigma.mk i '' (g i ⁻¹' s) ⊆ Sigma.map f g ⁻¹' (Sigma.mk (f i) '' s) 
goal: Sigma.mk i '' (g i ⁻¹' s) ⊆ Sigma.map f g ⁻¹' (Sigma.mk (f i) '' s)

full_name: Set.image_sigmaMk_preimage_sigmaMap
code: theorem image_sigmaMk_preimage_sigmaMap {β : ι' → Type*} {f : ι → ι'} (hf : Function.Injective f)
    (g : ∀ i, α i → β (f i)) (i : ι) (s : Set (β (f i))) :
    Sigma.mk i '' (g i ⁻¹' s) = Sigma.map f g ⁻¹' (Sigma.mk (f i) '' s) 
goal: Sigma.mk i '' (g i ⁻¹' s) = Sigma.map f g ⁻¹' (Sigma.mk (f i) '' s)

full_name: Set.sigma
code: /-- Indexed sum of sets. `s.sigma t` is the set of dependent pairs `⟨i, a⟩` such that `i ∈ s` and
`a ∈ t i`. -/
protected def sigma (s : Set ι) (t : ∀ i, Set (α i)) : Set (Σ i, α i) 
goal: Set ((i : ι) × α i)

full_name: Set.mem_sigma_iff
code: @[simp] theorem mem_sigma_iff : x ∈ s.sigma t ↔ x.1 ∈ s ∧ x.2 ∈ t x.1 
goal: x ∈ s.sigma t ↔ x.fst ∈ s ∧ x.snd ∈ t x.fst

full_name: Set.mk_sigma_iff
code: theorem mk_sigma_iff : (⟨i, a⟩ : Σ i, α i) ∈ s.sigma t ↔ i ∈ s ∧ a ∈ t i 
goal: ⟨i, a⟩ ∈ s.sigma t ↔ i ∈ s ∧ a ∈ t i

full_name: Set.mk_mem_sigma
code: theorem mk_mem_sigma (hi : i ∈ s) (ha : a ∈ t i) : (⟨i, a⟩ : Σ i, α i) ∈ s.sigma t 
goal: ⟨i, a⟩ ∈ s.sigma t

full_name: Set.sigma_mono
code: theorem sigma_mono (hs : s₁ ⊆ s₂) (ht : ∀ i, t₁ i ⊆ t₂ i) : s₁.sigma t₁ ⊆ s₂.sigma t₂ 
goal: s₁.sigma t₁ ⊆ s₂.sigma t₂

full_name: Set.sigma_subset_iff
code: theorem sigma_subset_iff :
    s.sigma t ⊆ u ↔ ∀ ⦃i⦄, i ∈ s → ∀ ⦃a⦄, a ∈ t i → (⟨i, a⟩ : Σ i, α i) ∈ u 
goal: s.sigma t ⊆ u ↔ ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃a : α i⦄, a ∈ t i → ⟨i, a⟩ ∈ u

full_name: Set.forall_sigma_iff
code: theorem forall_sigma_iff {p : (Σ i, α i) → Prop} :
    (∀ x ∈ s.sigma t, p x) ↔ ∀ ⦃i⦄, i ∈ s → ∀ ⦃a⦄, a ∈ t i → p ⟨i, a⟩ 
goal: (∀ x ∈ s.sigma t, p x) ↔ ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃a : α i⦄, a ∈ t i → p ⟨i, a⟩

full_name: Set.exists_sigma_iff
code: theorem exists_sigma_iff {p : (Σi, α i) → Prop} :
    (∃ x ∈ s.sigma t, p x) ↔ ∃ i ∈ s, ∃ a ∈ t i, p ⟨i, a⟩ 
goal: (∃ x ∈ s.sigma t, p x) ↔ ∃ i ∈ s, ∃ a ∈ t i, p ⟨i, a⟩

full_name: Set.sigma_empty
code: @[simp] theorem sigma_empty : s.sigma (fun i ↦ (∅ : Set (α i))) = ∅ 
goal: (s.sigma fun i => ∅) = ∅

full_name: Set.empty_sigma
code: @[simp] theorem empty_sigma : (∅ : Set ι).sigma t = ∅ 
goal: ∅.sigma t = ∅

full_name: Set.univ_sigma_univ
code: theorem univ_sigma_univ : (@univ ι).sigma (fun _ ↦ @univ (α i)) = univ 
goal: (Set.univ.sigma fun x => Set.univ) = Set.univ

full_name: Set.sigma_univ
code: @[simp]
theorem sigma_univ : s.sigma (fun _ ↦ univ : ∀ i, Set (α i)) = Sigma.fst ⁻¹' s 
goal: (s.sigma fun x => Set.univ) = Sigma.fst ⁻¹' s

full_name: Set.univ_sigma_preimage_mk
code: @[simp] theorem univ_sigma_preimage_mk (s : Set (Σ i, α i)) :
    (univ : Set ι).sigma (fun i ↦ Sigma.mk i ⁻¹' s) = s 
goal: (Set.univ.sigma fun i => Sigma.mk i ⁻¹' s) = s

full_name: Set.singleton_sigma
code: @[simp]
theorem singleton_sigma : ({i} : Set ι).sigma t = Sigma.mk i '' t i 
goal: {i}.sigma t = Sigma.mk i '' t i

full_name: Set.sigma_singleton
code: @[simp]
theorem sigma_singleton {a : ∀ i, α i} :
    s.sigma (fun i ↦ ({a i} : Set (α i))) = (fun i ↦ Sigma.mk i <| a i) '' s 
goal: (s.sigma fun i => {a i}) = (fun i => ⟨i, a i⟩) '' s

full_name: Set.singleton_sigma_singleton
code: theorem singleton_sigma_singleton {a : ∀ i, α i} :
    (({i} : Set ι).sigma fun i ↦ ({a i} : Set (α i))) = {⟨i, a i⟩} 
goal: ({i}.sigma fun i => {a i}) = {⟨i, a i⟩}

full_name: Set.union_sigma
code: @[simp]
theorem union_sigma : (s₁ ∪ s₂).sigma t = s₁.sigma t ∪ s₂.sigma t 
goal: (s₁ ∪ s₂).sigma t = s₁.sigma t ∪ s₂.sigma t

full_name: Set.sigma_union
code: @[simp]
theorem sigma_union : s.sigma (fun i ↦ t₁ i ∪ t₂ i) = s.sigma t₁ ∪ s.sigma t₂ 
goal: (s.sigma fun i => t₁ i ∪ t₂ i) = s.sigma t₁ ∪ s.sigma t₂

full_name: Set.sigma_inter_sigma
code: theorem sigma_inter_sigma : s₁.sigma t₁ ∩ s₂.sigma t₂ = (s₁ ∩ s₂).sigma fun i ↦ t₁ i ∩ t₂ i 
goal: s₁.sigma t₁ ∩ s₂.sigma t₂ = (s₁ ∩ s₂).sigma fun i => t₁ i ∩ t₂ i

full_name: biSup_sigma
code: theorem _root_.biSup_sigma (s : Set ι) (t : ∀ i, Set (α i)) (f : Sigma α → β) :
    ⨆ ij ∈ s.sigma t, f ij = ⨆ (i ∈ s) (j ∈ t i), f ⟨i, j⟩ 
goal: ⨆ ij ∈ s.sigma t, f ij = ⨆ i ∈ s, ⨆ j ∈ t i, f ⟨i, j⟩

full_name: biSup_sigma'
code: theorem _root_.biSup_sigma' (s : Set ι) (t : ∀ i, Set (α i)) (f : ∀ i, α i → β) :
    ⨆ (i ∈ s) (j ∈ t i), f i j = ⨆ ij ∈ s.sigma t, f ij.fst ij.snd 
goal: ⨆ i ∈ s, ⨆ j ∈ t i, f i j = ⨆ ij ∈ s.sigma t, f ij.fst ij.snd

full_name: biInf_sigma
code: theorem _root_.biInf_sigma (s : Set ι) (t : ∀ i, Set (α i)) (f : Sigma α → β) :
    ⨅ ij ∈ s.sigma t, f ij = ⨅ (i ∈ s) (j ∈ t i), f ⟨i, j⟩ 
goal: ⨅ ij ∈ s.sigma t, f ij = ⨅ i ∈ s, ⨅ j ∈ t i, f ⟨i, j⟩

full_name: biInf_sigma'
code: theorem _root_.biInf_sigma' (s : Set ι) (t : ∀ i, Set (α i)) (f : ∀ i, α i → β) :
    ⨅ (i ∈ s) (j ∈ t i), f i j = ⨅ ij ∈ s.sigma t, f ij.fst ij.snd 
goal: ⨅ i ∈ s, ⨅ j ∈ t i, f i j = ⨅ ij ∈ s.sigma t, f ij.fst ij.snd

full_name: Set.biUnion_sigma
code: theorem biUnion_sigma (s : Set ι) (t : ∀ i, Set (α i)) (f : Sigma α → Set β) :
    ⋃ ij ∈ s.sigma t, f ij = ⋃ i ∈ s, ⋃ j ∈ t i, f ⟨i, j⟩ 
goal: ⋃ ij ∈ s.sigma t, f ij = ⋃ i ∈ s, ⋃ j ∈ t i, f ⟨i, j⟩

full_name: Set.biUnion_sigma'
code: theorem biUnion_sigma' (s : Set ι) (t : ∀ i, Set (α i)) (f : ∀ i, α i → Set β) :
    ⋃ i ∈ s, ⋃ j ∈ t i, f i j = ⋃ ij ∈ s.sigma t, f ij.fst ij.snd 
goal: ⋃ i ∈ s, ⋃ j ∈ t i, f i j = ⋃ ij ∈ s.sigma t, f ij.fst ij.snd

full_name: Set.biInter_sigma
code: theorem biInter_sigma (s : Set ι) (t : ∀ i, Set (α i)) (f : Sigma α → Set β) :
    ⋂ ij ∈ s.sigma t, f ij = ⋂ i ∈ s, ⋂ j ∈ t i, f ⟨i, j⟩ 
goal: ⋂ ij ∈ s.sigma t, f ij = ⋂ i ∈ s, ⋂ j ∈ t i, f ⟨i, j⟩

full_name: Set.biInter_sigma'
code: theorem biInter_sigma' (s : Set ι) (t : ∀ i, Set (α i)) (f : ∀ i, α i → Set β) :
    ⋂ i ∈ s, ⋂ j ∈ t i, f i j = ⋂ ij ∈ s.sigma t, f ij.fst ij.snd 
goal: ⋂ i ∈ s, ⋂ j ∈ t i, f i j = ⋂ ij ∈ s.sigma t, f ij.fst ij.snd

full_name: Set.insert_sigma
code: theorem insert_sigma : (insert i s).sigma t = Sigma.mk i '' t i ∪ s.sigma t 
goal: (insert i s).sigma t = Sigma.mk i '' t i ∪ s.sigma t

full_name: Set.sigma_insert
code: theorem sigma_insert {a : ∀ i, α i} :
    s.sigma (fun i ↦ insert (a i) (t i)) = (fun i ↦ ⟨i, a i⟩) '' s ∪ s.sigma t 
goal: (s.sigma fun i => insert (a i) (t i)) = (fun i => ⟨i, a i⟩) '' s ∪ s.sigma t

full_name: Set.sigma_preimage_eq
code: theorem sigma_preimage_eq {f : ι' → ι} {g : ∀ i, β i → α i} :
    (f ⁻¹' s).sigma (fun i ↦ g (f i) ⁻¹' t (f i)) =
      (fun p : Σ i, β (f i) ↦ Sigma.mk _ (g _ p.2)) ⁻¹' s.sigma t 
goal: ((f ⁻¹' s).sigma fun i => g (f i) ⁻¹' t (f i)) = (fun p => ⟨f p.fst, g (f p.fst) p.snd⟩) ⁻¹' s.sigma t

full_name: Set.sigma_preimage_left
code: theorem sigma_preimage_left {f : ι' → ι} :
    ((f ⁻¹' s).sigma fun i ↦ t (f i)) = (fun p : Σ i, α (f i) ↦ Sigma.mk _ p.2) ⁻¹' s.sigma t 
goal: ((f ⁻¹' s).sigma fun i => t (f i)) = (fun p => ⟨f p.fst, p.snd⟩) ⁻¹' s.sigma t

full_name: Set.sigma_preimage_right
code: theorem sigma_preimage_right {g : ∀ i, β i → α i} :
    (s.sigma fun i ↦ g i ⁻¹' t i) = (fun p : Σ i, β i ↦ Sigma.mk p.1 (g _ p.2)) ⁻¹' s.sigma t 
goal: (s.sigma fun i => g i ⁻¹' t i) = (fun p => ⟨p.fst, g p.fst p.snd⟩) ⁻¹' s.sigma t

full_name: Set.preimage_sigmaMap_sigma
code: theorem preimage_sigmaMap_sigma {α' : ι' → Type*} (f : ι → ι') (g : ∀ i, α i → α' (f i))
    (s : Set ι') (t : ∀ i, Set (α' i)) :
    Sigma.map f g ⁻¹' s.sigma t = (f ⁻¹' s).sigma fun i ↦ g i ⁻¹' t (f i) 
goal: Sigma.map f g ⁻¹' s.sigma t = (f ⁻¹' s).sigma fun i => g i ⁻¹' t (f i)

full_name: Set.mk_preimage_sigma
code: @[simp]
theorem mk_preimage_sigma (hi : i ∈ s) : Sigma.mk i ⁻¹' s.sigma t = t i 
goal: Sigma.mk i ⁻¹' s.sigma t = t i

full_name: Set.mk_preimage_sigma_eq_empty
code: @[simp]
theorem mk_preimage_sigma_eq_empty (hi : i ∉ s) : Sigma.mk i ⁻¹' s.sigma t = ∅ 
goal: Sigma.mk i ⁻¹' s.sigma t = ∅

full_name: Set.mk_preimage_sigma_eq_if
code: theorem mk_preimage_sigma_eq_if [DecidablePred (· ∈ s)] :
    Sigma.mk i ⁻¹' s.sigma t = if i ∈ s then t i else ∅ 
goal: Sigma.mk i ⁻¹' s.sigma t = if i ∈ s then t i else ∅

full_name: Set.mk_preimage_sigma_fn_eq_if
code: theorem mk_preimage_sigma_fn_eq_if {β : Type*} [DecidablePred (· ∈ s)] (g : β → α i) :
    (fun b ↦ Sigma.mk i (g b)) ⁻¹' s.sigma t = if i ∈ s then g ⁻¹' t i else ∅ 
goal: (fun b => ⟨i, g b⟩) ⁻¹' s.sigma t = if i ∈ s then g ⁻¹' t i else ∅

full_name: Set.sigma_univ_range_eq
code: theorem sigma_univ_range_eq {f : ∀ i, α i → β i} :
    (univ : Set ι).sigma (fun i ↦ range (f i)) = range fun x : Σ i, α i ↦ ⟨x.1, f _ x.2⟩ 
goal: (Set.univ.sigma fun i => Set.range (f i)) = Set.range fun x => ⟨x.fst, f x.fst x.snd⟩

full_name: Set.Nonempty.sigma
code: protected theorem Nonempty.sigma :
    s.Nonempty → (∀ i, (t i).Nonempty) → (s.sigma t).Nonempty 
goal: s.Nonempty → (∀ (i : ι), (t i).Nonempty) → (s.sigma t).Nonempty

full_name: Set.Nonempty.sigma_fst
code: theorem Nonempty.sigma_fst : (s.sigma t).Nonempty → s.Nonempty 
goal: (s.sigma t).Nonempty → s.Nonempty

full_name: Set.Nonempty.sigma_snd
code: theorem Nonempty.sigma_snd : (s.sigma t).Nonempty → ∃ i ∈ s, (t i).Nonempty 
goal: (s.sigma t).Nonempty → ∃ i ∈ s, (t i).Nonempty

full_name: Set.sigma_nonempty_iff
code: theorem sigma_nonempty_iff : (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty 
goal: (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty

full_name: Set.sigma_eq_empty_iff
code: theorem sigma_eq_empty_iff : s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅ 
goal: s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅

full_name: Set.image_sigmaMk_subset_sigma_left
code: theorem image_sigmaMk_subset_sigma_left {a : ∀ i, α i} (ha : ∀ i, a i ∈ t i) :
    (fun i ↦ Sigma.mk i (a i)) '' s ⊆ s.sigma t 
goal: (fun i => ⟨i, a i⟩) '' s ⊆ s.sigma t

full_name: Set.image_sigmaMk_subset_sigma_right
code: theorem image_sigmaMk_subset_sigma_right (hi : i ∈ s) : Sigma.mk i '' t i ⊆ s.sigma t 
goal: Sigma.mk i '' t i ⊆ s.sigma t

full_name: Set.sigma_subset_preimage_fst
code: theorem sigma_subset_preimage_fst (s : Set ι) (t : ∀ i, Set (α i)) : s.sigma t ⊆ Sigma.fst ⁻¹' s 
goal: s.sigma t ⊆ Sigma.fst ⁻¹' s

full_name: Set.fst_image_sigma_subset
code: theorem fst_image_sigma_subset (s : Set ι) (t : ∀ i, Set (α i)) : Sigma.fst '' s.sigma t ⊆ s 
goal: Sigma.fst '' s.sigma t ⊆ s

full_name: Set.fst_image_sigma
code: theorem fst_image_sigma (s : Set ι) (ht : ∀ i, (t i).Nonempty) : Sigma.fst '' s.sigma t = s 
goal: Sigma.fst '' s.sigma t = s

full_name: Set.sigma_diff_sigma
code: theorem sigma_diff_sigma : s₁.sigma t₁ \ s₂.sigma t₂ = s₁.sigma (t₁ \ t₂) ∪ (s₁ \ s₂).sigma t₁ 
goal: s₁.sigma t₁ \ s₂.sigma t₂ = s₁.sigma (t₁ \ t₂) ∪ (s₁ \ s₂).sigma t₁