If it so happens that had an inverse mod (denoted by ) since we know that then we would be able to say that and therefore is of the form .
Therefore one just has to verify that is invertible mod , and actually if it was that was invertible then we could have symmetrically done the same. Recall that a number is invertible mod if , so suppose for the sake of contradiction that therefore and since then but then and so which is a contradiction, therefore , as needed.