Sage subs() function include product condition
Code:
from brial import *
katan=declare_ring([Block('x',32),Block('k',80)],globals())
r1=x(3)*x(8) + x(7) + x(10)*x(12) + x(18) + x(23) + k(1) + k(16)
r2 = r1.subs({x(3)*x(8)+x(7)+ x(10)*x(12)+ x(18) + x(23) + k(1) + k(16) : 0})
print(r2)
this is a sage code, make r1 equals a polynomial include some variables, then use the subs() function to fix some variable, in this case, let the polynomial equals 0, so the expected result of r2 is 0, but the sage gives the result is
x(7) + x(10)*x(12) + x(18) + x(23) + k(1) + k(16)
i know , some thing wrong with the x(3)*x(8), but i don't know how to make it right.
Also at https://stackoverflow.com/questions/5...