(In fact, this definition is incomplete: it must also be the case that the function is defined over the entire set A; each value in A maps to a value in B.† This is a common assumption to make about functions, but since I violate it earlier by talking about sqrt(x): ℝ ⟶ ℝ, I really should make it explicit. The definition I gave is motivated by the synonymous term "invertible function".)
"All values in the target set have property X" and "Each value in the target set has property X" are exactly equivalent English-language statements.
† "f: A ⟶ B satisfies ∀b∈B ∃a∈A ∀x∈A (f(a) = b ∧ f(x) ∈ B ∧ (f(x) = b ⟶ x = a))", but while that technically works, it feels kludgy.
There is no high principle that says "collecting multiple values and giving them a collective name that implies they are a single value is metaphysically superior to collecting multiple values and admitting that they are multiple values".
Maybe some kind of "it's all of them at once" mental model is useful in math, but object oriented programming gives you a hierarchal mindset, everything is in a container of some sort, so multiple return values having a container like a set makes perfect sense and just a bunch of loose values isn't a very familiar concept.
But perhaps if you're actually doing math, things are different?
Over in the programming world, Common Lisp allows you to return multiple values without wrapping them in a container. If you want the primary value, you just treat the function as if it returned one value. If you want additional return values, you use multiple-value-bind.
(I believe the general idea is along these lines: your function does a certain amount of computation, producing a set of related values. Most of the time, the caller will be interested in just one of those, which you return as the primary value. But some of the time, the caller will be interested in more than just that one value, and you have to compute the secondary values whether the caller wants them or not, so you return those too.)
The expressive power of single value functions is very powerful and the constraint is not necessarily restrictive but may even drive a stronger analysis. (Where does this function have multiple returns? Is it for the whole domain? Etc)
By contrast the expressive power of negation and implication are relatively low given very intuitive and well defined alternatives exist.
Second, there already exist good enough paradigms for dealing with multi-valued functions. Splitting the function up into multiple functions, mapping to an ordered pair, etc.
Defining a function the traditional way is more than just notational convenience. The single value constraint allows for many simplifying assumptions, enough that is worth to pay the cost when dealing with relations that you want to talk about in functional ways
The concept of a special kind of mapping between two sets, where to any element of the first set corresponds a unique element of the second set is very important and it needs a special name.
The choice of the names is arbitrary and one could use for instance the term "univocal function" to mean a mapping like described above and "function" for any mapping between two sets.
Nevertheless, by far the most widespread convention in mathematics is to use the term "relation" for any mapping between two sets and the term "function" only for those relations where to any element of the first set corresponds a unique element of the second set.
There exists no reason for not following this convention, from which it also results that an invertible function is a function where for any element of the second set corresponds a unique element of the first set, so this convention also provides a simple meaningful name for another important concept that needs a special name.
The functions in programming languages that return multiple values, unless they return partially or totally random values (in which case they are not functions of only the input arguments, but also of an internal state or of time), are just functions that return values which belong to the set that is the Cartesian product of the types of the individual values. So the name "function" is usually correct in the mathematical sense even for such functions. If they had not been functions, the programmer would not have known what values to return, when writing them.
Moreover, I disagree that in most contexts when you want to invert a function "it isn't actually important that functions yield a single value".
In the overwhelming majority of the cases that appear in engineering and science when you want to solve equations a.k.a. to invert functions, you want to obtain a unique solution that can be directly implemented in practice. Whenever you cannot obtain a unique solution, you need to add extra criteria that allow the selection of a unique solution that is usable. Those extra criteria are actually equivalent with transforming the original non-invertible function into a function that can be inverted.
Of course the function that gives you inverse images is nothing more than an inverse function that is allowed to give multiple values.
You can’t use the word function for something that isn’t a function. It makes no sense to say inverse function that is allowed to give multiple values. Hence the need for terms like pre-image of a set.
In all contexts it is important that a function yield a single value for a given input because that is the definition of the word.
Of course, these are still functions which take exactlt one element in their input set (the reals for sqrt, or pairs of reals for square) and return for each a single element in their output sets (the pairs of reals for sqrt, or the reals for square).
It would have cost you nothing except a minute or so of your time to have refuted yourself before posting: https://arxiv.org/abs/1912.08274 https://arxiv.org/abs/1703.01700
(See also: https://en.wikipedia.org/wiki/Multivalued_function)
They don’t think of Log(z) as a set of values. At least I don’t. I assume one means the principal branch when writing Log(z) unless specifically stated otherwise. Maybe in their mind they do think of an infinite set when seeing Log(z). I’m skeptical of this possibility though.
The insight behind multi-valued functions seems to be that for certain types of functions that seem unambiguous in the real case (roots, logarithms, ...) there's no clear candidate for which one is "the" logarithm function etc. So theorems look more like "let l be a logarithm function".
If you actually want to do complex analysis, it would not be very useful to have a vector valued function (even if that's technically possible) for logarithm etc. because most of the theory is developed for (in particular, differentiable) functions C -> C. So you'd rather just pick a branch.
Isn’t the function definition meant to be interpreted as “maps consistently to exactly one element of the codomain”? So an ordered pair of R^2 is still one element of R^2
It seems the parent has just mixed up the domain and codomain, because under that assumption he would be right about both the definition and bijectivity
An ordered pair drawn from ℝ² is in some sense a single value. In another sense, it is two values. Which way you want to think about it depends on what you're going to do with it; if you're thinking about square roots of real numbers, it will be more useful to think of it as two values.
> It seems the parent has just mixed up the domain and codomain, because under that assumption he would be right about both the definition and bijectivity
He still wouldn't be right about bijectivity; the condition that an element of the codomain can have no more than one inverse only describes an injective function.
What I tryed to say is that the sense in which “exactly one element” is used in the definition of function is inclusive of codomain being R^n, so it confused me why you would provide a function that has a codomain of R^2 as something that suggests deviation from the formalism. It just seemed misleading to phrase it that way
I thought consistently would convey the idea I had, nevermind if it doesn’t
My bad about bijectivity, I see it now, you’re right
Yes, nothing stops you from defining the square root function such that it returns an element of R^2. It's perfectly legal mathematics, functions can map arbitrary domains to arbitrary codomains after all.
But I've never seen it used anywhere. Maybe there is an area where such a definition makes sense... but regular real (or complex) analysis doesn't really normally do such a kind of thing.
The problem is that you want your typical functions like square root (and logarithms, which in the complex case also aren't unique) to be functions R -> R (or C -> C). Otherwise you can't compose them and then everything is kinda weird.
When working in a structure, one often doesn't want to leave that structure and go to another one, but keep the same structure (or at least one that is related in an interesting way, such as a quotient structure). That just leads to more interesting mathematics.
So you're wrong about the definition of a function, except that you're right in spirit; the way we normally think about functions, as opposed to the way we define them, definitely allows them to yield multiple values for one input.
You're catastrophically wrong about bijective functions; those are an important concept and your definition is not related to the actual one. A bijective function is one for which all values in the target set are reached by exactly one, no more and no less, value in the source set.