1

There was a question asked awhile ago concerning the Definition of a function. I have looked at a lot of books and for some reason they pretty much all label a function as $f: A\to B$ with a lower case $f$ where $A$ and $B$ are sets, and then describe $F$ as a subset of $A \times B$. Why do they do this instead of denoting a function as $F: A\to B$ where $F$ is a subset of $A \times B$? It would make sense to me to write it as a capital letter and be consistent, since functions are sets.

Will
  • 429
  • 3
    Tradition. And the fact that while a function is a set, most people think in terms of the informal notion of a function as a rule of correspondence. – Umberto P. Mar 24 '17 at 12:54
  • I can see that. I could see it as another reason though and please tell if if I am wrong. For example, if F={(1,2),(2,4)}, then f(1)=2 and f(2)=4. Is it okay if I label F(1)=2 and F(2)=4 as well? I appreciate the feedback. – Will Mar 24 '17 at 12:59
  • 1
    I don't see any immediate risk of ambiguity, so it's probably fine to do it like that, as long as you clarify what you mean first. Relations like $\leq$ are also in reality sets in exactly the same way (in fact, functions are speical cases of relations), but we usually write $2\leq 3$ instead of $(2, 3)\in \leq$. – Arthur Mar 24 '17 at 13:05
  • 1
    I did not know that relations like less than or equal to could be written like that. That is really cool to me. Thank you for your opinion. – Will Mar 24 '17 at 13:10
  • In a logic context, there are no sets. Instead there are sorts, though often one is working in a single-sorted context so it's not necessary to mention them. At any rate, you have function symbols and relations. If you have equality, then every function symbol gives rise to a relation via $F(a,b)\Leftrightarrow(f(a)=b)$. Given a relation satisfying $\forall a.\exists! b.F(a,b)$, we may not have a corresponding function symbol though we can introduce one via Skolemization. But relations and function symbols are not even the same kind of thing. – Derek Elkins left SE Mar 24 '17 at 13:53
  • That's also because some authors prefer to define functions as triples $f = (F, A, B)$ to make a distinction between function that have the same graph but not the same codomain. Now you can always recover the domain from the graph (indeed a function is "defined everywhere", so knowing $F$, one has $A = {a \mid \exists b, (a, b)\in F}$ (which is a set with the replacement axiom scheme), but not the codomain. For instance, some will say that $f: \mathbb{N} \to \mathbb{N}$ defined by $f(n) = n+1$, and $g: \mathbb{N}\to \mathbb{R}$ defined similarly have the same graph, but aren't the same. – Maxime Ramzi Mar 24 '17 at 14:09
  • This distinction between a function and its graph makes more sense if you look at it from a category theoretic point of view, where given an arrow you must be able to specify its codomain, thus if (with the notations of my previous comment) one had $f=g$, then one would have $cod(f) = cod(g)$, which is not what we want (and any function would be surjective, which is something we don't want) – Maxime Ramzi Mar 24 '17 at 14:11
  • Would it make sense if you saw {(fred,wilma)(barney,betty)(pebbles,dino)(bambam, dino)}:{fred,barney,pebbles,bambam}$\rightarrow$ {wilma,betty,dino}? Would it be intuitive what it meant? F = {(fred,wilma)(barney,betty)(pebbles,dino)(bambam, dino)} is a function and it is the same function as f:{fred,barney,pebbles,bambam}$\rightarrow$ {wilma,betty,dino} where f(fred)=wilma, f(barney) = ... etc. But I think notation and conception wise it is confusing. On the other hand, I wouldn't say "all" books follow your convention. – fleablood Mar 24 '17 at 16:16
  • " Is it okay if I label F(1)=2 and F(2)=4 as well?" Well, you can label anything you want and you could define {(1,2)(2,4)}(1)= 2 by saying "If A is a set of order pairs then A(x) = is the second term of the pair if the set whose first term is x" but then the "A" in "A(x)" is no longer representing the set A but some funny manipulation of the set A and the item x. So, I'd say, no, you can't do that. So I think that is your answer. F is the function as a subset of ordered pairs. f is a manipulation to extract values from the set F dependent upon other values. Different things/concepts. – fleablood Mar 24 '17 at 16:24
  • 3
    @fleablood You could say that $A(x)$ is shorthand for $\iota y.(x,y)\in A$ where $\iota$ is definite description. I think most mathematicians would simply say the whole expression $A(x)=y$ is short for $(x,y)\in A$. Taking this too seriously, though, would require a whole calculus for such shorthands. I suspect many mathematicians would flounder if asked what $f(x)$ means precisely in ZF. There are no ground terms in typical axiomatizations of ZF. – Derek Elkins left SE Mar 25 '17 at 01:40

2 Answers2

0

With the language of set theory, we start with the standard definition of a relation $A$ as a set of ordere pairs:

$A \text { is a relation } \leftrightarrow \forall x \ ( x \in A \to \exists y \ \exists z \ (x= \langle y,z \rangle))$.

Then we define what is a function:

$f \text { is a function } \leftrightarrow f \text { is a relation and } \forall x \ \forall y \ \forall z \ ((\langle x, y \rangle \in f \land \langle x, z \rangle \in f) \to y=z)$.

At this point, we need a new definition:

$f(x)=y \leftrightarrow [\exists ! z \ (\langle x, z \rangle \in f) \land \langle x, y \rangle \in f ]$.

-1

I disagree with the premise that a function is a set. Any function can be expressed as a set, surely, but not every set is a function (actually, most sets are not). Not even the Cartesian product of two sets is a good description of a function, since $A\times B$ will connect several elements of $B$ to the same $A$.

Is a number the same as a sequence?

Similarly, you could claim that a sequence is the same as a number. It's true: Any number can be described by a sequence (infinitely many sequences even), but not every sequence describes a number in this sense. And in the end, with a sequence you can do many things that make no sense with numbers - for example take out individual elements.

The same way, many things that make sense for sets (for example taking their complement) do not make sense for functions when used as sets.

Different ways to look at the same thing

In mathematics, there are often many ways to look at the same thing. A function can be viewed as a set, indeed. It can also be viewed as an infinite-dimensional vector. It can be viewed as an algorithm, a process to produce a result.

The thing is, a function is something rather specific. When you say "let $f$ be a function", you equip $f$ with every part of what defines a function. Saying "let $f$ be a set" or "let $f$ be a vector" would not provide every part, so you would need to go on with "also make sure that $f$ does not combine one element of $B$ to more than one element in $A$", etc.

And as functions play a very important role in mathematics, they got their own name, and a usual notation. Like, for example, an ordinary vector in $\mathbb R^n$, which is of course also a finite sequence, or a function $\{1, 2, ..., n\} \rightarrow \mathbb R$, or, by your definition, a set $\{1, 2, ..., n\} \times\mathbb R$, but when you say "vector in $\mathbb R^n$, everything about it is said.

Similarly, calling $f(x)$ a function is just a way of saying "You know, the kind of set over $A \times B$ where every $B$ has only one partner in $A$, or the kind of vector, that may have infinitely many entries and the index is given by $x$." When you call it a function, everything relevant is said.

Which way is the right one?

Knowing other ways of looking at it (as a set, as a possibly infinite-dimensional vector, as the limit of a series of other functions, or as the result of an algorithm for example) is excellent in certain applications, but I do not suggest taking one particular interpretation as the ultimate one, because for example your set-interpretation would make it very difficult indeed to come up with a notation like $f(x)$, with continuity, derivatives, or adding two functions.

It is often very easy to see what makes up a function from $A$ to $B$, but it is difficult to see when all you have is a bunch of $(a,b)$ tuples.

user7418923
  • 139
  • 4
  • 1
    "I disagree with the premise that a function is a set". No, you do not, at least not according to what the rest of this answer says. You disagree that all sets are functions, but nobody claimed that this was the case. – Tobias Kildetoft Mar 25 '17 at 17:50
  • @Tobias Kildetoft: I disagree with the premise that a function is a set, or more precisely, that functions are sets. I said they can be described as one. That's, in my view, a big difference. But if you will, you can also talk about semantics. A function is not a set, unless you specify rather broadly what "is" means. Given the set $A$, you wouldn't know what $A(x)$ or $\mathrm{d}A/\mathrm{d}x$ is. A set is a concept different from that of a function. There is a conceivable transformation between the two, pointed out by the question, but others exist as well. – user7418923 Mar 25 '17 at 18:43
  • 1
    If you work in ZFC, a function really is a set. If you don't, then you need to specify what system you are then working in. You might disagree with the usefulness of considering functions as sets, but in the most used setting of math, they really are sets. – Tobias Kildetoft Mar 25 '17 at 18:45
  • I don't disagree with the usefulness at all. It is useful to consider functions as sets. It is useful to consider them as vectors. But the "set" view is one view of a function, useful sometimes, not-so-useful other times; so is the "vector" view. It depends. ZFC is the most common setting with regard to set theory. And it can express functions. But its view of what defines a function draws on the original concept. Either way, what I stated is my view, and my understanding. I didn't mean to keep you from answering the above question in any way you consider fit, any time you consider fit. – user7418923 Mar 25 '17 at 22:30