I am in a Discrete Structures class, and am stuck on a concept. I am trying to show an example of a function N → N that is neither onto nor one-to-one.
If I use f(x) = 1, this is not onto because the target does not equal the range. My textbook uses the formula if f(a1) = f(a2), then a1 = a2. How would I use this formula in this case to prove my example is correct? (or incorrect?)