The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V01. The language of Mathlib

Mathlib.Logic.Embedding.Set

32 declarations. Mathlib docs · Source

Interactions between embeddings and sets.

theorem Function.Embedding.optionElim.congr_simp E1 #

∀ {α : Type u_1} {β : Type u_2} (f f_1 : α ↪ β) (e_f : f = f_1) (x x_1 : β) (e_x : x = x_1) (h : x ∉ Set.range ⇑f),
  f.optionElim x h = f_1.optionElim x_1 ⋯

theorem Function.Embedding.sumSet.congr_simp E1 #

∀ {α : Type u_1} {s t : Set α} (h : Disjoint s t), Function.Embedding.sumSet h = Function.Embedding.sumSet h

theorem Function.Embedding.sigmaSet.congr_simp E1 #

∀ {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (Function.onFun Disjoint s)),
  Function.Embedding.sigmaSet h = Function.Embedding.sigmaSet h

theorem subtypeOrEquiv.congr_simp E1 #

∀ {α : Type u_1} (p q : α → Prop) [inst : DecidablePred p] (h : Disjoint p q),
  subtypeOrEquiv p q h = subtypeOrEquiv p q h

theorem Equiv.asEmbedding_range E0 #

∀ {α : Sort u_1} {β : Type u_2} {p : β → Prop} (e : α ≃ Subtype p), Set.range ⇑e.asEmbedding = Set.ofPred p

def Function.Embedding.optionElim E1 #

{α : Type u_1} → {β : Type u_2} → (f : α ↪ β) → (x : β) → x ∉ Set.range ⇑f → Option α ↪ β

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

theorem Function.Embedding.optionElim_apply E0 #

∀ {α : 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

def Function.Embedding.optionEmbeddingEquiv E1 #

(α : Type u_1) → (β : Type u_2) → (Option α ↪ β) ≃ (f : α ↪ β) × ↑(Set.range ⇑f)ᶜ

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

theorem Function.Embedding.optionEmbeddingEquiv_apply_snd_coe E0 #

∀ (α : Type u_1) (β : Type u_2) (f : Option α ↪ β), ↑((Function.Embedding.optionEmbeddingEquiv α β) f).snd = f none

theorem Function.Embedding.optionEmbeddingEquiv_symm_apply E0 #

∀ (α : Type u_1) (β : Type u_2) (f : (f : α ↪ β) × ↑(Set.range ⇑f)ᶜ),
  (Function.Embedding.optionEmbeddingEquiv α β).symm f = f.fst.optionElim ↑f.snd ⋯

theorem Function.Embedding.optionEmbeddingEquiv_apply_fst E0 #

∀ (α : Type u_1) (β : Type u_2) (f : Option α ↪ β),
  ((Function.Embedding.optionEmbeddingEquiv α β) f).fst = Function.Embedding.some.trans f

def Function.Embedding.codRestrict E1 #

{α : Sort u_1} → {β : Type u_2} → (p : Set β) → (f : α ↪ β) → (∀ (a : α), f a ∈ p) → α ↪ ↑p

Restrict the codomain of an embedding.

theorem Function.Embedding.codRestrict_apply E0 #

∀ {α : Sort u_1} {β : Type u_2} (p : Set β) (f : α ↪ β) (H : ∀ (a : α), f a ∈ p) (a : α),
  (Function.Embedding.codRestrict p f H) a = ⟨f a, ⋯⟩

def Function.Embedding.image E1 #

{α : Type u_1} → {β : Type u_2} → (α ↪ β) → Set α ↪ Set β

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

theorem Function.Embedding.image_apply E0 #

∀ {α : Type u_1} {β : Type u_2} (f : α ↪ β) (s : Set α), f.image s = ⇑f '' s

def Set.embeddingOfSubset E1 #

{α : Type u_1} → (s t : Set α) → s ⊆ t → ↑s ↪ ↑t

The injection map is an embedding between subsets.

theorem Set.embeddingOfSubset_apply_coe E0 #

∀ {α : Type u_1} (s t : Set α) (h : s ⊆ t) (x : ↑s), ↑((s.embeddingOfSubset t h) x) = ↑x

def subtypeOrEquiv E1 #

{α : Type u_1} → (p q : α → Prop) → [DecidablePred p] → 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.

theorem subtypeOrEquiv_apply E0 #

∀ {α : Type u_1} (p q : α → Prop) [inst : DecidablePred p] (h : Disjoint p q) (a : { x // p x ∨ q x }),
  (subtypeOrEquiv p q h) a = (subtypeOrLeftEmbedding p q) a

theorem subtypeOrEquiv_symm_inl E0 #

∀ {α : Type u_1} (p q : α → Prop) [inst : DecidablePred p] (h : Disjoint p q) (x : { x // p x }),
  (subtypeOrEquiv p q h).symm (Sum.inl x) = ⟨↑x, ⋯⟩

theorem subtypeOrEquiv_symm_inr E0 #

∀ {α : Type u_1} (p q : α → Prop) [inst : DecidablePred p] (h : Disjoint p q) (x : { x // q x }),
  (subtypeOrEquiv p q h).symm (Sum.inr x) = ⟨↑x, ⋯⟩

def Function.Embedding.sumSet E1 #

{α : Type u_1} → {s t : Set α} → Disjoint s t → ↑s ⊕ ↑t ↪ α

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

theorem Function.Embedding.sumSet_apply E0 #

∀ {α : Type u_1} {s t : Set α} (h : Disjoint s t) (a : ↑s ⊕ ↑t),
  (Function.Embedding.sumSet h) a = Sum.elim Subtype.val Subtype.val a

theorem Function.Embedding.coe_sumSet E0 #

∀ {α : Type u_1} {s t : Set α} (h : Disjoint s t), ⇑(Function.Embedding.sumSet h) = Sum.elim Subtype.val Subtype.val

theorem Function.Embedding.sumSet_preimage_inl E0 #

∀ {α : Type u_1} {s t r : Set α} (h : Disjoint s t),
  Subtype.val '' Sum.inl ⁻¹' ⇑(Function.Embedding.sumSet h) ⁻¹' r = r ∩ s

theorem Function.Embedding.sumSet_preimage_inr E0 #

∀ {α : Type u_1} {s t r : Set α} (h : Disjoint s t),
  Subtype.val '' Sum.inr ⁻¹' ⇑(Function.Embedding.sumSet h) ⁻¹' r = r ∩ t

theorem Function.Embedding.sumSet_range E0 #

∀ {α : Type u_1} {s t : Set α} (h : Disjoint s t), Set.range ⇑(Function.Embedding.sumSet h) = s ∪ t

def Function.Embedding.sigmaSet E1 #

{α : Type u_1} → {ι : Type u_2} → {s : ι → Set α} → Pairwise (Function.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 α.

theorem Function.Embedding.sigmaSet_apply E0 #

∀ {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (Function.onFun Disjoint s)) (x : (i : ι) × ↑(s i)),
  (Function.Embedding.sigmaSet h) x = ↑x.snd

theorem Function.Embedding.coe_sigmaSet E0 #

∀ {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (Function.onFun Disjoint s)),
  ⇑(Function.Embedding.sigmaSet h) = fun x ↦ ↑x.snd

theorem Function.Embedding.sigmaSet_preimage E0 #

∀ {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (Function.onFun Disjoint s)) (i : ι) (r : Set α),
  Subtype.val '' Sigma.mk i ⁻¹' ⇑(Function.Embedding.sigmaSet h) ⁻¹' r = r ∩ s i

theorem Function.Embedding.sigmaSet_range E0 #

∀ {α : Type u_1} {ι : Type u_2} {s : ι → Set α} (h : Pairwise (Function.onFun Disjoint s)),
  Set.range ⇑(Function.Embedding.sigmaSet h) = ⋃ i, s i