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全単射ぜんたんしゃ.
Order matters in composition合成ごうせい. The codomain終域しゅういき of the first map must match the domain定義域ていぎいき of the next map. An inverse map exists only when every input-output move can be undone in both directions.
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基本法則きほんほうそく:恒等写像こうとうしゃぞうidentity mapと結合則けつごうそく
写像しゃぞうmap f:A\to B に対たいして、
\mathrm{id}_B\circ f=f,
\qquad
f\circ\mathrm{id}_A=f
が成立せいりつする。実際じっさい、任意にんいの a\in A について
(\mathrm{id}_B\circ f)(a)=\mathrm{id}_B(f(a))=f(a),
\qquad
(f\circ\mathrm{id}_A)(a)=f(\mathrm{id}_A(a))=f(a)
である。
また、f:A\to B、g:B\to C、h:C\to D に対たいして、合成ごうせいcompositionは結合則けつごうそくassociative law
h\circ(g\circ f)=(h\circ g)\circ f
を満みたす。どちらも a\in A を h(g(f(a))) へ送おくるからである。したがって、3 個こ以上いじょうの写像しゃぞうmapを合成ごうせいするとき、括弧かっこの付つけ方かたは結果けっかを変かえない。ただし、g\circ f と f\circ g のように順序じゅんじょorderを入いれ替かえることとは別べつである。
3Basic laws: identity maps恒等写像こうとうしゃぞう and associativity
For a map写像しゃぞう f:A\to B,
\mathrm{id}_B\circ f=f,
\qquad
f\circ\mathrm{id}_A=f.
Indeed, for every a\in A,
(\mathrm{id}_B\circ f)(a)=\mathrm{id}_B(f(a))=f(a),
\qquad
(f\circ\mathrm{id}_A)(a)=f(\mathrm{id}_A(a))=f(a).
For f:A\to B, g:B\to C, and h:C\to D, composition also satisfies the associative law結合則けつごうそく
h\circ(g\circ f)=(h\circ g)\circ f,
because both sides send a\in A to h(g(f(a))). Thus parentheses do not change the result when three or more maps are composed. This is different from changing the order, as in g\circ f versus f\circ g.
5直感的ちょっかんてきな説明せつめい
合成写像ごうせいしゃぞうcomposite mapは、機械きかいを直列ちょくれつに接続せつぞくすることに対応たいおうする。最初さいしょの機械きかい f に入力にゅうりょくinput a を入いれると f(a) が出力しゅつりょくされる。次つぎの機械きかい g に f(a) を入いれると g(f(a)) が出力しゅつりょくされる。したがって全体ぜんたいの機械きかいは g\circ f である。
逆写像ぎゃくしゃぞうinverse mapは、機械きかいの結果けっかから入力にゅうりょくを完全かんぜんに復元ふくげんする機械きかいである。もし 2 つの入力にゅうりょくが同おなじ出力しゅつりょくへ潰つぶれていれば、出力しゅつりょくだけを見みても元もとの入力にゅうりょくを選えらべない。もし終域しゅういきcodomainに届とどかない元げんelementがあれば、その元げんelementを戻もどす入力にゅうりょくが存在そんざいしない。
合成ごうせいcompositionは矢印やじるしを順じゅんにつなぐ操作そうさであり、一般いっぱんには g\circ f と f\circ g は同おなじではない。どちらか一方いっぽうしか型かたtypeが合あわないこともあり、型かたが合あわなければ、その合成ごうせいcompositionは定義ていぎできない。
5Intuitive 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.
Composition connects arrows in sequence. In general, g\circ f and f\circ g are not equal. Sometimes only one of them has compatible types型かた; if the types do not match, that composition is not defined.
6厳密げんみつな説明せつめい:逆写像ぎゃくしゃぞう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が決きまらない。
この定義ていぎから、任意にんいの a\in A と b\in B について
f^{-1}(f(a))=a,
\qquad
f(f^{-1}(b))=b
である。したがって f^{-1}\circ f=\mathrm{id}_A かつ f\circ f^{-1}=\mathrm{id}_B であり、構成こうせいした写像しゃぞうmapは実際じっさいに逆写像ぎゃくしゃぞうinverse mapである。
6Rigorous 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.
By this definition, for every a\in A and b\in B,
f^{-1}(f(a))=a,
\qquad
f(f^{-1}(b))=b.
Hence f^{-1}\circ f=\mathrm{id}_A and f\circ f^{-1}=\mathrm{id}_B, so the constructed map really is an inverse map.
7命題めいだい:逆写像ぎゃくしゃぞうinverse mapの一意性いちいせい
写像しゃぞうmap f:A\to B の逆写像ぎゃくしゃぞうinverse mapが存在そんざいするなら、それは一意いちいである。実際じっさい、h,k:B\to A がともに f の逆写像ぎゃくしゃぞうinverse mapなら、結合則けつごうそくassociative lawと恒等則こうとうそくidentity lawsより
h=h\circ\mathrm{id}_B
=h\circ(f\circ k)
=(h\circ f)\circ k
=\mathrm{id}_A\circ k
=k
である。この一意性いちいせいにより、逆写像ぎゃくしゃぞうinverse mapを f^{-1} と一意いちいに表あらわせる。
7Proposition: uniqueness of an inverse map逆写像ぎゃくしゃぞう
If a map写像しゃぞう f:A\to B has an inverse map逆写像ぎゃくしゃぞう, that inverse is unique. Indeed, if h,k:B\to A are both inverse maps of f, the associative law結合則けつごうそく and identity laws恒等則こうとうそく give
h=h\circ\mathrm{id}_B
=h\circ(f\circ k)
=(h\circ f)\circ k
=\mathrm{id}_A\circ k
=k.
This uniqueness justifies the unambiguous notation f^{-1}.
8.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を求もとめ、両側りょうがわの合成ごうせいcompositionが恒等写像こうとうしゃぞうidentity mapになることを確たしかめよ。
8.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全単射ぜんたんしゃ, find its inverse map逆写像ぎゃくしゃぞう, and verify that both composites are identity maps恒等写像こうとうしゃぞう.
8.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
となる。さらに x=1,2,3 のそれぞれについて f^{-1}(f(x))=x であり、y=a,b,c のそれぞれについて f(f^{-1}(y))=y である。したがって
f^{-1}\circ f=\mathrm{id}_A,
\qquad
f\circ f^{-1}=\mathrm{id}_B
が確たしかめられる。
8.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.
For each x=1,2,3, one has f^{-1}(f(x))=x, and for each y=a,b,c, one has f(f^{-1}(y))=y. Therefore
f^{-1}\circ f=\mathrm{id}_A,
\qquad
f\circ f^{-1}=\mathrm{id}_B.
10証明しょうめい補足ほそく:合成ごうせいで単射たんしゃ・全射ぜんしゃが保存ほぞんされる理由りゆう
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 の合成ごうせいはまた全単射ぜんたんしゃである。逆写像ぎゃくしゃぞうが存在そんざいすることも、単射たんしゃと全射ぜんしゃが同時どうじに成立せいりつすることの言いい換かえである。
10Proof 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.