Function
A function is a potential action, which, if performed on an existent of type , would uniquely produce an existent of type .
A function is a quantitative relation between two groups[note 1] of existents (called the "domain" and "codomain" of the function), in which any existent in the domain is related to a unique existent in the codomain. The notation means that is a function with domain and codomain . [TODO it's rationalistic to conceptualize functions as relationships. That's not how people think about them. They think about functions as "things you could do."]
A function is a binary quantitative relation between two groups[TODO see 2024-07-05 comment] of existents, in which one (the "codomain") is uniquely determined by the other (the "domain"). [TODO this definition is not bad, but it is a bit vague. what do I mean by determined? I mean something like, can be determined.]
[TODO the following is deprecated but I don't want to delete it yet] A function is a potential process, which, if enacted, would convert units of one mathematical concept to units of another. [TODO I'm not sure about this definition. Like normally I would be happy to say that addition is a function. But addition is not about converting units of one math concept to units of another, it's about identifying one thing based on one's identification of another thing. The notation is shorthand for the following statement: and are two mathematical concepts, is a function converting an into a . We say that is the domain of , and is the codomain of .
Examples

Functions
The following table encodes a function:
x | (0,0) | (1,0) | (0,1) | (1,1) |
f(x) | 0 | 1 | 1 | 0 |
That table describes the input and output of an XOR gate. A XOR gate (another example of something that performs a function) can be seen in figure (1).
The following lines of C++ code implement a function:

string reverseString(const string &s) { string returnStr = ""; for (int i = s.size() - 1; i >= 0; --i) { returnStr.append(s[i]); } return returnStr; }
A sequence of fractions is a function .
A table describing several trigonometric functions is shown in figure (2).
A graph can describe a function: it can be thought of as providing instructions for producing outputs from inputs, or it can be thought of as describing some function which was implemented elsewhere.
Let's suppose I have a process where I take a line segment, and I use a pencil to copy it onto transparent paper twice, resulting in a line segment of twice the length of the original. This is an example of the function ; it is not an example of the function , even though those functions only differ at a scale much smaller than the one relevant to my pencil drawings.
Non-functions
A coffee machine is not a function. It carries out a process; it takes some inputs (energy, water, coffee grounds, paper filter) and converts them into coffee. But the inputs and outputs are not mathematical notions.
The method that an elementary schooler learns for carrying out addition (carry the 1s and so forth) is not itself a function. It is an algorithm, which implements the addition function .
Consider the following potential action. For any natural number , I can produce (using a calculator) a decimal such that . This is not a function, because its result is not determined uniquely by the input.
The traditional concept
In standard mathematics, a function always converts elements of a set into elements of a set . The sets could be infinite, so the function doesn't have to describe a real process. In fact, though standard mathematicians usually think about functions as if they were processes, standard mathematics technically doesn't define functions as processes at all. Rather, it defines a function from to as a subset of satisfying certain conditions.[note 2] This sharp disconnect between formal mathematical jargon, and the intuition applicable to real life, is part of what Objective Mathematics seeks to avoid. [TODO rewrite last sentence]
Standard mathematicians usually prefer not to consider things like "the set of all strings containing less than n characters," where n is the number of bytes of free RAM available on some computer. Instead, standard mathematicians usually prefer to consider things like "the set of all strings." The reason for this is clear enough: the latter is much more elegant and simple than the former. The problem with the latter, though, is that it is completely disconnected from reality. There is no such thing as a function from the set of all strings to the set of all strings, since everything that exists is delimited and finite. For example, in the examples section §, Objective Mathematics made the identification that , where is the reverseString
function and denotes the concept of a string,[note 3] but standard mathematics cannot identify reverseString
as a function from "the set of all strings" to "the set of all strings", since there are limits on how big its input and output could be. In other words, there are some strings in "the set of all strings" that are so large that reverseString
would not be able to reverse them.
In conclusion, standard mathematicians are forced to make an impossible choice. Do we work with nice, clean mathematical objects and be disconnected from reality, or do we keep our connection with reality and suffer through nasty, non-conceptual messes?
[TODO I think this is a bad example, and I also am not sure if it belongs in this article.]
[TODO maybe the "problem" is just that standard mathematics is precise about functions, and I'm not.]
Functions are necessarily unitless
consider the function describing the relationship between the side length of a square, and the area of a square:
f(a meters) = a^2 meters^2.
consider the function describing the relationship between an angle of a circle and the x location of the point at that angle on the circle of radius 1 meter
f(a radians) = cos(a) meters
Notes
- ↑ In this context, by group I mean what AR means by group in ITOE. I do not mean the standard math notion of group.
- ↑ Namely, for each , the subset of must contain one and only one tuple whose first argument is .
- ↑ C++, being a practical language, basically says the same thing as Objective Mathematics; it's just a bit more specific. It says that the type of
reverseString
is that of a (C++) function fromstd::string
tostd::string
.