ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 13 Sep 2019 17:36:37 +0200Finite Fields: Basic Questionhttps://ask.sagemath.org/question/47894/finite-fields-basic-question/Good people!
So I'm currently working on a problem where I am dealing with a variety of variables which takes values in finite fields. After originally having tried for a week to do this the hard way from scratch in Python, the other day, my supervisor suggested that, hey, you know, SageMath already comes with the full functionality of finite fields, so why not give it a go? And so I installed it just yesterday!
I'm having problems finding the appropriate tutorials online to figure out the answer for a problem that is quite simple. Specifically, let's say that I create the finite field of order $3^2$,
k = GF(9, 'a')
Then that has elements ${0,a,a + 1,2a + 1,2,2a,2a + 2,a + 2,1}$. Now, I just want to start assigning various variables values in this field, for example, to just take something out of the blue, set $x = 2a+1$, then my natural assumption would be that, "ah, you just write:"
x = 2*a+1
But, well, turns out you cannot do that, which in retrospect is fairly obvious, since $k$ is some sort of array or another.
Can someone please give either some pointer or direct me to a place where it is explained how you work with variables that take values in a finite field?StormyTeacupFri, 13 Sep 2019 17:36:37 +0200https://ask.sagemath.org/question/47894/Segmentation fault when multiplying by variablehttps://ask.sagemath.org/question/39204/segmentation-fault-when-multiplying-by-variable/In Sage 7.5.1 I'm trying to work with unknown values in GF(3) and polynomials.
The following code gives me a *segmentation fault*:
P.<x> = GF(3)['x']
var('a')
sigma = 2*x+ 1
print(a*(sigma))
What is the proper way to handle unknown GF(3) values like "a" in Sage?PsiWed, 18 Oct 2017 22:30:48 +0200https://ask.sagemath.org/question/39204/