# Mathematical Definition of a function with array domain and codomain

I know the definition of a simple function is: $$f:\biggl\{\begin{array}{rl}R&\to R\\ x&\mapsto f(x)\end{array}$$

But i want to define a function which get a set as input and make the result be a set. $$G:\biggl\{\begin{array}{rl}?&\to ?\\ \{x_1,....,x_?\}&\mapsto \{a_1,...,a_?\}\end{array}$$//the size of input set and output and depend on the input

assume $$x_i \in X$$ and $$a_i \in A$$

$$G$$ maps subsets of $$X$$ to subsets of $$A$$ :

$$G:\mathcal{P}(X)\to\mathcal{P}(A)$$

If you have a function $$g:X\to A$$, you can define $$G(Y)=\lbrace g(y),\;y\in Y\rbrace$$