Given a matrix $\mathbf{X}\in\{0,1\}^{N\times M}$, what is the set notation I should use to define this: the set of all $n\in\{1,\ldots,N\}$ such that there exists at least $m\in\{1,\ldots,M\}$ where $\mathbf{X}_{n,m}=1$.
I write it as: $$\{n:\mathbf{X}_{n,m}=1,m\in\{1,\ldots,M\}\}, (1)$$ but it seems that would find all $n\in\{1,\ldots,N\}$ such that $\mathbf{X}_{n,m}=1$ for all $m\in\{1,\ldots,M\}$, which only finds the rows that have all ones.
If I write it as: $$\{n:\exists m\in\{1,\ldots,M\} : \mathbf{X}_{n,m}=1\},(2)$$ it seems ok but I used two ``such that'' in the defined set, which is ugly and maybe wrong.
Example: $N=3$, $M=4$, and
$$\mathbf{X}=\begin{pmatrix}1 & 1 & 0 & 0\\ 0 & 0 & 0 & 0\\ 1 & 1 & 1 & 1\end{pmatrix}.$$ I want the set $\{1, 3\}$ because row 1 has at least one nonzero element and row 3 has at least one nonzero element but row 2 in zero.
With $(1)$, the set is $\{3\}$, isn't it?
My suggestion is $$\{n: \left|\{m: X_{n,m} = 1\}\right| \geq 1 \}$$