ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 30 May 2019 04:09:10 -0500How to create in Sage system of equations using elements from boolean field?http://ask.sagemath.org/question/46710/how-to-create-in-sage-system-of-equations-using-elements-from-boolean-field/I want to create a field on 8 elements, and then, using this elements make a System of equations like:
nb = 8
varl = [c+ str(p) for c in 'xy' for p in range (nb)]
B = BooleanPolynomialRing(names = varl)
f1 = x1 + x7*x2
f2 = x4*x6*x8 + x7
and then....
But in this case Sage give me an error NameError: name 'x1' is not defined
And in this case:
f1 = x[3] + x[1]*x[2]
f2 = x[4]*x[6]*x[2] + x[7]
error: TypeError: 'sage.symbolic.expression.Expression' object does not support indexing
Is there any way to create them in Sage?MaoriThu, 30 May 2019 04:09:10 -0500http://ask.sagemath.org/question/46710/Using SageMath to solve Simultaneous equations in a Boolean Ringhttp://ask.sagemath.org/question/44856/using-sagemath-to-solve-simultaneous-equations-in-a-boolean-ring/I'm trying to get SageMath to solve a system of equations in a Boolean Ring.
Here is my code.
P.<x,y,z> = BooleanPolynomialRing(3, order= 'lex')
equations = [1+x+y+z, x+y, x*y+1, x+y]
zeros = [0,0,0,0]
I know that there are equation solvers for Sage, but I do not know how to have the answers of the equation be only in the Boolean Ring (ie. only 1 or 0). Obviously I can solve the equation by hand, but that's not the point here. Is there a way to have SageMath only output 0 or 1 as the answer?
Stockfish3709Thu, 03 Jan 2019 02:20:02 -0600http://ask.sagemath.org/question/44856/