In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, function application is the act of applying a
function to an argument from its
domain so as to obtain the corresponding value from its
range. In this sense, function application can be thought of as the opposite of function
abstraction
Abstraction is a process where general rules and concepts are derived from the use and classifying of specific examples, literal (reality, real or Abstract and concrete, concrete) signifiers, first principles, or other methods.
"An abstraction" ...
.
Representation
Function application is usually depicted by juxtaposing the variable representing the function with its argument encompassed in
parentheses. For example, the following expression represents the application of the function ''Æ’'' to its argument ''x''.
:
In some instances, a different notation is used where the parentheses aren't required, and function application can be expressed just by
juxtaposition
Juxtaposition is an act or instance of placing two opposing elements close together or side by side. This is often done in order to Comparison, compare/contrast the two, to show similarities or differences, etc.
Speech
Juxtaposition in literary ...
. For example, the following expression can be considered the same as the previous one:
:
The latter notation is especially useful in combination with the
currying isomorphism. Given a function
, its application is represented as
by the former notation and
(or
with the argument
written with the less common angle brackets) by the latter. However, functions in curried form
can be represented by juxtaposing their arguments:
, rather than
. This relies on function application being
left-associative.
— a contiguity operator indicating application of a function; that is an invisible zero width character intended to distinguish concatenation meaning function application from concatenation meaning multiplication.
Set theory
In
axiomatic set theory, especially
Zermelo–Fraenkel set theory, a function
is often defined as a
relation (
) having the property that, for any
there is a unique such that
.
One is usually not content to write "
" to specify that
, and usually wishes for the more common function notation "
", thus function application, or more specifically, the notation "
", is defined by an
axiom schema. Given any function
with a given
domain and
codomain :
Stating "For all
in
and
in
,
is equal to
if and only if there is a unique
in
such that
is in
and
is in
". The notation
here being defined is a new
functional predicate from the underlying logic, where each y is a
term in x. Since
, as a functional predicate, must map every object in the language, objects not in the specified domain are chosen to map to an arbitrary object, suct as the
empty set
In mathematics, the empty set or void set is the unique Set (mathematics), set having no Element (mathematics), elements; its size or cardinality (count of elements in a set) is 0, zero. Some axiomatic set theories ensure that the empty set exi ...
.
As an operator
Function application can be defined as an
operator, called
apply or
, by the following definition:
:
The operator may also be denoted by a
backtick (`).
If the operator is understood to be of
low precedence and
right-associative, the application operator can be used to cut down on the number of parentheses needed in an expression. For example;
:
can be rewritten as:
:
However, this is perhaps more clearly expressed by using
function composition instead:
:
or even:
:
if one considers
to be a
constant function returning
.
Other instances
Function application in the
lambda calculus
In mathematical logic, the lambda calculus (also written as ''λ''-calculus) is a formal system for expressing computability, computation based on function Abstraction (computer science), abstraction and function application, application using var ...
is expressed by
β-reduction.
The
Curry–Howard correspondence relates function application to the logical rule of
modus ponens.
See also
*
Polish notation
References
Functions and mappings
{{mathanalysis-stub