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.Equiv.Set

122 declarations and 6 deprecated aliases. Mathlib docs · Source

Equivalences and sets

In this file we provide lemmas linking equivalences to sets.

Some notable definitions are:

  • Equiv.ofInjective: an injective function is (noncomputably) equivalent to its range.
  • Set.equivOfEq: two equal sets are equivalent as types.
  • Equiv.Set.union: a disjoint union of sets is equivalent to their Sum.

This file is separate from Equiv/Basic such that we do not require the full lattice structure on sets before defining what an equivalence is.

theorem Equiv.Set.image.congr_simp E1 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (s : Set α) (H : Function.Injective f),
  Equiv.Set.image f s H = Equiv.Set.image f s H

theorem Equiv.subtypeEquiv.congr_simp E1 #

∀ {α : Sort u_1} {β : Sort u_4} {p : α → Prop} {q : β → Prop} (e e_1 : α ≃ β) (e_e : e = e_1)
  (h : ∀ (a : α), p a ↔ q (e a)), e.subtypeEquiv h = e_1.subtypeEquiv ⋯

theorem Equiv.ofLeftInverse'.congr_simp E1 #

∀ {α : Sort u_3} {β : Type u_4} (f : α → β) (f_inv f_inv_1 : β → α) (e_f_inv : f_inv = f_inv_1)
  (hf : Function.LeftInverse f_inv f), Equiv.ofLeftInverse' f f_inv hf = Equiv.ofLeftInverse' f f_inv_1 ⋯

theorem Equiv.ofLeftInverse.congr_simp E1 #

∀ {α : Sort u_3} {β : Type u_4} (f : α → β) (f_inv f_inv_1 : Nonempty α → β → α) (e_f_inv : f_inv = f_inv_1)
  (hf : ∀ (h : Nonempty α), Function.LeftInverse (f_inv h) f),
  Equiv.ofLeftInverse f f_inv hf = Equiv.ofLeftInverse f f_inv_1 ⋯

theorem Equiv.ofInjective.congr_simp E1 #

∀ {α : Sort u_3} {β : Type u_4} (f : α → β) (hf : Function.Injective f), Equiv.ofInjective f hf = Equiv.ofInjective f hf

theorem Equiv.Set.sumDiffSubset.congr_simp E1 #

∀ {α : Type u_3} {s t : Set α} (h : s ⊆ t) [inst : DecidablePred fun x ↦ x ∈ s],
  Equiv.Set.sumDiffSubset h = Equiv.Set.sumDiffSubset h

theorem EquivLike.range_eq_univ E0 #

∀ {α : Type u_1} {β : Type u_2} {E : Type u_3} [inst : EquivLike E α β] (e : E), Set.range ⇑e = Set.univ

def Set.equivOfEq E1 #

{α : Type u_1} → {s t : Set α} → s = t → ↑s ≃ ↑t

The subtypes corresponding to equal sets are equivalent.

See also Finset.equivOfEq.

theorem Set.equivOfEq_apply E0 #

∀ {α : Type u_1} {s t : Set α} (h : s = t) (a : { a // (fun x ↦ x ∈ s) a }), (Set.equivOfEq h) a = ⟨↑a, ⋯⟩

theorem Set.equivOfEq_symm_apply E0 #

∀ {α : Type u_1} {s t : Set α} (h : s = t) (b : { b // (fun x ↦ x ∈ t) b }), (Set.equivOfEq h).symm b = ⟨↑b, ⋯⟩

theorem Set.strictMono_equivOfEq E1 #

∀ {α : Type u_1} {s t : Set α} [inst : Preorder α] (h : s = t), StrictMono ⇑(Set.equivOfEq h)

theorem Equiv.range_eq_univ E1 #

∀ {α : Type u_1} {β : Type u_2} (e : α ≃ β), Set.range ⇑e = Set.univ

theorem Equiv.image_symm_eq_preimage E1 #

∀ {α : Type u_1} {β : Type u_2} (e : α ≃ β) (s : Set β), ⇑e.symm '' s = ⇑e ⁻¹' s

theorem Equiv.image_eq_preimage_symm E1 #

∀ {α : Type u_1} {β : Type u_2} (e : α ≃ β) (s : Set α), ⇑e '' s = ⇑e.symm ⁻¹' s

theorem Set.mem_image_equiv E0 #

∀ {α : Type u_3} {β : Type u_4} {S : Set α} {f : α ≃ β} {x : β}, x ∈ ⇑f '' S ↔ f.symm x ∈ S

theorem Equiv.symm_image_subset E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α) (t : Set β), ⇑e.symm '' t ⊆ s ↔ t ⊆ ⇑e '' s

theorem Equiv.subset_symm_image E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α) (t : Set β), s ⊆ ⇑e.symm '' t ↔ ⇑e '' s ⊆ t

theorem Equiv.symm_image_image E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α), ⇑e.symm '' ⇑e '' s = s

theorem Equiv.image_symm_image E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set β), ⇑e '' ⇑e.symm '' s = s

theorem Equiv.image_preimage E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set β), ⇑e '' ⇑e ⁻¹' s = s

theorem Equiv.preimage_image E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α), ⇑e ⁻¹' ⇑e '' s = s

theorem Equiv.image_compl E1 #

∀ {α : Type u_3} {β : Type u_4} (f : α ≃ β) (s : Set α), ⇑f '' sᶜ = (⇑f '' s)ᶜ

theorem Equiv.symm_preimage_preimage E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set β), ⇑e.symm ⁻¹' ⇑e ⁻¹' s = s

theorem Equiv.preimage_symm_preimage E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α), ⇑e ⁻¹' ⇑e.symm ⁻¹' s = s

theorem Equiv.preimage_subset E1 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s t : Set β), ⇑e ⁻¹' s ⊆ ⇑e ⁻¹' t ↔ s ⊆ t

theorem Equiv.image_subset E1 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s t : Set α), ⇑e '' s ⊆ ⇑e '' t ↔ s ⊆ t

theorem Equiv.image_eq_iff_eq E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s t : Set α), ⇑e '' s = ⇑e '' t ↔ s = t

theorem Equiv.preimage_eq_iff_eq_image E1 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set β) (t : Set α), ⇑e ⁻¹' s = t ↔ s = ⇑e '' t

theorem Equiv.setOfPred_apply_symm_eq_image_setOfPred E1 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (p : α → Prop), {b | p (e.symm b)} = ⇑e '' {a | p a}

theorem Equiv.prod_assoc_preimage E0 #

∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {s : Set α} {t : Set β} {u : Set γ},
  ⇑(Equiv.prodAssoc α β γ) ⁻¹' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u

theorem Equiv.prod_assoc_symm_preimage E0 #

∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {s : Set α} {t : Set β} {u : Set γ},
  ⇑(Equiv.prodAssoc α β γ).symm ⁻¹' (s ×ˢ t) ×ˢ u = s ×ˢ t ×ˢ u

theorem Equiv.prod_assoc_image E1 #

∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {s : Set α} {t : Set β} {u : Set γ},
  ⇑(Equiv.prodAssoc α β γ) '' (s ×ˢ t) ×ˢ u = s ×ˢ t ×ˢ u

theorem Equiv.prod_assoc_symm_image E1 #

∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {s : Set α} {t : Set β} {u : Set γ},
  ⇑(Equiv.prodAssoc α β γ).symm '' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u

def Equiv.setProdEquivSigma E1 #

{α : Type u_3} → {β : Type u_4} → (s : Set (α × β)) → ↑s ≃ (x : α) × ↑{y | (x, y) ∈ s}

A set s in α × β is equivalent to the sigma-type Σ x, {y | (x, y) ∈ s}.

def Equiv.setCongr E1 #

{α : Type u_3} → {β : Type u_4} → α ≃ β → Set α ≃ Set β

If α is equivalent to β, then Set α is equivalent to Set β.

See also Equiv.finsetCongr.

theorem Equiv.setCongr_apply E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α), e.setCongr s = ⇑e '' s

theorem Equiv.setCongr_symm_apply E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (t : Set β), e.setCongr.symm t = ⇑e.symm '' t

def Equiv.image E1 #

{α : Type u_3} → {β : Type u_4} → (e : α ≃ β) → (s : Set α) → ↑s ≃ ↑(⇑e '' s)

A set is equivalent to its image under an equivalence.

theorem Equiv.image_symm_apply_coe E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α) (y : ↑(⇑e '' s)), ↑((e.image s).symm y) = e.symm ↑y

theorem Equiv.image_apply_coe E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) (s : Set α) (x : ↑s), ↑((e.image s) x) = e ↑x

theorem Equiv.image_monotone E1 #

∀ {α : Type u_3} {β : Type u_4} [inst : Preorder α] [inst_1 : Preorder β] {e : α ≃ β} (s : Set α),
  Monotone ⇑e → Monotone ⇑(e.image s)

theorem Equiv.image_antitone E1 #

∀ {α : Type u_3} {β : Type u_4} [inst : Preorder α] [inst_1 : Preorder β] {e : α ≃ β} (s : Set α),
  Antitone ⇑e → Antitone ⇑(e.image s)

theorem Equiv.image_strictMono E1 #

∀ {α : Type u_3} {β : Type u_4} [inst : Preorder α] [inst_1 : Preorder β] {e : α ≃ β} (s : Set α),
  StrictMono ⇑e → StrictMono ⇑(e.image s)

theorem Equiv.image_strictAnti E1 #

∀ {α : Type u_3} {β : Type u_4} [inst : Preorder α] [inst_1 : Preorder β] {e : α ≃ β} (s : Set α),
  StrictAnti ⇑e → StrictAnti ⇑(e.image s)

def Equiv.Set.univ E1 #

(α : Type u_3) → ↑Set.univ ≃ α

univ α is equivalent to α.

theorem Equiv.Set.univ_symm_apply E0 #

∀ (α : Type u_3) (a : α), (Equiv.Set.univ α).symm a = ⟨a, trivial⟩

theorem Equiv.Set.univ_apply E0 #

∀ (α : Type u_3) (self : { x // x ∈ Set.univ }), (Equiv.Set.univ α) self = ↑self

theorem Equiv.Set.coe_univ E0 #

∀ (α : Type u_3), ⇑(Equiv.Set.univ α) = Subtype.val

def Equiv.Set.empty E1 #

(α : Type u_3) → ↑∅ ≃ Empty

An empty set is equivalent to the Empty type.

def Equiv.Set.pempty E1 #

(α : Type u_3) → ↑∅ ≃ PEmpty.{u_4}

An empty set is equivalent to a PEmpty type.

def Equiv.Set.union' E1 #

{α : Type u_3} →
  {s t : Set α} → (p : α → Prop) → [DecidablePred p] → (∀ x ∈ s, p x) → (∀ x ∈ t, ¬p x) → ↑(s ∪ t) ≃ ↑s ⊕ ↑t

If sets s and t are separated by a decidable predicate, then s ∪ t is equivalent to s ⊕ t.

def Equiv.Set.union E1 #

{α : Type u_3} → {s t : Set α} → [DecidablePred fun x ↦ x ∈ s] → Disjoint s t → ↑(s ∪ t) ≃ ↑s ⊕ ↑t

If sets s and t are disjoint, then s ∪ t is equivalent to s ⊕ t.

theorem Equiv.Set.union_apply_left E1 #

∀ {α : Type u_3} {s t : Set α} [inst : DecidablePred fun x ↦ x ∈ s] (H : Disjoint s t) {a : ↑(s ∪ t)} (ha : ↑a ∈ s),
  (Equiv.Set.union H) a = Sum.inl ⟨↑a, ha⟩

theorem Equiv.Set.union_apply_right E1 #

∀ {α : Type u_3} {s t : Set α} [inst : DecidablePred fun x ↦ x ∈ s] (H : Disjoint s t) {a : ↑(s ∪ t)} (ha : ↑a ∈ t),
  (Equiv.Set.union H) a = Sum.inr ⟨↑a, ha⟩

theorem Equiv.Set.union_symm_apply_left E0 #

∀ {α : Type u_3} {s t : Set α} [inst : DecidablePred fun x ↦ x ∈ s] (H : Disjoint s t) (a : ↑s),
  (Equiv.Set.union H).symm (Sum.inl a) = ⟨↑a, ⋯⟩

theorem Equiv.Set.union_symm_apply_right E0 #

∀ {α : Type u_3} {s t : Set α} [inst : DecidablePred fun x ↦ x ∈ s] (H : Disjoint s t) (a : ↑t),
  (Equiv.Set.union H).symm (Sum.inr a) = ⟨↑a, ⋯⟩

def Equiv.Set.singleton E1 #

{α : Type u_3} → (a : α) → ↑{a} ≃ PUnit.{u}

A singleton set is equivalent to a PUnit type.

def Equiv.Set.insert E1 #

{α : Type u} → {s : Set α} → [DecidablePred fun x ↦ x ∈ s] → {a : α} → a ∉ s → ↑(insert a s) ≃ ↑s ⊕ PUnit.{u + 1}

If a ∉ s, then insert a s is equivalent to s ⊕ PUnit.

theorem Equiv.Set.insert_symm_apply_inl E0 #

∀ {α : Type u} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] {a : α} (H : a ∉ s) (b : ↑s),
  (Equiv.Set.insert H).symm (Sum.inl b) = ⟨↑b, ⋯⟩

theorem Equiv.Set.insert_symm_apply_inr E0 #

∀ {α : Type u} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] {a : α} (H : a ∉ s) (b : PUnit.{u + 1}),
  (Equiv.Set.insert H).symm (Sum.inr b) = ⟨a, ⋯⟩

theorem Equiv.Set.insert_apply_left E0 #

∀ {α : Type u} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] {a : α} (H : a ∉ s),
  (Equiv.Set.insert H) ⟨a, ⋯⟩ = Sum.inr PUnit.unit

theorem Equiv.Set.insert_apply_right E0 #

∀ {α : Type u} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] {a : α} (H : a ∉ s) (b : ↑s),
  (Equiv.Set.insert H) ⟨↑b, ⋯⟩ = Sum.inl b

def Equiv.Set.sumCompl E1 #

{α : Type u_3} → (s : Set α) → [DecidablePred fun x ↦ x ∈ s] → ↑s ⊕ ↑sᶜ ≃ α

If s : Set α is a set with decidable membership, then s ⊕ sᶜ is equivalent to α.

See also Equiv.sumCompl.

theorem Equiv.Set.sumCompl_apply_inl E0 #

∀ {α : Type u} (s : Set α) [inst : DecidablePred fun x ↦ x ∈ s] (x : ↑s), (Equiv.Set.sumCompl s) (Sum.inl x) = ↑x

theorem Equiv.Set.sumCompl_apply_inr E0 #

∀ {α : Type u} (s : Set α) [inst : DecidablePred fun x ↦ x ∈ s] (x : ↑sᶜ), (Equiv.Set.sumCompl s) (Sum.inr x) = ↑x

theorem Equiv.Set.sumCompl_symm_apply_of_mem E1 #

∀ {α : Type u} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] {x : α} (hx : x ∈ s),
  (Equiv.Set.sumCompl s).symm x = Sum.inl ⟨x, hx⟩

theorem Equiv.Set.sumCompl_symm_apply_of_notMem E1 #

∀ {α : Type u} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] {x : α} (hx : x ∉ s),
  (Equiv.Set.sumCompl s).symm x = Sum.inr ⟨x, hx⟩

theorem Equiv.Set.sumCompl_symm_apply E0 #

∀ {α : Type u_3} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] (x : ↑s), (Equiv.Set.sumCompl s).symm ↑x = Sum.inl x

theorem Equiv.Set.sumCompl_symm_apply_compl E0 #

∀ {α : Type u_3} {s : Set α} [inst : DecidablePred fun x ↦ x ∈ s] (x : ↑sᶜ), (Equiv.Set.sumCompl s).symm ↑x = Sum.inr x

def Equiv.Set.sumDiffSubset E1 #

{α : Type u_3} → {s t : Set α} → s ⊆ t → [DecidablePred fun x ↦ x ∈ s] → ↑s ⊕ ↑(t \ s) ≃ ↑t

sumDiffSubset s t is the natural equivalence between s ⊕ (t \ s) and t, where s and t are two sets.

theorem Equiv.Set.sumDiffSubset_apply_inl E0 #

∀ {α : Type u_3} {s t : Set α} (h : s ⊆ t) [inst : DecidablePred fun x ↦ x ∈ s] (x : ↑s),
  (Equiv.Set.sumDiffSubset h) (Sum.inl x) = Set.inclusion h x

theorem Equiv.Set.sumDiffSubset_apply_inr E0 #

∀ {α : Type u_3} {s t : Set α} (h : s ⊆ t) [inst : DecidablePred fun x ↦ x ∈ s] (x : ↑(t \ s)),
  (Equiv.Set.sumDiffSubset h) (Sum.inr x) = Set.inclusion ⋯ x

theorem Equiv.Set.sumDiffSubset_symm_apply_of_mem E1 #

∀ {α : Type u_3} {s t : Set α} (h : s ⊆ t) [inst : DecidablePred fun x ↦ x ∈ s] {x : ↑t} (hx : ↑x ∈ s),
  (Equiv.Set.sumDiffSubset h).symm x = Sum.inl ⟨↑x, hx⟩

theorem Equiv.Set.sumDiffSubset_symm_apply_of_notMem E1 #

∀ {α : Type u_3} {s t : Set α} (h : s ⊆ t) [inst : DecidablePred fun x ↦ x ∈ s] {x : ↑t} (hx : ↑x ∉ s),
  (Equiv.Set.sumDiffSubset h).symm x = Sum.inr ⟨↑x, ⋯⟩

def Equiv.Set.unionSumInter E1 #

{α : Type u} → (s t : Set α) → [DecidablePred fun x ↦ x ∈ s] → ↑(s ∪ t) ⊕ ↑(s ∩ t) ≃ ↑s ⊕ ↑t

If s is a set with decidable membership, then the sum of s ∪ t and s ∩ t is equivalent to s ⊕ t.

def Equiv.Set.compl E1 #

{α : Type u} →
  {β : Type v} →
    {s : Set α} →
      {t : Set β} →
        [DecidablePred fun x ↦ x ∈ s] →
          [DecidablePred fun x ↦ x ∈ t] → (e₀ : ↑s ≃ ↑t) → { e // ∀ (x : ↑s), e ↑x = ↑(e₀ x) } ≃ (↑sᶜ ≃ ↑tᶜ)

Given an equivalence e₀ between sets s : Set α and t : Set β, the set of equivalences e : α ≃ β such that e ↑x = ↑(e₀ x) for each x : s is equivalent to the set of equivalences between sᶜ and tᶜ.

def Equiv.Set.prod E1 #

{α : Type u_3} → {β : Type u_4} → (s : Set α) → (t : Set β) → ↑(s ×ˢ t) ≃ ↑s × ↑t

The set product of two sets is equivalent to the type product of their coercions to types.

def Equiv.Set.univPi E1 #

{α : Type u_3} → {β : α → Type u_4} → (s : (a : α) → Set (β a)) → ↑(Set.univ.pi s) ≃ ((a : α) → ↑(s a))

The set Set.pi Set.univ s is equivalent to Π a, s a.

theorem Equiv.Set.univPi_symm_apply_coe E0 #

∀ {α : Type u_3} {β : α → Type u_4} (s : (a : α) → Set (β a)) (f : (a : α) → ↑(s a)) (a : α),
  ↑((Equiv.Set.univPi s).symm f) a = ↑(f a)

theorem Equiv.Set.univPi_apply_coe E0 #

∀ {α : Type u_3} {β : α → Type u_4} (s : (a : α) → Set (β a)) (f : ↑(Set.univ.pi s)) (a : α),
  ↑((Equiv.Set.univPi s) f a) = ↑f a

def Equiv.Set.imageOfInjOn E1 #

{α : Type u_3} → {β : Type u_4} → (f : α → β) → (s : Set α) → Set.InjOn f s → ↑s ≃ ↑(f '' s)

If a function f is injective on a set s, then s is equivalent to f '' s.

def Equiv.Set.image E1 #

{α : Type u_3} → {β : Type u_4} → (f : α → β) → (s : Set α) → Function.Injective f → ↑s ≃ ↑(f '' s)

If f is an injective function, then s is equivalent to f '' s.

theorem Equiv.Set.image_apply E0 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (s : Set α) (H : Function.Injective f) (p : ↑s),
  (Equiv.Set.image f s H) p = ⟨f ↑p, ⋯⟩

theorem Equiv.Set.image_symm_apply E0 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (s : Set α) (H : Function.Injective f) (x : α) (h : f x ∈ f '' s),
  (Equiv.Set.image f s H).symm ⟨f x, h⟩ = ⟨x, ⋯⟩

theorem Equiv.Set.image_symm_preimage E1 #

∀ {α : Type u_3} {β : Type u_4} {f : α → β} (hf : Function.Injective f) (u s : Set α),
  (fun x ↦ ↑((Equiv.Set.image f s hf).symm x)) ⁻¹' u = Subtype.val ⁻¹' f '' u

def Equiv.Set.sep E1 #

{α : Type u} → (s : Set α) → (t : α → Prop) → ↑{x | x ∈ s ∧ t x} ≃ ↑{x | t ↑x}

The set {x ∈ s | t x} is equivalent to the set of x : s such that t x.

def Equiv.Set.powerset E1 #

{α : Type u_3} → (S : Set α) → ↑(𝒫 S) ≃ Set ↑S

The set 𝒫 S := {x | x ⊆ S} is equivalent to the type Set S.

def Equiv.Set.rangeSplittingImageEquiv E1 #

{α : Type u_3} → {β : Type u_4} → (f : α → β) → (s : Set ↑(Set.range f)) → ↑(Set.rangeSplitting f '' s) ≃ ↑s

If s is a set in range f, then its image under rangeSplitting f is in bijection (via f) with s.

theorem Equiv.Set.rangeSplittingImageEquiv_symm_apply_coe E0 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (s : Set ↑(Set.range f)) (x : ↑s),
  ↑((Equiv.Set.rangeSplittingImageEquiv f s).symm x) = Set.rangeSplitting f ↑x

theorem Equiv.Set.rangeSplittingImageEquiv_apply_coe_coe E0 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (s : Set ↑(Set.range f)) (x : ↑(Set.rangeSplitting f '' s)),
  ↑↑((Equiv.Set.rangeSplittingImageEquiv f s) x) = f ↑x

def Equiv.Set.rangeInl E1 #

(α : Type u_3) → (β : Type u_4) → ↑(Set.range Sum.inl) ≃ α

Equivalence between the range of Sum.inl : α → α ⊕ β and α.

theorem Equiv.Set.rangeInl_symm_apply_coe E0 #

∀ (α : Type u_3) (β : Type u_4) (x : α), ↑((Equiv.Set.rangeInl α β).symm x) = Sum.inl x

theorem Equiv.Set.rangeInl_apply_inl E0 #

∀ {α : Type u_3} (β : Type u_4) (x : α), (Equiv.Set.rangeInl α β) ⟨Sum.inl x, ⋯⟩ = x

def Equiv.Set.rangeInr E1 #

(α : Type u_3) → (β : Type u_4) → ↑(Set.range Sum.inr) ≃ β

Equivalence between the range of Sum.inr : β → α ⊕ β and β.

theorem Equiv.Set.rangeInr_symm_apply_coe E0 #

∀ (α : Type u_3) (β : Type u_4) (x : β), ↑((Equiv.Set.rangeInr α β).symm x) = Sum.inr x

theorem Equiv.Set.rangeInr_apply_inr E0 #

∀ (α : Type u_3) {β : Type u_4} (x : β), (Equiv.Set.rangeInr α β) ⟨Sum.inr x, ⋯⟩ = x

def Equiv.ofLeftInverse E1 #

{α : Sort u_3} →
  {β : Type u_4} →
    (f : α → β) →
      (f_inv : Nonempty α → β → α) → (∀ (h : Nonempty α), Function.LeftInverse (f_inv h) f) → α ≃ ↑(Set.range f)

If f : α → β has a left-inverse when α is nonempty, then α is computably equivalent to the range of f.

While awkward, the Nonempty α hypothesis on f_inv and hf allows this to be used when α is empty too. This hypothesis is absent on analogous definitions on stronger Equivs like LinearEquiv.ofLeftInverse and RingEquiv.ofLeftInverse as their typeclass assumptions are already sufficient to ensure non-emptiness.

theorem Equiv.ofLeftInverse_apply_coe E0 #

∀ {α : Sort u_3} {β : Type u_4} (f : α → β) (f_inv : Nonempty α → β → α)
  (hf : ∀ (h : Nonempty α), Function.LeftInverse (f_inv h) f) (a : α), ↑((Equiv.ofLeftInverse f f_inv hf) a) = f a

theorem Equiv.ofLeftInverse_symm_apply E0 #

∀ {α : Sort u_3} {β : Type u_4} (f : α → β) (f_inv : Nonempty α → β → α)
  (hf : ∀ (h : Nonempty α), Function.LeftInverse (f_inv h) f) (b : ↑(Set.range f)),
  (Equiv.ofLeftInverse f f_inv hf).symm b = f_inv ⋯ ↑b

abbrev Equiv.ofLeftInverse' E1 #

{α : Sort u_3} → {β : Type u_4} → (f : α → β) → (f_inv : β → α) → Function.LeftInverse f_inv f → α ≃ ↑(Set.range f)

If f : α → β has a left-inverse, then α is computably equivalent to the range of f.

Note that if α is empty, no such f_inv exists and so this definition can't be used, unlike the stronger but less convenient ofLeftInverse.

def Equiv.ofInjective E1 #

{α : Sort u_3} → {β : Type u_4} → (f : α → β) → Function.Injective f → α ≃ ↑(Set.range f)

If f : α → β is an injective function, then domain α is equivalent to the range of f.

theorem Equiv.ofInjective_apply E0 #

∀ {α : Sort u_3} {β : Type u_4} (f : α → β) (hf : Function.Injective f) (a : α), (Equiv.ofInjective f hf) a = ⟨f a, ⋯⟩

theorem Equiv.apply_ofInjective_symm E1 #

∀ {α : Sort u_3} {β : Type u_4} {f : α → β} (hf : Function.Injective f) (b : ↑(Set.range f)),
  f ((Equiv.ofInjective f hf).symm b) = ↑b

theorem Equiv.ofInjective_symm_apply E0 #

∀ {α : Sort u_3} {β : Type u_4} {f : α → β} (hf : Function.Injective f) (a : α),
  (Equiv.ofInjective f hf).symm ⟨f a, ⋯⟩ = a

theorem Equiv.coe_ofInjective_symm E0 #

∀ {α : Type u_3} {β : Type u_4} {f : α → β} (hf : Function.Injective f),
  ⇑(Equiv.ofInjective f hf).symm = Set.rangeSplitting f

theorem Equiv.self_comp_ofInjective_symm E0 #

∀ {α : Sort u_3} {β : Type u_4} {f : α → β} (hf : Function.Injective f),
  f ∘ ⇑(Equiv.ofInjective f hf).symm = Subtype.val

theorem Equiv.ofLeftInverse_eq_ofInjective E1 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (f_inv : Nonempty α → β → α)
  (hf : ∀ (h : Nonempty α), Function.LeftInverse (f_inv h) f), Equiv.ofLeftInverse f f_inv hf = Equiv.ofInjective f ⋯

theorem Equiv.ofLeftInverse'_eq_ofInjective E1 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (f_inv : β → α) (hf : Function.LeftInverse f_inv f),
  Equiv.ofLeftInverse' f f_inv hf = Equiv.ofInjective f ⋯

theorem Equiv.set_forall_iff E0 #

∀ {α : Type u_3} {β : Type u_4} (e : α ≃ β) {p : Set α → Prop}, (∀ (a : Set α), p a) ↔ ∀ (a : Set β), p (⇑e ⁻¹' a)

theorem Equiv.preimage_piEquivPiSubtypeProd_symm_pi E1 #

∀ {α : Type u_3} {β : α → Type u_4} (p : α → Prop) [inst : DecidablePred p] (s : (i : α) → Set (β i)),
  ⇑(Equiv.piEquivPiSubtypeProd p β).symm ⁻¹' Set.univ.pi s = (Set.univ.pi fun i ↦ s ↑i) ×ˢ Set.univ.pi fun i ↦ s ↑i

def Equiv.sigmaPreimageEquiv E1 #

{α : Type u_3} → {β : Type u_4} → (f : α → β) → (b : β) × ↑(f ⁻¹' {b}) ≃ α

sigmaPreimageEquiv f for f : α → β is the natural equivalence between the type of all preimages of points under f and the total space α.

theorem Equiv.sigmaPreimageEquiv_symm_apply_snd_coe E0 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (x : α), ↑((Equiv.sigmaPreimageEquiv f).symm x).snd = x

theorem Equiv.sigmaPreimageEquiv_symm_apply_fst E0 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (x : α), ((Equiv.sigmaPreimageEquiv f).symm x).fst = f x

theorem Equiv.sigmaPreimageEquiv_apply E0 #

∀ {α : Type u_3} {β : Type u_4} (f : α → β) (x : (y : β) × { x // f x = y }), (Equiv.sigmaPreimageEquiv f) x = ↑x.snd

def Equiv.ofPreimageEquiv E1 #

{α : Type u_3} →
  {β : Type u_4} → {γ : Type u_5} → {f : α → γ} → {g : β → γ} → ((c : γ) → ↑(f ⁻¹' {c}) ≃ ↑(g ⁻¹' {c})) → α ≃ β

A family of equivalences between preimages of points gives an equivalence between domains.

theorem Equiv.ofPreimageEquiv_apply E0 #

∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {f : α → γ} {g : β → γ} (e : (c : γ) → ↑(f ⁻¹' {c}) ≃ ↑(g ⁻¹' {c}))
  (a : α), (Equiv.ofPreimageEquiv e) a = ↑((Equiv.sigmaCongrRight e) ((Equiv.sigmaFiberEquiv f).symm a)).snd

theorem Equiv.ofPreimageEquiv_symm_apply E0 #

∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {f : α → γ} {g : β → γ} (e : (c : γ) → ↑(f ⁻¹' {c}) ≃ ↑(g ⁻¹' {c}))
  (a : β), (Equiv.ofPreimageEquiv e).symm a = ↑((Equiv.sigmaCongrRight e).symm ((Equiv.sigmaFiberEquiv g).symm a)).snd

theorem Equiv.ofPreimageEquiv_map E1 #

∀ {α : Type u_3} {β : Type u_4} {γ : Type u_5} {f : α → γ} {g : β → γ} (e : (c : γ) → ↑(f ⁻¹' {c}) ≃ ↑(g ⁻¹' {c}))
  (a : α), g ((Equiv.ofPreimageEquiv e) a) = f a

def Set.BijOn.equiv E1 #

{α : Type u_1} → {β : Type u_2} → {s : Set α} → {t : Set β} → (f : α → β) → Set.BijOn f s t → ↑s ≃ ↑t

If a function is a bijection between two sets s and t, then it induces an equivalence between the types ↥s and ↥t.

theorem dite_comp_equiv_update E1 #

∀ {α : Type u_1} {E : Type u_2} {β : Sort u_3} {γ : Sort u_4} {p : α → Prop} [inst : EquivLike E { x // p x } β] (e : E)
  (v : β → γ) (w : α → γ) (j : β) (x : γ) [inst_1 : DecidableEq β] [inst_2 : DecidableEq α]
  [inst_3 : (j : α) → Decidable (p j)],
  (fun i ↦ if h : p i then Function.update v j x (e ⟨i, h⟩) else w i) =
    Function.update (fun i ↦ if h : p i then v (e ⟨i, h⟩) else w i) (↑(EquivLike.inv e j)) x

The composition of an updated function with an equiv on a subtype can be expressed as an updated function.

theorem Equiv.swap_bijOn_self E1 #

∀ {α : Type u_1} [inst : DecidableEq α] {a b : α} {s : Set α}, (a ∈ s ↔ b ∈ s) → Set.BijOn (⇑(Equiv.swap a b)) s s

theorem Equiv.swap_bijOn_exchange E1 #

∀ {α : Type u_1} [inst : DecidableEq α] {a b : α} {s : Set α},
  a ∈ s → b ∉ s → Set.BijOn (⇑(Equiv.swap a b)) s (insert b (s \ {a}))

Deprecated aliases

NameNew nameSince
Equiv.Set.Equiv.strictMono_setCongrSet.strictMono_equivOfEq2026-05-24
Equiv.Set.congrSet.equivOfEq2026-08-29
Equiv.Set.congr_applySet.equivOfEq_apply2026-08-29
Equiv.Set.congr_symm_applySet.equivOfEq_symm_apply2026-08-29
Equiv.setOf_apply_symm_eq_image_setOfEquiv.setOfPred_apply_symm_eq_image_setOfPred2026-07-09
Equiv.strictMono_setCongrSet.strictMono_equivOfEq2026-08-29