Does $A\sim B$ implies $B\sim A$? In my class we defined a set $A$ to be equivalent to set $B$ (noted $A \sim B$) if and only if there exists a function $f \colon A \to B$ that is bijective. Does that imply that $B$ is equivalent to $A$ (noted $B \sim A$)?
Here is my attempt of proof:
Lets define $g \colon B \to A$
Let $b_1$ and $b_2$ be elements of $B$, then we have to show that $g(b_1)=g(b_2)$ if and only if $b_1=b_2$.
By hypothesis $g(b_1)$ and $g(b_2)$ are elements of $A$, and lets define $a_1=g(b_1)$ and $a_2=g(b_2)$.
We know that $f(a_1)=f(a_2)$ if and only if $a_1=a_2$, which means $g(b_1)=g(b_2)$.
But we know that $f(g(b_1))=b_1$, which is to say that $f(a_1)=b_1$ (This is the step I am not sure about).
So $g(b_1)=g(b_2)$ if and only if $b_1=b_2$ and so $g$ is injective.
Now about $g$ being surjective:
We want to show that for every $a_1\in A$ there exists a $b_1\in B$ such that $g(b_1)=a_1$.
By hypothesis if we have an element of $B$ called $b_1$, we know that there exists one element of $A$ called $a_1$ such that $f(a_1)=b_1$ and by substitution we get $f(g(b_1))=b_1$ and I am stucked here.

Yes, if you take the inverse of $f$ you can show it's injective and surjective.
