Is it legal to define a function that gives different results for 1.0 and for 1? In programming languages I can define such function, because in most programming languages 1.0 is not 1, because 1.0 has type "float", and 1 has type "integer". In math I don't see axioms that forbid sets $\mathbb{R}$ and $\mathbb{N}$ to be disjoint. So can I define function in such a way, that f(1) = 1, and f(1.0) = 2, motivating it by saying that 1.0 is taken from $\mathbb{R}$, 1 is taken from $\mathbb{N}$, and these sets are defined in the completely separate ways?
 A: Yes. You can use the set $\mathbb{R}\sqcup\{1\}$, which is the disjoint union of the reals with the integer $1$ and define a function on that set which distinguishes between the $1.0$ in the reals and the $1$ in the set $\{1\}$. You can extend this idea to $\mathbb{R} \sqcup\mathbb{Z}$ and give distinct values depending on their membership in the $\mathbb{R}$ elements or the $\mathbb{Z}$ elements. The dijoint union is essentially creating labeled versions of each number with $1.0=1_{\mathbb{R}}$ and the other being $1_{\mathbb{Z}}$. While you lose many of the useful properties of the reals and integers by constructing this disjoint union it's still a perfectly valid set and you can use it to define the domain of a function.
A: Usually (emphasis on "usually") we regard $\Bbb N \subset \Bbb Z \subset \Bbb Q \subset \Bbb R \subset \Bbb C$ as subsets.
To do this, after you constructed $\Bbb Z$ from $\Bbb N$ etc., you retroactively redefine $\Bbb N, \Bbb Z, \Bbb Q,$ and $\Bbb R$ to be subsets of $\Bbb C$.
I'm only talking about what happens in fields of mathematics that aren't focused on foundations of mathematics.
