Theorem. Closure of functions under identity and composition [00KI]
- January 22, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Functions are closed under identity and composition.
Proof.
- January 22, 2024
- Jon Sterling
We have already seen in Theorem [00K8] that partial functions are closed under identity and composition. Therefore, it suffices to argue that the identity partial function is total, and that the composition of two total partial functions is total.
- We must show that for all a:A, there exists a' :A such that a\mathrel {\mathsf {id}_{A}} a'; unfolding the definition of the identity relation we may choose a' = a.
- Given f\colon A\to B and g\colon A \to C, we must check that for all a:A, there exists some c:C such that a\mathrel {{\mathopen {}\left (g\circ f\right )\mathclose {}}}c. By the definition of relational composition, we must show that there exists b:B and c:C and such that a\mathrel {f}b and b\mathrel {c}. We choose b = f{\mathopen {}\left (a\right )\mathclose {}} and c = g{\mathopen {}\left (b\right )\mathclose {}}=g{\mathopen {}\left (f{\mathopen {}\left (a\right )\mathclose {}}\right )\mathclose {}}.