# The domain of a function as a function: the "domain-function"

The domain of a function $f:X\to Y$ is normally defined as $\operatorname{dom}f\equiv X$, but I would like the domain-function $\operatorname{dom}$ to be a funtion itself, i.e. I would like to define the function $\operatorname{Dom}$ defined by:

$$\forall X\,\forall Y\,\forall f\,(f:X\to Y\Rightarrow\operatorname{Dom} f\equiv X)$$

Now $\operatorname{Dom}(\operatorname{Dom}(\cdot))$ would be the set of all functions, and $\operatorname{Ran}(\operatorname{Dom}(\cdot))$ would be the set of all sets.

It is however impossible to construct the set of all sets, by Russel's paradox. My question is what I have done wrong in the above definition, and how to define $\operatorname{Dom}$ as a function.

• In the definition the universal quantifiers appears and they talk about every set, every set in the universe... I guess that this has something to do with the "paradox". I'm not really expert but I bet that this formula actually do not define a function (aka a set $f\subset D\times C$). May 2, 2015 at 18:05

For example $x\mapsto\mathcal P(x)$ is a class function; and $x\mapsto|x|$ is a class function; and $x\mapsto x\cup\{x\}$ is a class functions.
And so, $x\mapsto\operatorname{Dom}(x)$ is also a class function, and you have to ask yourself, does it really matter that it is a class function?