Mathematical Foundations of Computer Science
Problem 2. (20 points) Let X, Y, Z be any three nonempty sets and let g : Y → Z be any function. Define the function, Lg : Y X → Z , (Lg, as a reminder that we compose with g on the left), by Lg(f) = g ◦ f, for every function, f : X → Y . (a) Prove that if Y = Z and g = idY , then LidY (f) = f, for all f : X → Y . Let T be another nonempty set and let h : Z → T be any function. Prove that Lh◦g = Lh ◦ Lg. (b) Use (a) to prove that if g is injective, then Lg : Y X → Z is also injective and if g is surjective, then Lg : Y X → Z is also surjective.