Documentation
Init
.
Data
.
Function
Search
return to top
source
Imports
Init.Core
Imported by
Function
.
curry
Function
.
uncurry
Function
.
curry_uncurry
Function
.
uncurry_curry
Function
.
uncurry_apply_pair
Function
.
curry_apply
source
@[inline]
def
Function
.
curry
{α :
Type
u_1}
{β :
Type
u_2}
{φ :
Sort
u_3}
:
(
α
×
β
→
φ
)
→
α
→
β
→
φ
Equations
Function.curry
f
a
b
=
f
(
a
,
b
)
Instances For
source
@[inline]
def
Function
.
uncurry
{α :
Type
u_1}
{β :
Type
u_2}
{φ :
Sort
u_3}
:
(
α
→
β
→
φ
)
→
α
×
β
→
φ
Interpret a function with two arguments as a function on
α × β
Equations
Function.uncurry
f
a
=
f
a
.fst
a
.snd
Instances For
source
@[simp]
theorem
Function
.
curry_uncurry
{α :
Type
u_1}
{β :
Type
u_2}
{φ :
Sort
u_3}
(f :
α
→
β
→
φ
)
:
curry
(
uncurry
f
)
=
f
source
@[simp]
theorem
Function
.
uncurry_curry
{α :
Type
u_1}
{β :
Type
u_2}
{φ :
Sort
u_3}
(f :
α
×
β
→
φ
)
:
uncurry
(
curry
f
)
=
f
source
@[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
source
@[simp]
theorem
Function
.
curry_apply
{α :
Type
u_1}
{β :
Type
u_2}
{γ :
Sort
u_3}
(f :
α
×
β
→
γ
)
(x :
α
)
(y :
β
)
:
curry
f
x
y
=
f
(
x
,
y
)