Consider two binary variables $p_1$ and $p_2$. Suppose, $x$ is a continuous variable that should not take values between $a$ and $b$.
Here is my try:
$$ p_1 =1 \mbox{ if } x \le a \\ p_1 =0 \mbox{ if } x >a \\ p_2 =1 \mbox{ if } x \ge b \\ p_2 =0 \mbox{ if } x < b $$ Now what will be the final equations?? $$ p_1+p_2=1 $$