# Composition of 2 functions

by TomMe
Tags: composition, functions
 P: 51 Can anyone show me how to prove exactly that the composition of 2 function is again a function, by using the following 3 formulas? Suppose f: A -> B and g: B -> C are functions, then (1)$$\forall \ a \ \epsilon \ A : \exists ! \ b \ \epsilon \ B : (a,b) \ \epsilon \ f$$ (2)$$\forall \ b \ \epsilon \ B : \exists ! \ c \ \epsilon \ C : (b,c) \ \epsilon \ g$$. And by definition the composition of relations f and g is (3)$$g \ o \ f = \{(a,c) \ | \ \exists \ b \ \epsilon \ B : (a,b) \ \epsilon \ f \ and \ (b,c) \ \epsilon \ g \}$$. I should be getting $$\forall \ a \ \epsilon \ A : \exists ! \ c \ \epsilon \ C : (a,c) \ \epsilon \ g \ o \ f$$ but I'm not sure how to combine the givens. I can do it in words, no problem, but I'm not that good in the use of quantifiers. Thanks in advance.
 P: 51 So I can't write down $$\forall \ a \ \epsilon \ A : \exists ! \ b \ \epsilon \ B : (a,b) \ \epsilon \ f$$ and $$\forall \ b \ \epsilon \ B : \exists ! \ c \ \epsilon \ C : (b,c) \ \epsilon \ g$$ and use the laws of logic to move around some quantifiers to get $$=>$$ $$\forall \ a \ \epsilon \ A : \exists ! \ c \ \epsilon \ C : (a,c) \ \epsilon \ g \ o \ f$$ without really thinking about it? That's too bad, because I already spent a lot of time trying to figure it out that way. Guess I'll stick to the "arrows" explanation then, I understand that one best.
 P: 51 I'm not really well versed in the use of logic, so forgive me if I don't fully understand your explanation above. I know the basic concepts of propositional logic, which is extremely useful when doing proofs. But in this case I seem to have a problem of interpretation. Trying to unite both pairs $$(a,b) \ \epsilon \ f$$ and $$(b,c) \ \epsilon \ g$$ in (3) gives me a headache. Maybe because that is not the way to do it then? I should focus on those intermediate steps instead? Then, just bear with me, can I say that if $$(a,c) \ \epsilon \ g \ o \ f \ => \exists \ b \ \epsilon \ B : \ (a,b) \ \epsilon \ f \ => \forall \ a \ \epsilon \ A : \exists! \ b \ \epsilon \ B$$ ? Or in other words, can I interpret the | and : in (1), (2) and (3) as => or <=> ?