# What is the correct notation to state that a variable can either be empty or not?

I want to express through a variable, that a certain action is either done, or not. When the action is done, the variable should have value 1, if not, the variable should be empty. How do I express the scope of this variable?

$\in \left\{0, 1\right\}$ doesn't feel quite right, maybe $\in \emptyset, \left\{1\right\}$?

-
This is a somewhat unusual variable, but if you really want the two possible values of the variable to be $1$ and the empty set, then the appropriate notation would be $\in \left\{\emptyset, 1\right\}$, or, perhaps, to make it clearer that this is the empty set and not a zero, $\in \left\{\{\}, 1\right\}$. – joriki May 7 '11 at 19:15
Thanks joriki for your suggestion. I can only think of the empty set as a way to express that the variable is not set. Maybe there is a better solution? – Thomas May 7 '11 at 19:21
I have a big problem with $\in \{\ldots\}$, as $\in$ is a binary relation, and one expects something on the left side of the $\in$ symbol. – Asaf Karagila May 7 '11 at 19:53
@Asaf: I understood this to be shorthand for saying "what do I need to put after the variable to express this property of the variable". – joriki May 12 '11 at 11:06

You can say that if $x$ is your variable then $|x|\le 1$ and $|x| > 0$ if and only if the action was done.