I saw a joke UI on another site where it was a phone number input using only the below commands:
$$n \times 3 \\ n + 7 \\ n \div 5 \\ n - 2 \\ \lfloor n \rfloor \\ \sqrt{n} \\ n^2 \\ \log_{10}(n) $$
Where $n$ is the current number (begins at $0$). I wonder if something like this could actually generate any positive number.
$\mathbb Z^+$ is easy: you can find any positive integer using only $n + 7$ and $n - 2$. For any integer, add sevens until you reach or pass your desired number, then subtract twos. If you want an odd number, add sevens until you hit that scenario and land on an odd number, otherwise even numbers.
But what about $\mathbb Q^+$? $\mathbb R^+$? Is there a more declarative way of proving (or disproving) this than just trial and error? What about negatives? If all negative integers can be found, can $\mathbb{C}$ be found?
To clarify, I'm asking specifically about the eight operations I mentioned above, with those specific operands.
You can get arbitrarily close to any number in $\Bbb R^+$ You showed you can get any positive integer. Now to get sort of close to $\pi$ you can form $1385$ and take the log, getting about $3.14145$. You can get closer by forming the closest integer to $10^{10^\pi}$ and taking the log twice. Keep going with the tower until you get as close as you want. The negative reals work the same. If you want to approach $x$, which is less than $0$, let $k$ be large enough so that $x+2k \gt 0$, approximate that, and subtract off $k\ 2$s.
You can do the same thing by forming the closest integer to $\pi^2$, which is $10$, and taking the square root, getting $3.162$. Then form the closest integer to $\pi^4$, which is $97$ and take two square roots, getting $3.138$. Keep going through $\pi^{2^n}$ and $n$ square roots.
I don't think you can get all rationals exactly because you don't have enough tools to get good denominators.