The areas / V03. Sets, finite structures and big operators
Mathlib.Data.Fintype.Inv
20 declarations. Mathlib docs · Source
theorem Function.Injective.invOfMemRange.congr_simp E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] {inst_1 : DecidableEq β} [inst_2 : DecidableEq β] {f : α → β}
(hf : Function.Injective f) (a a_1 : ↑(Set.range f)), a = a_1 → hf.invOfMemRange a = hf.invOfMemRange a_1
theorem Function.Embedding.invOfMemRange.congr_simp E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] {inst_1 : DecidableEq β} [inst_2 : DecidableEq β] (f : α ↪ β)
(b b_1 : ↑(Set.range ⇑f)), b = b_1 → f.invOfMemRange b = f.invOfMemRange b_1
def Function.Injective.invOfMemRange E1 #
{α : Type u_1} →
{β : Type u_2} → [Fintype α] → [DecidableEq β] → {f : α → β} → Function.Injective f → ↑(Set.range f) → α
The inverse of an hf : injective function f : α → β, of the type ↥(Set.range f) → α.
This is the computable version of Function.invFun that requires Fintype α and DecidableEq β,
or the function version of applying (Equiv.ofInjective f hf).symm.
This function should not usually be used for actual computation because for most cases,
an explicit inverse can be stated that has better computational properties.
This function computes by checking all terms a : α to find the f a = b, so it is O(N) where
N = Fintype.card α.
theorem Function.Injective.left_inv_of_invOfMemRange E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] {f : α → β} (hf : Function.Injective f)
(b : ↑(Set.range f)), f (hf.invOfMemRange b) = ↑b
theorem Function.Injective.right_inv_of_invOfMemRange E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] {f : α → β} (hf : Function.Injective f)
(a : α), hf.invOfMemRange ⟨f a, ⋯⟩ = a
theorem Function.Injective.invFun_restrict E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] {f : α → β} (hf : Function.Injective f)
[inst_2 : Nonempty α], (Set.range f).domRestrict (Function.invFun f) = hf.invOfMemRange
theorem Function.Injective.invOfMemRange_surjective E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] {f : α → β} (hf : Function.Injective f),
Function.Surjective hf.invOfMemRange
def Function.Embedding.invOfMemRange E1 #
{α : Type u_1} → {β : Type u_2} → [Fintype α] → [DecidableEq β] → (f : α ↪ β) → ↑(Set.range ⇑f) → α
The inverse of an embedding f : α ↪ β, of the type ↥(Set.range f) → α.
This is the computable version of Function.invFun that requires Fintype α and DecidableEq β,
or the function version of applying (Equiv.ofInjective f f.injective).symm.
This function should not usually be used for actual computation because for most cases,
an explicit inverse can be stated that has better computational properties.
This function computes by checking all terms a : α to find the f a = b, so it is O(N) where
N = Fintype.card α.
theorem Function.Embedding.left_inv_of_invOfMemRange E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] (f : α ↪ β) (b : ↑(Set.range ⇑f)),
f (f.invOfMemRange b) = ↑b
theorem Function.Embedding.right_inv_of_invOfMemRange E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] (f : α ↪ β) (a : α),
f.invOfMemRange ⟨f a, ⋯⟩ = a
theorem Function.Embedding.invFun_restrict E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] (f : α ↪ β) [inst_2 : Nonempty α],
(Set.range ⇑f).domRestrict (Function.invFun ⇑f) = f.invOfMemRange
theorem Function.Embedding.invOfMemRange_surjective E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] (f : α ↪ β),
Function.Surjective f.invOfMemRange
def Fintype.chooseX E1 #
{α : Type u_1} → [Fintype α] → (p : α → Prop) → [DecidablePred p] → (∃! a, p a) → { a // p a }
Given a fintype α and a predicate p, associate to a proof that there is a unique element of
α satisfying p this unique element, as an element of the corresponding subtype.
def Fintype.choose E1 #
{α : Type u_1} → [Fintype α] → (p : α → Prop) → [DecidablePred p] → (∃! a, p a) → α
Given a fintype α and a predicate p, associate to a proof that there is a unique element of
α satisfying p this unique element, as an element of α.
theorem Fintype.choose_spec E1 #
∀ {α : Type u_1} [inst : Fintype α] (p : α → Prop) [inst_1 : DecidablePred p] (hp : ∃! a, p a), p (Fintype.choose p hp)
theorem Fintype.choose_subtype_eq E0 #
∀ {α : Type u_3} (p : α → Prop) [inst : Fintype { a // p a }] [inst_1 : DecidableEq α] (x : { a // p a })
(h : optParam (∃! a, ↑a = ↑x) ⋯), Fintype.choose (fun y ↦ ↑y = ↑x) h = x
def Fintype.bijInv E1 #
{α : Type u_1} → {β : Type u_2} → [Fintype α] → [DecidableEq β] → {f : α → β} → Function.Bijective f → β → α
bijInv f is the unique inverse to a bijection f. This acts
as a computable alternative to Function.invFun.
theorem Fintype.leftInverse_bijInv E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] {f : α → β} (f_bij : Function.Bijective f),
Function.LeftInverse (Fintype.bijInv f_bij) f
theorem Fintype.rightInverse_bijInv E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] {f : α → β} (f_bij : Function.Bijective f),
Function.RightInverse (Fintype.bijInv f_bij) f
theorem Fintype.bijective_bijInv E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Fintype α] [inst_1 : DecidableEq β] {f : α → β} (f_bij : Function.Bijective f),
Function.Bijective (Fintype.bijInv f_bij)