1導入
合成写像で重要なのは、写像を操作として読むことである。f:A\to B は A の元を B の元へ送る操作であり、g:B\to C はその結果をさらに C へ送る操作である。この 2 つを続けて行うのが合成写像である。
逆写像は、操作を元に戻す操作である。ただし、戻すためには、入力が潰れておらず、出力側に余りもないことが必要である。この条件が全単射である。
合成では順序が重要で、先に適用した写像の終域が、次の写像の定義域に合う必要がある。逆写像は、この移動をすべての入力と出力で戻せるときにだけ存在する。
1Introduction
The key to a composite map is to read a map写像しゃぞう as an operation. A map f:A\to B sends an element元げん of A to an element of B, and a map g:B\to C sends that result further into C. Performing these two operations in sequence is composition.
An inverse map逆写像ぎゃくしゃぞう is an operation that restores the original input. To restore inputs, no two inputs may have collapsed to the same output, and no element of the output side may be left unused. This condition is exactly bijection全単射ぜんたんしゃ.
2用語ようごと定義ていぎ
写像しゃぞうmap f:A\to B と g:B\to C が与あたえられたとき、合成写像ごうせいしゃぞうcomposite map g\circ f:A\to C を
(g\circ f)(a)=g(f(a))
で定義ていぎする。記号きごう g\circ f は、先さきに f を適用てきようし、次つぎに g を適用てきようすることを表あらわす。
集合しゅうごうset A 上うえの恒等写像こうとうしゃぞうidentity map \mathrm{id}_A:A\to A は、
\mathrm{id}_A(a)=a
で定義ていぎされる写像しゃぞうmapである。
写像しゃぞうmap f:A\to B に対たいして、写像しゃぞうmap h:B\to A が
h\circ f=\mathrm{id}_A,
\qquad
f\circ h=\mathrm{id}_B
を満みたすとき、h を f の逆写像ぎゃくしゃぞうinverse mapといい、f^{-1} と書かく。
2Terms and definitions
Given maps f:A\to B and g:B\to C, define the composite map合成写像ごうせいしゃぞう g\circ f:A\to C by
(g\circ f)(a)=g(f(a)).
The notation g\circ f means that f is applied first and g is applied second.
The identity map恒等写像こうとうしゃぞう \mathrm{id}_A:A\to A on a set A is the map defined by
\mathrm{id}_A(a)=a.
For a map f:A\to B, if a map h:B\to A satisfies
h\circ f=\mathrm{id}_A,
\qquad
f\circ h=\mathrm{id}_B,
then h is called the inverse map逆写像ぎゃくしゃぞう of f and is written f^{-1}.
3方針ほうしん
合成写像ごうせいしゃぞうcomposite mapでは、型かたを先さきに確認かくにんする。g\circ f を作つくるには、f の終域しゅういきcodomainと g の定義域ていぎいきdomainが合あっていなければならない。少すくなくとも f(A)\subseteq\mathrm{dom}(g) が必要ひつようである。
逆写像ぎゃくしゃぞうinverse mapでは、f^{-1} という記号きごうを書かく前まえに、f が全単射ぜんたんしゃbijectionであることを確認かくにんする。逆像ぎゃくぞうpreimage f^{-1}(T) は任意にんいの写像しゃぞうmapで定義ていぎできるが、逆写像ぎゃくしゃぞうinverse map f^{-1}:B\to A は全単射ぜんたんしゃbijectionでなければ存在そんざいしない。
data/lecture/math/discrete-math/写像の基本-講義.n.md
data/lecture/math/discrete-math/単射・全射・全単射-講義.n.md
3Method
For a composite map合成写像ごうせいしゃぞう, check the types first. To form g\circ f, the codomain終域しゅういき of f must match the domain定義域ていぎいき of g. At minimum, f(A)\subseteq\mathrm{dom}(g) must hold.
For an inverse map逆写像ぎゃくしゃぞう, check that f is a bijection全単射ぜんたんしゃ before writing f^{-1} as a map. A preimage逆像ぎゃくぞう f^{-1}(T) is defined for any map, but an inverse map f^{-1}:B\to A exists only when f is bijective.
data/lecture/math/discrete-math/写像の基本-講義.n.md
data/lecture/math/discrete-math/単射・全射・全単射-講義.n.md
4直感的ちょっかんてきな説明せつめい
合成写像ごうせいしゃぞうcomposite mapは、機械きかいを直列ちょくれつに接続せつぞくすることに対応たいおうする。最初さいしょの機械きかい f に入力にゅうりょくinput a を入いれると f(a) が出力しゅつりょくされる。次つぎの機械きかい g に f(a) を入いれると g(f(a)) が出力しゅつりょくされる。したがって全体ぜんたいの機械きかいは g\circ f である。
逆写像ぎゃくしゃぞうinverse mapは、機械きかいの結果けっかから入力にゅうりょくを完全かんぜんに復元ふくげんする機械きかいである。もし 2 つの入力にゅうりょくが同おなじ出力しゅつりょくへ潰つぶれていれば、出力しゅつりょくだけを見みても元もとの入力にゅうりょくを選えらべない。もし終域しゅういきcodomainに届とどかない元げんelementがあれば、その元げんelementを戻もどす入力にゅうりょくが存在そんざいしない。
合成ごうせいcompositionは矢印やじるしを左ひだりから右みぎへ連結れんけつする操作そうさであり、一般いっぱんには gcirc f と fcirc g は同おなじではない。型かたが合あわなければ、そもそも合成ごうせいは定義ていぎできない。
4Intuitive explanation
A composite map合成写像ごうせいしゃぞう is like connecting machines in series. Put an input入力にゅうりょく a into the first machine f, and the output is f(a). Put that output into the second machine g, and the output is g(f(a)). The whole machine is therefore g\circ f.
An inverse map逆写像ぎゃくしゃぞう is a machine that reconstructs the input from the result. If two inputs collapse to the same output, the output alone cannot tell which input was used. If some element of the codomain終域しゅういき is never reached, there is no input to send back from that element.
5厳密げんみつな説明せつめい:逆写像ぎゃくしゃぞうinverse mapと全単射ぜんたんしゃbijection
f:A\to B が逆写像ぎゃくしゃぞうinverse map h:B\to A を持もつとする。f(a_1)=f(a_2) なら、両辺りょうへんに h を適用てきようして
h(f(a_1))=h(f(a_2))
を得える。h\circ f=\mathrm{id}_A より a_1=a_2 である。したがって f は単射たんしゃinjectionである。
また、任意にんいの b\in B に対たいして、a=h(b) と置おくと、f(a)=f(h(b))=b である。ここで f\circ h=\mathrm{id}_B を用もちいた。したがって f は全射ぜんしゃsurjectionである。
逆ぎゃくに f が全単射ぜんたんしゃbijectionなら、任意にんいの b\in B に対たいして、f(a)=b を満みたす a\in A が存在そんざいし、しかも単射性たんしゃせいinjectivityにより一意いちいである。そこで f^{-1}(b)=a と定義ていぎできる。この一意性いちいせいがなければ、逆写像ぎゃくしゃぞうinverse mapの値あたいvalueが決きまらない。
5Rigorous explanation: inverse maps and bijections
Suppose f:A\to B has an inverse map逆写像ぎゃくしゃぞう h:B\to A. If f(a_1)=f(a_2), then applying h to both sides gives
h(f(a_1))=h(f(a_2)).
Since h\circ f=\mathrm{id}_A, we get a_1=a_2. Hence f is an injection単射たんしゃ.
Also, for any b\in B, put a=h(b). Then f(a)=f(h(b))=b by f\circ h=\mathrm{id}_B. Hence f is a surjection全射ぜんしゃ.
Conversely, if f is a bijection全単射ぜんたんしゃ, then for every b\in B there exists a\in A with f(a)=b, and injectivity単射性たんしゃせい makes this a unique. Therefore one can define f^{-1}(b)=a. Without this uniqueness, the value of the inverse map would not be determined.
6.1問題もんだい
A=\{1,2,3\}、B=\{a,b,c\} とし、f:A\to B を
f(1)=b,
\qquad
f(2)=c,
\qquad
f(3)=a
で定義ていぎする。f が全単射ぜんたんしゃbijectionであることを確認かくにんし、逆写像ぎゃくしゃぞうinverse mapを求もとめよ。
6.1Problem
Let A=\{1,2,3\} and B=\{a,b,c\}. Define f:A\to B by
f(1)=b,
\qquad
f(2)=c,
\qquad
f(3)=a.
Check that f is a bijection全単射ぜんたんしゃ and find its inverse map逆写像ぎゃくしゃぞう.
6.2解説かいせつ
f(1),f(2),f(3) はそれぞれ b,c,a であり、互たがいに異ことなる。したがって異ことなる入力にゅうりょくinputは異ことなる出力しゅつりょくoutputへ送おくられるので、f は単射たんしゃinjectionである。
また、終域しゅういきcodomain B=\{a,b,c\} の全すべての元げんelementが f の値あたいvalueとして現あらわれる。したがって f は全射ぜんしゃsurjectionである。よって f は全単射ぜんたんしゃbijectionである。
逆写像ぎゃくしゃぞうinverse mapは、矢印やじるしを逆向ぎゃくむきに読よむことで
f^{-1}(a)=3,
\qquad
f^{-1}(b)=1,
\qquad
f^{-1}(c)=2
となる。
6.2Explanation
The values f(1),f(2),f(3) are b,c,a, and they are distinct. Thus distinct inputs入力にゅうりょく are sent to distinct outputs出力しゅつりょく, so f is an injection単射たんしゃ.
Every element元げん of the codomain終域しゅういき B=\{a,b,c\} appears as a value of f. Therefore f is a surjection全射ぜんしゃ. Hence f is a bijection全単射ぜんたんしゃ.
The inverse map逆写像ぎゃくしゃぞう is obtained by reading the arrows backward:
f^{-1}(a)=3,
\qquad
f^{-1}(b)=1,
\qquad
f^{-1}(c)=2.
8証明しょうめい補足ほそく:合成ごうせいで単射たんしゃ・全射ぜんしゃが保存ほぞんされる理由りゆう
f:X\to Y、g:Y\to Z とする。f と g がともに単射たんしゃinjectiveなら、g\circ f も単射たんしゃである。
証明しょうめいする。(g\circ f)(x_1)=(g\circ f)(x_2) とする。これは g(f(x_1))=g(f(x_2)) である。g が単射たんしゃなので f(x_1)=f(x_2) である。さらに f が単射たんしゃなので x_1=x_2 である。したがって g\circ f は単射たんしゃである。
f と g がともに全射ぜんしゃsurjectiveなら、g\circ f も全射ぜんしゃである。z\in Z を任意にんいに取とる。g が全射ぜんしゃなので、ある y\in Y が存在そんざいして g(y)=z である。さらに f が全射ぜんしゃなので、ある x\in X が存在そんざいして f(x)=y である。よって (g\circ f)(x)=z である。
この二ふたつを組くみ合あわせると、全単射ぜんたんしゃbijection の合成ごうせいはまた全単射ぜんたんしゃである。逆写像ぎゃくしゃぞうが存在そんざいすることも、単射たんしゃと全射ぜんしゃが同時どうじに成なり立たつことの言いい換かえである。
8Proof supplement: why composition preserves injectivity and surjectivity
Let f:X\to Y and g:Y\to Z. If both f and g are injective単射たんしゃ, then g\circ f is injective.
To prove this, assume (g\circ f)(x_1)=(g\circ f)(x_2). This means g(f(x_1))=g(f(x_2)). Since g is injective, f(x_1)=f(x_2). Since f is injective, x_1=x_2. Therefore g\circ f is injective.
If both f and g are surjective全射ぜんしゃ, then g\circ f is surjective. Take arbitrary z\in Z. Since g is surjective, there exists y\in Y with g(y)=z. Since f is surjective, there exists x\in X with f(x)=y. Hence (g\circ f)(x)=z.
Combining these two statements, the composite of bijections全単射ぜんたんしゃ is again a bijection. The existence of an inverse map is another way to say that injectivity and surjectivity hold at the same time.