What's an example of a function with $\mathcal{P}(\mathcal{P}(X)) \rightarrow \mathcal{P}(X)$ and $X \rightarrow \mathcal{P}(X)$ 
What's an example of a function with $\mathcal{P}(\mathcal{P}(X)) \rightarrow \mathcal{P}(X)$ and $X \rightarrow \mathcal{P}(X)?$

Absolute beginner here.
The first confusion I have is whether I have to provide two functions or one function satisfying both constraint. I will assume the first interpretation is true.
So $\mathcal{P}(\mathcal{P}(X))$ refers to all subsets of the set containing all subsets of X. For example if $X = \{0\}$, then $\mathcal{P}(\mathcal{P}(X))$ is $\{\emptyset, \{0\}, \{\emptyset\}, \{0, \emptyset\} \}$.
A function with $\mathcal{P}(\mathcal{P}(X)) \rightarrow \mathcal{P}(X)$ means that the domain is $\mathcal{P}(\mathcal{P}(X))$ and the codomain is $\mathcal{P}(X)$. An example I can think of is the $\max()$ function after I flatten out the element of a set(i.e. remove nested $\{$ and $\}$), but is it correct?
 A: There are many functions $X\to \mathcal P(X)$: for example,

*

*$x\mapsto \emptyset$

*More generally, if $A$ is a subset of $X$, $x\mapsto A$ is a constant function.

*$x\mapsto \{x\}$ is an example of non constant function.

*You can play with set operations and consider $x\mapsto \{x\}\cup A$ or $x\mapsto \{x\}\cap A$ or $x\mapsto A\setminus\{x\}$.

Similarly, since $\emptyset$ is a subset of every set, $A\in\mathcal P(\mathcal P(X)) \mapsto \emptyset$ is a constant function from $\mathcal P(\mathcal P(X))$ into $\mathcal P(X)$. If $X$ is not empty, you can construct many more constant functions.
Interesting examples of functions $\mathcal P(\mathcal P(X))\to\mathcal P(X)$ includes

*

*the topology induced by a family of subsets of $X$ (as a subbasis)

*the $\sigma$-algebra induced by a family of subsets of $X$
(thanks to @Dave L. Renfro for these examples and links).
As @dmtri mentioned in comments, it is easy to construct functions if there is no further restriction. More precisely, if $A$ and $B$ are two sets, there is always at least one function $A\to B$, the only exception being when $B$ is empty but $A$ isn't.
