summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sumofsquares/canon.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sumofsquares/canon.py b/sumofsquares/canon.py
index bec9cf0..97a271b 100644
--- a/sumofsquares/canon.py
+++ b/sumofsquares/canon.py
@@ -127,10 +127,10 @@ class PutinarPSatz(Canonicalization):
if d.read(state).scalar().constant() % 2 != 0:
d += 1
- monomials = x.combinations(poly.arange(d + 1)).half_newton_polytope(x)
- coeffs = opt_variable_from_name(rf"\gamma_{i},c", shape=monomials.shape)
+ monomials = x.combinations(poly.arange(d + 1)) #.half_newton_polytope(x)
+ coeffs = opt_variable_from_name(rf"\gamma_{i},z", shape=monomials.shape)
- multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},c")
+ multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},z")
new_constr = constr.expression - multiplier
# Add other terms of the quadratic module
@@ -162,7 +162,7 @@ class PutinarPSatz(Canonicalization):
# TODO: better documentation
# Generate monomials of up to degree d and take only monomials
# that are in half of the newton polytope
- monomials = x.combinations(poly.arange(d + 1)).half_newton_polytope(x)
+ monomials = x.combinations(poly.arange(d + 1)) # .half_newton_polytope(x)
coeffs = opt_variable_from_name(rf"\gamma_{i},{j}", shape=monomials.shape)
multiplier = poly.give_name(coeffs.T @ monomials, rf"\gamma_{i},{j}")