集合$X,Y$に対して,直積$X\times Y$の部分集合を$X$から$Y$への($2$項)関係という.また,$X$から$Y$への関係全体のなす集合を$\rel(X,Y)$で表わす:
$$
\rel(X,Y) \coloneqq \mathcal{P}(X \times Y).$$
集合$X$に対して,関係
$$
\Delta_{X} \coloneqq \{(x,x') \in X \times X \mid x=x'\} \in \rel(X,X)$$
を$X$上の等号関係という.
関係$R \in \rel(X,Y)$に対して,関係
$$
R^{\top} \coloneqq \{(y,x) \in Y \times X \mid (x,y) \in R\} \in \rel(Y,X)$$
を$R$の転置という.
明らかに$(R^{\top})^{\top} = R$が成り立つ.
関係$R \in \rel(X,Y),\, S \in \rel(Y,Z)$に対して,関係
$$
RS \coloneqq \{(x,z) \in X \times Z \mid \exists\,y \in Y,\ (x,y) \in R,\ (y,z) \in S\} \in \rel(X,Z)$$
を$R$と$S$との合成という.
明らかに$\Delta_{X}R = R = R\Delta_{Y}$が成り立つ.
任意の関係$R \in \rel(X,Y),\, S \in \rel(Y,Z)$に対して
$$
(RS)^{\top} = S^{\top}R^{\top} \in \rel(Z,X)$$
が成り立つ:
\begin{align}
(z,x) \in (RS)^{\top}
&\iff (x,z) \in RS \\
&\iff \exists\,y \in Y,\ (x,y) \in R,\ (y,z) \in S \\
&\iff \exists\,y \in Y,\ (z,y) \in S^{\top},\ (y,x) \in R^{\top} \\
&\iff (z,x) \in S^{\top}R^{\top}.
\end{align}
$R,R' \in \rel(X,Y),\,S,S' \in \rel(Y,Z)$とする.このとき,
$$
R \subset R',\ S \subset S' \implies RS \subset R'S'$$
が成り立つ:
$$
(x,z) \in RS \iff \exists\,y \in Y,\ (x,y) \in R,\ (y,z) \in S \implies \exists\,y \in Y,\ (x,y) \in R',\ (y,z) \in S' \iff (x,z) \in R'S'.$$
任意の関係$R \in \rel(X,Y),\, S \in \rel(Y,Z),\, T \in \rel(Z,W)$に対して
$$
R(ST) = (RS)T \in \rel(X,W)$$
が成り立つ:
\begin{align}
(x,w) \in R(ST)
&\iff \exists\, y \in Y,\ (x,y) \in R,\ (y,w) \in ST \\
&\iff \exists\,y \in Y,\ \exists\,z \in Z,\ (x,y) \in R,\ (y,z) \in S,\ (z,w) \in T \\
&\iff \exists\, z \in Z,\ (x,z) \in RS,\ (z,w) \in T \\
&\iff (x,w) \in (RS)T.
\end{align}
$X,Y$を集合とする.関係$F \in \rel(X,Y)$が
$$
\Delta_{X} \subset FF^{\top},\ F^{\top}F \subset \Delta_{Y}$$
を満たすとき,組$f=(F,X,Y)$を始域$X$から終域$Y$への写像といい,$F$をそのグラフという.写像$f$の始域が$X$であり終域が$Y$であることを$f \colon X \to Y$で表わす.また,$X$から$Y$への写像全体のなす集合を$\map(X,Y)$で表わす.
$f = (F,X,Y)$を写像とする.このとき,任意の$x \in X$に対して,$y\in Y$であって$(x,y) \in F$なるものがただ一つ存在する:実際,
そこで,この$y$を$f(x)$で表わす:
$$
f(x)=y \iff (x,y) \in F.$$
また,$f(x)=y$であることを$f\colon x \mapsto y$で表わす.
写像$\id_{X} \coloneqq (\Delta_{X},X,X)$を$X$上の恒等写像という:
$$
\id_{X}(x)=x.$$
写像$\varnothing_{Y} \coloneqq (\varnothing,\varnothing,Y)$を空写像という.
部分集合$A \subset X$に対して,写像
$$
\chi_{A} \coloneqq ((A \times \{1\}) \cup ((X \smallsetminus A) \times \{0\}),X,\{0,1\})$$
を$A$の指示函数という:
$$
\chi_{A}(x) = \begin{dcases}
1 & x \in A,\\
0 & x \notin A.
\end{dcases}$$
$f=(F,X,Y),\,g=(G,X,Y)$を写像とする.このとき次は同値である:
$$ f(x)=y \iff (x,y) \in F \iff (x,y) \in G \iff g(x)=y.$$
$$ (x,y) \in F \iff f(x)=y \iff g(x)=y \iff (x,y) \in G.$$
$f=(F,X,Y),\, g=(G,Y,Z)$を写像とする.このとき,合成$FG$は$X$から$Z$への写像を定める(cf. id,compo-inv,compo-monotone,compo-assc):
写像$g \circ f \coloneqq (FG,X,Z)$を$f$と$g$との合成写像という.任意の$x \in X$に対して,
$$
\exists\,z \in Z,\ (x,z) \in FG \quad\leadsto\quad \exists\,y \in Y,\ (x,y) \in F,\ (y,z) \in G$$
より,
$$
(g \circ f)(x) = z = g(y) = g(f(x))$$
が成り立つ.
任意の写像$f \colon X \to Y$に対して
$$
f \circ \id_{X} = f = \id_{Y} \circ f$$
が成り立つ(cf. id).
任意の写像$f \colon X \to Y,\, g \colon Y \to Z,\, h \colon Z \to W$に対して
$$
h \circ (g \circ f) = (h \circ g) \circ f$$
が成り立つ(cf. compo-assc).
写像$f \colon X \to Y$に対して,写像$g \colon Y \to X$であって
$$
g \circ f = \id_{X},\ f \circ g = \id_{Y}$$
を満たすものが存在するとき,$f$を可逆写像といい,$g$を$f$の逆写像という.
逆写像は存在すれば一意である:実際,$g,h$が$f$の逆写像であるとすると,
$$
g = g \circ \id_{Y} = g \circ (f \circ h) = (g \circ f) \circ h = \id_{X} \circ h = h$$
が成り立つ.そこで可逆写像$f$に対してその逆写像を$f^{-1}$で表わす:
$$
f(x)=y \iff x=f^{-1}(y).$$
可逆写像$f$の逆写像もまた可逆であり
$$
(f^{-1})^{-1}=f$$
が成り立つ.
写像$f \colon X \to Y,\,g \colon Y \to Z$が可逆ならば,合成写像$g \circ f \colon X \to Z$も可逆であって
$$
(g \circ f)^{-1} = f^{-1} \circ g^{-1}$$
が成り立つ:実際,$h \coloneqq f^{-1} \circ g^{-1}$とおくと,
\begin{align}
h \circ (g \circ f) &= (h \circ g) \circ f = (f^{-1} \circ (g^{-1} \circ g)) \circ f = (f^{-1} \circ \id_{Y}) \circ f = f^{-1} \circ f = \id_{X};\\
(g \circ f) \circ h &= g \circ (f \circ h) = g \circ ((f \circ f^{-1}) \circ g^{-1}) = g \circ (\id_{Y} \circ g^{-1}) = g \circ g^{-1} = \id_{Z};
\end{align}
が成り立つので,逆写像の一意性より結論を得る.
$f=(F,X,Y)$を写像とし,$A \subset X$とする.このとき,関係
$$
F|_{A} \coloneqq F \cap (A \times Y)$$
は$A$から$Y$への写像を定める:
写像$f|_{A} \coloneqq (F|_{A},A,Y)$を$f$の$A$への制限という.
$f=(F,X,Y)$を写像とし,$B \subset Y$とする.このとき,
$$
f_{*}(X) \coloneqq \{y \in Y \mid (y,y) \in F^{\top}F\}=\{y \in Y \mid \exists\,x \in X,\ f(x)=y\} \subset B$$
が成り立つならば,$F \subset X \times B$であるから,関係$F \in \rel(X,B)$は$X$から$B$への写像を定める:
写像$f|^{B} \coloneqq (F,X,B)$を$f$の$B$への(余)制限という.
終域を重視しない立場では,$f|^{B}$と$f$とを区別しない(cf. eq).
$A \subset X, B \subset Y$とする.写像$f \colon X \to Y$が$(f|_{A})_{*}(A) \subset B$を満たすとき,
$$
f|_{A}^{B} \coloneqq (f|_{A})|^{B} \colon A \to B$$
とおく.
$f=(F,X,Y)$を写像とする.
任意の写像$f \colon X \to Y$に対して,$f_{*}(X) \subset Y$への余制限
$$
f|^{f_{*}(X)} \colon X \to f_{*}(X)$$
は全射である.
空写像$\varnothing_{Y} \colon \varnothing \to Y$は単射であり,$Y=\varnothing$ならば全射でもある.
写像$f=(F,X,Y)$が全射であるためには,任意の写像$g=(G,Y,Z),\, h=(H,Y,Z)$に対して
$$
g \circ f = h \circ f \implies g=h$$
が成り立つことが必要かつ十分である.
$$ FG=FH \implies G = \Delta_{Y}G = (F^{\top}F)G = F^{\top}(FG) = F^{\top}(FH) = (F^{\top}F)H = \Delta_{Y}H = H.$$
対偶を示す.そこで$f$が全射でないとして$b \in Y \smallsetminus f_{*}(X)$を取る.このとき,
$$
\forall\,x \in X,\ (\chi_{f_{*}(X)} \circ f)(x) = 1 = (\chi_{Y} \circ f)(x) \quad\leadsto\quad \chi_{f_{*}(X)} \circ f = \chi_{Y} \circ f$$
が成り立つが,
$$
\chi_{f_{*}(X)}(b) = 0 \neq 1 = \chi_{Y}(b) \quad\leadsto\quad \chi_{f_{*}(X)} \neq \chi_{Y}$$
となる.
任意の写像$f \colon X \to Y,\,g \colon Y \to Z$に対して,次が成り立つ:
写像$f \colon X \to Y$について,次は同値である:
$f$の全射性より
$$
\forall\,y \in Y,\ f^{*}(y) \coloneqq \{x \in X \mid f(x)=y\} \neq \varnothing$$
であるから,写像$c \colon Y \to X$であって$c(y) \in f^{*}(y)$なるものが存在する(cf. ac).そこで$s \coloneqq c$とおけば,任意の$y \in Y$に対して
$$
(f \circ s)(y) = f(c(y)) = y = \id_{Y}(y)$$
が成り立つ.
$f \circ s = \id_{Y}$が全射なので,$f$は全射である.
写像$f=(F,X,Y)$が単射であるためには,任意の写像$g=(G,Z,X),\, h=(H,Z,X)$に対して
$$
f \circ g =f \circ h \implies g=h$$
が成り立つことが必要かつ十分である.
$$ GF=HF \implies G = G\Delta_{X} = G(FF^{\top}) = (GF)F^{\top} = (HF)F^{\top} = H(FF^{\top}) = H\Delta_{X} = H.$$
$X \neq \varnothing$としてよい(cf. empty-map).
$f(x)=f(x')$とする.このとき,写像
$$
g \coloneqq (\{0\} \times \{x\},\{0\},X),\ h \coloneqq (\{0\} \times \{x'\},\{0\},X)$$
について
$$
(f \circ g)(0) = f(x) = f(x') = (f \circ h)(0)$$
より$g=h$が成り立つので,
$$
x=g(0)=h(0)=x'$$
を得る.
任意の写像$f \colon X \to Y,\,g \colon Y \to Z$に対して,次が成り立つ:
$X \neq \varnothing$のとき,写像$f=(F,X,Y)$について,次は同値である:
$a \in X$を取り
$$
R \coloneqq F^{\top} \sqcup ((Y \smallsetminus f_{*}(X)) \times \{a\}) \in \rel(Y,X)$$
とおく.
$r \circ f = \id_{X}$が単射なので,$f$は単射である.
写像$f=(F,X,Y)$が双射であるためには,$f$が可逆写像であることが必要かつ十分である:実際,
写像$f \colon X \to Y$について,次は同値である:
$r \coloneqq s \coloneqq f^{\top}$とおけばよい.
$$ r = r \circ \id_{Y} = r \circ (f \circ s) = (r \circ f) \circ s = \id_{X} \circ s = s \quad\leadsto\quad r=s=f^{-1}.$$
任意の集合$X,Y$に対して,$\rel(X,Y)$から$\map(X,\mathcal{P}(Y))$への双射が存在する.
関係$R \in \rel(X,Y)$に対して,関係$M_{R} \in \rel(X,\mathcal{P}(Y))$を
$$
M_{R} \coloneqq \{(x,B) \in X \times \mathcal{P}(Y) \mid (x,y) \in R \iff y \in B\}$$
で定める.
よって$\mu_{R} \coloneqq (M_{R},X,\mathcal{P}(Y))$は写像であるから,写像$\mu \colon \rel(X,Y) \to \map(X,\mathcal{P}(Y))$が
$$
\mu \colon R \mapsto \mu_{R}$$
により定まる:
$$
y \in \mu_{R}(x) \iff (x,y) \in R.$$
また,写像$\rho \colon \map(X,\mathcal{P}(Y)) \to \rel(X,Y)$を
$$
\rho \colon f \mapsto \{(x,y) \mid y \in f(x)\}$$
で定める.あとは
$$
\rho\circ\mu = \id_{\rel(X,Y)},\ \mu\circ\rho=\id_{\map(X,\mathcal{P}(Y))}$$
が成り立つことを示せばよい(cf. bij-inv).
任意の写像$f=(F,X,Y)$に対して,
$$
y \in \mu_{F}(x) \iff (x,y) \in F \iff f(x)=y$$
より,
$$
\mu_{F}(x) = \{f(x)\}$$
が成り立つ.
adjで構成した双射$\mu$は次の意味で“自然”である:
選択公理
を次のように述べることができる:写像$g \colon X \to \mathcal{P}(Y)$が
$$
\forall\,x \in X,\ g(x) \neq \varnothing$$
を満たすならば,組$c \coloneqq (\rho(g),X,Y)$は写像である:
$$
\forall\,x \in X,\ (x,c(x)) \in \rho(g) \quad\leadsto\quad c(x) \in g(x).$$
実際,
指示函数を考えることで双射$\mathcal{P}(X) \to \map(X,\{0,1\})$が得られ,これによって$\mathcal{P}(X)$と$\map(X,\{0,1\})$とを同一視すると,写像
$$
\mu \colon \map(X \times Y,\{0,1\}) \to \map(X,\map(Y,\{0,1\}))$$
は
$$
\mu(f)(x) \colon y \mapsto f(x,y)$$
で与えられる(cf.
Currying
).
関係$E \in \rel(X,X)$が
$$
\Delta_{X} \cup EE \subset E=E^{\top}$$
を満たすとき,$E$を$X$上の同値関係という.
$X$上の同値関係$E \in \rel(X,X)$に対応する写像$\mu_{E} \colon X \to \mathcal{P}(X)$について,次が成り立つ:
各$x \in X$に対して,$\mu_{E}(x) \in \mathcal{P}(X)$を$x$の同値類という.したがって,$X$はいくつかの同値類の非交和として表わせる.
関係$E \in \rel(X,X)$が同値関係であるためには$E=\Ker_{\mu_{E}}$が成り立つことが必要かつ十分である:
$X$を集合とし$E \in \rel(X,X)$を同値関係とする.このとき,集合
$$
X/E \coloneqq (\mu_{E})_{*}(X) = \{A \in \mathcal{P}(X) \mid \exists\,x \in X,\ \mu_{E}(x)=A\}$$
を$X$の$E$による商集合といい,$\mu_{E}$の$X/E$への余制限$q_{E} \coloneqq \mu_{E}|^{X/E}$を商写像という:
$$
q_{E} \colon X \to X/E.$$
$E \in \rel(X,X)$を同値関係とする.このとき次は同値である(cf. equiv-ker,equiv-class):
商写像$q_{\Delta_{Y}} \colon Y \to Y/\Delta_{Y}$は双射である(cf. adj-ex):
$$
(q_{\Delta_{Y}})^{-1}(\{y\}) = y.$$
$f \colon X \to Y$とする.関係$R \in \rel(X,X), S \in \rel(Y,Y)$に対して
$$
(x,x') \in R \implies (f(x),f(x')) \in S$$
が成り立つとき,$f$は$(R,S)$と両立するという.とくに$f$が$(R,\Delta_{Y})$と両立するとき,単に$f$は$R$と両立するという.
$f=(F,X,Y)$を写像とし,$R \in \rel(X,X)$とする.このとき,$f$が$R$と両立するためには,$R \subset \Ker_{f}$が成り立つことが必要かつ十分である.また,$\Delta_{X}\subset R$なるとき,
$$
R \subset \Ker_{f} \iff RF=F$$
が成り立つ.
前半は
$$
f(x)=f(x') \iff (x,x') \in \Ker_{f}$$
よりしたがう.
$f=(F,X,Y)$を写像とし,$E \in \rel(X,X)$を同値関係とする.このとき,$f$が$E$と両立するならば,写像$\bar{f} \colon X/E \to Y$であって$\bar{f}\circ q_{E}=f$なるものがただ一つ存在する:
$$
\xymatrix{
{X} \ar[rr]^{f} \ar[dd]_{q_{E}} && {Y.} \\ \\
{X/E} \ar@{.>}[uurr]_{\bar{f}}
}$$
写像$q_{E}$の全射性より
$$
g \circ q_{E} = f \implies g \circ q_{E} = \bar{f} \circ q_{E} \implies g=\bar{f}$$
が成り立つ(cf. epi).
仮定より$EF=F=F\Delta_{Y}$であるから(cf. ref-rel),
$$
f_{*} \circ \mu_{E} = \mu_{EF} = \mu_{F\Delta_{Y}} = \mu_{\Delta_{Y}} \circ f$$
が成り立つ(cf. naturality):
$$
\xymatrix{
{X} \ar[rr]^{f} \ar[dd]_{\mu_{E}} && {Y} \ar[dd]^{\mu_{\Delta_{Y}}} \\ \\
{\mathcal{P}(X)} \ar[rr]_{f_{*}} && {\mathcal{P}(Y).}
}$$
このとき
$$
f_{*}(q_{E}(x)) = (f_{*} \circ \mu_{E})(x) = (\mu_{\Delta_{Y}} \circ f)(x) = \{f(x)\} \in Y/\Delta_{Y}$$
となるので,写像
$$
\bar{f} \coloneqq (q_{\Delta_{Y}})^{-1} \circ f_{*}|_{X/E}^{Y/\Delta_{Y}} \colon X/E \to Y$$
が定まる:
$$
\xymatrix{
{X} \ar[rr]^{f} \ar[dd]_{q_{E}} && {Y} \ar[dd]^{q_{\Delta_{Y}}} \\ \\
{X/E} \ar[rr]_{f_{*}|_{X/E}^{Y/\Delta_{Y}}} \ar@{.>}[uurr]_{\bar{f}} && {Y/\Delta_{Y}.}
}$$
さらに,任意の$x \in X$に対して
$$
(\bar{f}\circ q_{E})(x) = (q_{\Delta_{Y}})^{-1}(f_{*}(q_{E}(x))) = (q_{\Delta_{Y}})^{-1}(\{f(x)\}) = f(x)$$
が成り立つ.
存在性のよくある証明は以下の通り:関係$\bar{F} \in \rel(X/E,Y)$を
$$
\bar{F} \coloneqq \{(A,y) \in (X/E) \times Y \mid \forall\,x \in A,\ f(x)=y\}$$
で定める.
よって写像$\bar{f} \coloneqq (\bar{F},X/E,Y)$が定まる.さらに,任意の$x \in X$に対して
$$
x \in q_{E}(x) \quad\leadsto\quad (\bar{f} \circ q_{E})(x) = \bar{f}(q_{E}(x)) = f(x)$$
が成り立つ.
写像$f \colon X \to Y$が全射ならば,写像
$$
\bar{f} \colon X/\Ker_{f} \to Y$$
は双射である.
写像$f \colon X \to Y$が同値関係$E \in \rel(X,X),E' \in \rel(Y,Y)$と両立するならば,写像$\bar{f}_{(E,E')} \colon X/E \to Y/E'$であって$\bar{f}_{(E,E')} \circ q_{E} = q_{E'} \circ f$なるものがただ一つ存在する:
$$
\xymatrix{
{X} \ar[rr]^{f} \ar[dd]_{q_{E}} && {Y} \ar[dd]^{q_{E'}} \\ \\
{X/E} \ar@{.>}[rr]_{\bar{f}_{(E,E')}} && {Y/E'.}
}$$
仮定より
$$
(x,x') \in E \implies (f(x),f(x')) \in E'=\Ker_{q_{E'}} \implies q_{E'}(f(x))=q_{E'}(f(x'))$$
が成り立つ.よって$q_{E'}\circ f$は$E$と両立するので,
$$
\bar{f}_{(E,E')} \coloneqq \overline{q_{E'}\circ f} \colon X/E \to Y/E'$$
とおけばよい.
$X$を集合とし,$E,E' \in \rel(X,X)$を同値関係とする.このとき,$E \subset E'$が成り立つならば,恒等写像$\id_{X}$は$(E,E')$と両立するので,全射$q \colon X/E \to X/E'$であって$q \circ q_{E} = q_{E'}$なるものがただ一つ存在する:
$$
\xymatrix{
{X} \ar[rr]^{\id_{X}} \ar[dd]_{q_{E}} && {X} \ar[dd]^{q_{E'}} \\ \\
{X/E} \ar@{.>}[rr]_{q} && {X/E'.}
}$$
そこで,$E'/E \coloneqq \Ker_{q} \in \rel(X/E,X/E)$とおくと,これは同値関係であるから,写像
$$
\bar{q} \colon (X/E)/(E'/E) \to X/E'$$
は双射である(cf. inj-surj-quoti).
$X$を集合とする.写像$\gamma \colon I \to \mathcal{P}(X)\smallsetminus\{\varnothing\}$が
$$
X = \bigcup_{i \in I} \gamma(i)$$
を満たすとき,$\gamma$を$X$の被覆という.
$X,Y$を集合とし,$\gamma \colon I \to \mathcal{P}(X)\smallsetminus\{\varnothing\}$を$X$の被覆とする.さらに,写像
$$
f_{\bullet} \in \map\left(I,\bigcup_{i \in I}\map(\gamma(i),Y)\right),\ f_{\bullet} \colon i \mapsto f_{i} \in \map(\gamma(i),Y)$$
が
$$
\forall\,i,j \in I,\ f_{i}|_{\gamma(i) \cap \gamma(j)} = f_{j}|_{\gamma(i) \cap \gamma(j)}$$
を満たしているとする.このとき,写像$f \colon X \to Y$であって
$$
\forall\,i \in I,\ f|_{\gamma(i)}=f_{i}$$
なるものがただ一つ存在する.
$\gamma$が被覆であることからしたがう(cf. eq).