Function: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
[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 quantitative relation between two groups<ref group="note">In this context, by group I mean what AR means by group in ITOE. I do ''not'' mean [[Group|the standard math notion of group]]. </ref> 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 <math>f : A \rightarrow B</math> means that <math>f</math> is a function with domain <math>A</math> and codomain <math>B</math>. | A '''function''' is a quantitative relation between two groups<ref group="note">In this context, by group I mean what AR means by group in ITOE. I do ''not'' mean [[Group|the standard math notion of group]]. </ref> 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 <math>f : A \rightarrow B</math> means that <math>f</math> is a function with domain <math>A</math> and codomain <math>B</math>. | ||
Revision as of 00:14, 13 February 2025
[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 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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f} is a function with domain Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A} and codomain Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B} .
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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f : A \rightarrow B} is shorthand for the following statement: and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B} are two mathematical concepts, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f} is a function converting an Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A} into a Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B} . We say that Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A} is the domain of Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f} , and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B} is the codomain of Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f} .
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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbb{N}\rightarrow\mathbb{Q}} .
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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x \mapsto 2x} ; it is not an example of the function Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x \mapsto 2.00001 x} , 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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle +:\mathbb{N}\times \mathbb{N} \rightarrow \mathbb{N}} .
The traditional concept
In standard mathematics, a function always converts elements of a set Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X} into elements of a set Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Y} . 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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X} to Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Y} as a subset of Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X \times Y} 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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle r : \text{String} \rightarrow \text{String} }
, where Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle r}
is the reverseString
function and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \text{String}}
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 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x \in X} , the subset of Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle X \times Y} must contain one and only one tuple whose first argument is Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x} .
- ↑ 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
.