跳转至

3. functions

function, map, mapping 函数,映射

A function (or map or mapping) \(f\) from a class \(A\) to a class \(B\) (written \(f:\ A \rightarrow B\)) assigns to each \(a \in A\) exactly one element \(b \in B\).

\(b\) is called the valve of the function at \(a\) or the image of \(a\) and is usually written \(f(a)\).

\(A\) is the domain of the function (sometimes written \(\mathrm{Dom} f\)) and B is the range or codomain.

Sometimes it is convenient to denote the effect of the function \(f\) on an element of \(A\) by \(a \mapsto f(a)\).

Two functions are equal if they have the same domain and range and have the same valve for element of their common domain. a

restriction 映射的限制

If \(f:A \rightarrow B\) is a function and \(S \subset A\), the function from \(S\) to \(B\) given by \(a \mapsto f(a),\ \mathrm{for}\ a \in S\) is called the restriction of \(f\) to \(S\) and is denoted \(f|S:S \rightarrow B\).

identity function 恒等函数

If \(A\) is any class, the identity function on \(A\) (denoted \(1_A:A \rightarrow A\)) is the function given by \(a \mapsto a\).

If \(S \subset A\), the function \(1_A|S:S \rightarrow A\) is called the inclusion map of \(S\) into \(A\).

composite 复合函数

Let \(f:A \rightarrow B\) and \(g: B \rightarrow C\) be functions. The composite of \(f\) and \(g\) is the function \(A \rightarrow C\) given by \(a \mapsto g(f(a)),\ a \in A\).

The composite function is denoted \(g \circ f\) or simply \(gf\).

If \(h: C \rightarrow D\) is a third function, it is easy to verift that \(h(gf)=(hg)f\)

函数的复合满足结合律

If \(f:A \rightarrow B\),then \(f \circ 1_A = f = 1_B \circ f : A \rightarrow B\)

image 函数的像

Let \(f: A \rightarrow B\) be a function. If \(S \subset A\), the image of \(S\) under \(f\) (denoted \(f(S)\)) is the class \(\{b \in B | b=f(a)\ \mathrm{for\ some}\ a \in S\}\)

The class \(f(A)\) is called the image of \(f\) and is sometimes denoted \(\mathrm{Im} f\).

If \(T \subset B\), the inverse image of \(T\) under \(f\) (denoted \(f^{-1}(T)\)) is the class \(\{a \in A|f(a) \in T\}\). If \(T\) consists of a single element, \(T=\{b\}\), we write \(f^{-1}(b)\) in place of \(f^{-1}(T)\).

some facts of image 函数的像相关结论

\[ \mathrm{for}\ S \subset A,f^{-1}(f(S)) \supset S \tag{5} \label{ref5} \]
\[ \mathrm{for}\ T \subset B,f(f^{-1}(T)) \subset T \tag{6} \label{ref6} \]

For any family \(\{T_i | i \in I\}\) of subsets of \(B\),

\[ f^{-1}(\bigcup_{i \in I}T_i)=\bigcup_{i \in I}f^{-1}(T_i) \tag{7} \label{ref7} \]
\[ f^{-1}(\bigcap_{i \in I}T_i)=\bigcap_{i \in I}f^{-1}(T_i) \tag{8} \label{ref8} \]

injective, surjective, bijective 单射,满射,双射

A function \(f:A \rightarrow B\) is said to be injective (or one-to-one) provided \(\mathrm{for\ all\ }a,a' \in A, a\not=a'\Rightarrow f(a)\not=f(a')\).

Alternatively, \(f\) is injective if and only if \(\mathrm{for\ all\ }a,a' \in A, f(a)=f(a')\Rightarrow a=a'\).

A function is surjective (or onto) provided \(f(A)=B\); in other words, \(\mathrm{for\ each\ }b \in B,b=f(a),\ \mathrm{for\ some\ }a\in A\)

A function \(f\) is said to be bijective (or a bijection or a on-to-one correspondence) if it is both injective and surjective.

For any class \(A\), the identity map \(1_A:A\rightarrow A\) is bijective.

恒等函数均为双射函数。

some facts of injective, surjective and bijective 单射满射双射相关结论

For maps \(f:A\rightarrow B\) and \(g:B\rightarrow C\),

\[ f\ \mathrm{and}\ g\ \mathrm{injective} \Rightarrow gf\ \mathrm{is\ injective} \tag{9} \label{ref9} \]
\[ f\ \mathrm{and}\ g\ \mathrm{surjective} \Rightarrow gf\ \mathrm{is\ surjective} \tag{10} \label{ref10} \]
\[ gf\ \mathrm{injective} \Rightarrow f\ \mathrm{is\ injective} \tag{11} \label{ref11} \]
\[ gf\ \mathrm{surjective} \Rightarrow g\ \mathrm{is\ surjective} \tag{12} \label{ref12} \]

Theorem 3.1 逆映射

Let \(f:A\rightarrow B\) be a function, with \(A\) nonempty.

  1. \(f\) is injective if and only if there is a map \(g:B\rightarrow A\) such that \(gf=1_A\).
  2. If \(A\) is a set, then \(f\) is surjective if and only if there a map \(h:B\rightarrow A\) such that \(fh=1_B\).
Proof

\((\Leftarrow)\)

由恒等函数皆双射,\(\eqref{ref11}\)\(\eqref{ref12}\) 知必要性成立。

\((\Rightarrow)\)

  1. \(f\) 为单射,则对于任意 \(b \in f(A)\) 总存在唯一的 \(a \in A\) 使得 \(f(a)=b\).

    选择一确定的 \(a_0 \in A\),定义映射 \(g:B \rightarrow A\) 如下:

    \[ g(b)= \left\{ \begin{aligned} a\ &\ \mathrm{if}\ b\in f(A)\ \mathrm{and}\ f(a)=b \\ a_0 &\ \mathrm{if}\ b\not\in f(A) \end{aligned} \right. \]

    显然有 \(gf=1_A\)

  2. \(f\) 为满射,故对于任意 \(b \in B\) 都有非空集 \(f^{-1}(B)\subset A\).

    对每个 \(b \in B\) 选择一个 \(a_b \in f^{-1}(b)\),则映射 \(h: B\rightarrow A,h(b)=a_b\) 满足 \(fh=1_B\)

The map \(g\) is called a left inverse of \(f\) and \(g\) is called a right inverse of \(f\).

If a map \(f:A \rightarrow B\) has both a left inverse \(g\) and a right inverse \(h\), then \(g=g1_B=g(fh)=(gf)h=1_Ah=h\), and the map \(g=h\) is called a two-sided inverse of \(f\).

The two-sided inverse is unique.

双侧逆映射唯一

\[ \mathrm{If}\ A\ \mathrm{is\ a\ set\ and}\ f:A\rightarrow B\ \mathrm{a\ function,\ then}\ f\ \mathrm{is\ bijective}\ \Leftrightarrow f\ \mathrm{has\ a\ two-sided\ inverse.} \tag{13} \label{ref13} \]

The unique two-sided inverse of a bijective \(f\) is denoted \(f^{-1}\), \(f\) is a two-sided inverse of \(f^{-1}\) so that \(f^{-1}\) is also a bijective.