If a function is a set of ordered pairs, it defines its own proper domain and codomain.
f determines
- A;
- a minimal B.
If we extend B, do we have a different function?
If a function is a set of ordered pairs, it defines its own proper domain and codomain.
f determines
If we extend B, do we have a different function?
Often you can find the definition that a function $f : A \to B$ is a subset of $A \times B$ such that for all $a \in A$ there is a unique $b \in B$ such that $(a,b) \in f$ (which is written as $b=f(a)$). Thus, if $B \subseteq C$, then $f$ is also a function $f : A \to C$. But often, it is very useful (especially in category theory, but also in order to define basic notions such as surjectivity or bijectivity) to be able to recover the codomain of a function. One then defines a function $f : A \to B$ to be a triple $(A,B,f)$, where $A,B$ are sets and $f \subseteq A \times B$ is a subset with the already mentioned property. This definition has many advantages and I think that nowadays it has become the standard definition (outside of set theory). If $f : A \to B$ is a function and $B \subset C$, then $f$ is not a function $A \to C$. Rather, we consider the inclusion function $i : B \to C$ any may compose to get $i \circ f : A \to C$.
Here is a quote from Wikipedia which supports this:
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.
Related: math.SE/651464
Yes, you get a different function.
It is not really clear to me, what you mean by "redundant" when you say that $A$ and $B$ are redundant in $f:A\to B$. One way to define a function is to define its graph, i.e. the set $(x,f(x))$. But to do so, you need to say where the set of pairs $(x,f(x))$ lie. In other words, the definition of a function consists of the specification of two sets $A$, $B$ and a suitable subset of $A\times B$. (Please do not jump of the verb "specify"; one could define functions also recursively or work with functions with a proper "specification" of the graph, but anyway, the graph lies in a product space and one has to say what the factors are.) In other words, the definition of a function consists of $A$, $B$ and $\mathrm{gr}(f)\subset A\times B$.
The benefit of having domain and codomain explicitly seen in the definition can be seen if you have functions like the derivation, which takes a function (say on the reals) and gives back the derivation of this function. This function has very different properties when domain and codomain change (e.g. you can extend the domain beyond the set of continuously differentiable function when you adapt the codomain properly, for example). I a similar vein, one can consider extension of linear operators on Banach spaces to larger spaces, and so on.
The answer is, "it depends on your conventions". There are two very common conventions in mathematics, which I will summarize as:
F-SET: A function "is" a set of ordered pairs in which no two pairs have the same first element.
F-TRIPLE: A function "is" a triple $(A, B, \Gamma)$ where $\Gamma \subseteq A \times B$ and every element of $A$ occurs as the first element of exactly one pair in $\Gamma$.
These two conventions lead to the same mathematics but they require different language to describe it. For example, the two conventions give different meanings to the notation "$f\colon A \to B$".
In the F-TRIPLE convention, the notation "$f\colon A \to B$" just means $(A,B,\Gamma_f)$ is a function (in the sense of F-TRIPLE). In the F-SET convention, the notation "$f\colon A \to B$" means $\Gamma_f$ is a function (as in F-SET), and it is defined for every element of $A$, and every element of $A$ is sent to an element of $B$ - in this convention the latter two properties are viewed as additional properties beyond being "a function". But, as you can see, there is not much mathematical difference between these conventions - in the end "$f\colon A \to B$"" has the same fundamental meaning, it's just that the meaning is built up in a different way.
For another example, suppose I want to construct a function $f \colon A \to B$. In the F-SET convention, this means I need to prove that $f$ is a function (a set of ordered pairs), and I need to prove that $f$ is "total" - it is defined for every element of $A$ - and I need to prove that $f(x) \in B$ for all $x \in A$. Notice that this is exactly the same as what I would need to prove if I wanted to prove that $f$ gives me a function in the sense of F-TRIPLE. (An F-SET function from $A$ to $B$ might have some "extra" ordered pairs, but if I am working with $A$ I can just ignore them, or I can just remove them.)
The same thing happens everywhere: I can do exactly the same things with F-SET functions and F-TRIPLE functions, I just have to phrase what I am doing slightly differently depending on the convention that I use for functions.
In some sense, terminology doesn't matter, because we can always talk around it. But good terminology for a particular setting can make the proofs in that setting easier to read and more elegant. There are many settings where the F-TRIPLE definition does that. It lets us talk about whether a function itself is surjective, and it allows us to avoid ever having to use the word "total". But it can make other things linguistically more difficult - composing functions can require tedious fiddling with codomains.
The F-SET definition gives us a lot of freedom to construct functions - we can directly compose any two functions, or we can take the intersection of two functions. We will still have to verify the domain of the resulting function contains what we want it to contain, of course.
Technically speaking, yes. If you are very strict in your definitions, then $$f:[0,1]\to[0,1]\\ f: x\mapsto x^2$$
is not the same function as $$g:[0,1]\to[0,2]\\g:x\mapsto x^2$$
Yes, if you wish to explicitly write out the list of ordered pairs. However, this is usually not possible. So, to take for example the function given by 5xum,
$f(x)=x^2$, how am I supposed to know the domain? Lets say I want the domain to be the unit interval as above, $[0,1]$. Then to list it as a set of ordered pairs, I need to write it as $f=\{(x,x^2)|x\in [0,1]\}$ as a minimal representation. This isn't exactly much shorter/less redundant than $f(x)=x^2,f:[0,1]\to [0,1]$.
What's more, there's a lot of theorems and other useful things that apply to, for instance, all real valued functions. Hence, it's often more useful to say $f(x):[0,1]\to \mathbb R$, even if the codomain isn't all of $\mathbb R$.
Finally, with the 'standard' notation, we can speak of restricted domains easily. So every mathematician knows when I talk about the real valued function $f(x)=x^2$, we're going from $\mathbb R$ to $\mathbb R$, and then when I restrict the domain to $[0,1]$, we have our usual notation.
In short, writing everything as sets of ordered pairs does not really shorten anything, does not add to clarity or ease of use, and should only be done by set theorists :).
This is to explain my motivation for asking the question.
An analogy
A programming language I am fond of (look me up if you're interested) has a small library of algorithms that defines a graph as having
Without much trouble, I rewrote the library to do without the set of nodes, defining a graph as a mapping only, removing much clutter and some time-wasting.
Similar examples abound in computer science. For example, a (binary) deterministic finite automaton is defined as
The transition function determines both the states and the inputs. Yet the theory requires them though they are redundant both in theory and in practice.