s
Section 5.4 Functions
383
The association itself is described by 5(x, g (x)) 0 g(x) = x
3
6, or simply g (x) = x
3
.
This set includes (2, 8), (1, 1), (−1,−1), but because it is an infinite set, we cannot
list all its members; we have to describe them.
From the above examples, we can conclude that there are three parts to a
function: (1) a set of starting values, (2) a set from which associated values come,
and (3) the association itself. The set of starting values is called the domain of the
function, and the set from which associated values come is called the codomain
of the function. Thus both the domain and codomain represent pools from which
values may be chosen. (This usage is consistent with our use of the word domain
when discussing predicate wffs in Section 1.2. There the domain of an interpretation is a pool of values that variables can assume and to which constant symbols
may be assigned. Similarly, the domain D i of an attribute A i in a database relation,
discussed in Section 5.3, is a pool of potential values for the attribute.)
The picture for an arbitrary function f is shown in Figure 5.15. Here f is a
function from S to T, symbolized f : S S T . S is the domain and T is the codomain. The association itself is a set of ordered pairs, each of the form (s, t) where
s [ S, t [ T , and t is the value from T that the function associates with the value
s from S; t = f (s). Hence, the association is a subset of S × T (a binary relation
from S to T). But the important property of this relation is that every member of
S must have one and only one T value associated with it, so every s [ S will appear exactly once as the first component of an (s, t) pair. (This property does not
prevent a given T value from appearing more than once.)
Domain S
Codomain T
f(s) = t
f
s
We are now ready for the formal definition of a function.
Figure 5.15
DefInItIonS teRMinology FoR FunctionS
Let S and T be sets. A function (mapping) f from S to T, f : S S T , is a subset of
S × T where each member of S appears exactly once as the first component of
an ordered pair. S is the domain and T is the codomain of the function. If (s, t)
belongs to the function, then t is denoted by f (s); t is the image of s under
f, s is a preimage of t under f, and f is said to map s to t. For A # S, f (A) denotes
5 f (a) 0 a [ A6.
A function from S to T is a subset of S × T with certain restrictions on the
ordered pairs it contains. That is why we spoke of a function as a special kind of
binary relation. By the definition of a function, a binary relation that is one-tomany (or many-to-many) cannot be a function. Also, each member of S must be
used as a first component.
We have talked a lot about values from the sets S and T, but as our example
of salary increases shows, these values are not necessarily numbers, nor is the association itself necessarily described by an equation.
Précédent

- 400/986

Suivant