# Set Notation and usage

I am working on a write-up and want to say that a variable is a positive integer (including zero). Would this be said as "variable is in the set of all nonnegative integers"? Maybe there is a different notation I should be using? In the event that I do want to use set notation, how would I write it in symbols?

• I'd just say "the variable is a non-negative integer". (Note: $0$ is not a positive number. Positive means strictly greater than $0$) There's no point is specifically saying "variable is in the set of all nonnegative integers" as every object is an element of the set that describes it. It's enough to just say "variable is non-negative integer". If you wont notation $x\in \{n\in \mathbb Z| n \ge 0\}$ is fine but there is also the notation $\mathbb Z^+$ which conventionally (and maybe confusedly) includes $0$. There's also $\mathbb N \cup \{0\}$. Nov 28, 2022 at 1:40

Saying that a variable is a nonnegative integer does include $$0$$. Sometimes people define the set of natural numbers $$\mathbb{N}$$ so that $$0 \in \mathbb{N}$$, though it is usually explicitly stated.
In set builder notation, you could denote the set of nonnegative integers with $$\{x\in\mathbb{Z} \mid x \ge0\}$$
You could say $$x\in\mathbb{N}$$ or $$x\in\mathbb{Z^+}$$. $$\mathbb{N}$$ is the set of natural numbers and $$\mathbb{Z^+}$$ is the set of positive integers, which are essentially the same thing.
• Another common notation is $\mathbb{Z}^{\geq 0}$, which solves the ambiguity in both $\mathbb{N}$ and $\mathbb{Z}^+$ of whether you take them to mean “positive” or “strictly positive”. Nov 28, 2022 at 10:25