File: Mathlib/Data/Set/Defs.lean

full_name: Set.mem_setOf_eq
code: @[simp, mfld_simps] theorem mem_setOf_eq {x : α} {p : α → Prop} : (x ∈ {y | p y}) = p x 
goal: (x ∈ {y | p y}) = p x

full_name: Set.mem_univ
code: @[simp, mfld_simps] theorem mem_univ (x : α) : x ∈ @univ α 
goal: x ∈ Set.univ

full_name: Set.instHasCompl
code: instance : HasCompl (Set α) 
goal: HasCompl (Set α)

full_name: Set.mem_compl_iff
code: @[simp] theorem mem_compl_iff (s : Set α) (x : α) : x ∈ sᶜ ↔ x ∉ s 
goal: x ∈ sᶜ ↔ ¬x ∈ s

full_name: Set.diff_eq
code: theorem diff_eq (s t : Set α) : s \ t = s ∩ tᶜ 
goal: s \ t = s ∩ tᶜ

full_name: Set.mem_diff
code: @[simp] theorem mem_diff {s t : Set α} (x : α) : x ∈ s \ t ↔ x ∈ s ∧ x ∉ t 
goal: x ∈ s \ t ↔ x ∈ s ∧ ¬x ∈ t

full_name: Set.mem_diff_of_mem
code: theorem mem_diff_of_mem {s t : Set α} {x : α} (h1 : x ∈ s) (h2 : x ∉ t) : x ∈ s \ t 
goal: x ∈ s \ t

full_name: Set.Elem
code: /-- Given the set `s`, `Elem s` is the `Type` of element of `s`. -/
@[coe, reducible] def Elem (s : Set α) : Type u 
goal: Type u

full_name: Set.instCoeSortType
code: /-- Coercion from a set to the corresponding subtype. -/
instance : CoeSort (Set α) (Type u) 
goal: CoeSort (Set α) (Type u)

full_name: Set.preimage
code: /-- The preimage of `s : Set β` by `f : α → β`, written `f ⁻¹' s`,
  is the set of `x : α` such that `f x ∈ s`. -/
def preimage (f : α → β) (s : Set β) : Set α 
goal: Set α

full_name: Set._aux_Mathlib_Data_Set_Defs___unexpand_Set_preimage_1
code: /-- `f ⁻¹' t` denotes the preimage of `t : Set β` under the function `f : α → β`. -/
infixl:80 " ⁻¹' " => preimage
goal: Lean.PrettyPrinter.Unexpander

full_name: Set.«_aux_Mathlib_Data_Set_Defs___macroRules_Set_term_⁻¹'__1»
code: /-- `f ⁻¹' t` denotes the preimage of `t : Set β` under the function `f : α → β`. -/
infixl:80 " ⁻¹' " => preimage
goal: Lean.Macro

full_name: Set.mem_preimage
code: @[simp, mfld_simps]
theorem mem_preimage {f : α → β} {s : Set β} {a : α} : a ∈ f ⁻¹' s ↔ f a ∈ s 
goal: a ∈ f ⁻¹' s ↔ f a ∈ s

full_name: Set._aux_Mathlib_Data_Set_Defs___unexpand_Set_image_1
code: /-- `f '' s` denotes the image of `s : Set α` under the function `f : α → β`. -/
infixl:80 " '' " => image
goal: Lean.PrettyPrinter.Unexpander

full_name: Set._aux_Mathlib_Data_Set_Defs___macroRules_Set_term_''__1
code: /-- `f '' s` denotes the image of `s : Set α` under the function `f : α → β`. -/
infixl:80 " '' " => image
goal: Lean.Macro

full_name: Set.mem_image
code: @[simp]
theorem mem_image (f : α → β) (s : Set α) (y : β) : y ∈ f '' s ↔ ∃ x ∈ s, f x = y 
goal: y ∈ f '' s ↔ ∃ x, x ∈ s ∧ f x = y

full_name: Set.mem_image_of_mem
code: @[mfld_simps]
theorem mem_image_of_mem (f : α → β) {x : α} {a : Set α} (h : x ∈ a) : f x ∈ f '' a 
goal: f x ∈ f '' a

full_name: Set.imageFactorization
code: /-- Restriction of `f` to `s` factors through `s.imageFactorization f : s → f '' s`. -/
def imageFactorization (f : α → β) (s : Set α) : s → f '' s 
goal: ↑s → ↑(f '' s)

full_name: Set.kernImage
code: /-- `kernImage f s` is the set of `y` such that `f ⁻¹ y ⊆ s`. -/
def kernImage (f : α → β) (s : Set α) : Set β 
goal: Set β

full_name: Set.subset_kernImage_iff
code: lemma subset_kernImage_iff {s : Set β} {t : Set α} {f : α → β} : s ⊆ kernImage f t ↔ f ⁻¹' s ⊆ t 
goal: s ⊆ Set.kernImage f t ↔ f ⁻¹' s ⊆ t

full_name: Set.range
code: /-- Range of a function.

This function is more flexible than `f '' univ`, as the image requires that the domain is in Type
and not an arbitrary Sort. -/
def range (f : ι → α) : Set α 
goal: Set α

full_name: Set.mem_range
code: @[simp] theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x 
goal: x ∈ Set.range f ↔ ∃ y, f y = x

full_name: Set.mem_range_self
code: @[mfld_simps] theorem mem_range_self (i : ι) : f i ∈ range f 
goal: f i ∈ Set.range f

full_name: Set.rangeFactorization
code: /-- Any map `f : ι → α` factors through a map `rangeFactorization f : ι → range f`. -/
def rangeFactorization (f : ι → α) : ι → range f 
goal: ι → ↑(Set.range f)

full_name: Set.rangeSplitting
code: /-- We can use the axiom of choice to pick a preimage for every element of `range f`. -/
noncomputable def rangeSplitting (f : α → β) : range f → α 
goal: ↑(Set.range f) → α

full_name: Set.apply_rangeSplitting
code: theorem apply_rangeSplitting (f : α → β) (x : range f) : f (rangeSplitting f x) = x 
goal: f (Set.rangeSplitting f x) = ↑x

full_name: Set.comp_rangeSplitting
code: @[simp]
theorem comp_rangeSplitting (f : α → β) : f ∘ rangeSplitting f = Subtype.val 
goal: f ∘ Set.rangeSplitting f = Subtype.val

full_name: Set.prod
code: /-- The cartesian product `Set.prod s t` is the set of `(a, b)` such that `a ∈ s` and `b ∈ t`. -/
def prod (s : Set α) (t : Set β) : Set (α × β) 
goal: Set (α × β)

full_name: Set.instSProd
code: @[default_instance]
instance instSProd : SProd (Set α) (Set β) (Set (α × β)) 
goal: SProd (Set α) (Set β) (Set (α × β))

full_name: Set.prod_eq
code: theorem prod_eq (s : Set α) (t : Set β) : s ×ˢ t = Prod.fst ⁻¹' s ∩ Prod.snd ⁻¹' t 
goal: s ×ˢ t = Prod.fst ⁻¹' s ∩ Prod.snd ⁻¹' t

full_name: Set.mem_prod_eq
code: theorem mem_prod_eq : (p ∈ s ×ˢ t) = (p.1 ∈ s ∧ p.2 ∈ t) 
goal: (p ∈ s ×ˢ t) = (p.fst ∈ s ∧ p.snd ∈ t)

full_name: Set.mem_prod
code: @[simp, mfld_simps]
theorem mem_prod : p ∈ s ×ˢ t ↔ p.1 ∈ s ∧ p.2 ∈ t 
goal: p ∈ s ×ˢ t ↔ p.fst ∈ s ∧ p.snd ∈ t

full_name: Set.prod_mk_mem_set_prod_eq
code: @[mfld_simps]
theorem prod_mk_mem_set_prod_eq : ((a, b) ∈ s ×ˢ t) = (a ∈ s ∧ b ∈ t) 
goal: ((a, b) ∈ s ×ˢ t) = (a ∈ s ∧ b ∈ t)

full_name: Set.mk_mem_prod
code: theorem mk_mem_prod (ha : a ∈ s) (hb : b ∈ t) : (a, b) ∈ s ×ˢ t 
goal: (a, b) ∈ s ×ˢ t

full_name: Set.diagonal
code: /-- `diagonal α` is the set of `α × α` consisting of all pairs of the form `(a, a)`. -/
def diagonal (α : Type*) : Set (α × α) 
goal: Set (α × α)

full_name: Set.mem_diagonal
code: theorem mem_diagonal (x : α) : (x, x) ∈ diagonal α 
goal: (x, x) ∈ Set.diagonal α

full_name: Set.mem_diagonal_iff
code: @[simp] theorem mem_diagonal_iff {x : α × α} : x ∈ diagonal α ↔ x.1 = x.2 
goal: x ∈ Set.diagonal α ↔ x.fst = x.snd

full_name: Set.offDiag
code: /-- The off-diagonal of a set `s` is the set of pairs `(a, b)` with `a, b ∈ s` and `a ≠ b`. -/
def offDiag (s : Set α) : Set (α × α) 
goal: Set (α × α)

full_name: Set.mem_offDiag
code: @[simp]
theorem mem_offDiag {x : α × α} {s : Set α} : x ∈ s.offDiag ↔ x.1 ∈ s ∧ x.2 ∈ s ∧ x.1 ≠ x.2 
goal: x ∈ s.offDiag ↔ x.fst ∈ s ∧ x.snd ∈ s ∧ x.fst ≠ x.snd

full_name: Set.pi
code: /-- Given an index set `ι` and a family of sets `t : Π i, Set (α i)`, `pi s t`
is the set of dependent functions `f : Πa, π a` such that `f a` belongs to `t a`
whenever `a ∈ s`. -/
def pi (s : Set ι) (t : ∀ i, Set (α i)) : Set (∀ i, α i) 
goal: Set ((i : ι) → α i)

full_name: Set.mem_pi
code: @[simp] theorem mem_pi : f ∈ s.pi t ↔ ∀ i ∈ s, f i ∈ t i 
goal: f ∈ s.pi t ↔ ∀ (i : ι), i ∈ s → f i ∈ t i

full_name: Set.mem_univ_pi
code: theorem mem_univ_pi : f ∈ pi univ t ↔ ∀ i, f i ∈ t i 
goal: f ∈ Set.univ.pi t ↔ ∀ (i : ι), f i ∈ t i

full_name: Set.EqOn
code: /-- Two functions `f₁ f₂ : α → β` are equal on `s` if `f₁ x = f₂ x` for all `x ∈ s`. -/
def EqOn (f₁ f₂ : α → β) (s : Set α) : Prop 
goal: Prop

full_name: Set.MapsTo
code: /-- `MapsTo f a b` means that the image of `a` is contained in `b`. -/
def MapsTo (f : α → β) (s : Set α) (t : Set β) : Prop 
goal: Prop

full_name: Set.mapsTo_image
code: theorem mapsTo_image (f : α → β) (s : Set α) : MapsTo f s (f '' s) 
goal: Set.MapsTo f s (f '' s)

full_name: Set.mapsTo_preimage
code: theorem mapsTo_preimage (f : α → β) (t : Set β) : MapsTo f (f ⁻¹' t) t 
goal: Set.MapsTo f (f ⁻¹' t) t

full_name: Set.MapsTo.restrict
code: /-- Given a map `f` sending `s : Set α` into `t : Set β`, restrict domain of `f` to `s`
and the codomain to `t`. Same as `Subtype.map`. -/
def MapsTo.restrict (f : α → β) (s : Set α) (t : Set β) (h : MapsTo f s t) : s → t 
goal: ↑s → ↑t

full_name: Set.restrictPreimage
code: /-- The restriction of a function onto the preimage of a set. -/
@[simps!]
def restrictPreimage (t : Set β) (f : α → β) : f ⁻¹' t → t 
goal: ↑(f ⁻¹' t) → ↑t

full_name: Set.restrictPreimage_coe
code: /-- The restriction of a function onto the preimage of a set. -/
@[simps!]
def restrictPreimage (t : Set β) (f : α → β) : f ⁻¹' t → t 
goal: ∀ (a : ↑(f ⁻¹' t)), ↑(t.restrictPreimage f a) = f ↑a

full_name: Set.InjOn
code: /-- `f` is injective on `a` if the restriction of `f` to `a` is injective. -/
def InjOn (f : α → β) (s : Set α) : Prop 
goal: Prop

full_name: Set.graphOn
code: /-- The graph of a function `f : α → β` on a set `s`. -/
def graphOn (f : α → β) (s : Set α) : Set (α × β) 
goal: Set (α × β)

full_name: Set.SurjOn
code: /-- `f` is surjective from `a` to `b` if `b` is contained in the image of `a`. -/
def SurjOn (f : α → β) (s : Set α) (t : Set β) : Prop 
goal: Prop

full_name: Set.BijOn
code: /-- `f` is bijective from `s` to `t` if `f` is injective on `s` and `f '' s = t`. -/
def BijOn (f : α → β) (s : Set α) (t : Set β) : Prop 
goal: Prop

full_name: Set.LeftInvOn
code: /-- `g` is a left inverse to `f` on `a` means that `g (f x) = x` for all `x ∈ a`. -/
def LeftInvOn (f' : β → α) (f : α → β) (s : Set α) : Prop 
goal: Prop

full_name: Set.RightInvOn
code: /-- `g` is a right inverse to `f` on `b` if `f (g x) = x` for all `x ∈ b`. -/
abbrev RightInvOn (f' : β → α) (f : α → β) (t : Set β) : Prop 
goal: Prop

full_name: Set.InvOn
code: /-- `g` is an inverse to `f` viewed as a map from `a` to `b` -/
def InvOn (g : β → α) (f : α → β) (s : Set α) (t : Set β) : Prop 
goal: Prop

full_name: Set.image2
code: /-- The image of a binary function `f : α → β → γ` as a function `Set α → Set β → Set γ`.
Mathematically this should be thought of as the image of the corresponding function `α × β → γ`. -/
def image2 (f : α → β → γ) (s : Set α) (t : Set β) : Set γ 
goal: Set γ

full_name: Set.mem_image2
code: @[simp] theorem mem_image2 : c ∈ image2 f s t ↔ ∃ a ∈ s, ∃ b ∈ t, f a b = c 
goal: c ∈ Set.image2 f s t ↔ ∃ a, a ∈ s ∧ ∃ b, b ∈ t ∧ f a b = c

full_name: Set.mem_image2_of_mem
code: theorem mem_image2_of_mem (ha : a ∈ s) (hb : b ∈ t) : f a b ∈ image2 f s t 
goal: f a b ∈ Set.image2 f s t

full_name: Set.seq
code: /-- Given a set `s` of functions `α → β` and `t : Set α`, `seq s t` is the union of `f '' t` over
all `f ∈ s`. -/
def seq (s : Set (α → β)) (t : Set α) : Set β 
goal: Set β

full_name: Set.mem_seq_iff
code: @[simp]
theorem mem_seq_iff {s : Set (α → β)} {t : Set α} {b : β} :
    b ∈ seq s t ↔ ∃ f ∈ s, ∃ a ∈ t, (f : α → β) a = b 
goal: b ∈ s.seq t ↔ ∃ f, f ∈ s ∧ ∃ a, a ∈ t ∧ f a = b

full_name: Set.seq_eq_image2
code: lemma seq_eq_image2 (s : Set (α → β)) (t : Set α) : seq s t = image2 (fun f a ↦ f a) s t 
goal: s.seq t = Set.image2 (fun f a => f a) s t