Ask Your Question

Revision history [back]

If you want to mod out by r1, you could use a quotient ring.

One good option is to project to the quotient ring and then lift back to the original ring.

sage: from brial import *
sage: katan = declare_ring([Block('x', 32), Block('k', 80)], globals())
sage: r1 = x(3)*x(8) + x(7) + x(10)*x(12) + x(18) + x(23) + k(1) + k(16)
sage: r1
x(3)*x(8) + x(7) + x(10)*x(12) + x(18) + x(23) + k(1) + k(16)
sage: J = katan.ideal([r1])
sage: R = katan.quotient(J)
sage: r2 = R(r1).lift()
sage: r2
0