# Defining a set which we can choose elements from / set notation check

Let $$\alpha\in [0,9].$$ I want to use set notation to choose an integer $$k_1\in\{ 0, \ldots, 9 \}$$ such that $$\vert k_1-\alpha\vert$$ is as small as possible. But if, for example, $$\alpha=0.5$$, I want to allow $$k_1$$ to be either $$0$$ or $$1$$.

Is the following correct set notation for this?

Let $$k_1\in \{\ x\in\{0,\ldots,9\}:\quad \lvert\frac{x}{1}-\alpha \rvert\leq\lvert\frac{y}{1}-\alpha \rvert\quad \forall\ y\in\{0,\ldots,9\}\ \}$$.

And I know we can use words to describe choice from such a set, but I am not looking for this.

But, are there "better/simpler" set notations to describe the same set for $$k_1$$ to be chosen from, akin to the single set notation above?

You have expressed the statement "Let $$k_1$$ be an integer between 0 and 9 such that the difference between $$\alpha$$ and $$k_1$$ is no greater that the difference between $$\alpha$$ and any other integer between 0 and 9" in set theoretic notation. I don't understand why you've written $$\frac{x}{1}$$ and $$\frac{y}{1}$$ rather than $$x$$ and $$y$$, though. Stick with $$x$$ and $$y$$.
• I suppose you could replace $\{0,\ldots,9\}$ with $\mathbb{Z}$, since it will amount to the same thing, but that's not much of a change. I don't know what the context is, since you seem not to be allowing the use of words. But in any context to be read by humans (rather than computers) I would just say "Let $k_1$ be an integer closest to $\alpha$". Jul 8, 2021 at 13:59