Notation: Vector contains an element equal to 0

I have a vector $v \in \mathbb{R}^n$ and I am searching for a mathematical notation for a function that returns $1$ if at least one of the vector's elements is $0$ and $0$ otherwise. The analogue function for a set $S$ would be: $$ f = \begin{cases} 1 & \text{if } 0 \in S \\ 0 & \text{if } 0 \notin S \end{cases} $$ However I am struggling to find a similar notation for a vector. In particular, how do I write: "If any element in $v$ is $0$"?


Solution 1:

It's best to write it in words: $$ f(v) = \begin{cases} 1&\text{when at least one component of $v$ is zero}\\ 0&\text{otherwise}. \end{cases} $$ This is perfectly valid mathematical notation. Using symbols doesn't make it better than using words. With words you can say directly what you want to say instead of taking an unnecessary detour.

If someone insists on using symbols (in order for the function to be implementable on a machine), you can replace "when at least one component of $v$ is zero" by "$0\in\{v_1,\dots,v_n\}$". That's still readable, but I think the version in words is best for communicating with people.

Solution 2:

If $\prod_{i=1}^nv_i=0$, then $f(v)=1$ otherwise $f(v)=0$. For a compact representation, you can use the indicator function $\mathbf 1_E$ of an event $E$. Define the event $E$ to be the event that $\prod_{i=1}^n v_i=0$. Then $$f(v)=\mathbf 1_E$$

Solution 3:

I agree with @Joonas Ilmavirta that it's probably better to write it in words.

Nevertheless, one can talk about the support of a vector, namely, $$\operatorname{supp}(v)=\{i\in[n]\, |\, v_i \neq 0\},$$ where $[n]=\{1,\ldots,n\}$. This is a widely accepted terminology.

In particular, $$\text{"If any element of $v$ is $0$"}$$ becomes $$\text{"If $\operatorname{supp}(v)\neq [n]$"}$$