File: Mathlib/Data/Fin/Tuple/Curry.lean

full_name: Function.FromTypes.uncurry
code: /-- Uncurry all the arguments of `Function.FromTypes p τ` to get
a function from a tuple.

Note this can be used on raw functions if used. -/
def uncurry : {n : ℕ} → {p : Fin n → Type u} → {τ : Type u} →
    (f : Function.FromTypes p τ) → ((i : Fin n) → p i) → τ
  
goal: ((i : Fin n) → p i) → τ

full_name: Function.FromTypes.curry
code: /-- Curry all the arguments of `Function.FromTypes p τ` to get a function from a tuple. -/
def curry : {n : ℕ} → {p : Fin n → Type u} → {τ : Type u} →
    (((i : Fin n) → p i) → τ) → Function.FromTypes p τ
  
goal: (((i : Fin n) → p i) → τ) → Function.FromTypes p τ

full_name: Function.FromTypes.uncurry_apply_cons
code: @[simp]
theorem uncurry_apply_cons {n : ℕ} {α} {p : Fin n → Type u} {τ : Type u}
    (f : Function.FromTypes (vecCons α p) τ) (a : α) (args : (i : Fin n) → p i) :
    uncurry f (Fin.cons a args) = @uncurry _ p _ (f a) args 
goal: f.uncurry (Fin.cons a args) = (f a).uncurry args

full_name: Function.FromTypes.uncurry_apply_succ
code: @[simp low]
theorem uncurry_apply_succ {n : ℕ} {p : Fin (n + 1) → Type u} {τ : Type u}
    (f : Function.FromTypes p τ) (args : (i : Fin (n + 1)) → p i) :
    uncurry f args = uncurry (f (args 0)) (Fin.tail args) 
goal: f.uncurry args = (f (args 0)).uncurry (Fin.tail args)

full_name: Function.FromTypes.curry_apply_cons
code: @[simp]
theorem curry_apply_cons {n : ℕ} {α} {p : Fin n → Type u} {τ : Type u}
    (f : ((i : Fin (n + 1)) → (vecCons α p) i) → τ) (a : α) :
    curry f a = @curry _ p _ (f ∘' Fin.cons a) 
goal: Function.FromTypes.curry f a = Function.FromTypes.curry ((fun {x} => f) ∘' Fin.cons a)

full_name: Function.FromTypes.curry_apply_succ
code: @[simp low]
theorem curry_apply_succ {n : ℕ} {p : Fin (n + 1) → Type u} {τ : Type u}
    (f : ((i : Fin (n + 1)) → p i) → τ) (a : p 0) :
    curry f a = curry (f ∘ Fin.cons a) 
goal: Function.FromTypes.curry f a = Function.FromTypes.curry (f ∘ Fin.cons a)

full_name: Function.FromTypes.curry_uncurry
code: @[simp]
theorem curry_uncurry (f : Function.FromTypes p τ) : curry (uncurry f) = f 
goal: Function.FromTypes.curry f.uncurry = f

full_name: Function.FromTypes.uncurry_curry
code: @[simp]
theorem uncurry_curry (f : ((i : Fin n) → p i) → τ) :
    uncurry (curry f) = f 
goal: (Function.FromTypes.curry f).uncurry = f

full_name: Function.FromTypes.curryEquiv
code: /-- `Equiv.curry` for `p`-ary heterogeneous functions. -/
@[simps]
def curryEquiv (p : Fin n → Type u) : (((i : Fin n) → p i) → τ) ≃ FromTypes p τ 
goal: (((i : Fin n) → p i) → τ) ≃ Function.FromTypes p τ

full_name: Function.FromTypes.curryEquiv_symm_apply
code: /-- `Equiv.curry` for `p`-ary heterogeneous functions. -/
@[simps]
def curryEquiv (p : Fin n → Type u) : (((i : Fin n) → p i) → τ) ≃ FromTypes p τ 
goal: ∀ (a : (i : Fin n) → p i), (Function.FromTypes.curryEquiv p).symm f a = f.uncurry a

full_name: Function.FromTypes.curryEquiv_apply
code: /-- `Equiv.curry` for `p`-ary heterogeneous functions. -/
@[simps]
def curryEquiv (p : Fin n → Type u) : (((i : Fin n) → p i) → τ) ≃ FromTypes p τ 
goal: ∀ (a : ((i : Fin n) → p i) → τ), (Function.FromTypes.curryEquiv p) a = Function.FromTypes.curry a

full_name: Function.FromTypes.curry_two_eq_curry
code: lemma curry_two_eq_curry {p : Fin 2 → Type u} {τ : Type u}
    (f : ((i : Fin 2) → p i) → τ) :
    curry f = Function.curry (f ∘ (piFinTwoEquiv p).symm) 
goal: Function.FromTypes.curry f = Function.curry (f ∘ ⇑(piFinTwoEquiv p).symm)

full_name: Function.FromTypes.uncurry_two_eq_uncurry
code: lemma uncurry_two_eq_uncurry (p : Fin 2 → Type u) (τ : Type u)
    (f : Function.FromTypes p τ) :
    uncurry f = Function.uncurry f ∘ piFinTwoEquiv p 
goal: f.uncurry = Function.uncurry f ∘ ⇑(piFinTwoEquiv p)

full_name: Function.OfArity.uncurry
code: /-- Uncurry all the arguments of `Function.OfArity α n` to get a function from a tuple.

Note this can be used on raw functions if used. -/
def uncurry {n} (f : Function.OfArity α β n) : (Fin n → α) → β 
goal: (Fin n → α) → β

full_name: Function.OfArity.curry
code: /-- Curry all the arguments of `Function.OfArity α β n` to get a function from a tuple. -/
def curry {n} (f : (Fin n → α) → β) : Function.OfArity α β n 
goal: Function.OfArity α β n

full_name: Function.OfArity.curry_uncurry
code: @[simp]
theorem curry_uncurry {n} (f : Function.OfArity α β n) :
    curry (uncurry f) = f 
goal: Function.OfArity.curry f.uncurry = f

full_name: Function.OfArity.uncurry_curry
code: @[simp]
theorem uncurry_curry {n} (f : (Fin n → α) → β) :
    uncurry (curry f) = f 
goal: (Function.OfArity.curry f).uncurry = f

full_name: Function.OfArity.curryEquiv_symm_apply
code: /-- `Equiv.curry` for n-ary functions. -/
@[simps!]
def curryEquiv (n : ℕ) : ((Fin n → α) → β) ≃ OfArity α β n 
goal: ∀ (a : Fin n → α), (Function.OfArity.curryEquiv n).symm f a = f.uncurry a

full_name: Function.OfArity.curryEquiv_apply
code: /-- `Equiv.curry` for n-ary functions. -/
@[simps!]
def curryEquiv (n : ℕ) : ((Fin n → α) → β) ≃ OfArity α β n 
goal: ∀ (a : (Fin n → α) → β), (Function.OfArity.curryEquiv n) a = Function.FromTypes.curry a

full_name: Function.OfArity.curryEquiv
code: /-- `Equiv.curry` for n-ary functions. -/
@[simps!]
def curryEquiv (n : ℕ) : ((Fin n → α) → β) ≃ OfArity α β n 
goal: ((Fin n → α) → β) ≃ Function.OfArity α β n

full_name: Function.OfArity.curry_two_eq_curry
code: lemma curry_two_eq_curry {α β : Type u} (f : ((i : Fin 2) → α) → β) :
    curry f = Function.curry (f ∘ (finTwoArrowEquiv α).symm) 
goal: Function.OfArity.curry f = Function.curry (f ∘ ⇑(finTwoArrowEquiv α).symm)

full_name: Function.OfArity.uncurry_two_eq_uncurry
code: lemma uncurry_two_eq_uncurry {α β : Type u} (f : OfArity α β 2) :
    uncurry f = Function.uncurry f ∘ (finTwoArrowEquiv α) 
goal: f.uncurry = Function.uncurry f ∘ ⇑(finTwoArrowEquiv α)