File: Mathlib/Logic/Function/Basic.lean

full_name: Function.eval
code: /-- Evaluate a function at an argument. Useful if you want to talk about the partially applied
  `Function.eval x : (∀ x, β x) → β x`. -/
@[reducible, simp] def eval {β : α → Sort*} (x : α) (f : ∀ x, β x) : β x 
goal: β x

full_name: Function.eval_apply
code: theorem eval_apply {β : α → Sort*} (x : α) (f : ∀ x, β x) : eval x f = f x 
goal: Function.eval x f = f x

full_name: Function.const_def
code: theorem const_def {y : β} : (fun _ : α ↦ y) = const α y 
goal: (fun x => y) = Function.const α y

full_name: Function.const_injective
code: theorem const_injective [Nonempty α] : Injective (const α : β → α → β) 
goal: Function.Injective (Function.const α)

full_name: Function.const_inj
code: @[simp]
theorem const_inj [Nonempty α] {y₁ y₂ : β} : const α y₁ = const α y₂ ↔ y₁ = y₂ 
goal: Function.const α y₁ = Function.const α y₂ ↔ y₁ = y₂

full_name: Function.onFun_apply
code: theorem onFun_apply (f : β → β → γ) (g : α → β) (a b : α) : onFun f g a b = f (g a) (g b) 
goal: (f on g) a b = f (g a) (g b)

full_name: Function.hfunext
code: lemma hfunext {α α' : Sort u} {β : α → Sort v} {β' : α' → Sort v} {f : ∀a, β a} {f' : ∀a, β' a}
    (hα : α = α') (h : ∀a a', HEq a a' → HEq (f a) (f' a')) : HEq f f' 
goal: HEq f f'

full_name: Function.ne_iff
code: theorem ne_iff {β : α → Sort*} {f₁ f₂ : ∀ a, β a} : f₁ ≠ f₂ ↔ ∃ a, f₁ a ≠ f₂ a 
goal: f₁ ≠ f₂ ↔ ∃ a, f₁ a ≠ f₂ a

full_name: Function.funext_iff_of_subsingleton
code: lemma funext_iff_of_subsingleton [Subsingleton α] {g : α → β} (x y : α) :
    f x = g y ↔ f = g 
goal: f x = g y ↔ f = g

full_name: Function.Bijective.injective
code: protected theorem Bijective.injective {f : α → β} (hf : Bijective f) : Injective f 
goal: Function.Injective f

full_name: Function.Bijective.surjective
code: protected theorem Bijective.surjective {f : α → β} (hf : Bijective f) : Surjective f 
goal: Function.Surjective f

full_name: Function.Injective.eq_iff
code: theorem Injective.eq_iff (I : Injective f) {a b : α} : f a = f b ↔ a = b 
goal: f a = f b ↔ a = b

full_name: Function.Injective.beq_eq
code: theorem Injective.beq_eq {α β : Type*} [BEq α] [LawfulBEq α] [BEq β] [LawfulBEq β] {f : α → β}
    (I : Injective f) {a b : α} : (f a == f b) = (a == b) 
goal: (f a == f b) = (a == b)

full_name: Function.Injective.eq_iff'
code: theorem Injective.eq_iff' (I : Injective f) {a b : α} {c : β} (h : f b = c) : f a = c ↔ a = b 
goal: f a = c ↔ a = b

full_name: Function.Injective.ne
code: theorem Injective.ne (hf : Injective f) {a₁ a₂ : α} : a₁ ≠ a₂ → f a₁ ≠ f a₂ 
goal: a₁ ≠ a₂ → f a₁ ≠ f a₂

full_name: Function.Injective.ne_iff
code: theorem Injective.ne_iff (hf : Injective f) {x y : α} : f x ≠ f y ↔ x ≠ y 
goal: f x ≠ f y ↔ x ≠ y

full_name: Function.Injective.ne_iff'
code: theorem Injective.ne_iff' (hf : Injective f) {x y : α} {z : β} (h : f y = z) : f x ≠ z ↔ x ≠ y 
goal: f x ≠ z ↔ x ≠ y

full_name: Function.not_injective_iff
code: theorem not_injective_iff : ¬ Injective f ↔ ∃ a b, f a = f b ∧ a ≠ b 
goal: ¬Function.Injective f ↔ ∃ a b, f a = f b ∧ a ≠ b

full_name: Function.Injective.decidableEq
code: /-- If the co-domain `β` of an injective function `f : α → β` has decidable equality, then
the domain `α` also has decidable equality. -/
protected def Injective.decidableEq [DecidableEq β] (I : Injective f) : DecidableEq α 
goal: DecidableEq α

full_name: Function.Injective.of_comp
code: theorem Injective.of_comp {g : γ → α} (I : Injective (f ∘ g)) : Injective g 
goal: Function.Injective g

full_name: Function.Injective.of_comp_iff
code: @[simp]
theorem Injective.of_comp_iff (hf : Injective f) (g : γ → α) :
    Injective (f ∘ g) ↔ Injective g 
goal: Function.Injective (f ∘ g) ↔ Function.Injective g

full_name: Function.Injective.of_comp_right
code: theorem Injective.of_comp_right {g : γ → α} (I : Injective (f ∘ g)) (hg : Surjective g) :
    Injective f 
goal: Function.Injective f

full_name: Function.Surjective.bijective₂_of_injective
code: theorem Surjective.bijective₂_of_injective {g : γ → α} (hf : Surjective f) (hg : Surjective g)
    (I : Injective (f ∘ g)) : Bijective f ∧ Bijective g 
goal: Function.Bijective f ∧ Function.Bijective g

full_name: Function.Injective.of_comp_iff'
code: @[simp]
theorem Injective.of_comp_iff' (f : α → β) {g : γ → α} (hg : Bijective g) :
    Injective (f ∘ g) ↔ Injective f 
goal: Function.Injective (f ∘ g) ↔ Function.Injective f

full_name: Function.Injective.comp_left
code: /-- Composition by an injective function on the left is itself injective. -/
theorem Injective.comp_left {g : β → γ} (hg : Function.Injective g) :
    Function.Injective (g ∘ · : (α → β) → α → γ) 
goal: Function.Injective fun x => g ∘ x

full_name: Function.injective_of_subsingleton
code: theorem injective_of_subsingleton [Subsingleton α] (f : α → β) : Injective f 
goal: Function.Injective f

full_name: Function.Injective.dite
code: lemma Injective.dite (p : α → Prop) [DecidablePred p]
    {f : {a : α // p a} → β} {f' : {a : α // ¬ p a} → β}
    (hf : Injective f) (hf' : Injective f')
    (im_disj : ∀ {x x' : α} {hx : p x} {hx' : ¬ p x'}, f ⟨x, hx⟩ ≠ f' ⟨x', hx'⟩) :
    Function.Injective (fun x ↦ if h : p x then f ⟨x, h⟩ else f' ⟨x, h⟩) 
goal: Function.Injective fun x => if h : p x then f ⟨x, h⟩ else f' ⟨x, h⟩

full_name: Function.Surjective.of_comp
code: theorem Surjective.of_comp {g : γ → α} (S : Surjective (f ∘ g)) : Surjective f 
goal: Function.Surjective f

full_name: Function.Surjective.of_comp_iff
code: @[simp]
theorem Surjective.of_comp_iff (f : α → β) {g : γ → α} (hg : Surjective g) :
    Surjective (f ∘ g) ↔ Surjective f 
goal: Function.Surjective (f ∘ g) ↔ Function.Surjective f

full_name: Function.Surjective.of_comp_left
code: theorem Surjective.of_comp_left {g : γ → α} (S : Surjective (f ∘ g)) (hf : Injective f) :
    Surjective g 
goal: Function.Surjective g

full_name: Function.Injective.bijective₂_of_surjective
code: theorem Injective.bijective₂_of_surjective {g : γ → α} (hf : Injective f) (hg : Injective g)
    (S : Surjective (f ∘ g)) : Bijective f ∧ Bijective g 
goal: Function.Bijective f ∧ Function.Bijective g

full_name: Function.Surjective.of_comp_iff'
code: @[simp]
theorem Surjective.of_comp_iff' (hf : Bijective f) (g : γ → α) :
    Surjective (f ∘ g) ↔ Surjective g 
goal: Function.Surjective (f ∘ g) ↔ Function.Surjective g

full_name: Function.decidableEqPFun
code: instance decidableEqPFun (p : Prop) [Decidable p] (α : p → Type*) [∀ hp, DecidableEq (α hp)] :
    DecidableEq (∀ hp, α hp)
  
goal: DecidableEq ((hp : p) → α hp)

full_name: Function.Surjective.forall
code: protected theorem Surjective.forall (hf : Surjective f) {p : β → Prop} :
    (∀ y, p y) ↔ ∀ x, p (f x) 
goal: (∀ (y : β), p y) ↔ ∀ (x : α), p (f x)

full_name: Function.Surjective.forall₂
code: protected theorem Surjective.forall₂ (hf : Surjective f) {p : β → β → Prop} :
    (∀ y₁ y₂, p y₁ y₂) ↔ ∀ x₁ x₂, p (f x₁) (f x₂) 
goal: (∀ (y₁ y₂ : β), p y₁ y₂) ↔ ∀ (x₁ x₂ : α), p (f x₁) (f x₂)

full_name: Function.Surjective.forall₃
code: protected theorem Surjective.forall₃ (hf : Surjective f) {p : β → β → β → Prop} :
    (∀ y₁ y₂ y₃, p y₁ y₂ y₃) ↔ ∀ x₁ x₂ x₃, p (f x₁) (f x₂) (f x₃) 
goal: (∀ (y₁ y₂ y₃ : β), p y₁ y₂ y₃) ↔ ∀ (x₁ x₂ x₃ : α), p (f x₁) (f x₂) (f x₃)

full_name: Function.Surjective.exists
code: protected theorem Surjective.exists (hf : Surjective f) {p : β → Prop} :
    (∃ y, p y) ↔ ∃ x, p (f x) 
goal: (∃ y, p y) ↔ ∃ x, p (f x)

full_name: Function.Surjective.exists₂
code: protected theorem Surjective.exists₂ (hf : Surjective f) {p : β → β → Prop} :
    (∃ y₁ y₂, p y₁ y₂) ↔ ∃ x₁ x₂, p (f x₁) (f x₂) 
goal: (∃ y₁ y₂, p y₁ y₂) ↔ ∃ x₁ x₂, p (f x₁) (f x₂)

full_name: Function.Surjective.exists₃
code: protected theorem Surjective.exists₃ (hf : Surjective f) {p : β → β → β → Prop} :
    (∃ y₁ y₂ y₃, p y₁ y₂ y₃) ↔ ∃ x₁ x₂ x₃, p (f x₁) (f x₂) (f x₃) 
goal: (∃ y₁ y₂ y₃, p y₁ y₂ y₃) ↔ ∃ x₁ x₂ x₃, p (f x₁) (f x₂) (f x₃)

full_name: Function.Surjective.injective_comp_right
code: theorem Surjective.injective_comp_right (hf : Surjective f) : Injective fun g : β → γ ↦ g ∘ f 
goal: Function.Injective fun g => g ∘ f

full_name: Function.Surjective.right_cancellable
code: protected theorem Surjective.right_cancellable (hf : Surjective f) {g₁ g₂ : β → γ} :
    g₁ ∘ f = g₂ ∘ f ↔ g₁ = g₂ 
goal: g₁ ∘ f = g₂ ∘ f ↔ g₁ = g₂

full_name: Function.surjective_of_right_cancellable_Prop
code: theorem surjective_of_right_cancellable_Prop (h : ∀ g₁ g₂ : β → Prop, g₁ ∘ f = g₂ ∘ f → g₁ = g₂) :
    Surjective f 
goal: Function.Surjective f

full_name: Function.bijective_iff_existsUnique
code: theorem bijective_iff_existsUnique (f : α → β) : Bijective f ↔ ∀ b : β, ∃! a : α, f a = b 
goal: Function.Bijective f ↔ ∀ (b : β), ∃! a, f a = b

full_name: Function.Bijective.existsUnique
code: /-- Shorthand for using projection notation with `Function.bijective_iff_existsUnique`. -/
protected theorem Bijective.existsUnique {f : α → β} (hf : Bijective f) (b : β) :
    ∃! a : α, f a = b 
goal: ∃! a, f a = b

full_name: Function.Bijective.existsUnique_iff
code: theorem Bijective.existsUnique_iff {f : α → β} (hf : Bijective f) {p : β → Prop} :
    (∃! y, p y) ↔ ∃! x, p (f x) 
goal: (∃! y, p y) ↔ ∃! x, p (f x)

full_name: Function.Bijective.of_comp_iff
code: theorem Bijective.of_comp_iff (f : α → β) {g : γ → α} (hg : Bijective g) :
    Bijective (f ∘ g) ↔ Bijective f 
goal: Function.Bijective (f ∘ g) ↔ Function.Bijective f

full_name: Function.Bijective.of_comp_iff'
code: theorem Bijective.of_comp_iff' {f : α → β} (hf : Bijective f) (g : γ → α) :
    Function.Bijective (f ∘ g) ↔ Function.Bijective g 
goal: Function.Bijective (f ∘ g) ↔ Function.Bijective g

full_name: Function.cantor_surjective
code: /-- **Cantor's diagonal argument** implies that there are no surjective functions from `α`
to `Set α`. -/
theorem cantor_surjective {α} (f : α → Set α) : ¬Surjective f
  
goal: ¬Function.Surjective f

full_name: Function.cantor_injective
code: /-- **Cantor's diagonal argument** implies that there are no injective functions from `Set α`
to `α`. -/
theorem cantor_injective {α : Type*} (f : Set α → α) : ¬Injective f
  
goal: ¬Function.Injective f

full_name: Function.not_surjective_Type
code: /-- There is no surjection from `α : Type u` into `Type (max u v)`. This theorem
  demonstrates why `Type : Type` would be inconsistent in Lean. -/
theorem not_surjective_Type {α : Type u} (f : α → Type max u v) : ¬Surjective f 
goal: ¬Function.Surjective f

full_name: Function.IsPartialInv
code: /-- `g` is a partial inverse to `f` (an injective but not necessarily
  surjective function) if `g y = some x` implies `f x = y`, and `g y = none`
  implies that `y` is not in the range of `f`. -/
def IsPartialInv {α β} (f : α → β) (g : β → Option α) : Prop 
goal: Prop

full_name: Function.isPartialInv_left
code: theorem isPartialInv_left {α β} {f : α → β} {g} (H : IsPartialInv f g) (x) : g (f x) = some x 
goal: g (f x) = some x

full_name: Function.injective_of_isPartialInv
code: theorem injective_of_isPartialInv {α β} {f : α → β} {g} (H : IsPartialInv f g) :
    Injective f 
goal: Function.Injective f

full_name: Function.injective_of_isPartialInv_right
code: theorem injective_of_isPartialInv_right {α β} {f : α → β} {g} (H : IsPartialInv f g) (x y b)
    (h₁ : b ∈ g x) (h₂ : b ∈ g y) : x = y 
goal: x = y

full_name: Function.LeftInverse.comp_eq_id
code: theorem LeftInverse.comp_eq_id {f : α → β} {g : β → α} (h : LeftInverse f g) : f ∘ g = id 
goal: f ∘ g = id

full_name: Function.leftInverse_iff_comp
code: theorem leftInverse_iff_comp {f : α → β} {g : β → α} : LeftInverse f g ↔ f ∘ g = id 
goal: Function.LeftInverse f g ↔ f ∘ g = id

full_name: Function.RightInverse.comp_eq_id
code: theorem RightInverse.comp_eq_id {f : α → β} {g : β → α} (h : RightInverse f g) : g ∘ f = id 
goal: g ∘ f = id

full_name: Function.rightInverse_iff_comp
code: theorem rightInverse_iff_comp {f : α → β} {g : β → α} : RightInverse f g ↔ g ∘ f = id 
goal: Function.RightInverse f g ↔ g ∘ f = id

full_name: Function.LeftInverse.comp
code: theorem LeftInverse.comp {f : α → β} {g : β → α} {h : β → γ} {i : γ → β} (hf : LeftInverse f g)
    (hh : LeftInverse h i) : LeftInverse (h ∘ f) (g ∘ i) 
goal: Function.LeftInverse (h ∘ f) (g ∘ i)

full_name: Function.RightInverse.comp
code: theorem RightInverse.comp {f : α → β} {g : β → α} {h : β → γ} {i : γ → β} (hf : RightInverse f g)
    (hh : RightInverse h i) : RightInverse (h ∘ f) (g ∘ i) 
goal: Function.RightInverse (h ∘ f) (g ∘ i)

full_name: Function.LeftInverse.rightInverse
code: theorem LeftInverse.rightInverse {f : α → β} {g : β → α} (h : LeftInverse g f) : RightInverse f g 
goal: Function.RightInverse f g

full_name: Function.RightInverse.leftInverse
code: theorem RightInverse.leftInverse {f : α → β} {g : β → α} (h : RightInverse g f) : LeftInverse f g 
goal: Function.LeftInverse f g

full_name: Function.LeftInverse.surjective
code: theorem LeftInverse.surjective {f : α → β} {g : β → α} (h : LeftInverse f g) : Surjective f 
goal: Function.Surjective f

full_name: Function.RightInverse.injective
code: theorem RightInverse.injective {f : α → β} {g : β → α} (h : RightInverse f g) : Injective f 
goal: Function.Injective f

full_name: Function.LeftInverse.rightInverse_of_injective
code: theorem LeftInverse.rightInverse_of_injective {f : α → β} {g : β → α} (h : LeftInverse f g)
    (hf : Injective f) : RightInverse f g 
goal: Function.RightInverse f g

full_name: Function.LeftInverse.rightInverse_of_surjective
code: theorem LeftInverse.rightInverse_of_surjective {f : α → β} {g : β → α} (h : LeftInverse f g)
    (hg : Surjective g) : RightInverse f g 
goal: Function.RightInverse f g

full_name: Function.RightInverse.leftInverse_of_surjective
code: theorem RightInverse.leftInverse_of_surjective {f : α → β} {g : β → α} :
    RightInverse f g → Surjective f → LeftInverse f g 
goal: Function.RightInverse f g → Function.Surjective f → Function.LeftInverse f g

full_name: Function.RightInverse.leftInverse_of_injective
code: theorem RightInverse.leftInverse_of_injective {f : α → β} {g : β → α} :
    RightInverse f g → Injective g → LeftInverse f g 
goal: Function.RightInverse f g → Function.Injective g → Function.LeftInverse f g

full_name: Function.LeftInverse.eq_rightInverse
code: theorem LeftInverse.eq_rightInverse {f : α → β} {g₁ g₂ : β → α} (h₁ : LeftInverse g₁ f)
    (h₂ : RightInverse g₂ f) : g₁ = g₂ 
goal: g₁ = g₂

full_name: Function.partialInv
code: /-- We can use choice to construct explicitly a partial inverse for
  a given injective function `f`. -/
noncomputable def partialInv {α β} (f : α → β) (b : β) : Option α 
goal: Option α

full_name: Function.partialInv_of_injective
code: theorem partialInv_of_injective {α β} {f : α → β} (I : Injective f) : IsPartialInv f (partialInv f)
  
goal: Function.IsPartialInv f (Function.partialInv f)

full_name: Function.partialInv_left
code: theorem partialInv_left {α β} {f : α → β} (I : Injective f) : ∀ x, partialInv f (f x) = some x 
goal: Function.partialInv f (f x) = some x

full_name: Function.invFun
code: /-- The inverse of a function (which is a left inverse if `f` is injective
  and a right inverse if `f` is surjective). -/
-- Explicit Sort so that `α` isn't inferred to be Prop via `exists_prop_decidable`
noncomputable def invFun {α : Sort u} {β} [Nonempty α] (f : α → β) : β → α 
goal: β → α

full_name: Function.invFun_eq
code: theorem invFun_eq (h : ∃ a, f a = b) : f (invFun f b) = b 
goal: f (Function.invFun f b) = b

full_name: Function.apply_invFun_apply
code: theorem apply_invFun_apply {α β : Type*} {f : α → β} {a : α} :
    f (@invFun _ _ ⟨a⟩ f (f a)) = f a 
goal: f (Function.invFun f (f a)) = f a

full_name: Function.invFun_neg
code: theorem invFun_neg (h : ¬∃ a, f a = b) : invFun f b = Classical.choice ‹_› 
goal: Function.invFun f b = Classical.choice inst✝

full_name: Function.invFun_eq_of_injective_of_rightInverse
code: theorem invFun_eq_of_injective_of_rightInverse {g : β → α} (hf : Injective f)
    (hg : RightInverse g f) : invFun f = g 
goal: Function.invFun f = g

full_name: Function.rightInverse_invFun
code: theorem rightInverse_invFun (hf : Surjective f) : RightInverse (invFun f) f 
goal: Function.RightInverse (Function.invFun f) f

full_name: Function.leftInverse_invFun
code: theorem leftInverse_invFun (hf : Injective f) : LeftInverse (invFun f) f 
goal: Function.LeftInverse (Function.invFun f) f

full_name: Function.invFun_surjective
code: theorem invFun_surjective (hf : Injective f) : Surjective (invFun f) 
goal: Function.Surjective (Function.invFun f)

full_name: Function.invFun_comp
code: theorem invFun_comp (hf : Injective f) : invFun f ∘ f = id 
goal: Function.invFun f ∘ f = id

full_name: Function.Injective.hasLeftInverse
code: theorem Injective.hasLeftInverse (hf : Injective f) : HasLeftInverse f 
goal: Function.HasLeftInverse f

full_name: Function.injective_iff_hasLeftInverse
code: theorem injective_iff_hasLeftInverse : Injective f ↔ HasLeftInverse f 
goal: Function.Injective f ↔ Function.HasLeftInverse f

full_name: Function.surjInv
code: /-- The inverse of a surjective function. (Unlike `invFun`, this does not require
  `α` to be inhabited.) -/
noncomputable def surjInv {f : α → β} (h : Surjective f) (b : β) : α 
goal: α

full_name: Function.surjInv_eq
code: theorem surjInv_eq (h : Surjective f) (b) : f (surjInv h b) = b 
goal: f (Function.surjInv h b) = b

full_name: Function.rightInverse_surjInv
code: theorem rightInverse_surjInv (hf : Surjective f) : RightInverse (surjInv hf) f 
goal: Function.RightInverse (Function.surjInv hf) f

full_name: Function.leftInverse_surjInv
code: theorem leftInverse_surjInv (hf : Bijective f) : LeftInverse (surjInv hf.2) f 
goal: Function.LeftInverse (Function.surjInv ⋯) f

full_name: Function.Surjective.hasRightInverse
code: theorem Surjective.hasRightInverse (hf : Surjective f) : HasRightInverse f 
goal: Function.HasRightInverse f

full_name: Function.surjective_iff_hasRightInverse
code: theorem surjective_iff_hasRightInverse : Surjective f ↔ HasRightInverse f 
goal: Function.Surjective f ↔ Function.HasRightInverse f

full_name: Function.bijective_iff_has_inverse
code: theorem bijective_iff_has_inverse : Bijective f ↔ ∃ g, LeftInverse g f ∧ RightInverse g f 
goal: Function.Bijective f ↔ ∃ g, Function.LeftInverse g f ∧ Function.RightInverse g f

full_name: Function.injective_surjInv
code: theorem injective_surjInv (h : Surjective f) : Injective (surjInv h) 
goal: Function.Injective (Function.surjInv h)

full_name: Function.surjective_to_subsingleton
code: theorem surjective_to_subsingleton [na : Nonempty α] [Subsingleton β] (f : α → β) :
    Surjective f 
goal: Function.Surjective f

full_name: Function.Surjective.comp_left
code: /-- Composition by a surjective function on the left is itself surjective. -/
theorem Surjective.comp_left {g : β → γ} (hg : Surjective g) :
    Surjective (g ∘ · : (α → β) → α → γ) 
goal: Function.Surjective fun x => g ∘ x

full_name: Function.Bijective.comp_left
code: /-- Composition by a bijective function on the left is itself bijective. -/
theorem Bijective.comp_left {g : β → γ} (hg : Bijective g) :
    Bijective (g ∘ · : (α → β) → α → γ) 
goal: Function.Bijective fun x => g ∘ x

full_name: Function.update
code: /-- Replacing the value of a function at a given point by a given value. -/
def update (f : ∀ a, β a) (a' : α) (v : β a') (a : α) : β a 
goal: β a

full_name: Function.update_same
code: @[simp]
theorem update_same (a : α) (v : β a) (f : ∀ a, β a) : update f a v a = v 
goal: Function.update f a v a = v

full_name: Function.update_noteq
code: @[simp]
theorem update_noteq {a a' : α} (h : a ≠ a') (v : β a') (f : ∀ a, β a) : update f a' v a = f a 
goal: Function.update f a' v a = f a

full_name: Function.update_apply
code: /-- On non-dependent functions, `Function.update` can be expressed as an `ite` -/
theorem update_apply {β : Sort*} (f : α → β) (a' : α) (b : β) (a : α) :
    update f a' b a = if a = a' then b else f a 
goal: Function.update f a' b a = if a = a' then b else f a

full_name: Function.update_eq_const_of_subsingleton
code: @[nontriviality]
theorem update_eq_const_of_subsingleton [Subsingleton α] (a : α) (v : α') (f : α → α') :
    update f a v = const α v 
goal: Function.update f a v = Function.const α v

full_name: Function.surjective_eval
code: theorem surjective_eval {α : Sort u} {β : α → Sort v} [h : ∀ a, Nonempty (β a)] (a : α) :
    Surjective (eval a : (∀ a, β a) → β a) 
goal: Function.Surjective (Function.eval a)

full_name: Function.update_injective
code: theorem update_injective (f : ∀ a, β a) (a' : α) : Injective (update f a') 
goal: Function.Injective (Function.update f a')

full_name: Function.forall_update_iff
code: lemma forall_update_iff (f : ∀a, β a) {a : α} {b : β a} (p : ∀a, β a → Prop) :
    (∀ x, p x (update f a b x)) ↔ p a b ∧ ∀ x, x ≠ a → p x (f x) 
goal: (∀ (x : α), p x (Function.update f a b x)) ↔ p a b ∧ ∀ (x : α), x ≠ a → p x (f x)

full_name: Function.exists_update_iff
code: theorem exists_update_iff (f : ∀ a, β a) {a : α} {b : β a} (p : ∀ a, β a → Prop) :
    (∃ x, p x (update f a b x)) ↔ p a b ∨ ∃ x ≠ a, p x (f x) 
goal: (∃ x, p x (Function.update f a b x)) ↔ p a b ∨ ∃ x, x ≠ a ∧ p x (f x)

full_name: Function.update_eq_iff
code: theorem update_eq_iff {a : α} {b : β a} {f g : ∀ a, β a} :
    update f a b = g ↔ b = g a ∧ ∀ x ≠ a, f x = g x 
goal: Function.update f a b = g ↔ b = g a ∧ ∀ (x : α), x ≠ a → f x = g x

full_name: Function.eq_update_iff
code: theorem eq_update_iff {a : α} {b : β a} {f g : ∀ a, β a} :
    g = update f a b ↔ g a = b ∧ ∀ x ≠ a, g x = f x 
goal: g = Function.update f a b ↔ g a = b ∧ ∀ (x : α), x ≠ a → g x = f x

full_name: Function.update_eq_self_iff
code: @[simp] lemma update_eq_self_iff : update f a b = f ↔ b = f a 
goal: Function.update f a b = f ↔ b = f a

full_name: Function.eq_update_self_iff
code: @[simp] lemma eq_update_self_iff : f = update f a b ↔ f a = b 
goal: f = Function.update f a b ↔ f a = b

full_name: Function.ne_update_self_iff
code: lemma ne_update_self_iff : f ≠ update f a b ↔ f a ≠ b 
goal: f ≠ Function.update f a b ↔ f a ≠ b

full_name: Function.update_ne_self_iff
code: lemma update_ne_self_iff : update f a b ≠ f ↔ b ≠ f a 
goal: Function.update f a b ≠ f ↔ b ≠ f a

full_name: Function.update_eq_self
code: @[simp]
theorem update_eq_self (a : α) (f : ∀ a, β a) : update f a (f a) = f 
goal: Function.update f a (f a) = f

full_name: Function.update_comp_eq_of_forall_ne'
code: theorem update_comp_eq_of_forall_ne' {α'} (g : ∀ a, β a) {f : α' → α} {i : α} (a : β i)
    (h : ∀ x, f x ≠ i) : (fun j ↦ (update g i a) (f j)) = fun j ↦ g (f j) 
goal: (fun j => Function.update g i a (f j)) = fun j => g (f j)

full_name: Function.update_comp_eq_of_forall_ne
code: /-- Non-dependent version of `Function.update_comp_eq_of_forall_ne'` -/
theorem update_comp_eq_of_forall_ne {α β : Sort*} (g : α' → β) {f : α → α'} {i : α'} (a : β)
    (h : ∀ x, f x ≠ i) : update g i a ∘ f = g ∘ f 
goal: Function.update g i a ∘ f = g ∘ f

full_name: Function.update_comp_eq_of_injective'
code: theorem update_comp_eq_of_injective' (g : ∀ a, β a) {f : α' → α} (hf : Function.Injective f)
    (i : α') (a : β (f i)) : (fun j ↦ update g (f i) a (f j)) = update (fun i ↦ g (f i)) i a 
goal: (fun j => Function.update g (f i) a (f j)) = Function.update (fun i => g (f i)) i a

full_name: Function.update_comp_eq_of_injective
code: /-- Non-dependent version of `Function.update_comp_eq_of_injective'` -/
theorem update_comp_eq_of_injective {β : Sort*} (g : α' → β) {f : α → α'}
    (hf : Function.Injective f) (i : α) (a : β) :
    Function.update g (f i) a ∘ f = Function.update (g ∘ f) i a 
goal: Function.update g (f i) a ∘ f = Function.update (g ∘ f) i a

full_name: Function.apply_update
code: theorem apply_update {ι : Sort*} [DecidableEq ι] {α β : ι → Sort*} (f : ∀ i, α i → β i)
    (g : ∀ i, α i) (i : ι) (v : α i) (j : ι) :
    f j (update g i v j) = update (fun k ↦ f k (g k)) i (f i v) j 
goal: f j (Function.update g i v j) = Function.update (fun k => f k (g k)) i (f i v) j

full_name: Function.apply_update₂
code: theorem apply_update₂ {ι : Sort*} [DecidableEq ι] {α β γ : ι → Sort*} (f : ∀ i, α i → β i → γ i)
    (g : ∀ i, α i) (h : ∀ i, β i) (i : ι) (v : α i) (w : β i) (j : ι) :
    f j (update g i v j) (update h i w j) = update (fun k ↦ f k (g k) (h k)) i (f i v w) j 
goal: f j (Function.update g i v j) (Function.update h i w j) = Function.update (fun k => f k (g k) (h k)) i (f i v w) j

full_name: Function.pred_update
code: theorem pred_update (P : ∀ ⦃a⦄, β a → Prop) (f : ∀ a, β a) (a' : α) (v : β a') (a : α) :
    P (update f a' v a) ↔ a = a' ∧ P v ∨ a ≠ a' ∧ P (f a) 
goal: P (Function.update f a' v a) ↔ a = a' ∧ P v ∨ a ≠ a' ∧ P (f a)

full_name: Function.comp_update
code: theorem comp_update {α' : Sort*} {β : Sort*} (f : α' → β) (g : α → α') (i : α) (v : α') :
    f ∘ update g i v = update (f ∘ g) i (f v) 
goal: f ∘ Function.update g i v = Function.update (f ∘ g) i (f v)

full_name: Function.update_comm
code: theorem update_comm {α} [DecidableEq α] {β : α → Sort*} {a b : α} (h : a ≠ b) (v : β a) (w : β b)
    (f : ∀ a, β a) : update (update f a v) b w = update (update f b w) a v 
goal: Function.update (Function.update f a v) b w = Function.update (Function.update f b w) a v

full_name: Function.update_idem
code: @[simp]
theorem update_idem {α} [DecidableEq α] {β : α → Sort*} {a : α} (v w : β a) (f : ∀ a, β a) :
    update (update f a v) a w = update f a w 
goal: Function.update (Function.update f a v) a w = Function.update f a w

full_name: Function.extend
code: /-- Extension of a function `g : α → γ` along a function `f : α → β`.

For every `a : α`, `f a` is sent to `g a`. `f` might not be surjective, so we use an auxiliary
function `j : β → γ` by sending `b : β` not in the range of `f` to `j b`. If you do not care about
the behavior outside the range, `j` can be used as a junk value by setting it to be `0` or
`Classical.arbitrary` (assuming `γ` is nonempty).

This definition is mathematically meaningful only when `f a₁ = f a₂ → g a₁ = g a₂` (spelled
`g.FactorsThrough f`). In particular this holds if `f` is injective.

A typical use case is extending a function from a subtype to the entire type. If you wish to extend
`g : {b : β // p b} → γ` to a function `β → γ`, you should use `Function.extend Subtype.val g j`. -/
def extend (f : α → β) (g : α → γ) (j : β → γ) : β → γ 
goal: β → γ

full_name: Function.FactorsThrough
code: /-- g factors through f : `f a = f b → g a = g b` -/
def FactorsThrough (g : α → γ) (f : α → β) : Prop 
goal: Prop

full_name: Function.extend_def
code: theorem extend_def (f : α → β) (g : α → γ) (e' : β → γ) (b : β) [Decidable (∃ a, f a = b)] :
    extend f g e' b = if h : ∃ a, f a = b then g (Classical.choose h) else e' b 
goal: Function.extend f g e' b = if h : ∃ a, f a = b then g (Classical.choose h) else e' b

full_name: Function.Injective.factorsThrough
code: lemma Injective.factorsThrough (hf : Injective f) (g : α → γ) : g.FactorsThrough f 
goal: Function.FactorsThrough g f

full_name: Function.FactorsThrough.extend_apply
code: lemma FactorsThrough.extend_apply {g : α → γ} (hf : g.FactorsThrough f) (e' : β → γ) (a : α) :
    extend f g e' (f a) = g a 
goal: Function.extend f g e' (f a) = g a

full_name: Function.Injective.extend_apply
code: @[simp]
theorem Injective.extend_apply (hf : Injective f) (g : α → γ) (e' : β → γ) (a : α) :
    extend f g e' (f a) = g a 
goal: Function.extend f g e' (f a) = g a

full_name: Function.extend_apply'
code: @[simp]
theorem extend_apply' (g : α → γ) (e' : β → γ) (b : β) (hb : ¬∃ a, f a = b) :
    extend f g e' b = e' b 
goal: Function.extend f g e' b = e' b

full_name: Function.factorsThrough_iff
code: lemma factorsThrough_iff (g : α → γ) [Nonempty γ] : g.FactorsThrough f ↔ ∃ (e : β → γ), g = e ∘ f 
goal: Function.FactorsThrough g f ↔ ∃ e, g = e ∘ f

full_name: Function.apply_extend
code: lemma apply_extend {δ} {g : α → γ} (F : γ → δ) (f : α → β) (e' : β → γ) (b : β) :
    F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b 
goal: F (Function.extend f g e' b) = Function.extend f (F ∘ g) (F ∘ e') b

full_name: Function.extend_injective
code: theorem extend_injective (hf : Injective f) (e' : β → γ) : Injective fun g ↦ extend f g e' 
goal: Function.Injective fun g => Function.extend f g e'

full_name: Function.FactorsThrough.extend_comp
code: lemma FactorsThrough.extend_comp {g : α → γ} (e' : β → γ) (hf : FactorsThrough g f) :
    extend f g e' ∘ f = g 
goal: Function.extend f g e' ∘ f = g

full_name: Function.extend_comp
code: @[simp]
theorem extend_comp (hf : Injective f) (g : α → γ) (e' : β → γ) : extend f g e' ∘ f = g 
goal: Function.extend f g e' ∘ f = g

full_name: Function.Injective.surjective_comp_right'
code: theorem Injective.surjective_comp_right' (hf : Injective f) (g₀ : β → γ) :
    Surjective fun g : β → γ ↦ g ∘ f 
goal: Function.Surjective fun g => g ∘ f

full_name: Function.Injective.surjective_comp_right
code: theorem Injective.surjective_comp_right [Nonempty γ] (hf : Injective f) :
    Surjective fun g : β → γ ↦ g ∘ f 
goal: Function.Surjective fun g => g ∘ f

full_name: Function.Bijective.comp_right
code: theorem Bijective.comp_right (hf : Bijective f) : Bijective fun g : β → γ ↦ g ∘ f 
goal: Function.Bijective fun g => g ∘ f

full_name: Function.FactorsThrough.rfl
code: protected theorem rfl {α β : Sort*} {f : α → β} : FactorsThrough f f 
goal: Function.FactorsThrough f f

full_name: Function.FactorsThrough.comp_left
code: theorem comp_left {α β γ δ : Sort*} {f : α → β} {g : α → γ} (h : FactorsThrough g f) (g' : γ → δ) :
    FactorsThrough (g' ∘ g) f 
goal: Function.FactorsThrough (g' ∘ g) f

full_name: Function.FactorsThrough.comp_right
code: theorem comp_right {α β γ δ : Sort*} {f : α → β} {g : α → γ} (h : FactorsThrough g f) (g' : δ → α) :
    FactorsThrough (g ∘ g') (f ∘ g') 
goal: Function.FactorsThrough (g ∘ g') (f ∘ g')

full_name: Function.uncurry_def
code: theorem uncurry_def {α β γ} (f : α → β → γ) : uncurry f = fun p ↦ f p.1 p.2 
goal: Function.uncurry f = fun p => f p.fst p.snd

full_name: Function.uncurry_apply_pair
code: @[simp]
theorem uncurry_apply_pair {α β γ} (f : α → β → γ) (x : α) (y : β) : uncurry f (x, y) = f x y 
goal: Function.uncurry f (x, y) = f x y

full_name: Function.curry_apply
code: @[simp]
theorem curry_apply {α β γ} (f : α × β → γ) (x : α) (y : β) : curry f x y = f (x, y) 
goal: Function.curry f x y = f (x, y)

full_name: Function.bicompl
code: /-- Compose a binary function `f` with a pair of unary functions `g` and `h`.
If both arguments of `f` have the same type and `g = h`, then `bicompl f g g = f on g`. -/
def bicompl (f : γ → δ → ε) (g : α → γ) (h : β → δ) (a b) 
goal: ε

full_name: Function.bicompr
code: /-- Compose a unary function `f` with a binary function `g`. -/
def bicompr (f : γ → δ) (g : α → β → γ) (a b) 
goal: δ

full_name: Function.«_aux_Mathlib_Logic_Function_Basic___macroRules_Function_term_∘₂__1»
code: local notation f " ∘₂ " g => bicompr f g
goal: Lean.Macro

full_name: Function._aux_Mathlib_Logic_Function_Basic___unexpand_Function_bicompr_1
code: local notation f " ∘₂ " g => bicompr f g
goal: Lean.PrettyPrinter.Unexpander

full_name: Function.uncurry_bicompr
code: theorem uncurry_bicompr (f : α → β → γ) (g : γ → δ) : uncurry (g ∘₂ f) = g ∘ uncurry f 
goal: Function.uncurry (Function.bicompr g f) = g ∘ Function.uncurry f

full_name: Function.uncurry_bicompl
code: theorem uncurry_bicompl (f : γ → δ → ε) (g : α → γ) (h : β → δ) :
    uncurry (bicompl f g h) = uncurry f ∘ Prod.map g h 
goal: Function.uncurry (Function.bicompl f g h) = Function.uncurry f ∘ Prod.map g h

full_name: Function.HasUncurry.uncurry
code: /-- Records a way to turn an element of `α` into a function from `β` to `γ`. The most generic use
is to recursively uncurry. For instance `f : α → β → γ → δ` will be turned into
`↿f : α × β × γ → δ`. One can also add instances for bundled maps. -/
class HasUncurry (α : Type*) (β : outParam Type*) (γ : outParam Type*) where
  /-- Uncurrying operator. The most generic use is to recursively uncurry. For instance
  `f : α → β → γ → δ` will be turned into `↿f : α × β × γ → δ`. One can also add instances
  for bundled maps. -/
  uncurry : α → β → γ
goal: α → β → γ

full_name: Function.HasUncurry
code: /-- Records a way to turn an element of `α` into a function from `β` to `γ`. The most generic use
is to recursively uncurry. For instance `f : α → β → γ → δ` will be turned into
`↿f : α × β × γ → δ`. One can also add instances for bundled maps. -/
class HasUncurry (α : Type*) (β : outParam Type*) (γ : outParam Type*) where
  /-- Uncurrying operator. The most generic use is to recursively uncurry. For instance
  `f : α → β → γ → δ` will be turned into `↿f : α × β × γ → δ`. One can also add instances
  for bundled maps. -/
  uncurry : α → β → γ
goal: Type (max (max u_5 u_6) u_7)

full_name: Function.«_aux_Mathlib_Logic_Function_Basic___macroRules_Function_term↿__1»
code: @[inherit_doc] notation:arg "↿" x:arg => HasUncurry.uncurry x
goal: Lean.Macro

full_name: Function._aux_Mathlib_Logic_Function_Basic___unexpand_Function_HasUncurry_uncurry_1
code: @[inherit_doc] notation:arg "↿" x:arg => HasUncurry.uncurry x
goal: Lean.PrettyPrinter.Unexpander

full_name: Function.hasUncurryBase
code: instance hasUncurryBase : HasUncurry (α → β) α β 
goal: Function.HasUncurry (α → β) α β

full_name: Function.hasUncurryInduction
code: instance hasUncurryInduction [HasUncurry β γ δ] : HasUncurry (α → β) (α × γ) δ 
goal: Function.HasUncurry (α → β) (α × γ) δ

full_name: Function.Involutive
code: /-- A function is involutive, if `f ∘ f = id`. -/
def Involutive {α} (f : α → α) : Prop 
goal: Prop

full_name: Bool.involutive_not
code: theorem _root_.Bool.involutive_not : Involutive not 
goal: Function.Involutive not

full_name: Function.Involutive.comp_self
code: @[simp]
theorem comp_self : f ∘ f = id 
goal: f ∘ f = id

full_name: Function.Involutive.leftInverse
code: protected theorem leftInverse : LeftInverse f f 
goal: Function.LeftInverse f f

full_name: Function.Involutive.rightInverse
code: protected theorem rightInverse : RightInverse f f 
goal: Function.RightInverse f f

full_name: Function.Involutive.injective
code: protected theorem injective : Injective f 
goal: Function.Injective f

full_name: Function.Involutive.surjective
code: protected theorem surjective : Surjective f 
goal: Function.Surjective f

full_name: Function.Involutive.bijective
code: protected theorem bijective : Bijective f 
goal: Function.Bijective f

full_name: Function.Involutive.ite_not
code: /-- Involuting an `ite` of an involuted value `x : α` negates the `Prop` condition in the `ite`. -/
protected theorem ite_not (P : Prop) [Decidable P] (x : α) :
    f (ite P x (f x)) = ite (¬P) x (f x) 
goal: f (if P then x else f x) = if ¬P then x else f x

full_name: Function.Involutive.eq_iff
code: /-- An involution commutes across an equality. Compare to `Function.Injective.eq_iff`. -/
protected theorem eq_iff {x y : α} : f x = y ↔ x = f y 
goal: f x = y ↔ x = f y

full_name: Function.not_involutive
code: lemma not_involutive : Involutive Not 
goal: Function.Involutive Not

full_name: Function.not_injective
code: lemma not_injective : Injective Not 
goal: Function.Injective Not

full_name: Function.not_surjective
code: lemma not_surjective : Surjective Not 
goal: Function.Surjective Not

full_name: Function.not_bijective
code: lemma not_bijective : Bijective Not 
goal: Function.Bijective Not

full_name: Function.symmetric_apply_eq_iff
code: @[simp]
lemma symmetric_apply_eq_iff {α : Sort*} {f : α → α} : Symmetric (f · = ·) ↔ Involutive f 
goal: (Symmetric fun x x_1 => f x = x_1) ↔ Function.Involutive f

full_name: Function.Injective2
code: /-- The property of a binary function `f : α → β → γ` being injective.
Mathematically this should be thought of as the corresponding function `α × β → γ` being injective.
-/
def Injective2 {α β γ : Sort*} (f : α → β → γ) : Prop 
goal: Prop

full_name: Function.Injective2.left
code: /-- A binary injective function is injective when only the left argument varies. -/
protected theorem left (hf : Injective2 f) (b : β) : Function.Injective fun a ↦ f a b 
goal: Function.Injective fun a => f a b

full_name: Function.Injective2.right
code: /-- A binary injective function is injective when only the right argument varies. -/
protected theorem right (hf : Injective2 f) (a : α) : Function.Injective (f a) 
goal: Function.Injective (f a)

full_name: Function.Injective2.uncurry
code: protected theorem uncurry {α β γ : Type*} {f : α → β → γ} (hf : Injective2 f) :
    Function.Injective (uncurry f) 
goal: Function.Injective (Function.uncurry f)

full_name: Function.Injective2.left'
code: /-- As a map from the left argument to a unary function, `f` is injective. -/
theorem left' (hf : Injective2 f) [Nonempty β] : Function.Injective f 
goal: Function.Injective f

full_name: Function.Injective2.right'
code: /-- As a map from the right argument to a unary function, `f` is injective. -/
theorem right' (hf : Injective2 f) [Nonempty α] : Function.Injective fun b a ↦ f a b 
goal: Function.Injective fun b a => f a b

full_name: Function.Injective2.eq_iff
code: theorem eq_iff (hf : Injective2 f) {a₁ a₂ b₁ b₂} : f a₁ b₁ = f a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ 
goal: f a₁ b₁ = f a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂

full_name: Function.sometimes
code: /-- `sometimes f` evaluates to some value of `f`, if it exists. This function is especially
interesting in the case where `α` is a proposition, in which case `f` is necessarily a
constant function, so that `sometimes f = f a` for all `a`. -/
noncomputable def sometimes {α β} [Nonempty β] (f : α → β) : β 
goal: β

full_name: Function.sometimes_eq
code: theorem sometimes_eq {p : Prop} {α} [Nonempty α] (f : p → α) (a : p) : sometimes f = f a 
goal: Function.sometimes f = f a

full_name: Function.sometimes_spec
code: theorem sometimes_spec {p : Prop} {α} [Nonempty α] (P : α → Prop) (f : p → α) (a : p)
    (h : P (f a)) : P (sometimes f) 
goal: P (Function.sometimes f)

full_name: forall_existsUnique_iff
code: /-- A relation `r : α → β → Prop` is "function-like"
(for each `a` there exists a unique `b` such that `r a b`)
if and only if it is `(f · = ·)` for some function `f`. -/
lemma forall_existsUnique_iff {r : α → β → Prop} :
    (∀ a, ∃! b, r a b) ↔ ∃ f : α → β, ∀ {a b}, r a b ↔ f a = b 
goal: (∀ (a : α), ∃! b, r a b) ↔ ∃ f, ∀ {a : α} {b : β}, r a b ↔ f a = b

full_name: forall_existsUnique_iff'
code: /-- A relation `r : α → β → Prop` is "function-like"
(for each `a` there exists a unique `b` such that `r a b`)
if and only if it is `(f · = ·)` for some function `f`. -/
lemma forall_existsUnique_iff' {r : α → β → Prop} :
    (∀ a, ∃! b, r a b) ↔ ∃ f : α → β, r = (f · = ·) 
goal: (∀ (a : α), ∃! b, r a b) ↔ ∃ f, r = fun x x_1 => f x = x_1

full_name: Symmetric.forall_existsUnique_iff'
code: /-- A symmetric relation `r : α → α → Prop` is "function-like"
(for each `a` there exists a unique `b` such that `r a b`)
if and only if it is `(f · = ·)` for some involutive function `f`. -/
protected lemma Symmetric.forall_existsUnique_iff' {r : α → α → Prop} (hr : Symmetric r) :
    (∀ a, ∃! b, r a b) ↔ ∃ f : α → α, Involutive f ∧ r = (f · = ·) 
goal: (∀ (a : α), ∃! b, r a b) ↔ ∃ f, Function.Involutive f ∧ r = fun x x_1 => f x = x_1

full_name: Symmetric.forall_existsUnique_iff
code: /-- A symmetric relation `r : α → α → Prop` is "function-like"
(for each `a` there exists a unique `b` such that `r a b`)
if and only if it is `(f · = ·)` for some involutive function `f`. -/
protected lemma Symmetric.forall_existsUnique_iff {r : α → α → Prop} (hr : Symmetric r) :
    (∀ a, ∃! b, r a b) ↔ ∃ f : α → α, Involutive f ∧ ∀ {a b}, r a b ↔ f a = b 
goal: (∀ (a : α), ∃! b, r a b) ↔ ∃ f, Function.Involutive f ∧ ∀ {a b : α}, r a b ↔ f a = b

full_name: Set.piecewise
code: /-- `s.piecewise f g` is the function equal to `f` on the set `s`, and to `g` on its complement. -/
def Set.piecewise {α : Type u} {β : α → Sort v} (s : Set α) (f g : ∀ i, β i)
    [∀ j, Decidable (j ∈ s)] : ∀ i, β i 
goal: β i

full_name: eq_rec_on_bijective
code: theorem eq_rec_on_bijective {C : α → Sort*} :
    ∀ {a a' : α} (h : a = a'), Function.Bijective (@Eq.ndrec _ _ C · _ h)
  
goal: Function.Bijective fun x => h ▸ x

full_name: eq_mp_bijective
code: theorem eq_mp_bijective {α β : Sort _} (h : α = β) : Function.Bijective (Eq.mp h) 
goal: Function.Bijective h.mp

full_name: eq_mpr_bijective
code: theorem eq_mpr_bijective {α β : Sort _} (h : α = β) : Function.Bijective (Eq.mpr h) 
goal: Function.Bijective h.mpr

full_name: cast_bijective
code: theorem cast_bijective {α β : Sort _} (h : α = β) : Function.Bijective (cast h) 
goal: Function.Bijective (cast h)

full_name: eq_rec_inj
code: @[simp]
theorem eq_rec_inj {a a' : α} (h : a = a') {C : α → Type*} (x y : C a) :
    (Eq.ndrec x h : C a') = Eq.ndrec y h ↔ x = y 
goal: h ▸ x = h ▸ y ↔ x = y

full_name: cast_inj
code: @[simp]
theorem cast_inj {α β : Type u} (h : α = β) {x y : α} : cast h x = cast h y ↔ x = y 
goal: cast h x = cast h y ↔ x = y

full_name: Function.LeftInverse.eq_rec_eq
code: theorem Function.LeftInverse.eq_rec_eq {γ : β → Sort v} {f : α → β} {g : β → α}
    (h : Function.LeftInverse g f) (C : ∀ a : α, γ (f a)) (a : α) :
    -- TODO: mathlib3 uses `(congr_arg f (h a)).rec (C (g (f a)))` for LHS
    @Eq.rec β (f (g (f a))) (fun x _ ↦ γ x) (C (g (f a))) (f a) (congr_arg f (h a)) = C a 
goal: ⋯ ▸ C (g (f a)) = C a

full_name: Function.LeftInverse.eq_rec_on_eq
code: theorem Function.LeftInverse.eq_rec_on_eq {γ : β → Sort v} {f : α → β} {g : β → α}
    (h : Function.LeftInverse g f) (C : ∀ a : α, γ (f a)) (a : α) :
    -- TODO: mathlib3 uses `(congr_arg f (h a)).recOn (C (g (f a)))` for LHS
    @Eq.recOn β (f (g (f a))) (fun x _ ↦ γ x) (f a) (congr_arg f (h a)) (C (g (f a))) = C a 
goal: Eq.recOn ⋯ (C (g (f a))) = C a

full_name: Function.LeftInverse.cast_eq
code: theorem Function.LeftInverse.cast_eq {γ : β → Sort v} {f : α → β} {g : β → α}
    (h : Function.LeftInverse g f) (C : ∀ a : α, γ (f a)) (a : α) :
    cast (congr_arg (fun a ↦ γ (f a)) (h a)) (C (g (f a))) = C a 
goal: cast ⋯ (C (g (f a))) = C a

full_name: Set.SeparatesPoints
code: /-- A set of functions "separates points"
if for each pair of distinct points there is a function taking different values on them. -/
def Set.SeparatesPoints {α β : Type*} (A : Set (α → β)) : Prop 
goal: Prop

full_name: IsSymmOp.flip_eq
code: theorem IsSymmOp.flip_eq (op) [IsSymmOp α β op] : flip op = op 
goal: flip op = op

full_name: InvImage.equivalence
code: theorem InvImage.equivalence {α : Sort u} {β : Sort v} (r : β → β → Prop) (f : α → β)
    (h : Equivalence r) : Equivalence (InvImage r f) 
goal: Equivalence (InvImage r f)

full_name: instDecidableUncurryOfFstSnd
code: instance {α β : Type*} {r : α → β → Prop} {x : α × β} [Decidable (r x.1 x.2)] :
  Decidable (uncurry r x) 
goal: Decidable (Function.uncurry r x)

full_name: instDecidableCurryOfMk
code: instance {α β : Type*} {r : α × β → Prop} {a : α} {b : β} [Decidable (r (a, b))] :
  Decidable (curry r a b) 
goal: Decidable (Function.curry r a b)