Why is this not a choice function from subsets of $\Bbb R$? A definition of the Axiom of Choice mentions that:

[...] no choice function is known for the collection of all
  non-empty subsets of the real numbers 
  --Wikipedia

However, for all non-empty subsets $X$ of the real numbers I can construct a function $f$ which chooses the element closest to $0$, and if there are two such elements, chooses the positive one.
Below is my attempt at stating this rigorously:
$ \forall X \subset \mathbb{R} | X \neq \emptyset: f(X)=\begin{cases}
  x:\min (|X|),& \text{if } (\max(x):x \in X, x<0) \neq (\min(x):x \in X, x>0)\\
    \min(|X|),& \text{otherwise}
\end{cases}$
This certainly holds for subsets of reals which


*

*are positive only $\longrightarrow$ select the smallest

*are negative only $\longrightarrow$ select the largest

*contain $0$ $\longrightarrow$ select $0$

*are positive and negative $\longrightarrow$ select the element nearest to $0$

*contain a positive and a negative element both closest to $0$ $\longrightarrow$ select the positive one


Is this a choice function for the collection of all non-empty subsets of the real numbers? And if it's not a breakthrough, what am I missing?
 A: No, it is not a choice function, because it is not defined for all non-empty subsets of $\mathbb R$. For instance, $f\bigl((1,2]\bigr)$ is not defined.
A: Consider the set $\mathbb R^+ = \{x\in\mathbb R: x>0\}$. This is clearly a non-empty subset of $\mathbb R$, and it consists only of positive numbers (indeed, it consists of all of them).
So, let's try to apply your rule:

are positive only ⟶ select the smallest

OK, so what is the smallest element of $\mathbb R^+$? Well, let's assume we've found it; let's call it $s$ (for “smallest”). But then, what about $s/2$? Clearly, $s/2$ is also positive, so it's also in $\mathbb R^+$. Moreover, as can be easily checked, $s/2<s$. But that means that we have found an element in $\mathbb R^+$ smaller than the smallest element in $\mathbb R^+$. Obviously that cannot exist.
But since this construction works for any element of $\mathbb R^+$, it follows that $\mathbb R^+$ has no smallest element. And thus your supposed choice function doesn't work.
A: There are two possible reasons why you're making this mistake:

*

*You are only thinking about finite subsets of the reals. In that case, yes, you can uniformly define a choice function from all non-empty finite subsets of the real numbers. Take the closest to $0$, or the minimum, that works equally well.


*You are really thinking about the integers, rather than the real numbers. Because if I asked you to choose a number, you're probably going to say $1$ or $5$ or $42$ if you're being clever. But you're unlikely to say Chaitin's constant, or $\varphi$. Even if you say something like $\pi,e,\sqrt2$ or $\frac12$, those are only a few specific constants in mind. The rest are integers.
So you're not thinking about the real numbers as a dense linear order. You're thinking about them as $\Bbb Z$ + a few more useful numbers. And of course that in that case, taking the smallest positive or the largest negative works.
But as pointed by others, this is not going to work in general. In fact, even for $\Bbb Q$ this is not going to work, because there is no smallest positive rational number and there is no largest negative rational numbers. Simply dividing by two will work.
However, unlikely with $\Bbb R$, we can in fact define a choice function on non-empty sets of $\Bbb Q$. Consider each rational numbers as $\frac pq$ where $p\in\Bbb Z$ and $q\in\Bbb N\setminus\{0\}$ and $q$ has the smallest possible value. Then simply choose the one with the smallest $q$ that has $p$ closest to $0$.
But why wouldn't that work for $\Bbb R$? Well, because $\Bbb R$ is much larger than $\Bbb Q$ in terms of cardinality. You cannot represent it as a field of fractions. It is not countable, and you cannot jump through various hoops to give an explicit choice functions.
It's not just that. We know for a fact that there are models of set theory without the axiom of choice where there is no choice function. It's not even about being able to define a choice function or not (because in some universes of set theory, there is in fact a definable choice function), it's purely about existence. So whatever definition you have, it is either not going to provably choose from all sets of reals, or it is not provably a choice function. In the case you suggest here, it is in fact provably not choosing from all sets of reals.
