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.Mon, 28 May 2018 00:40:42 +0200kernel of a matrix defined over polynomial ringshttps://ask.sagemath.org/question/42453/kernel-of-a-matrix-defined-over-polynomial-rings/ I have a matrix defined as a function of variables in a polynomial ring defined over finite field as follows-
Gr.<xp,yp>=LaurentPolynomialRing(GF(2));
M=Matrix(Gr,[[xp-1,0],
[yp-1,0],
[0,(yp^(-1))-1],
[0,-(xp^(-1))+1]]);
I want to calculate the kernel of this matrix but the kernel function
M.kernel()
gives an error. What am I doing wrong?arpitMon, 28 May 2018 00:40:42 +0200https://ask.sagemath.org/question/42453/Correct way to construct a field with i adjoined?https://ask.sagemath.org/question/42420/correct-way-to-construct-a-field-with-i-adjoined/Hello,
I'm an undergrad maths student looking to understand how I successfully adjoin elements to a finite field in sagemath, to explore some of my university topics.
I can construct a base field, for example:
B = GF(2**3-1)
and I can construct an extension to this by adjoining I, which is equivalent to using the minimum polynomial x^2+1 like so:
reset('i') # make sure we haven't clobbered the imaginary constant
E = B[i]
This does what I want (I think), creating a field E that is an extension of B. We can even list the elements:
[e for e in enumerate(E)]
and this looks correct. However, things get messy when I try to use a larger field, for example:
C = GF(2**127-1)
F = C[i]
This gives the error:
> I already exists with incompatible valence
I haven't tried to redefine i at all, so far as I can tell, so, my questions are:
1. How do I correctly extend a given finite field ?
2. Following on from this, I tried the following:
A = GF(2**3-1)
B = A[i]
C = A.extension(x^2+1, 'i')
B==C
So it appears I can't successfully adjoin 'i' using a minimum irr poly either. Printing B and C give:
sage: B
Finite Field in I of size 7^2
sage: C
Finite Field in i of size 7^2
which would explain why they aren't equal... except i and I should be equal.
In short, I would like to construct the quotient field PRIME BASE FIELD[x]/x^2-1 and have the arbitrary x treated as complex values ("adjoining sqrt(-1)") but I'm unclear from sage's documentation on how to achieve this.
3. I see the notation
R.<x> = GF(blah)
quite a lot. Can someone please explain it? I can't find anything in the documentation that might help me understand what this is and why it is necessary.
You can assume I understand most of an undergraduate galois theory course and have a basic understanding of algebraic number theory - what I don't understand is how this maps into sage.zahllosThu, 24 May 2018 15:52:10 +0200https://ask.sagemath.org/question/42420/Transform a list of coefficients to polynomial (in GF(2^8))https://ask.sagemath.org/question/29465/transform-a-list-of-coefficients-to-polynomial-in-gf28/ Hi there,
Currently i'm trying to convert a list of coefficients automatically to a polynom. I got a list of zeros and ones and want to transform this list to a polynom in GF(2^8). First I set up the GF(2^8) with the reduction polynom
P2.<x> = GF(2)[];
p = x^8 + x^4 + x^3 + x + 1;
GF256 = GF(2^8, 'x', modulus=p)
Next I get a list of coefficients:
coeff = [0, 1, 0, 1, 1, 1, 0, 1]
which should be the polynom:
x^6 + x^4 + x^3 + x^2 + 1
How do I get this transformation from list to polynom automatically? The native thing I think about is I set up a string and fill in the coeff. like this:
polyString = str(coeff[7])+'*x^7 + '+str(coeff[6])...
And then cast it in GF256
poly = GF256(polyString)
But I think they are smarter ways out there.. Any ideas ? :)
nablaheroWed, 16 Sep 2015 15:19:32 +0200https://ask.sagemath.org/question/29465/