Documentation

Init.Data.Function

@[inline]
def Function.curry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} :
(α × β → φ) → α → β → φ

Transforms a function from pairs into an equivalent two-parameter function.

Examples:

Equations
Instances For
    @[inline]
    def Function.uncurry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} :
    (α → β → φ) → α × β → φ

    Transforms a two-parameter function into an equivalent function from pairs.

    Examples:

    Equations
    Instances For
      @[simp]
      theorem Function.curry_uncurry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} (f : α → β → φ) :
      @[simp]
      theorem Function.uncurry_curry {α : Type u_1} {β : Type u_2} {φ : Sort u_3} (f : α × β → φ) :
      @[simp]
      theorem Function.uncurry_apply_pair {α : Type u_1} {β : Type u_2} {γ : Sort u_3} (f : α → β → γ) (x : α) (y : β) :
      uncurry f (x, y) = f x y
      @[simp]
      theorem Function.curry_apply {α : Type u_1} {β : Type u_2} {γ : Sort u_3} (f : α × β → γ) (x : α) (y : β) :
      curry f x y = f (x, y)