File: Mathlib/Logic/Embedding/Set.lean

full_name: Equiv.asEmbedding_range
code: @[simp]
theorem Equiv.asEmbedding_range {α β : Sort _} {p : β → Prop} (e : α ≃ Subtype p) :
    Set.range e.asEmbedding = setOf p 
goal: Set.range ⇑e.asEmbedding = setOf p

full_name: Function.Embedding.coeWithTop_apply
code: /-- Embedding into `WithTop α`. -/
@[simps]
def coeWithTop {α} : α ↪ WithTop α 
goal: ∀ (a : α), Function.Embedding.coeWithTop a = ↑a

full_name: Function.Embedding.coeWithTop
code: /-- Embedding into `WithTop α`. -/
@[simps]
def coeWithTop {α} : α ↪ WithTop α 
goal: α ↪ WithTop α

full_name: Function.Embedding.optionElim_apply
code: /-- Given an embedding `f : α ↪ β` and a point outside of `Set.range f`, construct an embedding
`Option α ↪ β`. -/
@[simps]
def optionElim {α β} (f : α ↪ β) (x : β) (h : x ∉ Set.range f) : Option α ↪ β 
goal: ∀ (a : Option α), (f.optionElim x h) a = Option.elim' x (⇑f) a

full_name: Function.Embedding.optionElim
code: /-- Given an embedding `f : α ↪ β` and a point outside of `Set.range f`, construct an embedding
`Option α ↪ β`. -/
@[simps]
def optionElim {α β} (f : α ↪ β) (x : β) (h : x ∉ Set.range f) : Option α ↪ β 
goal: Option α ↪ β

full_name: Function.Embedding.optionEmbeddingEquiv
code: /-- Equivalence between embeddings of `Option α` and a sigma type over the embeddings of `α`. -/
@[simps]
def optionEmbeddingEquiv (α β) : (Option α ↪ β) ≃ Σ f : α ↪ β, ↥(Set.range f)ᶜ 
goal: (Option α ↪ β) ≃ (f : α ↪ β) × ↑(Set.range ⇑f)ᶜ

full_name: Function.Embedding.optionEmbeddingEquiv_symm_apply
code: /-- Equivalence between embeddings of `Option α` and a sigma type over the embeddings of `α`. -/
@[simps]
def optionEmbeddingEquiv (α β) : (Option α ↪ β) ≃ Σ f : α ↪ β, ↥(Set.range f)ᶜ 
goal: (Function.Embedding.optionEmbeddingEquiv α β).symm f = f.fst.optionElim ↑f.snd ⋯

full_name: Function.Embedding.optionEmbeddingEquiv_apply_snd_coe
code: /-- Equivalence between embeddings of `Option α` and a sigma type over the embeddings of `α`. -/
@[simps]
def optionEmbeddingEquiv (α β) : (Option α ↪ β) ≃ Σ f : α ↪ β, ↥(Set.range f)ᶜ 
goal: ↑((Function.Embedding.optionEmbeddingEquiv α β) f).snd = f none

full_name: Function.Embedding.optionEmbeddingEquiv_apply_fst
code: /-- Equivalence between embeddings of `Option α` and a sigma type over the embeddings of `α`. -/
@[simps]
def optionEmbeddingEquiv (α β) : (Option α ↪ β) ≃ Σ f : α ↪ β, ↥(Set.range f)ᶜ 
goal: ((Function.Embedding.optionEmbeddingEquiv α β) f).fst = Function.Embedding.coeWithTop.trans f

full_name: Function.Embedding.codRestrict
code: /-- Restrict the codomain of an embedding. -/
def codRestrict {α β} (p : Set β) (f : α ↪ β) (H : ∀ a, f a ∈ p) : α ↪ p 
goal: α ↪ ↑p

full_name: Function.Embedding.codRestrict_apply
code: @[simp]
theorem codRestrict_apply {α β} (p) (f : α ↪ β) (H a) : codRestrict p f H a = ⟨f a, H a⟩ 
goal: (Function.Embedding.codRestrict p f H) a = ⟨f a, ⋯⟩

full_name: Function.Embedding.image_apply
code: /-- `Set.image` as an embedding `Set α ↪ Set β`. -/
@[simps apply]
protected def image {α β} (f : α ↪ β) : Set α ↪ Set β 
goal: f.image s = ⇑f '' s

full_name: Function.Embedding.image
code: /-- `Set.image` as an embedding `Set α ↪ Set β`. -/
@[simps apply]
protected def image {α β} (f : α ↪ β) : Set α ↪ Set β 
goal: Set α ↪ Set β

full_name: Set.embeddingOfSubset
code: /-- The injection map is an embedding between subsets. -/
@[simps apply_coe]
def embeddingOfSubset {α} (s t : Set α) (h : s ⊆ t) : s ↪ t 
goal: ↑s ↪ ↑t

full_name: Set.embeddingOfSubset_apply_coe
code: /-- The injection map is an embedding between subsets. -/
@[simps apply_coe]
def embeddingOfSubset {α} (s t : Set α) (h : s ⊆ t) : s ↪ t 
goal: ↑((s.embeddingOfSubset t h) x) = ↑x

full_name: subtypeOrEquiv
code: /-- A subtype `{x // p x ∨ q x}` over a disjunction of `p q : α → Prop` is equivalent to a sum of
subtypes `{x // p x} ⊕ {x // q x}` such that `¬ p x` is sent to the right, when
`Disjoint p q`.

See also `Equiv.sumCompl`, for when `IsCompl p q`.  -/
@[simps apply]
def subtypeOrEquiv (p q : α → Prop) [DecidablePred p] (h : Disjoint p q) :
    { x // p x ∨ q x } ≃ { x // p x } ⊕ { x // q x } 
goal: { x // p x ∨ q x } ≃ { x // p x } ⊕ { x // q x }

full_name: subtypeOrEquiv_apply
code: /-- A subtype `{x // p x ∨ q x}` over a disjunction of `p q : α → Prop` is equivalent to a sum of
subtypes `{x // p x} ⊕ {x // q x}` such that `¬ p x` is sent to the right, when
`Disjoint p q`.

See also `Equiv.sumCompl`, for when `IsCompl p q`.  -/
@[simps apply]
def subtypeOrEquiv (p q : α → Prop) [DecidablePred p] (h : Disjoint p q) :
    { x // p x ∨ q x } ≃ { x // p x } ⊕ { x // q x } 
goal: (subtypeOrEquiv p q h) a = (subtypeOrLeftEmbedding p q) a

full_name: subtypeOrEquiv_symm_inl
code: @[simp]
theorem subtypeOrEquiv_symm_inl (p q : α → Prop) [DecidablePred p] (h : Disjoint p q)
    (x : { x // p x }) : (subtypeOrEquiv p q h).symm (Sum.inl x) = ⟨x, Or.inl x.prop⟩ 
goal: (subtypeOrEquiv p q h).symm (Sum.inl x) = ⟨↑x, ⋯⟩

full_name: subtypeOrEquiv_symm_inr
code: @[simp]
theorem subtypeOrEquiv_symm_inr (p q : α → Prop) [DecidablePred p] (h : Disjoint p q)
    (x : { x // q x }) : (subtypeOrEquiv p q h).symm (Sum.inr x) = ⟨x, Or.inr x.prop⟩ 
goal: (subtypeOrEquiv p q h).symm (Sum.inr x) = ⟨↑x, ⋯⟩

full_name: Function.Embedding.sumSet
code: /-- For disjoint `s t : Set α`, the natural injection from `↑s ⊕ ↑t` to `α`. -/
@[simps] def Function.Embedding.sumSet (h : Disjoint s t) : s ⊕ t ↪ α 
goal: ↑s ⊕ ↑t ↪ α

full_name: Function.Embedding.sumSet_apply
code: /-- For disjoint `s t : Set α`, the natural injection from `↑s ⊕ ↑t` to `α`. -/
@[simps] def Function.Embedding.sumSet (h : Disjoint s t) : s ⊕ t ↪ α 
goal: ∀ (a : ↑s ⊕ ↑t), (Function.Embedding.sumSet h) a = Sum.elim Subtype.val Subtype.val a

full_name: Function.Embedding.coe_sumSet
code: @[norm_cast] lemma Function.Embedding.coe_sumSet (h : Disjoint s t) :
    (Function.Embedding.sumSet h : s ⊕ t → α) = Sum.elim (↑) (↑) 
goal: ⇑(Function.Embedding.sumSet h) = Sum.elim Subtype.val Subtype.val

full_name: Function.Embedding.sumSet_preimage_inl
code: @[simp] theorem Function.Embedding.sumSet_preimage_inl (h : Disjoint s t) :
    .inl ⁻¹' (Function.Embedding.sumSet h ⁻¹' r) = r ∩ s 
goal: ↑(Sum.inl ⁻¹' (⇑(Function.Embedding.sumSet h) ⁻¹' r)) = r ∩ s

full_name: Function.Embedding.sumSet_preimage_inr
code: @[simp] theorem Function.Embedding.sumSet_preimage_inr (h : Disjoint s t) :
    .inr ⁻¹' (Function.Embedding.sumSet h ⁻¹' r) = r ∩ t 
goal: ↑(Sum.inr ⁻¹' (⇑(Function.Embedding.sumSet h) ⁻¹' r)) = r ∩ t

full_name: Function.Embedding.sumSet_range
code: @[simp] theorem Function.Embedding.sumSet_range {s t : Set α} (h : Disjoint s t) :
    range (Function.Embedding.sumSet h) = s ∪ t 
goal: Set.range ⇑(Function.Embedding.sumSet h) = s ∪ t

full_name: Function.Embedding.sigmaSet_apply
code: /-- For an indexed family `s : ι → Set α` of disjoint sets,
the natural injection from the sigma-type `(i : ι) × ↑(s i)` to `α`. -/
@[simps] def Function.Embedding.sigmaSet {s : ι → Set α} (h : Pairwise (Disjoint on s)) :
    (i : ι) × s i ↪ α 
goal: (Function.Embedding.sigmaSet h) x = ↑x.snd

full_name: Function.Embedding.sigmaSet
code: /-- For an indexed family `s : ι → Set α` of disjoint sets,
the natural injection from the sigma-type `(i : ι) × ↑(s i)` to `α`. -/
@[simps] def Function.Embedding.sigmaSet {s : ι → Set α} (h : Pairwise (Disjoint on s)) :
    (i : ι) × s i ↪ α 
goal: (i : ι) × ↑(s i) ↪ α

full_name: Function.Embedding.coe_sigmaSet
code: @[norm_cast] lemma Function.Embedding.coe_sigmaSet {s : ι → Set α} (h) :
    (Function.Embedding.sigmaSet h : ((i : ι) × s i) → α) = fun x ↦ x.2.1 
goal: ⇑(Function.Embedding.sigmaSet h) = fun x => ↑x.snd

full_name: Function.Embedding.sigmaSet_preimage
code: @[simp] theorem Function.Embedding.sigmaSet_preimage {s : ι → Set α}
    (h : Pairwise (Disjoint on s)) (i : ι) (r : Set α) :
    Sigma.mk i ⁻¹' (Function.Embedding.sigmaSet h ⁻¹' r) = r ∩ s i 
goal: ↑(Sigma.mk i ⁻¹' (⇑(Function.Embedding.sigmaSet h) ⁻¹' r)) = r ∩ s i

full_name: Function.Embedding.sigmaSet_range
code: @[simp] theorem Function.Embedding.sigmaSet_range {s : ι → Set α}
    (h : Pairwise (Disjoint on s)) : Set.range (Function.Embedding.sigmaSet h) = ⋃ i, s i 
goal: Set.range ⇑(Function.Embedding.sigmaSet h) = ⋃ i, s i