File: Mathlib/Logic/Equiv/Fintype.lean

full_name: Function.Embedding.toEquivRange
code: /-- Computably turn an embedding `f : α ↪ β` into an equiv `α ≃ Set.range f`,
if `α` is a `Fintype`. Has poor computational performance, due to exhaustive searching in
constructed inverse. When a better inverse is known, use `Equiv.ofLeftInverse'` or
`Equiv.ofLeftInverse` instead. This is the computable version of `Equiv.ofInjective`.
-/
def Function.Embedding.toEquivRange : α ≃ Set.range f 
goal: α ≃ ↑(Set.range ⇑f)

full_name: Function.Embedding.toEquivRange_apply
code: @[simp]
theorem Function.Embedding.toEquivRange_apply (a : α) :
    f.toEquivRange a = ⟨f a, Set.mem_range_self a⟩ 
goal: f.toEquivRange a = ⟨f a, ⋯⟩

full_name: Function.Embedding.toEquivRange_symm_apply_self
code: @[simp]
theorem Function.Embedding.toEquivRange_symm_apply_self (a : α) :
    f.toEquivRange.symm ⟨f a, Set.mem_range_self a⟩ = a 
goal: f.toEquivRange.symm ⟨f a, ⋯⟩ = a

full_name: Function.Embedding.toEquivRange_eq_ofInjective
code: theorem Function.Embedding.toEquivRange_eq_ofInjective :
    f.toEquivRange = Equiv.ofInjective f f.injective 
goal: f.toEquivRange = Equiv.ofInjective ⇑f ⋯

full_name: Equiv.Perm.viaFintypeEmbedding
code: /-- Extend the domain of `e : Equiv.Perm α`, mapping it through `f : α ↪ β`.
Everything outside of `Set.range f` is kept fixed. Has poor computational performance,
due to exhaustive searching in constructed inverse due to using `Function.Embedding.toEquivRange`.
When a better `α ≃ Set.range f` is known, use `Equiv.Perm.viaSetRange`.
When `[Fintype α]` is not available, a noncomputable version is available as
`Equiv.Perm.viaEmbedding`.
-/
def Equiv.Perm.viaFintypeEmbedding : Equiv.Perm β 
goal: Equiv.Perm β

full_name: Equiv.Perm.viaFintypeEmbedding_apply_image
code: @[simp]
theorem Equiv.Perm.viaFintypeEmbedding_apply_image (a : α) :
    e.viaFintypeEmbedding f (f a) = f (e a) 
goal: (e.viaFintypeEmbedding f) (f a) = f (e a)

full_name: Equiv.Perm.viaFintypeEmbedding_apply_mem_range
code: theorem Equiv.Perm.viaFintypeEmbedding_apply_mem_range {b : β} (h : b ∈ Set.range f) :
    e.viaFintypeEmbedding f b = f (e (f.invOfMemRange ⟨b, h⟩)) 
goal: (e.viaFintypeEmbedding f) b = f (e (f.invOfMemRange ⟨b, h⟩))

full_name: Equiv.Perm.viaFintypeEmbedding_apply_not_mem_range
code: theorem Equiv.Perm.viaFintypeEmbedding_apply_not_mem_range {b : β} (h : b ∉ Set.range f) :
    e.viaFintypeEmbedding f b = b 
goal: (e.viaFintypeEmbedding f) b = b

full_name: Equiv.Perm.viaFintypeEmbedding_sign
code: @[simp]
theorem Equiv.Perm.viaFintypeEmbedding_sign [DecidableEq α] [Fintype β] :
    Equiv.Perm.sign (e.viaFintypeEmbedding f) = Equiv.Perm.sign e 
goal: Equiv.Perm.sign (e.viaFintypeEmbedding f) = Equiv.Perm.sign e

full_name: Equiv.toCompl
code: /-- If `e` is an equivalence between two subtypes of a finite type `α`, `e.toCompl`
is an equivalence between the complement of those subtypes.

See also `Equiv.compl`, for a computable version when a term of type
`{e' : α ≃ α // ∀ x : {x // p x}, e' x = e x}` is known. -/
noncomputable def toCompl {p q : α → Prop} (e : { x // p x } ≃ { x // q x }) :
    { x // ¬p x } ≃ { x // ¬q x } 
goal: { x // ¬p x } ≃ { x // ¬q x }

full_name: Equiv.extendSubtype
code: /-- If `e` is an equivalence between two subtypes of a fintype `α`, `e.extendSubtype`
is a permutation of `α` acting like `e` on the subtypes and doing something arbitrary outside.

Note that when `p = q`, `Equiv.Perm.subtypeCongr e (Equiv.refl _)` can be used instead. -/
noncomputable abbrev extendSubtype (e : { x // p x } ≃ { x // q x }) : Perm α 
goal: Equiv.Perm α

full_name: Equiv.extendSubtype_apply_of_mem
code: theorem extendSubtype_apply_of_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : p x) :
    e.extendSubtype x = e ⟨x, hx⟩ 
goal: e.extendSubtype x = ↑(e ⟨x, hx⟩)

full_name: Equiv.extendSubtype_mem
code: theorem extendSubtype_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : p x) :
    q (e.extendSubtype x) 
goal: q (e.extendSubtype x)

full_name: Equiv.extendSubtype_apply_of_not_mem
code: theorem extendSubtype_apply_of_not_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : ¬p x) :
    e.extendSubtype x = e.toCompl ⟨x, hx⟩ 
goal: e.extendSubtype x = ↑(e.toCompl ⟨x, hx⟩)

full_name: Equiv.extendSubtype_not_mem
code: theorem extendSubtype_not_mem (e : { x // p x } ≃ { x // q x }) (x) (hx : ¬p x) :
    ¬q (e.extendSubtype x) 
goal: ¬q (e.extendSubtype x)