I'm learning about functions and more specific, surjections and injections. However I'm a little bit confused regarding the use of quantifiers and "contraposition".
Example:
A function $ f: X \rightarrow Y$ is injective if $ \forall x_1, x_2 \in X: x_1 \not = x_2 \implies f(x_1) \not = f(x_2) $, My book says this is equivalent to the contrapostion, that is: $ \forall x_1, x_2 \in X: f(x_1) = f(x_2) \implies x_1 = x_2 $. So in this case the quantifiers don't change.
However if we look at this example, which is an excercise my professor wrote out for us.
The original implication is: $$\forall B \in P(Y): \forall C \in P(Y): f^{-1}(B) \subset f^{-1}(C) \implies B \subset C \implies f $$ is surjective
And our professor said that the contraposition of this implication is: $f$ is not surjective $$ \implies \exists B \in P(Y): \exists C \in P(Y): \neg \left[ f^{-1}(B) \subset f^{-1}(C) \implies B \subset C \right] $$
So in this case the quantifiers do change. I can't seem to find the reason why sometimes they change and other times they don't. If anyone could clarify, I would highly appreciate it!
First case
$$\forall x_1, x_2 \in X: \color{orange}{\big(}x_1 \not = x_2\color{orange}{\big)} \implies f(x_1) \not = f(x_2)$$
$$ \forall x_1, x_2 \in X: f(x_1) = f(x_2) \implies \color{orange}{\big(}x_1 = x_2\color{orange}{\big)}$$
Second case (this should be what your professor actually trying to write)
$$\color{orange}{\big(}\forall B \in P(Y): \forall C \in P(Y): f^{-1}(B) \subset f^{-1}(C) \implies B \subset C\color{orange}{\big)} \implies f \text{ is surjective}$$ has contraposition as following
$$f \text{ is not surjective} \implies \color{orange}{\big(}\exists B \in P(Y): \exists C \in P(Y):\neg \left[ f^{-1}(B) \subset f^{-1}(C) \implies B \subset C \right] \color{orange}{\big)} $$
The problem might be how do you read the invisible bracket, in second case need to bracket the whole 'thing' just because we all know that 'thing' iff $f$ is surjective.
This is similar to when someone ask that how to read $\forall x,P(x)\rightarrow Q$, you can think this as $(\forall x,P(x))\rightarrow Q$ or $\forall x,(P(x)\rightarrow Q)$, but normally it means the second one, I think this is just some unwritten rules when people using those symbols.