discrete math invertibility