# Formal Function

A formal function is a formal operation that maps every member of a function domain to a member of a function range.

**AKA:**ƒ, F, Function.**Context:**- It must have a Function Input (composed of one or more Function Parameters) from the Function Domain).
- It must have a Function Output (which is a member of the Function Range).
- It can be Formally Defined as: let [math]D[/math] and [math]R[/math] be sets. A function
*ƒ*is a Binary Relation defined for each Element in [math]B[/math] and some Element of*D*. - It can be instantiated as a Function Structure.
- It can range, based on function input cardinality, from being a Unary Function, to being a Binary Function, to being an n-Ary Function.
- It can range, depending on what proportion of the Domain Range is mapped, from being a Total Function to being a Partial Function.
- It can range, depending on the function range type, from being:
- a Value-Output Function (such as a continuous-output function);
- a Multiset-Output Function, such as a Set-Output Function;
- a Sequence-Output Function, such as a String-Output Function;
- a Tuple-Output Function, such as a Vector-Output Function.

- It can range from being a Scalar Function; a Set Function; Multiset Function; String Function; Sequence Function; Tuple Function; to being Vector Function.
- It can range, depending on the function domain type, from being:
- a Value-Input Function, such as a class-input Function or a number-input function;
- a Set-Input Function, or a Multiset-Input Function;
- a Sequence-Input Function, such as a String-Input Function;
- a Tuple-Input Function, such as a Vector-Input Function.

- It can range from being a Bijective Function to being an Injective Function to being a Surjective Function.
- It can range from being an Associative Function to being a Commutative Function to being a Distributive Function.
- …

**Example(s):**- an Mathmematical/Algebraic Function, composed of algebraic expressions.
- A Metric Function.
- A Cosine Function.
- A Vector Length Function.
- A Vector Dot Product Function.
- a Predictive Function with a Probability Value.
- …

**Counter-Example(s):**- a Function Structure.
- an Informal Operation.
- a Real Number.
- a Symbol.

**See:**Algorithm, Function Parameter, Ordered Pair, Malfunction.

## References

### 2015

- (Wikipedia, 2015) ⇒ http://en.wikipedia.org/wiki/function_(mathematics) Retrieved:2015-6-14.
- In mathematics, a '
*function*x^{[1]}is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output. An example is the function that relates each real number*to its square*x^{2}. The output of a function*f*corresponding to an input*x*is denoted by*f*(*x*) (read "*f*of*x*”). In this example, if the input is −3, then the output is 9, and we may write f*(−3) = 9. Likewise, if the input is 3, then the output is also 9, and we may write*f*(3) = 9. (The same output may be produced by more than one input, but each input gives only one output.) The input variable(s) are sometimes referred to as the argument(s) of the function. Functions of various kinds are "the central objects of investigation"in most fields of modern mathematics. There are many ways to describe or represent a function. Some functions may be defined by a formula or algorithm that tells how to compute the output for a given input. Others are given by a picture, called the graph of the function. In science, functions are sometimes defined by a table that gives the outputs for selected inputs. A function could be described implicitly, for example as the inverse to another function or as a solution of a differential equation. The input and output of a function can be expressed as an ordered pair, ordered so that the first element is the input (or tuple of inputs, if the function takes more than one input), and the second is the output. In the example above,*f*(*x*) =*x^{2}, we have the ordered pair (−3, 9). If both input and output are real numbers, this ordered pair can be viewed as the Cartesian coordinates of a point on the graph of the function. In modern mathematics, a function is defined by its set of inputs, called the*domain*; a set containing the set of outputs, and possibly additional elements, as members, called its*codomain*; and the set of all input-output pairs, called its*graph*. Sometimes the codomain is called the function's "range", but more commonly the word "range" is used to mean, instead, specifically the set of outputs (this is also called the*image*of the function). For example, we could define a function using the rule*f*(*x*) =*x*^{2}by saying that the domain and codomain are the real numbers, and that the graph consists of all pairs of real numbers (x*,*x^{2}). The image of this function is the set of non-negative real numbers. Collections of functions with the same domain and the same codomain are called function spaces, the properties of which are studied in such mathematical disciplines as real analysis, complex analysis, and functional analysis.In analogy with arithmetic, it is possible to define addition, subtraction, multiplication, and division of functions, in those cases where the output is a number. Another important operation defined on functions is function composition, where the output from one function becomes the input to another function.

- In mathematics, a '

### 2009

- (Wikipedia, 2009) ⇒ http://en.wikipedia.org/wiki/Function_(Programming)
- In computer science, a subroutine (function, method, procedure, or subprogram) is a portion of code within a larger program, which performs a specific task and can be relatively independent of the remaining code. ...

- http://planetmath.org/encyclopedia/Range2.html
- A function is a triplet (
*f,A,B*) where:- 1. [math]A[/math] is a set (called the domain of the function).
- 2. [math]B[/math] is a set (called the codomain of the function).
- 3. [math]f[/math] is a binary relation between [math]A[/math] and
*B*. - 4. For every [math]a[/math] in [math]A[/math], there exists [math]b[/math] in [math]B[/math] such that (
*a,b*) in [math]f[/math]. - 5. If [math]a[/math] in [math]A[/math],
*b_1,b_2*in [math]B[/math], and (*a,b_1*) in [math]f[/math] and (*a,b_2*) in [math]f[/math], then*b_1*=*b_2*.

- The triplet (
*f,A,B*) is usually written with the specialized notation*f: A->B*. This notation visually conveys the fact that [math]f[/math] maps elements of [math]A[/math] into elements of*B*.

- A function is a triplet (
- CYC Glossary http://www.cyc.com/cycdoc/ref/glossary.html
- function: A function (in the mathematical sense) is a relation such that for each thing in its domain (the universe of things it can be applied to), there is a single thing in its range (the universe of results it can have) such that the relation holds between them. In CycL, functions are denoted by certain constants. These constants are referred to as "function-denoting constants, "CycL functions," or sometimes just "functions." CycL functions can be applied to arguments to form non-atomic terms, which can serve as arguments to a predicate just as other terms can. There are more details about CycL functions in the Functions section of "The Syntax of Cycl".

- http://www.isi.edu/~hobbs/bgt-sequences.text

A function f from a set s1 to a set s2 is a set of pairs where each element of s1 occurs exactly once as the first element in a pair, and every element of s2 occurs as a second element of at least one pair. We will call this predicate "function0" because in Chapter B7 we will extend it to functions from scales to scales as well.

(forall (f s1 s2) (5) (iff (function0 f s1 s2) (and (set s1)(set s2) (forall (p) (if (member p f) (and (pair p) (forall (x y) (if (and (first x p)(second y p)) (and (member x s1) (member y s2))))))) (forall (x) (if (member x s1) (exists (p) (and (member p f)(first x p))))) (forall (p1 p2 x) (if (and (first x p1)(first x p2) (member p1 f)(member p2 f)) (equal p1 p2))) (forall (y) (if (member y s2) (exists (p) (and (member p f)(second y p))))))))

Lines 4-10 of this definition say that a function is a set of pairs, the first elements of which come from s1 and the second elements of which come from s2. Lines 11-14 say that there is a value of the function for every element of s1. Lines 15-18 say that value is unique. Lines 19-22 say that every element of s2 is a value of some member of s1 under the function f.

- http://ltcconline.net/greenl/courses/202/vectorIntegration/vectorFields.htm#fields
- We have now seen many types of functions. They are characterized by the domain and the range.
- Below is a list of some of the functions that we have encountered so far.

R | R | One variable Function |

R | R^{2} | Parametric Equations |

R^{2} | R | Function of 2 Variables |

R | Vectors | Vector Valued Function |

- http://www.math.com/tables/algebra/functions/index.htm
- Definition: A function is a relation from a domain set to a range set, where each element of the domain set is related to exactly one element of the range set.
- An equivalent definition: A function (f) is a relation from a set A to a set B (denoted f: A�B), such that for each element in the domain of A (Dom(A)), the f-relative set of A (f(A)) contains exactly one element.

- ↑ The words
**map**or**mapping**,**transformation**,**correspondence**, and operator are often used synonymously. .