For this discussion, I will be considering polynomials over multiple complex variables, and a system of polynomial constraints, where the constraints on the variables can be written as a set of polynomials $S$ such that: for all $p \in S, p(variables) = 0$. (These are the kind of polynomial constraints that can be solved by calculating a Groebner basis with a computer algebra system. As that's the best tool I have available to me for solving complex valued multi-variable polynomial constraints, I'm trying to specify the restrictions within these bounds ... so I cannot have constraints referencing the complex conjugate of a variable, taking just the real part of a variable, etc. -- just normal multi-variate polynomials in the constraints.)
I am trying to reduce a problem to a system of polynomial constraints, and for some restrictions it would be useful if I could introduce a new variable $a$ for a given variable $b$, such that $(a = 0)$ if and only if $(b \neq 0)$.
This allows adding a polynomial constraint that succinctly encodes restrictions like:
"If $b$ is zero, then the polynomial $p(x_1,x_2,x_3, ... ) = k$", as
$$ a \ \left( p(x_1,x_2,x_3, ... ) - k \right) = 0. $$
In order for this to be useful, I need to introduce the new variable $a$, and enforce its relation to $b$, without further restricting the value of $b$.
So I am interested in the possible solutions to:
- How can we enforce that $a=0$ if and only if $b \neq 0$, using polynomial constraints, without placing any restrictions on the value of $b$?
After playing with it a bit, I've figured out how to do it by introducing two new variables, and two new constraints, for each variable that I want a mutually-exclusive non-zero partner.
Restrict that at least one of $a$ and $b$ must be zero: $$a b = 0$$
Restrict that $a$ is 1 if $b$ is zero: $$a + b c = 1$$
These have the consequence:
- $(b \neq 0) \rightarrow (a=0)$
- $(b = 0) \rightarrow (a=1)$
- together: $(a=0)$ if and only if $(b \neq 0)$
Additionally, these also give the restriction: if $b$ is non-zero, then $c = 1/b$.
Now, I do not actually need $a=1$ if $b=0$, I just need $a$ to be non-zero. Nor do I have a use for a variable for the inverse of $b$ when it is zero. So it feels like I am being wasteful here. (And tripling the number of variables instead of just doubling them, has a severe computational effect on trying to solve the constraints with a computer algebra systems.) So I'd like to avoid introducing what feels like a superfluous variable.
Which then leads to my specific question:
- Is there some way to enforce the relationship between $a$ and $b$ with polynomial constraints, but without introducing an extra variable $c$? Possibly by introducing more polynomial constraints between $a$ and $b$?
(Or maybe the two variable solution is somehow provably the best we can do?)
Why not $a^2+b^2 > 0$ combined with $ab=0$, gives exactly the constraint that the equation $a=0$ if and only if the relation $b \not = 0$ holds.