Polynomial constraints for restricting: $a=0$ if and only if $b\neq 0$

88 Views Asked by At

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?)
2

There are 2 best solutions below

1
On

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.

0
On

If a different approach to the encoding is allowed, it is possible to encode the "if $b=0$, then some polynomial must be zero" restrictions with only one additional variable. This addresses the underlying motivation of the question, but unfortunately does not provide a solution to the question as currently posed. Maybe it could provide inspiration for a more complete solution.


With an answer to the question we can write:
"If $b=0$, then the polynomial $p(x_1,x_2,x_3, ... ) = k$", as $$ a \ \left( p(x_1,x_2,x_3, ... ) - k \right) = 0, $$ and requiring extra constraints to enforce the relationship between $a$ and $b$.

However we could instead write:
"If $b=0$, then the polynomial $p(x_1,x_2,x_3, ... ) = k$", as $$ (1 - bc) \ \left( p(x_1,x_2,x_3, ... ) - k \right) = 0, $$ with no further restrictions on $c$. Or more precisely, $c$ could be used in additional constraints of this form, such that it only shows up in a factor of a constraint polynomial as $(1 - bc)$.

With this encoding, if $b$ is non-zero, then the first factor of that expression can always be zero (with the free variable becoming restricted to $c=1/b$), and so places no restriction on the later factor. And if $b$ is zero, then the first factor cannot be zero, and requires that the later factor is zero.

So this method achieves that "if $b=0$, then $p(...) = 0$" type of restriction with only a single variable, but at the cost of that variable, $c$, not being easy to interpret if it shows up in any derived constraints. Because, we cannot interpret anything from $c$ being non-zero. (Nothing restricts the value of $c$ if $b=0$.)

Maybe that alternate encoding will give someone an idea for solving a way to do the original constraint encoding.


EDIT: Adding the constraint $(1-bc)(b + c) = 0$, would make $c$ easier to interpret. As now $(b=0) \Leftrightarrow (c=0)$. So it's essentially a kind of inverse/complement to the original encoding -- it does the encoding by adding a variable where: $(c\neq 0)$ if and only if $b \neq 0$.

As $b$ itself has this property, its worth looking at whether we need the extra variable at all. However to use this approach without an additional variable, would require a polynomial in just $b$ that is non-zero when b is zero, and zero everywhere else. This is discontinuous in b, and so is not possible in a polynomial. This falls short of proving that there is no way to encode such constraints without extra variables, but seems like it would be impossible without already knowing important details about the solution space on the variables.