Composition and inverse · Exercise-COMPOSITION-AND-INVERSE-018
Step-by-step solved exercise: Relations and functions
If \(\displaystyle f:M\to N\), which composition is well typed?
Composition and inverse · Exercise-COMPOSITION-AND-INVERSE-018
If \(\displaystyle f:M\to N\), which composition is well typed?
In \(\displaystyle \operatorname{id}_N\circ f\), first apply \(\displaystyle f\), which goes from \(\displaystyle M\) to \(\displaystyle N\).
Then \(\displaystyle \operatorname{id}_N\), which goes from \(\displaystyle N\) to \(\displaystyle N\), takes that result in \(\displaystyle N\).
Since \(\displaystyle \operatorname{id}_N\) leaves everything fixed, the composition returns \(\displaystyle f\).
Hence \(\displaystyle \operatorname{id}_N\circ f=f\) is the well-typed composition.
\(\displaystyle \operatorname{id}_N\circ f=f\)