# Interactions between embeddings and sets. #

source
@[simp]
theorem Equiv.asEmbedding_range {α : Sort u_1} {β : Type u_2} {p : β → Prop} (e : α ≃ Subtype p) :
Set.range ⇑e.asEmbedding = setOf p
source
def Function.Embedding.optionElim {α : Type u_1} {β : Type u_2} (f : α ↪ β) (x : β) (h : x ∉ Set.range ⇑f) :
Option α ↪ β

Given an embedding `f : α ↪ β` and a point outside of `Set.range f`, construct an embedding `Option α ↪ β`.

Equations

- f.optionElim x h = { toFun := Option.elim' x ⇑f, inj' := ⋯ }

Instances For

source
@[simp]
theorem Function.Embedding.optionElim_apply {α : Type u_1} {β : Type u_2} (f : α ↪ β) (x : β) (h : x ∉ Set.range ⇑f) (a✝ : Option α) :
(f.optionElim x h) a✝ = Option.elim' x (⇑f) a✝
source
def Function.Embedding.optionEmbeddingEquiv (α : Type u_1) (β : Type u_2) :
(Option α ↪ β) ≃ (f : α ↪ β) × ↑(Set.range ⇑f)ᶜ

Equivalence between embeddings of `Option α` and a sigma type over the embeddings of `α`.

Equations

- One or more equations did not get rendered due to their size.

Instances For

source
@[simp]
theorem Function.Embedding.optionEmbeddingEquiv_symm_apply (α : Type u_1) (β : Type u_2) (f : (f : α ↪ β) × ↑(Set.range ⇑f)ᶜ) :
(optionEmbeddingEquiv α β).symm f = f.fst.optionElim ↑f.snd ⋯
source
@[simp]
theorem Function.Embedding.optionEmbeddingEquiv_apply_fst (α : Type u_1) (β : Type u_2) (f : Option α ↪ β) :
((optionEmbeddingEquiv α β) f).fst = Embedding.some.trans f
source
@[simp]
theorem Function.Embedding.optionEmbeddingEquiv_apply_snd_coe (α : Type u_1) (β : Type u_2) (f : Option α ↪ β) :
↑((optionEmbeddingEquiv α β) f).snd = f none
source
def Function.Embedding.codRestrict {α : Sort u_1} {β : Type u_2} (p : Set β) (f : α ↪ β) (H : ∀ (a : α), f a ∈ p) :
α ↪ ↑p

Restrict the codomain of an embedding.

Equations

- Function.Embedding.codRestrict p f H = { toFun := fun (a : α) => ⟨f a, ⋯⟩, inj' := ⋯ }

Instances For

source
@[simp]
theorem Function.Embedding.codRestrict_apply {α : Sort u_1} {β : Type u_2} (p : Set β) (f : α ↪ β) (H : ∀ (a : α), f a ∈ p) (a : α) :
(codRestrict p f H) a = ⟨f a, ⋯⟩
source
def Function.Embedding.image {α : Type u_1} {β : Type u_2} (f : α ↪ β) :
Set α ↪ Set β

`Set.image` as an embedding `Set α ↪ Set β`.

Equations

- f.image = { toFun := Set.image ⇑f, inj' := ⋯ }

Instances For

source
@[simp]
theorem Function.Embedding.image_apply {α : Type u_1} {β : Type u_2} (f : α ↪ β) (s : Set α) :
f.image s = ⇑f '' s
source
def Set.embeddingOfSubset {α : Type u_1} (s t : Set α) (h : s ⊆ t) :
↑s ↪ ↑t

The injection map is an embedding between subsets.

Equations

- s.embeddingOfSubset t h = { toFun := fun (x : ↑s) => ⟨↑x, ⋯⟩, inj' := ⋯ }

Instances For

source
@[simp]
theorem Set.embeddingOfSubset_apply_coe {α : Type u_1} (s t : Set α) (h : s ⊆ t) (x : ↑s) :
↑((s.embeddingOfSubset t h) x) = ↑x
source
def subtypeOrEquiv {α : Type u_1} (p q : α → Prop) [DecidablePred p] (h : Disjoint p q) :
{ x : α // p x ∨ q x } ≃ { x : α // p x } ⊕ { x : α // q x }

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`.

Equations

- One or more equations did not get rendered due to their size.

Instances For

source
@[simp]
theorem subtypeOrEquiv_apply {α : Type u_1} (p q : α → Prop) [DecidablePred p] (h : Disjoint p q) (a : { x : α // p x ∨ q x }) :
(subtypeOrEquiv p q h) a = (subtypeOrLeftEmbedding p q) a
source
@[simp]
theorem subtypeOrEquiv_symm_inl {α : Type u_1} (p q : α → Prop) [DecidablePred p] (h : Disjoint p q) (x : { x : α // p x }) :
(subtypeOrEquiv p q h).symm (Sum.inl x) = ⟨↑x, ⋯⟩
source
@[simp]
theorem subtypeOrEquiv_symm_inr {α : Type u_1} (p q : α → Prop) [DecidablePred p] (h : Disjoint p q) (x : { x : α // q x }) :
(subtypeOrEquiv p q h).symm (Sum.inr x) = ⟨↑x, ⋯⟩
source
def Function.Embedding.sumSet {α : Type u_1} {s t : Set α} (h : Disjoint s t) :
↑s ⊕ ↑t ↪ α

For disjoint `s t : Set α`, the natural injection from `↑s ⊕ ↑t` to `α`.

Equations

- Function.Embedding.sumSet h = { toFun := Sum.elim Subtype.val Subtype.val, inj' := ⋯ }

Instances For

source
@[simp]
theorem Function.Embedding.sumSet_apply {α : Type u_1} {s t : Set α} (h : Disjoint s t) (a✝ : ↑s ⊕ ↑t) :
(sumSet h) a✝ = Sum.elim Subtype.val Subtype.val a✝
source
theorem Function.Embedding.coe_sumSet {α : Type u_1} {s t : Set α} (h : Disjoint s t) :
⇑(sumSet h) = Sum.elim Subtype.val Subtype.val
source
@[simp]
theorem Function.Embedding.sumSet_preimage_inl {α : Type u_1} {s t r : Set α} (h : Disjoint s t) :
Subtype.val '' (Sum.inl ⁻¹' (⇑(sumSet h) ⁻¹' r)) = r ∩ s
source
@[simp]
theorem Function.Embedding.sumSet_preimage_inr {α : Type u_1} {s t r : Set α} (h : Disjoint s t) :
Subtype.val '' (Sum.inr ⁻¹' (⇑(sumSet h) ⁻¹' r)) = r ∩ t
source
@[simp]
theorem Function.Embedding.sumSet_range {α : Type u_1} {s t : Set α} (h : Disjoint s t) :
Set.range ⇑(sumSet h) = s ∪ t
source
def Function.Embedding.sigmaSet {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (onFun Disjoint s)) :
(i : ι) × ↑(s i) ↪ α

For an indexed family `s : ι → Set α` of disjoint sets, the natural injection from the sigma-type `(i : ι) × ↑(s i)` to `α`.

Equations

- Function.Embedding.sigmaSet h = { toFun := fun (x : (i : ι) × ↑(s i)) => ↑x.snd, inj' := ⋯ }

Instances For

source
@[simp]
theorem Function.Embedding.sigmaSet_apply {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (onFun Disjoint s)) (x : (i : ι) × ↑(s i)) :
(sigmaSet h) x = ↑x.snd
source
theorem Function.Embedding.coe_sigmaSet {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (onFun Disjoint s)) :
⇑(sigmaSet h) = fun (x : (i : ι) × ↑(s i)) => ↑x.snd
source
@[simp]
theorem Function.Embedding.sigmaSet_preimage {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (onFun Disjoint s)) (i : ι) (r : Set α) :
Subtype.val '' (Sigma.mk i ⁻¹' (⇑(sigmaSet h) ⁻¹' r)) = r ∩ s i
source
@[simp]
theorem Function.Embedding.sigmaSet_range {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (onFun Disjoint s)) :
Set.range ⇑(sigmaSet h) = ⋃ (i : ι), s i