I have an indicator function $\mathbb{1}(A)$ that equals to one if A is true. I am interested in simplifying the following difference between indicator functions:
$$ \mathbb{1}\left\{\sum_{j^{\prime}\neq j }d_{j^{\prime}}^{*} + d_{j}^{*} > 0\right\} - \mathbb{1}\left\{\sum_{j^{\prime}\neq j }d_{j^{\prime}}^{*} + \hat{d_{j}}> 0\right\} $$
so, for $j^{\prime}\neq j$ both summations contain the same terms and the difference between both arguments is for entry $j$. Moreover, for all j, $d_{j} \in \{0,1\}$.
I am wondering if the following factorization of this expression is correct:
$$ \mathbb{1}\left\{\sum_{j^{\prime}\neq j }d_{j^{\prime}}^{*} + d_{j}^{*} > 0\right\} - \mathbb{1}\left\{\sum_{j^{\prime}\neq j }d_{j^{\prime}}^{*} + \hat{d_{j}}> 0\right\} = \left(1 - \mathbb{1}\left\{\sum_{j^{\prime}\neq j }d_{j^{\prime}}^{*}> 0\right\}\right)\left( d_{j}^{*} - \hat{d_{j}} \right) $$
I have been thinking all day about a more synthetic way to write this expression. If someone can help me, I would deeply appreciate it.