Can someone give me some feedback, please?

********

f: Ζ⇒Ζ

f(x) = { x/2 if x is even, 0 if x is odd

Prove whether f is onto and one-to-one.

Here's my proof.

******

Proof. To show that f is onto, let b∈Ζ. Consider the 2 following cases:

1. If b=0, f(x)=0 implies x=z.

2. If b≠0, x/2=b gives x=2b which implies f(2b)=2b/b=b.

This shows that f has 2 pre-images which proves that f is onto. Since f(0)=0=f(1),

we have also proved that f is not one-to-one. ■