File: Mathlib/Data/Set/Image.lean

full_name: Set.preimage_empty
code: @[simp]
theorem preimage_empty : f ⁻¹' ∅ = ∅ 
goal: f ⁻¹' ∅ = ∅

full_name: Set.preimage_congr
code: theorem preimage_congr {f g : α → β} {s : Set β} (h : ∀ x : α, f x = g x) : f ⁻¹' s = g ⁻¹' s 
goal: f ⁻¹' s = g ⁻¹' s

full_name: Set.preimage_mono
code: @[gcongr]
theorem preimage_mono {s t : Set β} (h : s ⊆ t) : f ⁻¹' s ⊆ f ⁻¹' t 
goal: f ⁻¹' s ⊆ f ⁻¹' t

full_name: Set.preimage_univ
code: @[simp, mfld_simps]
theorem preimage_univ : f ⁻¹' univ = univ 
goal: f ⁻¹' Set.univ = Set.univ

full_name: Set.subset_preimage_univ
code: theorem subset_preimage_univ {s : Set α} : s ⊆ f ⁻¹' univ 
goal: s ⊆ f ⁻¹' Set.univ

full_name: Set.preimage_inter
code: @[simp, mfld_simps]
theorem preimage_inter {s t : Set β} : f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t 
goal: f ⁻¹' (s ∩ t) = f ⁻¹' s ∩ f ⁻¹' t

full_name: Set.preimage_union
code: @[simp]
theorem preimage_union {s t : Set β} : f ⁻¹' (s ∪ t) = f ⁻¹' s ∪ f ⁻¹' t 
goal: f ⁻¹' (s ∪ t) = f ⁻¹' s ∪ f ⁻¹' t

full_name: Set.preimage_compl
code: @[simp]
theorem preimage_compl {s : Set β} : f ⁻¹' sᶜ = (f ⁻¹' s)ᶜ 
goal: f ⁻¹' sᶜ = (f ⁻¹' s)ᶜ

full_name: Set.preimage_diff
code: @[simp]
theorem preimage_diff (f : α → β) (s t : Set β) : f ⁻¹' (s \ t) = f ⁻¹' s \ f ⁻¹' t 
goal: f ⁻¹' (s \ t) = f ⁻¹' s \ f ⁻¹' t

full_name: Set.preimage_symmDiff
code: @[simp]
lemma preimage_symmDiff {f : α → β} (s t : Set β) : f ⁻¹' (s ∆ t) = (f ⁻¹' s) ∆ (f ⁻¹' t) 
goal: f ⁻¹' symmDiff s t = symmDiff (f ⁻¹' s) (f ⁻¹' t)

full_name: Set.preimage_ite
code: @[simp]
theorem preimage_ite (f : α → β) (s t₁ t₂ : Set β) :
    f ⁻¹' s.ite t₁ t₂ = (f ⁻¹' s).ite (f ⁻¹' t₁) (f ⁻¹' t₂) 
goal: f ⁻¹' s.ite t₁ t₂ = (f ⁻¹' s).ite (f ⁻¹' t₁) (f ⁻¹' t₂)

full_name: Set.preimage_setOf_eq
code: @[simp]
theorem preimage_setOf_eq {p : α → Prop} {f : β → α} : f ⁻¹' { a | p a } = { a | p (f a) } 
goal: f ⁻¹' {a | p a} = {a | p (f a)}

full_name: Set.preimage_id_eq
code: @[simp]
theorem preimage_id_eq : preimage (id : α → α) = id 
goal: Set.preimage id = id

full_name: Set.preimage_id
code: @[mfld_simps]
theorem preimage_id {s : Set α} : id ⁻¹' s = s 
goal: id ⁻¹' s = s

full_name: Set.preimage_id'
code: @[simp, mfld_simps]
theorem preimage_id' {s : Set α} : (fun x => x) ⁻¹' s = s 
goal: (fun x => x) ⁻¹' s = s

full_name: Set.preimage_const_of_mem
code: @[simp]
theorem preimage_const_of_mem {b : β} {s : Set β} (h : b ∈ s) : (fun _ : α => b) ⁻¹' s = univ 
goal: (fun x => b) ⁻¹' s = Set.univ

full_name: Set.preimage_const_of_not_mem
code: @[simp]
theorem preimage_const_of_not_mem {b : β} {s : Set β} (h : b ∉ s) : (fun _ : α => b) ⁻¹' s = ∅ 
goal: (fun x => b) ⁻¹' s = ∅

full_name: Set.preimage_const
code: theorem preimage_const (b : β) (s : Set β) [Decidable (b ∈ s)] :
    (fun _ : α => b) ⁻¹' s = if b ∈ s then univ else ∅ 
goal: (fun x => b) ⁻¹' s = if b ∈ s then Set.univ else ∅

full_name: Set.exists_eq_const_of_preimage_singleton
code: /-- If preimage of each singleton under `f : α → β` is either empty or the whole type,
then `f` is a constant. -/
lemma exists_eq_const_of_preimage_singleton [Nonempty β] {f : α → β}
    (hf : ∀ b : β, f ⁻¹' {b} = ∅ ∨ f ⁻¹' {b} = univ) : ∃ b, f = const α b 
goal: ∃ b, f = Function.const α b

full_name: Set.preimage_comp
code: theorem preimage_comp {s : Set γ} : g ∘ f ⁻¹' s = f ⁻¹' (g ⁻¹' s) 
goal: g ∘ f ⁻¹' s = f ⁻¹' (g ⁻¹' s)

full_name: Set.preimage_comp_eq
code: theorem preimage_comp_eq : preimage (g ∘ f) = preimage f ∘ preimage g 
goal: Set.preimage (g ∘ f) = Set.preimage f ∘ Set.preimage g

full_name: Set.preimage_iterate_eq
code: theorem preimage_iterate_eq {f : α → α} {n : ℕ} : Set.preimage f^[n] = (Set.preimage f)^[n] 
goal: Set.preimage f^[n] = (Set.preimage f)^[n]

full_name: Set.preimage_preimage
code: theorem preimage_preimage {g : β → γ} {f : α → β} {s : Set γ} :
    f ⁻¹' (g ⁻¹' s) = (fun x => g (f x)) ⁻¹' s 
goal: f ⁻¹' (g ⁻¹' s) = (fun x => g (f x)) ⁻¹' s

full_name: Set.eq_preimage_subtype_val_iff
code: theorem eq_preimage_subtype_val_iff {p : α → Prop} {s : Set (Subtype p)} {t : Set α} :
    s = Subtype.val ⁻¹' t ↔ ∀ (x) (h : p x), (⟨x, h⟩ : Subtype p) ∈ s ↔ x ∈ t 
goal: s = Subtype.val ⁻¹' t ↔ ∀ (x : α) (h : p x), ⟨x, h⟩ ∈ s ↔ x ∈ t

full_name: Set.nonempty_of_nonempty_preimage
code: theorem nonempty_of_nonempty_preimage {s : Set β} {f : α → β} (hf : (f ⁻¹' s).Nonempty) :
    s.Nonempty 
goal: s.Nonempty

full_name: Set.preimage_singleton_true
code: @[simp] theorem preimage_singleton_true (p : α → Prop) : p ⁻¹' {True} = {a | p a} 
goal: p ⁻¹' {True} = {a | p a}

full_name: Set.preimage_singleton_false
code: @[simp] theorem preimage_singleton_false (p : α → Prop) : p ⁻¹' {False} = {a | ¬p a} 
goal: p ⁻¹' {False} = {a | ¬p a}

full_name: Set.preimage_subtype_coe_eq_compl
code: theorem preimage_subtype_coe_eq_compl {s u v : Set α} (hsuv : s ⊆ u ∪ v)
    (H : s ∩ (u ∩ v) = ∅) : ((↑) : s → α) ⁻¹' u = ((↑) ⁻¹' v)ᶜ 
goal: Subtype.val ⁻¹' u = (Subtype.val ⁻¹' v)ᶜ

full_name: Set.mem_image_iff_bex
code: @[deprecated mem_image (since := "2024-03-23")]
theorem mem_image_iff_bex {f : α → β} {s : Set α} {y : β} :
    y ∈ f '' s ↔ ∃ (x : _) (_ : x ∈ s), f x = y 
goal: y ∈ f '' s ↔ ∃ x, ∃ (_ : x ∈ s), f x = y

full_name: Set.image_eta
code: theorem image_eta (f : α → β) : f '' s = (fun x => f x) '' s 
goal: f '' s = (fun x => f x) '' s

full_name: Function.Injective.mem_set_image
code: theorem _root_.Function.Injective.mem_set_image {f : α → β} (hf : Injective f) {s : Set α} {a : α} :
    f a ∈ f '' s ↔ a ∈ s 
goal: f a ∈ f '' s ↔ a ∈ s

full_name: Set.preimage_subset_of_surjOn
code: lemma preimage_subset_of_surjOn {t : Set β} (hf : Injective f) (h : SurjOn f s t) :
    f ⁻¹' t ⊆ s 
goal: f ⁻¹' t ⊆ s

full_name: Set.forall_mem_image
code: theorem forall_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
    (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x⦄, x ∈ s → p (f x) 
goal: (∀ y ∈ f '' s, p y) ↔ ∀ ⦃x : α⦄, x ∈ s → p (f x)

full_name: Set.exists_mem_image
code: theorem exists_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
    (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x) 
goal: (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)

full_name: Set.mem_image_elim
code: @[deprecated forall_mem_image (since := "2024-02-21")]
theorem mem_image_elim {f : α → β} {s : Set α} {C : β → Prop} (h : ∀ x : α, x ∈ s → C (f x)) :
    ∀ {y : β}, y ∈ f '' s → C y 
goal: y ∈ f '' s → C y

full_name: Set.mem_image_elim_on
code: @[deprecated forall_mem_image (since := "2024-02-21")]
theorem mem_image_elim_on {f : α → β} {s : Set α} {C : β → Prop} {y : β} (h_y : y ∈ f '' s)
    (h : ∀ x : α, x ∈ s → C (f x)) : C y 
goal: C y

full_name: Set.image_congr
code: @[congr]
theorem image_congr {f g : α → β} {s : Set α} (h : ∀ a ∈ s, f a = g a) : f '' s = g '' s 
goal: f '' s = g '' s

full_name: Set.image_congr'
code: /-- A common special case of `image_congr` -/
theorem image_congr' {f g : α → β} {s : Set α} (h : ∀ x : α, f x = g x) : f '' s = g '' s 
goal: f '' s = g '' s

full_name: Set.image_mono
code: @[gcongr]
lemma image_mono (h : s ⊆ t) : f '' s ⊆ f '' t 
goal: f '' s ⊆ f '' t

full_name: Set.image_comp
code: theorem image_comp (f : β → γ) (g : α → β) (a : Set α) : f ∘ g '' a = f '' (g '' a) 
goal: f ∘ g '' a = f '' (g '' a)

full_name: Set.image_comp_eq
code: theorem image_comp_eq {g : β → γ} : image (g ∘ f) = image g ∘ image f 
goal: Set.image (g ∘ f) = Set.image g ∘ Set.image f

full_name: Set.image_image
code: /-- A variant of `image_comp`, useful for rewriting -/
theorem image_image (g : β → γ) (f : α → β) (s : Set α) : g '' (f '' s) = (fun x => g (f x)) '' s 
goal: g '' (f '' s) = (fun x => g (f x)) '' s

full_name: Set.image_comm
code: theorem image_comm {β'} {f : β → γ} {g : α → β} {f' : α → β'} {g' : β' → γ}
    (h_comm : ∀ a, f (g a) = g' (f' a)) : (s.image g).image f = (s.image f').image g' 
goal: f '' (g '' s) = g' '' (f' '' s)

full_name: Function.Semiconj.set_image
code: theorem _root_.Function.Semiconj.set_image {f : α → β} {ga : α → α} {gb : β → β}
    (h : Function.Semiconj f ga gb) : Function.Semiconj (image f) (image ga) (image gb) 
goal: Function.Semiconj (Set.image f) (Set.image ga) (Set.image gb)

full_name: Function.Commute.set_image
code: theorem _root_.Function.Commute.set_image {f g : α → α} (h : Function.Commute f g) :
    Function.Commute (image f) (image g) 
goal: Function.Commute (Set.image f) (Set.image g)

full_name: Set.image_subset
code: /-- Image is monotone with respect to `⊆`. See `Set.monotone_image` for the statement in
terms of `≤`. -/
@[gcongr]
theorem image_subset {a b : Set α} (f : α → β) (h : a ⊆ b) : f '' a ⊆ f '' b 
goal: f '' a ⊆ f '' b

full_name: Set.monotone_image
code: /-- `Set.image` is monotone. See `Set.image_subset` for the statement in terms of `⊆`. -/
lemma monotone_image {f : α → β} : Monotone (image f) 
goal: Monotone (Set.image f)

full_name: Set.image_union
code: theorem image_union (f : α → β) (s t : Set α) : f '' (s ∪ t) = f '' s ∪ f '' t 
goal: f '' (s ∪ t) = f '' s ∪ f '' t

full_name: Set.image_empty
code: @[simp]
theorem image_empty (f : α → β) : f '' ∅ = ∅ 
goal: f '' ∅ = ∅

full_name: Set.image_inter_subset
code: theorem image_inter_subset (f : α → β) (s t : Set α) : f '' (s ∩ t) ⊆ f '' s ∩ f '' t 
goal: f '' (s ∩ t) ⊆ f '' s ∩ f '' t

full_name: Set.image_inter_on
code: theorem image_inter_on {f : α → β} {s t : Set α} (h : ∀ x ∈ t, ∀ y ∈ s, f x = f y → x = y) :
    f '' (s ∩ t) = f '' s ∩ f '' t 
goal: f '' (s ∩ t) = f '' s ∩ f '' t

full_name: Set.image_inter
code: theorem image_inter {f : α → β} {s t : Set α} (H : Injective f) : f '' (s ∩ t) = f '' s ∩ f '' t 
goal: f '' (s ∩ t) = f '' s ∩ f '' t

full_name: Set.image_univ_of_surjective
code: theorem image_univ_of_surjective {ι : Type*} {f : ι → β} (H : Surjective f) : f '' univ = univ 
goal: f '' Set.univ = Set.univ

full_name: Set.image_singleton
code: @[simp]
theorem image_singleton {f : α → β} {a : α} : f '' {a} = {f a} 
goal: f '' {a} = {f a}

full_name: Set.Nonempty.image_const
code: @[simp]
theorem Nonempty.image_const {s : Set α} (hs : s.Nonempty) (a : β) : (fun _ => a) '' s = {a} 
goal: (fun x => a) '' s = {a}

full_name: Set.image_eq_empty
code: @[simp, mfld_simps]
theorem image_eq_empty {α β} {f : α → β} {s : Set α} : f '' s = ∅ ↔ s = ∅ 
goal: f '' s = ∅ ↔ s = ∅

full_name: Set.preimage_compl_eq_image_compl
code: theorem preimage_compl_eq_image_compl [BooleanAlgebra α] (S : Set α) :
    HasCompl.compl ⁻¹' S = HasCompl.compl '' S 
goal: compl ⁻¹' S = compl '' S

full_name: Set.mem_compl_image
code: theorem mem_compl_image [BooleanAlgebra α] (t : α) (S : Set α) :
    t ∈ HasCompl.compl '' S ↔ tᶜ ∈ S 
goal: t ∈ compl '' S ↔ tᶜ ∈ S

full_name: Set.image_id_eq
code: @[simp]
theorem image_id_eq : image (id : α → α) = id 
goal: Set.image id = id

full_name: Set.image_id'
code: /-- A variant of `image_id` -/
@[simp]
theorem image_id' (s : Set α) : (fun x => x) '' s = s 
goal: (fun x => x) '' s = s

full_name: Set.image_id
code: theorem image_id (s : Set α) : id '' s = s 
goal: id '' s = s

full_name: Set.image_iterate_eq
code: lemma image_iterate_eq {f : α → α} {n : ℕ} : image (f^[n]) = (image f)^[n] 
goal: Set.image f^[n] = (Set.image f)^[n]

full_name: Set.compl_compl_image
code: theorem compl_compl_image [BooleanAlgebra α] (S : Set α) :
    HasCompl.compl '' (HasCompl.compl '' S) = S 
goal: compl '' (compl '' S) = S

full_name: Set.image_insert_eq
code: theorem image_insert_eq {f : α → β} {a : α} {s : Set α} :
    f '' insert a s = insert (f a) (f '' s) 
goal: f '' insert a s = insert (f a) (f '' s)

full_name: Set.image_pair
code: theorem image_pair (f : α → β) (a b : α) : f '' {a, b} = {f a, f b} 
goal: f '' {a, b} = {f a, f b}

full_name: Set.image_subset_preimage_of_inverse
code: theorem image_subset_preimage_of_inverse {f : α → β} {g : β → α} (I : LeftInverse g f) (s : Set α) :
    f '' s ⊆ g ⁻¹' s 
goal: f '' s ⊆ g ⁻¹' s

full_name: Set.preimage_subset_image_of_inverse
code: theorem preimage_subset_image_of_inverse {f : α → β} {g : β → α} (I : LeftInverse g f) (s : Set β) :
    f ⁻¹' s ⊆ g '' s 
goal: f ⁻¹' s ⊆ g '' s

full_name: Set.image_eq_preimage_of_inverse
code: theorem image_eq_preimage_of_inverse {f : α → β} {g : β → α} (h₁ : LeftInverse g f)
    (h₂ : RightInverse g f) : image f = preimage g 
goal: Set.image f = Set.preimage g

full_name: Set.mem_image_iff_of_inverse
code: theorem mem_image_iff_of_inverse {f : α → β} {g : β → α} {b : β} {s : Set α} (h₁ : LeftInverse g f)
    (h₂ : RightInverse g f) : b ∈ f '' s ↔ g b ∈ s 
goal: b ∈ f '' s ↔ g b ∈ s

full_name: Set.image_compl_subset
code: theorem image_compl_subset {f : α → β} {s : Set α} (H : Injective f) : f '' sᶜ ⊆ (f '' s)ᶜ 
goal: f '' sᶜ ⊆ (f '' s)ᶜ

full_name: Set.subset_image_compl
code: theorem subset_image_compl {f : α → β} {s : Set α} (H : Surjective f) : (f '' s)ᶜ ⊆ f '' sᶜ 
goal: (f '' s)ᶜ ⊆ f '' sᶜ

full_name: Set.image_compl_eq
code: theorem image_compl_eq {f : α → β} {s : Set α} (H : Bijective f) : f '' sᶜ = (f '' s)ᶜ 
goal: f '' sᶜ = (f '' s)ᶜ

full_name: Set.subset_image_diff
code: theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f '' (s \ t) 
goal: f '' s \ f '' t ⊆ f '' (s \ t)

full_name: Set.subset_image_symmDiff
code: theorem subset_image_symmDiff : (f '' s) ∆ (f '' t) ⊆ f '' s ∆ t 
goal: symmDiff (f '' s) (f '' t) ⊆ f '' symmDiff s t

full_name: Set.image_diff
code: theorem image_diff {f : α → β} (hf : Injective f) (s t : Set α) : f '' (s \ t) = f '' s \ f '' t 
goal: f '' (s \ t) = f '' s \ f '' t

full_name: Set.image_symmDiff
code: theorem image_symmDiff (hf : Injective f) (s t : Set α) : f '' s ∆ t = (f '' s) ∆ (f '' t) 
goal: f '' symmDiff s t = symmDiff (f '' s) (f '' t)

full_name: Set.Nonempty.image
code: theorem Nonempty.image (f : α → β) {s : Set α} : s.Nonempty → (f '' s).Nonempty
  
goal: s.Nonempty → (f '' s).Nonempty

full_name: Set.Nonempty.of_image
code: theorem Nonempty.of_image {f : α → β} {s : Set α} : (f '' s).Nonempty → s.Nonempty
  
goal: (f '' s).Nonempty → s.Nonempty

full_name: Set.image_nonempty
code: @[simp]
theorem image_nonempty {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty 
goal: (f '' s).Nonempty ↔ s.Nonempty

full_name: Set.Nonempty.preimage
code: theorem Nonempty.preimage {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : Surjective f) :
    (f ⁻¹' s).Nonempty 
goal: (f ⁻¹' s).Nonempty

full_name: Set.instNonemptyElemImage
code: instance (f : α → β) (s : Set α) [Nonempty s] : Nonempty (f '' s) 
goal: Nonempty ↑(f '' s)

full_name: Set.image_subset_iff
code: /-- image and preimage are a Galois connection -/
@[simp]
theorem image_subset_iff {s : Set α} {t : Set β} {f : α → β} : f '' s ⊆ t ↔ s ⊆ f ⁻¹' t 
goal: f '' s ⊆ t ↔ s ⊆ f ⁻¹' t

full_name: Set.image_preimage_subset
code: theorem image_preimage_subset (f : α → β) (s : Set β) : f '' (f ⁻¹' s) ⊆ s 
goal: f '' (f ⁻¹' s) ⊆ s

full_name: Set.subset_preimage_image
code: theorem subset_preimage_image (f : α → β) (s : Set α) : s ⊆ f ⁻¹' (f '' s) 
goal: s ⊆ f ⁻¹' (f '' s)

full_name: Set.preimage_image_eq
code: @[simp]
theorem preimage_image_eq {f : α → β} (s : Set α) (h : Injective f) : f ⁻¹' (f '' s) = s 
goal: f ⁻¹' (f '' s) = s

full_name: Set.image_preimage_eq
code: @[simp]
theorem image_preimage_eq {f : α → β} (s : Set β) (h : Surjective f) : f '' (f ⁻¹' s) = s 
goal: f '' (f ⁻¹' s) = s

full_name: Set.Nonempty.subset_preimage_const
code: @[simp]
theorem Nonempty.subset_preimage_const {s : Set α} (hs : Set.Nonempty s) (t : Set β) (a : β) :
    s ⊆ (fun _ => a) ⁻¹' t ↔ a ∈ t 
goal: s ⊆ (fun x => a) ⁻¹' t ↔ a ∈ t

full_name: Set.preimage_eq_preimage
code: @[simp]
theorem preimage_eq_preimage {f : β → α} (hf : Surjective f) : f ⁻¹' s = f ⁻¹' t ↔ s = t 
goal: f ⁻¹' s = f ⁻¹' t ↔ s = t

full_name: Set.image_inter_preimage
code: theorem image_inter_preimage (f : α → β) (s : Set α) (t : Set β) :
    f '' (s ∩ f ⁻¹' t) = f '' s ∩ t 
goal: f '' (s ∩ f ⁻¹' t) = f '' s ∩ t

full_name: Set.image_preimage_inter
code: theorem image_preimage_inter (f : α → β) (s : Set α) (t : Set β) :
    f '' (f ⁻¹' t ∩ s) = t ∩ f '' s 
goal: f '' (f ⁻¹' t ∩ s) = t ∩ f '' s

full_name: Set.image_inter_nonempty_iff
code: @[simp]
theorem image_inter_nonempty_iff {f : α → β} {s : Set α} {t : Set β} :
    (f '' s ∩ t).Nonempty ↔ (s ∩ f ⁻¹' t).Nonempty 
goal: (f '' s ∩ t).Nonempty ↔ (s ∩ f ⁻¹' t).Nonempty

full_name: Set.image_diff_preimage
code: theorem image_diff_preimage {f : α → β} {s : Set α} {t : Set β} :
    f '' (s \ f ⁻¹' t) = f '' s \ t 
goal: f '' (s \ f ⁻¹' t) = f '' s \ t

full_name: Set.compl_image
code: theorem compl_image : image (compl : Set α → Set α) = preimage compl 
goal: Set.image compl = Set.preimage compl

full_name: Set.compl_image_set_of
code: theorem compl_image_set_of {p : Set α → Prop} : compl '' { s | p s } = { s | p sᶜ } 
goal: compl '' {s | p s} = {s | p sᶜ}

full_name: Set.inter_preimage_subset
code: theorem inter_preimage_subset (s : Set α) (t : Set β) (f : α → β) :
    s ∩ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∩ t) 
goal: s ∩ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∩ t)

full_name: Set.union_preimage_subset
code: theorem union_preimage_subset (s : Set α) (t : Set β) (f : α → β) :
    s ∪ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∪ t) 
goal: s ∪ f ⁻¹' t ⊆ f ⁻¹' (f '' s ∪ t)

full_name: Set.subset_image_union
code: theorem subset_image_union (f : α → β) (s : Set α) (t : Set β) : f '' (s ∪ f ⁻¹' t) ⊆ f '' s ∪ t 
goal: f '' (s ∪ f ⁻¹' t) ⊆ f '' s ∪ t

full_name: Set.preimage_subset_iff
code: theorem preimage_subset_iff {A : Set α} {B : Set β} {f : α → β} :
    f ⁻¹' B ⊆ A ↔ ∀ a : α, f a ∈ B → a ∈ A 
goal: f ⁻¹' B ⊆ A ↔ ∀ (a : α), f a ∈ B → a ∈ A

full_name: Set.image_eq_image
code: theorem image_eq_image {f : α → β} (hf : Injective f) : f '' s = f '' t ↔ s = t 
goal: f '' s = f '' t ↔ s = t

full_name: Set.subset_image_iff
code: theorem subset_image_iff {t : Set β} :
    t ⊆ f '' s ↔ ∃ u, u ⊆ s ∧ f '' u = t 
goal: t ⊆ f '' s ↔ ∃ u ⊆ s, f '' u = t

full_name: Set.exists_subset_image_iff
code: @[simp]
lemma exists_subset_image_iff {p : Set β → Prop} : (∃ t ⊆ f '' s, p t) ↔ ∃ t ⊆ s, p (f '' t) 
goal: (∃ t ⊆ f '' s, p t) ↔ ∃ t ⊆ s, p (f '' t)

full_name: Set.forall_subset_image_iff
code: @[simp]
lemma forall_subset_image_iff {p : Set β → Prop} : (∀ t ⊆ f '' s, p t) ↔ ∀ t ⊆ s, p (f '' t) 
goal: (∀ t ⊆ f '' s, p t) ↔ ∀ t ⊆ s, p (f '' t)

full_name: Set.image_subset_image_iff
code: theorem image_subset_image_iff {f : α → β} (hf : Injective f) : f '' s ⊆ f '' t ↔ s ⊆ t 
goal: f '' s ⊆ f '' t ↔ s ⊆ t

full_name: Set.prod_quotient_preimage_eq_image
code: theorem prod_quotient_preimage_eq_image [s : Setoid α] (g : Quotient s → β) {h : α → β}
    (Hh : h = g ∘ Quotient.mk'') (r : Set (β × β)) :
    { x : Quotient s × Quotient s | (g x.1, g x.2) ∈ r } =
      (fun a : α × α => (⟦a.1⟧, ⟦a.2⟧)) '' ((fun a : α × α => (h a.1, h a.2)) ⁻¹' r) 
goal: {x | (g x.1, g x.2) ∈ r} = (fun a => (⟦a.1⟧, ⟦a.2⟧)) '' ((fun a => (h a.1, h a.2)) ⁻¹' r)

full_name: Set.exists_image_iff
code: theorem exists_image_iff (f : α → β) (x : Set α) (P : β → Prop) :
    (∃ a : f '' x, P a) ↔ ∃ a : x, P (f a) 
goal: (∃ a, P ↑a) ↔ ∃ a, P (f ↑a)

full_name: Set.imageFactorization_eq
code: theorem imageFactorization_eq {f : α → β} {s : Set α} :
    Subtype.val ∘ imageFactorization f s = f ∘ Subtype.val 
goal: Subtype.val ∘ Set.imageFactorization f s = f ∘ Subtype.val

full_name: Set.surjective_onto_image
code: theorem surjective_onto_image {f : α → β} {s : Set α} : Surjective (imageFactorization f s) 
goal: Function.Surjective (Set.imageFactorization f s)

full_name: Set.image_perm
code: /-- If the only elements outside `s` are those left fixed by `σ`, then mapping by `σ` has no effect.
-/
theorem image_perm {s : Set α} {σ : Equiv.Perm α} (hs : { a : α | σ a ≠ a } ⊆ s) : σ '' s = s 
goal: ⇑σ '' s = s

full_name: Set.powerset_insert
code: /-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s 
goal: 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s

full_name: Set.forall_mem_range
code: theorem forall_mem_range {p : α → Prop} : (∀ a ∈ range f, p a) ↔ ∀ i, p (f i) 
goal: (∀ a ∈ Set.range f, p a) ↔ ∀ (i : ι), p (f i)

full_name: Set.forall_subtype_range_iff
code: theorem forall_subtype_range_iff {p : range f → Prop} :
    (∀ a : range f, p a) ↔ ∀ i, p ⟨f i, mem_range_self _⟩ 
goal: (∀ (a : ↑(Set.range f)), p a) ↔ ∀ (i : ι), p ⟨f i, ⋯⟩

full_name: Set.exists_range_iff
code: theorem exists_range_iff {p : α → Prop} : (∃ a ∈ range f, p a) ↔ ∃ i, p (f i) 
goal: (∃ a ∈ Set.range f, p a) ↔ ∃ i, p (f i)

full_name: Set.exists_subtype_range_iff
code: theorem exists_subtype_range_iff {p : range f → Prop} :
    (∃ a : range f, p a) ↔ ∃ i, p ⟨f i, mem_range_self _⟩ 
goal: (∃ a, p a) ↔ ∃ i, p ⟨f i, ⋯⟩

full_name: Set.range_iff_surjective
code: theorem range_iff_surjective : range f = univ ↔ Surjective f 
goal: Set.range f = Set.univ ↔ Function.Surjective f

full_name: Set.subset_range_of_surjective
code: @[simp]
theorem subset_range_of_surjective {f : α → β} (h : Surjective f) (s : Set β) :
    s ⊆ range f 
goal: s ⊆ Set.range f

full_name: Set.image_univ
code: @[simp]
theorem image_univ {f : α → β} : f '' univ = range f 
goal: f '' Set.univ = Set.range f

full_name: Set.preimage_eq_univ_iff
code: @[simp]
theorem preimage_eq_univ_iff {f : α → β} {s} : f ⁻¹' s = univ ↔ range f ⊆ s 
goal: f ⁻¹' s = Set.univ ↔ Set.range f ⊆ s

full_name: Set.image_subset_range
code: theorem image_subset_range (f : α → β) (s) : f '' s ⊆ range f 
goal: f '' s ⊆ Set.range f

full_name: Set.mem_range_of_mem_image
code: theorem mem_range_of_mem_image (f : α → β) (s) {x : β} (h : x ∈ f '' s) : x ∈ range f 
goal: x ∈ Set.range f

full_name: Nat.mem_range_succ
code: theorem _root_.Nat.mem_range_succ (i : ℕ) : i ∈ range Nat.succ ↔ 0 < i 
goal: i ∈ Set.range Nat.succ ↔ 0 < i

full_name: Set.Nonempty.preimage'
code: theorem Nonempty.preimage' {s : Set β} (hs : s.Nonempty) {f : α → β} (hf : s ⊆ range f) :
    (f ⁻¹' s).Nonempty 
goal: (f ⁻¹' s).Nonempty

full_name: Set.range_comp
code: theorem range_comp (g : α → β) (f : ι → α) : range (g ∘ f) = g '' range f 
goal: Set.range (g ∘ f) = g '' Set.range f

full_name: Set.range_subset_iff
code: theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s 
goal: Set.range f ⊆ s ↔ ∀ (y : ι), f y ∈ s

full_name: Set.range_subset_range_iff_exists_comp
code: theorem range_subset_range_iff_exists_comp {f : α → γ} {g : β → γ} :
    range f ⊆ range g ↔ ∃ h : α → β, f = g ∘ h 
goal: Set.range f ⊆ Set.range g ↔ ∃ h, f = g ∘ h

full_name: Set.range_eq_iff
code: theorem range_eq_iff (f : α → β) (s : Set β) :
    range f = s ↔ (∀ a, f a ∈ s) ∧ ∀ b ∈ s, ∃ a, f a = b 
goal: Set.range f = s ↔ (∀ (a : α), f a ∈ s) ∧ ∀ b ∈ s, ∃ a, f a = b

full_name: Set.range_comp_subset_range
code: theorem range_comp_subset_range (f : α → β) (g : β → γ) : range (g ∘ f) ⊆ range g 
goal: Set.range (g ∘ f) ⊆ Set.range g

full_name: Set.range_nonempty_iff_nonempty
code: theorem range_nonempty_iff_nonempty : (range f).Nonempty ↔ Nonempty ι 
goal: (Set.range f).Nonempty ↔ Nonempty ι

full_name: Set.range_nonempty
code: theorem range_nonempty [h : Nonempty ι] (f : ι → α) : (range f).Nonempty 
goal: (Set.range f).Nonempty

full_name: Set.range_eq_empty_iff
code: @[simp]
theorem range_eq_empty_iff {f : ι → α} : range f = ∅ ↔ IsEmpty ι 
goal: Set.range f = ∅ ↔ IsEmpty ι

full_name: Set.range_eq_empty
code: theorem range_eq_empty [IsEmpty ι] (f : ι → α) : range f = ∅ 
goal: Set.range f = ∅

full_name: Set.instNonemptyRange
code: instance instNonemptyRange [Nonempty ι] (f : ι → α) : Nonempty (range f) 
goal: Nonempty ↑(Set.range f)

full_name: Set.image_union_image_compl_eq_range
code: @[simp]
theorem image_union_image_compl_eq_range (f : α → β) : f '' s ∪ f '' sᶜ = range f 
goal: f '' s ∪ f '' sᶜ = Set.range f

full_name: Set.insert_image_compl_eq_range
code: theorem insert_image_compl_eq_range (f : α → β) (x : α) : insert (f x) (f '' {x}ᶜ) = range f 
goal: insert (f x) (f '' {x}ᶜ) = Set.range f

full_name: Set.image_preimage_eq_range_inter
code: theorem image_preimage_eq_range_inter {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = range f ∩ t 
goal: f '' (f ⁻¹' t) = Set.range f ∩ t

full_name: Set.image_preimage_eq_inter_range
code: theorem image_preimage_eq_inter_range {f : α → β} {t : Set β} : f '' (f ⁻¹' t) = t ∩ range f 
goal: f '' (f ⁻¹' t) = t ∩ Set.range f

full_name: Set.image_preimage_eq_of_subset
code: theorem image_preimage_eq_of_subset {f : α → β} {s : Set β} (hs : s ⊆ range f) :
    f '' (f ⁻¹' s) = s 
goal: f '' (f ⁻¹' s) = s

full_name: Set.image_preimage_eq_iff
code: theorem image_preimage_eq_iff {f : α → β} {s : Set β} : f '' (f ⁻¹' s) = s ↔ s ⊆ range f 
goal: f '' (f ⁻¹' s) = s ↔ s ⊆ Set.range f

full_name: Set.subset_range_iff_exists_image_eq
code: theorem subset_range_iff_exists_image_eq {f : α → β} {s : Set β} : s ⊆ range f ↔ ∃ t, f '' t = s 
goal: s ⊆ Set.range f ↔ ∃ t, f '' t = s

full_name: Set.range_image
code: theorem range_image (f : α → β) : range (image f) = 𝒫 range f 
goal: Set.range (Set.image f) = 𝒫 Set.range f

full_name: Set.exists_subset_range_and_iff
code: @[simp]
theorem exists_subset_range_and_iff {f : α → β} {p : Set β → Prop} :
    (∃ s, s ⊆ range f ∧ p s) ↔ ∃ s, p (f '' s) 
goal: (∃ s ⊆ Set.range f, p s) ↔ ∃ s, p (f '' s)

full_name: Set.exists_subset_range_iff
code: @[deprecated exists_subset_range_and_iff (since := "2024-06-06")]
theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
    (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s) 
goal: (∃ s, ∃ (_ : s ⊆ Set.range f), p s) ↔ ∃ s, p (f '' s)

full_name: Set.forall_subset_range_iff
code: @[simp]
theorem forall_subset_range_iff {f : α → β} {p : Set β → Prop} :
    (∀ s, s ⊆ range f → p s) ↔ ∀ s, p (f '' s) 
goal: (∀ s ⊆ Set.range f, p s) ↔ ∀ (s : Set α), p (f '' s)

full_name: Set.preimage_subset_preimage_iff
code: @[simp]
theorem preimage_subset_preimage_iff {s t : Set α} {f : β → α} (hs : s ⊆ range f) :
    f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t 
goal: f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t

full_name: Set.preimage_eq_preimage'
code: theorem preimage_eq_preimage' {s t : Set α} {f : β → α} (hs : s ⊆ range f) (ht : t ⊆ range f) :
    f ⁻¹' s = f ⁻¹' t ↔ s = t 
goal: f ⁻¹' s = f ⁻¹' t ↔ s = t

full_name: Set.preimage_inter_range
code: theorem preimage_inter_range {f : α → β} {s : Set β} : f ⁻¹' (s ∩ range f) = f ⁻¹' s 
goal: f ⁻¹' (s ∩ Set.range f) = f ⁻¹' s

full_name: Set.preimage_range_inter
code: theorem preimage_range_inter {f : α → β} {s : Set β} : f ⁻¹' (range f ∩ s) = f ⁻¹' s 
goal: f ⁻¹' (Set.range f ∩ s) = f ⁻¹' s

full_name: Set.preimage_image_preimage
code: theorem preimage_image_preimage {f : α → β} {s : Set β} : f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s 
goal: f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s

full_name: Set.range_id
code: @[simp, mfld_simps]
theorem range_id : range (@id α) = univ 
goal: Set.range id = Set.univ

full_name: Set.range_id'
code: @[simp, mfld_simps]
theorem range_id' : (range fun x : α => x) = univ 
goal: (Set.range fun x => x) = Set.univ

full_name: Prod.range_fst
code: @[simp]
theorem _root_.Prod.range_fst [Nonempty β] : range (Prod.fst : α × β → α) = univ 
goal: Set.range Prod.fst = Set.univ

full_name: Prod.range_snd
code: @[simp]
theorem _root_.Prod.range_snd [Nonempty α] : range (Prod.snd : α × β → β) = univ 
goal: Set.range Prod.snd = Set.univ

full_name: Set.range_eval
code: @[simp]
theorem range_eval {α : ι → Sort _} [∀ i, Nonempty (α i)] (i : ι) :
    range (eval i : (∀ i, α i) → α i) = univ 
goal: Set.range (Function.eval i) = Set.univ

full_name: Set.range_inl
code: theorem range_inl : range (@Sum.inl α β) = {x | Sum.isLeft x} 
goal: Set.range Sum.inl = {x | x.isLeft = true}

full_name: Set.range_inr
code: theorem range_inr : range (@Sum.inr α β) = {x | Sum.isRight x} 
goal: Set.range Sum.inr = {x | x.isRight = true}

full_name: Set.isCompl_range_inl_range_inr
code: theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range Sum.inr) 
goal: IsCompl (Set.range Sum.inl) (Set.range Sum.inr)

full_name: Set.range_inl_union_range_inr
code: @[simp]
theorem range_inl_union_range_inr : range (Sum.inl : α → α ⊕ β) ∪ range Sum.inr = univ 
goal: Set.range Sum.inl ∪ Set.range Sum.inr = Set.univ

full_name: Set.range_inl_inter_range_inr
code: @[simp]
theorem range_inl_inter_range_inr : range (Sum.inl : α → α ⊕ β) ∩ range Sum.inr = ∅ 
goal: Set.range Sum.inl ∩ Set.range Sum.inr = ∅

full_name: Set.range_inr_union_range_inl
code: @[simp]
theorem range_inr_union_range_inl : range (Sum.inr : β → α ⊕ β) ∪ range Sum.inl = univ 
goal: Set.range Sum.inr ∪ Set.range Sum.inl = Set.univ

full_name: Set.range_inr_inter_range_inl
code: @[simp]
theorem range_inr_inter_range_inl : range (Sum.inr : β → α ⊕ β) ∩ range Sum.inl = ∅ 
goal: Set.range Sum.inr ∩ Set.range Sum.inl = ∅

full_name: Set.preimage_inl_image_inr
code: @[simp]
theorem preimage_inl_image_inr (s : Set β) : Sum.inl ⁻¹' (@Sum.inr α β '' s) = ∅ 
goal: Sum.inl ⁻¹' (Sum.inr '' s) = ∅

full_name: Set.preimage_inr_image_inl
code: @[simp]
theorem preimage_inr_image_inl (s : Set α) : Sum.inr ⁻¹' (@Sum.inl α β '' s) = ∅ 
goal: Sum.inr ⁻¹' (Sum.inl '' s) = ∅

full_name: Set.preimage_inl_range_inr
code: @[simp]
theorem preimage_inl_range_inr : Sum.inl ⁻¹' range (Sum.inr : β → α ⊕ β) = ∅ 
goal: Sum.inl ⁻¹' Set.range Sum.inr = ∅

full_name: Set.preimage_inr_range_inl
code: @[simp]
theorem preimage_inr_range_inl : Sum.inr ⁻¹' range (Sum.inl : α → α ⊕ β) = ∅ 
goal: Sum.inr ⁻¹' Set.range Sum.inl = ∅

full_name: Set.compl_range_inl
code: @[simp]
theorem compl_range_inl : (range (Sum.inl : α → α ⊕ β))ᶜ = range (Sum.inr : β → α ⊕ β) 
goal: (Set.range Sum.inl)ᶜ = Set.range Sum.inr

full_name: Set.compl_range_inr
code: @[simp]
theorem compl_range_inr : (range (Sum.inr : β → α ⊕ β))ᶜ = range (Sum.inl : α → α ⊕ β) 
goal: (Set.range Sum.inr)ᶜ = Set.range Sum.inl

full_name: Set.image_preimage_inl_union_image_preimage_inr
code: theorem image_preimage_inl_union_image_preimage_inr (s : Set (α ⊕ β)) :
    Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s 
goal: Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s

full_name: Set.range_quot_mk
code: @[simp]
theorem range_quot_mk (r : α → α → Prop) : range (Quot.mk r) = univ 
goal: Set.range (Quot.mk r) = Set.univ

full_name: Set.range_quot_lift
code: @[simp]
theorem range_quot_lift {r : ι → ι → Prop} (hf : ∀ x y, r x y → f x = f y) :
    range (Quot.lift f hf) = range f 
goal: Set.range (Quot.lift f hf) = Set.range f

full_name: Set.range_quotient_mk
code: @[simp]
theorem range_quotient_mk [sa : Setoid α] : (range (α := Quotient sa) fun x : α => ⟦x⟧) = univ 
goal: (Set.range fun x => ⟦x⟧) = Set.univ

full_name: Set.range_quotient_lift
code: @[simp]
theorem range_quotient_lift [s : Setoid ι] (hf) :
    range (Quotient.lift f hf : Quotient s → α) = range f 
goal: Set.range (Quotient.lift f hf) = Set.range f

full_name: Set.range_quotient_mk'
code: @[simp]
theorem range_quotient_mk' {s : Setoid α} : range (Quotient.mk' : α → Quotient s) = univ 
goal: Set.range Quotient.mk' = Set.univ

full_name: Set.Quotient.range_mk''
code: @[simp] lemma Quotient.range_mk'' {sa : Setoid α} : range (Quotient.mk'' (s₁ := sa)) = univ 
goal: Set.range Quotient.mk'' = Set.univ

full_name: Set.range_quotient_lift_on'
code: @[simp]
theorem range_quotient_lift_on' {s : Setoid ι} (hf) :
    (range fun x : Quotient s => Quotient.liftOn' x f hf) = range f 
goal: (Set.range fun x => x.liftOn' f hf) = Set.range f

full_name: Set.canLift
code: instance canLift (c) (p) [CanLift α β c p] :
    CanLift (Set α) (Set β) (c '' ·) fun s => ∀ x ∈ s, p x 
goal: CanLift (Set α) (Set β) (fun x => c '' x) fun s => ∀ x ∈ s, p x

full_name: Set.range_const_subset
code: theorem range_const_subset {c : α} : (range fun _ : ι => c) ⊆ {c} 
goal: (Set.range fun x => c) ⊆ {c}

full_name: Set.range_const
code: @[simp]
theorem range_const : ∀ [Nonempty ι] {c : α}, (range fun _ : ι => c) = {c}
  
goal: (Set.range fun x => c) = {c}

full_name: Set.range_subtype_map
code: theorem range_subtype_map {p : α → Prop} {q : β → Prop} (f : α → β) (h : ∀ x, p x → q (f x)) :
    range (Subtype.map f h) = (↑) ⁻¹' (f '' { x | p x }) 
goal: Set.range (Subtype.map f h) = Subtype.val ⁻¹' (f '' {x | p x})

full_name: Set.image_swap_eq_preimage_swap
code: theorem image_swap_eq_preimage_swap : image (@Prod.swap α β) = preimage Prod.swap 
goal: Set.image Prod.swap = Set.preimage Prod.swap

full_name: Set.preimage_singleton_nonempty
code: theorem preimage_singleton_nonempty {f : α → β} {y : β} : (f ⁻¹' {y}).Nonempty ↔ y ∈ range f 
goal: (f ⁻¹' {y}).Nonempty ↔ y ∈ Set.range f

full_name: Set.preimage_singleton_eq_empty
code: theorem preimage_singleton_eq_empty {f : α → β} {y : β} : f ⁻¹' {y} = ∅ ↔ y ∉ range f 
goal: f ⁻¹' {y} = ∅ ↔ y ∉ Set.range f

full_name: Set.range_subset_singleton
code: theorem range_subset_singleton {f : ι → α} {x : α} : range f ⊆ {x} ↔ f = const ι x 
goal: Set.range f ⊆ {x} ↔ f = Function.const ι x

full_name: Set.image_compl_preimage
code: theorem image_compl_preimage {f : α → β} {s : Set β} : f '' (f ⁻¹' s)ᶜ = range f \ s 
goal: f '' (f ⁻¹' s)ᶜ = Set.range f \ s

full_name: Set.rangeFactorization_eq
code: theorem rangeFactorization_eq {f : ι → β} : Subtype.val ∘ rangeFactorization f = f 
goal: Subtype.val ∘ Set.rangeFactorization f = f

full_name: Set.rangeFactorization_coe
code: @[simp]
theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f a : β) = f a 
goal: ↑(Set.rangeFactorization f a) = f a

full_name: Set.coe_comp_rangeFactorization
code: @[simp]
theorem coe_comp_rangeFactorization (f : ι → β) : (↑) ∘ rangeFactorization f = f 
goal: Subtype.val ∘ Set.rangeFactorization f = f

full_name: Set.surjective_onto_range
code: theorem surjective_onto_range : Surjective (rangeFactorization f) 
goal: Function.Surjective (Set.rangeFactorization f)

full_name: Set.image_eq_range
code: theorem image_eq_range (f : α → β) (s : Set α) : f '' s = range fun x : s => f x 
goal: f '' s = Set.range fun x => f ↑x

full_name: Sum.range_eq
code: theorem _root_.Sum.range_eq (f : α ⊕ β → γ) :
    range f = range (f ∘ Sum.inl) ∪ range (f ∘ Sum.inr) 
goal: Set.range f = Set.range (f ∘ Sum.inl) ∪ Set.range (f ∘ Sum.inr)

full_name: Set.Sum.elim_range
code: @[simp]
theorem Sum.elim_range (f : α → γ) (g : β → γ) : range (Sum.elim f g) = range f ∪ range g 
goal: Set.range (Sum.elim f g) = Set.range f ∪ Set.range g

full_name: Set.range_ite_subset'
code: theorem range_ite_subset' {p : Prop} [Decidable p] {f g : α → β} :
    range (if p then f else g) ⊆ range f ∪ range g 
goal: Set.range (if p then f else g) ⊆ Set.range f ∪ Set.range g

full_name: Set.range_ite_subset
code: theorem range_ite_subset {p : α → Prop} [DecidablePred p] {f g : α → β} :
    (range fun x => if p x then f x else g x) ⊆ range f ∪ range g 
goal: (Set.range fun x => if p x then f x else g x) ⊆ Set.range f ∪ Set.range g

full_name: Set.preimage_range
code: @[simp]
theorem preimage_range (f : α → β) : f ⁻¹' range f = univ 
goal: f ⁻¹' Set.range f = Set.univ

full_name: Set.range_unique
code: /-- The range of a function from a `Unique` type contains just the
function applied to its single value. -/
theorem range_unique [h : Unique ι] : range f = {f default} 
goal: Set.range f = {f default}

full_name: Set.range_diff_image_subset
code: theorem range_diff_image_subset (f : α → β) (s : Set α) : range f \ f '' s ⊆ f '' sᶜ 
goal: Set.range f \ f '' s ⊆ f '' sᶜ

full_name: Set.range_diff_image
code: theorem range_diff_image {f : α → β} (H : Injective f) (s : Set α) : range f \ f '' s = f '' sᶜ 
goal: Set.range f \ f '' s = f '' sᶜ

full_name: Set.range_inclusion
code: @[simp]
theorem range_inclusion (h : s ⊆ t) : range (inclusion h) = { x : t | (x : α) ∈ s } 
goal: Set.range (Set.inclusion h) = {x | ↑x ∈ s}

full_name: Set.leftInverse_rangeSplitting
code: theorem leftInverse_rangeSplitting (f : α → β) :
    LeftInverse (rangeFactorization f) (rangeSplitting f) 
goal: Function.LeftInverse (Set.rangeFactorization f) (Set.rangeSplitting f)

full_name: Set.rangeSplitting_injective
code: theorem rangeSplitting_injective (f : α → β) : Injective (rangeSplitting f) 
goal: Function.Injective (Set.rangeSplitting f)

full_name: Set.rightInverse_rangeSplitting
code: theorem rightInverse_rangeSplitting {f : α → β} (h : Injective f) :
    RightInverse (rangeFactorization f) (rangeSplitting f) 
goal: Function.RightInverse (Set.rangeFactorization f) (Set.rangeSplitting f)

full_name: Set.preimage_rangeSplitting
code: theorem preimage_rangeSplitting {f : α → β} (hf : Injective f) :
    preimage (rangeSplitting f) = image (rangeFactorization f) 
goal: Set.preimage (Set.rangeSplitting f) = Set.image (Set.rangeFactorization f)

full_name: Set.isCompl_range_some_none
code: theorem isCompl_range_some_none (α : Type*) : IsCompl (range (some : α → Option α)) {none} 
goal: IsCompl (Set.range some) {none}

full_name: Set.compl_range_some
code: @[simp]
theorem compl_range_some (α : Type*) : (range (some : α → Option α))ᶜ = {none} 
goal: (Set.range some)ᶜ = {none}

full_name: Set.range_some_inter_none
code: @[simp]
theorem range_some_inter_none (α : Type*) : range (some : α → Option α) ∩ {none} = ∅ 
goal: Set.range some ∩ {none} = ∅

full_name: Set.range_some_union_none
code: theorem range_some_union_none (α : Type*) : range (some : α → Option α) ∪ {none} = univ 
goal: Set.range some ∪ {none} = Set.univ

full_name: Set.insert_none_range_some
code: @[simp]
theorem insert_none_range_some (α : Type*) : insert none (range (some : α → Option α)) = univ 
goal: insert none (Set.range some) = Set.univ

full_name: Set.Subsingleton.image
code: /-- The image of a subsingleton is a subsingleton. -/
theorem Subsingleton.image (hs : s.Subsingleton) (f : α → β) : (f '' s).Subsingleton 
goal: (f '' s).Subsingleton

full_name: Set.Subsingleton.preimage
code: /-- The preimage of a subsingleton under an injective map is a subsingleton. -/
theorem Subsingleton.preimage {s : Set β} (hs : s.Subsingleton) {f : α → β}
    (hf : Function.Injective f) : (f ⁻¹' s).Subsingleton 
goal: (f ⁻¹' s).Subsingleton

full_name: Set.subsingleton_of_image
code: /-- If the image of a set under an injective map is a subsingleton, the set is a subsingleton. -/
theorem subsingleton_of_image {f : α → β} (hf : Function.Injective f) (s : Set α)
    (hs : (f '' s).Subsingleton) : s.Subsingleton 
goal: s.Subsingleton

full_name: Set.subsingleton_of_preimage
code: /-- If the preimage of a set under a surjective map is a subsingleton,
the set is a subsingleton. -/
theorem subsingleton_of_preimage {f : α → β} (hf : Function.Surjective f) (s : Set β)
    (hs : (f ⁻¹' s).Subsingleton) : s.Subsingleton 
goal: s.Subsingleton

full_name: Set.subsingleton_range
code: theorem subsingleton_range {α : Sort*} [Subsingleton α] (f : α → β) : (range f).Subsingleton 
goal: (Set.range f).Subsingleton

full_name: Set.Nontrivial.preimage
code: /-- The preimage of a nontrivial set under a surjective map is nontrivial. -/
theorem Nontrivial.preimage {s : Set β} (hs : s.Nontrivial) {f : α → β}
    (hf : Function.Surjective f) : (f ⁻¹' s).Nontrivial 
goal: (f ⁻¹' s).Nontrivial

full_name: Set.Nontrivial.image
code: /-- The image of a nontrivial set under an injective map is nontrivial. -/
theorem Nontrivial.image (hs : s.Nontrivial) {f : α → β} (hf : Function.Injective f) :
    (f '' s).Nontrivial 
goal: (f '' s).Nontrivial

full_name: Set.nontrivial_of_image
code: /-- If the image of a set is nontrivial, the set is nontrivial. -/
theorem nontrivial_of_image (f : α → β) (s : Set α) (hs : (f '' s).Nontrivial) : s.Nontrivial 
goal: s.Nontrivial

full_name: Set.image_nontrivial
code: @[simp]
theorem image_nontrivial {f : α → β} (hf : f.Injective) : (f '' s).Nontrivial ↔ s.Nontrivial 
goal: (f '' s).Nontrivial ↔ s.Nontrivial

full_name: Set.nontrivial_of_preimage
code: /-- If the preimage of a set under an injective map is nontrivial, the set is nontrivial. -/
theorem nontrivial_of_preimage {f : α → β} (hf : Function.Injective f) (s : Set β)
    (hs : (f ⁻¹' s).Nontrivial) : s.Nontrivial 
goal: s.Nontrivial

full_name: Function.Surjective.preimage_injective
code: theorem Surjective.preimage_injective (hf : Surjective f) : Injective (preimage f) 
goal: Function.Injective (Set.preimage f)

full_name: Function.Injective.preimage_image
code: theorem Injective.preimage_image (hf : Injective f) (s : Set α) : f ⁻¹' (f '' s) = s 
goal: f ⁻¹' (f '' s) = s

full_name: Function.Injective.preimage_surjective
code: theorem Injective.preimage_surjective (hf : Injective f) : Surjective (preimage f) 
goal: Function.Surjective (Set.preimage f)

full_name: Function.Injective.subsingleton_image_iff
code: theorem Injective.subsingleton_image_iff (hf : Injective f) {s : Set α} :
    (f '' s).Subsingleton ↔ s.Subsingleton 
goal: (f '' s).Subsingleton ↔ s.Subsingleton

full_name: Function.Surjective.image_preimage
code: theorem Surjective.image_preimage (hf : Surjective f) (s : Set β) : f '' (f ⁻¹' s) = s 
goal: f '' (f ⁻¹' s) = s

full_name: Function.Surjective.image_surjective
code: theorem Surjective.image_surjective (hf : Surjective f) : Surjective (image f) 
goal: Function.Surjective (Set.image f)

full_name: Function.Surjective.nonempty_preimage
code: @[simp]
theorem Surjective.nonempty_preimage (hf : Surjective f) {s : Set β} :
    (f ⁻¹' s).Nonempty ↔ s.Nonempty 
goal: (f ⁻¹' s).Nonempty ↔ s.Nonempty

full_name: Function.Injective.image_injective
code: theorem Injective.image_injective (hf : Injective f) : Injective (image f) 
goal: Function.Injective (Set.image f)

full_name: Function.Surjective.preimage_subset_preimage_iff
code: theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective f) :
    f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t 
goal: f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t

full_name: Function.Surjective.range_comp
code: theorem Surjective.range_comp {ι' : Sort*} {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
    range (g ∘ f) = range g 
goal: Set.range (g ∘ f) = Set.range g

full_name: Function.Injective.mem_range_iff_exists_unique
code: theorem Injective.mem_range_iff_exists_unique (hf : Injective f) {b : β} :
    b ∈ range f ↔ ∃! a, f a = b 
goal: b ∈ Set.range f ↔ ∃! a, f a = b

full_name: Function.Injective.exists_unique_of_mem_range
code: theorem Injective.exists_unique_of_mem_range (hf : Injective f) {b : β} (hb : b ∈ range f) :
    ∃! a, f a = b 
goal: ∃! a, f a = b

full_name: Function.Injective.compl_image_eq
code: theorem Injective.compl_image_eq (hf : Injective f) (s : Set α) :
    (f '' s)ᶜ = f '' sᶜ ∪ (range f)ᶜ 
goal: (f '' s)ᶜ = f '' sᶜ ∪ (Set.range f)ᶜ

full_name: Function.LeftInverse.image_image
code: theorem LeftInverse.image_image {g : β → α} (h : LeftInverse g f) (s : Set α) :
    g '' (f '' s) = s 
goal: g '' (f '' s) = s

full_name: Function.LeftInverse.preimage_preimage
code: theorem LeftInverse.preimage_preimage {g : β → α} (h : LeftInverse g f) (s : Set α) :
    f ⁻¹' (g ⁻¹' s) = s 
goal: f ⁻¹' (g ⁻¹' s) = s

full_name: Function.Involutive.preimage
code: protected theorem Involutive.preimage {f : α → α} (hf : Involutive f) : Involutive (preimage f) 
goal: Function.Involutive (Set.preimage f)

full_name: EquivLike.range_comp
code: @[simp] lemma range_comp {α : Type*} (f : ι' → α) (e : E) : range (f ∘ e) = range f 
goal: Set.range (f ∘ ⇑e) = Set.range f

full_name: Subtype.coe_image
code: theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
    (↑) '' s = { x | ∃ h : p x, (⟨x, h⟩ : Subtype p) ∈ s } 
goal: Subtype.val '' s = {x | ∃ (h : p x), ⟨x, h⟩ ∈ s}

full_name: Subtype.coe_image_of_subset
code: @[simp]
theorem coe_image_of_subset {s t : Set α} (h : t ⊆ s) : (↑) '' { x : ↥s | ↑x ∈ t } = t 
goal: Subtype.val '' {x | ↑x ∈ t} = t

full_name: Subtype.range_coe
code: theorem range_coe {s : Set α} : range ((↑) : s → α) = s 
goal: Set.range Subtype.val = s

full_name: Subtype.range_val
code: /-- A variant of `range_coe`. Try to use `range_coe` if possible.
  This version is useful when defining a new type that is defined as the subtype of something.
  In that case, the coercion doesn't fire anymore. -/
theorem range_val {s : Set α} : range (Subtype.val : s → α) = s 
goal: Set.range Subtype.val = s

full_name: Subtype.range_coe_subtype
code: /-- We make this the simp lemma instead of `range_coe`. The reason is that if we write
  for `s : Set α` the function `(↑) : s → α`, then the inferred implicit arguments of `(↑)` are
  `↑α (fun x ↦ x ∈ s)`. -/
@[simp]
theorem range_coe_subtype {p : α → Prop} : range ((↑) : Subtype p → α) = { x | p x } 
goal: Set.range Subtype.val = {x | p x}

full_name: Subtype.coe_preimage_self
code: @[simp]
theorem coe_preimage_self (s : Set α) : ((↑) : s → α) ⁻¹' s = univ 
goal: Subtype.val ⁻¹' s = Set.univ

full_name: Subtype.range_val_subtype
code: theorem range_val_subtype {p : α → Prop} : range (Subtype.val : Subtype p → α) = { x | p x } 
goal: Set.range Subtype.val = {x | p x}

full_name: Subtype.coe_image_subset
code: theorem coe_image_subset (s : Set α) (t : Set s) : ((↑) : s → α) '' t ⊆ s 
goal: Subtype.val '' t ⊆ s

full_name: Subtype.coe_image_univ
code: theorem coe_image_univ (s : Set α) : ((↑) : s → α) '' Set.univ = s 
goal: Subtype.val '' Set.univ = s

full_name: Subtype.image_preimage_coe
code: @[simp]
theorem image_preimage_coe (s t : Set α) : ((↑) : s → α) '' (((↑) : s → α) ⁻¹' t) = s ∩ t 
goal: Subtype.val '' (Subtype.val ⁻¹' t) = s ∩ t

full_name: Subtype.image_preimage_val
code: theorem image_preimage_val (s t : Set α) : (Subtype.val : s → α) '' (Subtype.val ⁻¹' t) = s ∩ t 
goal: Subtype.val '' (Subtype.val ⁻¹' t) = s ∩ t

full_name: Subtype.preimage_coe_eq_preimage_coe_iff
code: theorem preimage_coe_eq_preimage_coe_iff {s t u : Set α} :
    ((↑) : s → α) ⁻¹' t = ((↑) : s → α) ⁻¹' u ↔ s ∩ t = s ∩ u 
goal: Subtype.val ⁻¹' t = Subtype.val ⁻¹' u ↔ s ∩ t = s ∩ u

full_name: Subtype.preimage_coe_self_inter
code: theorem preimage_coe_self_inter (s t : Set α) :
    ((↑) : s → α) ⁻¹' (s ∩ t) = ((↑) : s → α) ⁻¹' t 
goal: Subtype.val ⁻¹' (s ∩ t) = Subtype.val ⁻¹' t

full_name: Subtype.preimage_coe_inter_self
code: theorem preimage_coe_inter_self (s t : Set α) :
    ((↑) : s → α) ⁻¹' (t ∩ s) = ((↑) : s → α) ⁻¹' t 
goal: Subtype.val ⁻¹' (t ∩ s) = Subtype.val ⁻¹' t

full_name: Subtype.preimage_val_eq_preimage_val_iff
code: theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
    (Subtype.val : s → α) ⁻¹' t = Subtype.val ⁻¹' u ↔ s ∩ t = s ∩ u 
goal: Subtype.val ⁻¹' t = Subtype.val ⁻¹' u ↔ s ∩ t = s ∩ u

full_name: Subtype.preimage_val_subset_preimage_val_iff
code: lemma preimage_val_subset_preimage_val_iff (s t u : Set α) :
    (Subtype.val ⁻¹' t : Set s) ⊆ Subtype.val ⁻¹' u ↔ s ∩ t ⊆ s ∩ u 
goal: Subtype.val ⁻¹' t ⊆ Subtype.val ⁻¹' u ↔ s ∩ t ⊆ s ∩ u

full_name: Subtype.exists_set_subtype
code: theorem exists_set_subtype {t : Set α} (p : Set α → Prop) :
    (∃ s : Set t, p (((↑) : t → α) '' s)) ↔ ∃ s : Set α, s ⊆ t ∧ p s 
goal: (∃ s, p (Subtype.val '' s)) ↔ ∃ s ⊆ t, p s

full_name: Subtype.forall_set_subtype
code: theorem forall_set_subtype {t : Set α} (p : Set α → Prop) :
    (∀ s : Set t, p (((↑) : t → α) '' s)) ↔ ∀ s : Set α, s ⊆ t → p s 
goal: (∀ (s : Set ↑t), p (Subtype.val '' s)) ↔ ∀ s ⊆ t, p s

full_name: Subtype.preimage_coe_nonempty
code: theorem preimage_coe_nonempty {s t : Set α} :
    (((↑) : s → α) ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty 
goal: (Subtype.val ⁻¹' t).Nonempty ↔ (s ∩ t).Nonempty

full_name: Subtype.preimage_coe_eq_empty
code: theorem preimage_coe_eq_empty {s t : Set α} : ((↑) : s → α) ⁻¹' t = ∅ ↔ s ∩ t = ∅ 
goal: Subtype.val ⁻¹' t = ∅ ↔ s ∩ t = ∅

full_name: Subtype.preimage_coe_compl
code: theorem preimage_coe_compl (s : Set α) : ((↑) : s → α) ⁻¹' sᶜ = ∅ 
goal: Subtype.val ⁻¹' sᶜ = ∅

full_name: Subtype.preimage_coe_compl'
code: @[simp]
theorem preimage_coe_compl' (s : Set α) :
    (fun x : (sᶜ : Set α) => (x : α)) ⁻¹' s = ∅ 
goal: (fun x => ↑x) ⁻¹' s = ∅

full_name: Option.injective_iff
code: theorem injective_iff {α β} {f : Option α → β} :
    Injective f ↔ Injective (f ∘ some) ∧ f none ∉ range (f ∘ some) 
goal: Function.Injective f ↔ Function.Injective (f ∘ some) ∧ f none ∉ Set.range (f ∘ some)

full_name: Option.range_eq
code: theorem range_eq {α β} (f : Option α → β) : range f = insert (f none) (range (f ∘ some)) 
goal: Set.range f = insert (f none) (Set.range (f ∘ some))

full_name: WithBot.range_eq
code: theorem WithBot.range_eq {α β} (f : WithBot α → β) :
    range f = insert (f ⊥) (range (f ∘ WithBot.some : α → β)) 
goal: Set.range f = insert (f ⊥) (Set.range (f ∘ WithBot.some))

full_name: WithTop.range_eq
code: theorem WithTop.range_eq {α β} (f : WithTop α → β) :
    range f = insert (f ⊤) (range (f ∘ WithBot.some : α → β)) 
goal: Set.range f = insert (f ⊤) (Set.range (f ∘ WithBot.some))

full_name: Set.preimage_injective
code: @[simp]
theorem preimage_injective : Injective (preimage f) ↔ Surjective f 
goal: Function.Injective (Set.preimage f) ↔ Function.Surjective f

full_name: Set.preimage_surjective
code: @[simp]
theorem preimage_surjective : Surjective (preimage f) ↔ Injective f 
goal: Function.Surjective (Set.preimage f) ↔ Function.Injective f

full_name: Set.image_surjective
code: @[simp]
theorem image_surjective : Surjective (image f) ↔ Surjective f 
goal: Function.Surjective (Set.image f) ↔ Function.Surjective f

full_name: Set.image_injective
code: @[simp]
theorem image_injective : Injective (image f) ↔ Injective f 
goal: Function.Injective (Set.image f) ↔ Function.Injective f

full_name: Set.preimage_eq_iff_eq_image
code: theorem preimage_eq_iff_eq_image {f : α → β} (hf : Bijective f) {s t} :
    f ⁻¹' s = t ↔ s = f '' t 
goal: f ⁻¹' s = t ↔ s = f '' t

full_name: Set.eq_preimage_iff_image_eq
code: theorem eq_preimage_iff_image_eq {f : α → β} (hf : Bijective f) {s t} :
    s = f ⁻¹' t ↔ f '' s = t 
goal: s = f ⁻¹' t ↔ f '' s = t

full_name: Disjoint.preimage
code: theorem Disjoint.preimage (f : α → β) {s t : Set β} (h : Disjoint s t) :
    Disjoint (f ⁻¹' s) (f ⁻¹' t) 
goal: Disjoint (f ⁻¹' s) (f ⁻¹' t)

full_name: Codisjoint.preimage
code: lemma Codisjoint.preimage (f : α → β) {s t : Set β} (h : Codisjoint s t) :
    Codisjoint (f ⁻¹' s) (f ⁻¹' t) 
goal: Codisjoint (f ⁻¹' s) (f ⁻¹' t)

full_name: IsCompl.preimage
code: lemma IsCompl.preimage (f : α → β) {s t : Set β} (h : IsCompl s t) :
    IsCompl (f ⁻¹' s) (f ⁻¹' t) 
goal: IsCompl (f ⁻¹' s) (f ⁻¹' t)

full_name: Set.disjoint_image_image
code: theorem disjoint_image_image {f : β → α} {g : γ → α} {s : Set β} {t : Set γ}
    (h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c) : Disjoint (f '' s) (g '' t) 
goal: Disjoint (f '' s) (g '' t)

full_name: Set.disjoint_image_of_injective
code: theorem disjoint_image_of_injective (hf : Injective f) {s t : Set α} (hd : Disjoint s t) :
    Disjoint (f '' s) (f '' t) 
goal: Disjoint (f '' s) (f '' t)

full_name: Disjoint.of_image
code: theorem _root_.Disjoint.of_image (h : Disjoint (f '' s) (f '' t)) : Disjoint s t 
goal: Disjoint s t

full_name: Set.disjoint_image_iff
code: @[simp]
theorem disjoint_image_iff (hf : Injective f) : Disjoint (f '' s) (f '' t) ↔ Disjoint s t 
goal: Disjoint (f '' s) (f '' t) ↔ Disjoint s t

full_name: Disjoint.of_preimage
code: theorem _root_.Disjoint.of_preimage (hf : Surjective f) {s t : Set β}
    (h : Disjoint (f ⁻¹' s) (f ⁻¹' t)) : Disjoint s t 
goal: Disjoint s t

full_name: Set.disjoint_preimage_iff
code: @[simp]
theorem disjoint_preimage_iff (hf : Surjective f) {s t : Set β} :
    Disjoint (f ⁻¹' s) (f ⁻¹' t) ↔ Disjoint s t 
goal: Disjoint (f ⁻¹' s) (f ⁻¹' t) ↔ Disjoint s t

full_name: Set.preimage_eq_empty
code: theorem preimage_eq_empty {s : Set β} (h : Disjoint s (range f)) :
    f ⁻¹' s = ∅ 
goal: f ⁻¹' s = ∅

full_name: Set.preimage_eq_empty_iff
code: theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (range f) 
goal: f ⁻¹' s = ∅ ↔ Disjoint s (Set.range f)

full_name: sigma_mk_preimage_image'
code: lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅ 
goal: Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅

full_name: sigma_mk_preimage_image_eq_self
code: lemma sigma_mk_preimage_image_eq_self : Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s 
goal: Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s