定义 函数复合 [00G1]
定义 函数复合 [00G1]
给定函数 \(f:X\to Y\) 与 \(g:Y\to Z\),复合是 \(g\circ f:X\to Z\),定义为 \((g\circ f)(x)=g(f(x))\)。写在右边的函数先应用。恒等函数 \(\operatorname {id}_X\) 把 \(x\) 送到自身。
对可复合的 \(f,g,h\),有 \(h\circ (g\circ f)=(h\circ g)\circ f\),因为两边在 \(x\) 处都等于 \(h(g(f(x)))\);且 \(f\circ \operatorname {id}_X=f=\operatorname {id}_Y\circ f\)。双射的逆满足 \(f^{-1}\circ f=\operatorname {id}_X\) 与 \(f\circ f^{-1}=\operatorname {id}_Y\)。
上述逐点验证使用集合论的函数外延原则:定义域与陪域相同的两个函数相等,当且仅当它们在每个输入处取值相等。单位律的两边在任意 \(x\in X\) 处都取值 \(f(x)\)。