Let f: A-->B, g:B--->C be functions. Prove that if g o f is one to one then f is one to one.

Proof by contrapositive

Assume that f is not one to one then f(a_{1})≠f(a_{2}) where a_{1},a_{2}belong to set A. We also assume a_{1}≠a_{2}. Let f(a_{1})=r and f(a_{2})=s where r and s belong to set B. Then that means r≠s. Hence (g o f)(a_{1})≠(g o f)(a_{2})=g(f(a_{1})≠g(f(a_{2})=

g(r)≠g(s). Thus g o f is not one to one.

Did I do this right? When a function is not one to one do i get to assume that f(x)≠f(y) where x,y belong to domain and furthermore x≠y?

----------------------------------

Remark

I did this wrong. I forgot that when you negate the one to one definition it becomes A function f: A--->B is not one one when f(x)=f(y) where x,y are elements of A and x≠y

Edit to proof

Assume that f is not one to one then f(a_{1})=f((a_{2}) where a_{1},a_{2}belong to set A. We also assume a_{1}≠a_{2}. Let f(a_{1})=r and f(a_{2})=s where r and s belong to set B. Then that means f(a_{1})=f(a_{2}). Hence (g o f)(a_{1})=(g o f)(a_{2})<=>g(f(a_{1})=g(f(a_{2})<=>

g(r)=g(s) but r≠s. Thus g o f is not one to one.

is it right now?