In mathematics, 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.[1] In this sense, function application can be thought of as the opposite of function abstraction.

Representation

edit

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. 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.

When mathematical notation is represented in a digital document, the invisible zero-width Unicode characters U+2061 FUNCTION APPLICATION and U+2062 INVISIBLE TIMES can be used to distinguish concatenation meaning function application from concatenation meaning multiplication

Set theory

edit

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 allowed by defining a binary function symbol   as:[2]

 

Or, more formally:[3][4]

  where   denotes set exponentiation: the set of all functions from   to  .

In prose:   if there exists a domain   and range   such that   is a function from   to   and  ; or (the negation of former) and   The choice of using the empty set   when   is undefined is arbitrary. However, since   is a primitive function symbol, it must be defined for any two objects (sets, in this case) it takes in the domain of discourse.[5]

If   denotes the formula on the right side of the biconditional above, for any two sets,   the formula   associates a unique object  :  . Therefore the language of set theory can use an extension by definition to include the function application operation   conservatively.

As an operator

edit

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

edit

Function application in the lambda calculus is expressed by β-reduction.

The Curry–Howard correspondence relates function application to the logical rule of modus ponens.

See also

edit

References

edit
  1. ^ Alama, Jesse; Korbmacher, Johannes (2023), "The Lambda Calculus", in Zalta, Edward N.; Nodelman, Uri (eds.), The Stanford Encyclopedia of Philosophy (Winter 2023 ed.), Metaphysics Research Lab, Stanford University, retrieved 2024-02-29
  2. ^ Mendelson, Elliot (1987). Introduction to Mathematical Logic (3rd ed.). Belmont: Wadsworth, Inc. p. 185. doi:10.1007/978-1-4615-7288-6. ISBN 978-1-4615-7290-9. LCCN 86-11084.
  3. ^ Suppes, Patrick (1972). Axiomatic set theory. Internet Archive. New York, Dover Publications. p. 87. ISBN 978-0-486-61630-8.
  4. ^ Lévy, Azriel (1979). Basic set theory. Berlin; New York: Springer-Verlag. p. 27. ISBN 978-0-387-08417-6.
  5. ^ Lévy, Azriel (1979). Basic set theory. Berlin; New York: Springer-Verlag. p. 15. ISBN 978-0-387-08417-6.