For a function to be considered injective, we consider that $\forall x_1, x_2 \in X, x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2)$.
Now, when it comes to proving this, we prove that $\forall x_1, x_2 \in X, x_1 = x_2 \Rightarrow f(x_1) = f(x_2)$, and if it turns out that $x_1 = x_2$, that means that the function is injective, but injectivity means that every $x$ has maps to only one, unique $y$, and we proved that it is not. (?)
So, why do we try to prove the opposite, and if it proves correct we consider it injective?
Best Answer
To prove $1-1$, you are right that we consider that $\forall x_1, x_2 \in X, x_1 \neq x_2 \Rightarrow f(x_1) \neq f(x_2)$
For the other part, just take contrapositive of above statement to get:
$\forall x_1, x_2 \in X, f(x_1) = f(x_2)\Rightarrow x_1=x_2$.