Ask Your Question

algebraicallyclosed's profile - activity

2021-08-28 13:23:48 +0200 received badge  Famous Question (source)
2021-02-05 00:20:14 +0200 received badge  Notable Question (source)
2021-01-18 14:29:38 +0200 received badge  Notable Question (source)
2020-09-01 01:38:15 +0200 received badge  Taxonomist
2020-07-23 10:27:28 +0200 received badge  Notable Question (source)
2020-05-28 19:49:14 +0200 received badge  Popular Question (source)
2020-04-14 16:58:09 +0200 received badge  Popular Question (source)
2018-04-03 21:23:11 +0200 received badge  Popular Question (source)
2015-12-04 09:23:44 +0200 received badge  Popular Question (source)
2015-12-04 09:23:44 +0200 received badge  Notable Question (source)
2015-04-26 22:16:35 +0200 received badge  Famous Question (source)
2015-04-06 02:22:47 +0200 received badge  Notable Question (source)
2015-02-24 16:39:20 +0200 asked a question Use the global variables assigned in an iterative expression

Hi everyone. Assume that I have assigned some global variables to items of a list L (L is a list of polynomials guess) such as

for i, item in enumerate(L):
      globals()['g%s'%i] = item

Now I want to get the multiplication of

g0*g1*g2*...

and so on. But I can not do

mul('g%s'%i..)

or something. How can I get this multiplication (as an example of the concept) without writing all the assigned g0, g1, etc.? Thanks for help,

2015-02-24 06:48:03 +0200 received badge  Popular Question (source)
2015-02-24 06:46:28 +0200 commented answer a bug in computing minimum distance, coding theory

Thanks @vdelecroix for all the help. It seems fixed in the upcoming release..

2014-12-28 00:55:18 +0200 asked a question Checking Similarity of Matrices over Finite Fields

Hi, There is a command in SAGE which allows us to check the similarity of two matrices over Q (or sth); is_similar()

But, when trying to check two matrices' similarity over Finite Fields it usually gives the error: "unable to compute Jordan canonical form for matrix"

I would be appreciated if someone can help me to construct a practical way to check the similarity of two matrices with entries in Finite Fields.

Thanks in advance,

2014-12-26 15:02:54 +0200 commented answer Factoring polynomials over IntegerModRings

I do wonder this kind of a factorization over non UFDs, Hensel's Lemma says there is a unique factorization into "basic irreducible polynomials". Is there any command that allows us to get unique basic irreducible factorization of polynomials over Z_p^k?

2014-12-24 09:19:04 +0200 commented answer a bug in computing minimum distance, coding theory

Thank you, Until it is okay, I use this command rather than above and it works but it is not handy at all;

C=LinearCode(G.row_space().basis_matrix())
2014-12-07 00:10:44 +0200 commented answer Echelon form of matrix with coefficients in Zp

Oh,sorry, I thought that it was the field Zp,

2014-12-06 22:40:47 +0200 answered a question elliptic curves in quartic and standard form

SAGE can do anything on Elliptic Curves ; you can define

#Elliptic Curves definition. 1--xy, 2--x2, 3--y,4--x,5--0
E = EllipticCurve([1,2,3,4,5]);E

gives you

Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field

you can do everything on your Elliptic Curve then, you can add points , several times, you can plot your curve, etc..

2014-12-06 22:28:28 +0200 answered a question Echelon form of matrix with coefficients in Zp
F = GF(5)
Matrix(F, 3, 3, [1..9]).echelon_form()
︡

gives the output

[1 0 4]
[0 1 2]
[0 0 0]
2014-10-30 00:53:28 +0200 received badge  Student (source)
2014-10-22 13:43:07 +0200 asked a question "Too many output messages"

Hi, I am running a program on Sage worksheet, on cloud interface. It has too many outputs but ı need to see them. However, Sage says "Too many output messages (at most 256 per cell): attempting to terminate..." What does this mean? Can't I see all of them? Or write them in an outer file or sth?

2014-10-17 07:09:55 +0200 asked a question How to take multiple outputs of a command and use them one by one later

Hi,

This is what I am trying to achieve while using Sage worksheet interface.

Assume that I wrote a code and it gave, for example, for each i in a range of lists, list[0]. (First element of each list) So I have multiple outputs. Now I want to use these outputs, I want the system to consider them as a list, and take iterative combinations of elements of it. Can I do that, and how?

2014-10-16 19:14:26 +0200 asked a question a bug in computing minimum distance, coding theory

For anyone who is familiar with coding theory, we build codes as a subspace of the vector space F_q^n from generating matrices, with all linear combinations of rows of this matrix. For any generating matrix defined over a Finite Field, SAGE has spesific attributes "C =LinearCode(G)" which constructs the code from generating matrix and "C.minimum_distance()" which computes the minimum distance of the code. However, there is probably a bug or something which I couldn't find out.

For example see this:

This code is a [7,3] linear code over the field GF(4,"a"), which has min. distance 3,(as computed with MAGMA), but SAGE computes its min. distance as 5, which is above upper bound!

This is the SAGE input-output:

K = GF(4,"a"); a = K.gen(); G = Matrix([[a, a + 1, 1, a + 1, 1, 0, 0], [0, a, a + 1, 1, a + 1, 1, 0], [0, 0, a, a + 1, 1, a + 1, 1], [a + 1, 0, 1, 0, a + 1, 1, a + 1], [a, a + 1, a + 1, 0, 0, a + 1, 1], [a + 1, a, a, 1, 0, 0, a + 1], [a, a + 1, 1, a + 1, 1, 0, 0]]); C=LinearCode(G); C; C.minimum_distance();

gives the output:

︡"Linear code of length 7, dimension 3 over Finite Field in a of size 2^2"   "5"

However for the same conditions MAGMA says this:

︡> G6 := LinearCode <F,7|[[a, a + 1, 1, a + 1, 1, 0, 0], [0, a, a + 1, 1, a + 1, 1, 0], [0, 0, a, a + 1, 1, a + 1, 1], [a + 1, 0, 1, 0, a + 1, 1, a + 1], [a, a + 1, a + 1, 0, 0, a + 1, 1], [a + 1, a, a, 1, 0, 0, a + 1], [a, a + 1, 1, a + 1, 1, 0, 0]]>; G6;

[7, 3, 3] Linear Code over GF(2^2)

I don't understand where SAGE fails.. Do you have any idea?

2014-10-16 18:06:35 +0200 received badge  Scholar (source)
2014-10-16 18:05:25 +0200 received badge  Editor (source)
2014-10-16 18:03:18 +0200 answered a question converting a list to a text without copy-pasting

Thank you for answering. However, not those, but this worked; where

L = list(U); text = ''+str(L)

-For anyone who is also interested:)

2014-10-01 12:02:41 +0200 asked a question converting a list to a text without copy-pasting

Hi, I have a list and I need to convert it to a text but i want to call this list, so I don't want to copy and paste the result in text = " "

I tried text = list(U) (just assume that U is callable, so list(U) gives anything in U as a list) but it didn't work.

Can anyone suggest a way?

2014-09-30 11:58:17 +0200 commented answer applying the script to running over variables-(write to file/read from file?)

Now, ok to get v's from there but then below there is an algebraic process, for example, it will take each v and apply some procedure and get a result for this v. I want the results listed for each v at the end of the process.:(.

2014-09-30 11:56:03 +0200 commented answer applying the script to running over variables-(write to file/read from file?)

Actually, since I am working on GF(4) the elements are 0,1,a,a+1

2014-09-24 09:59:28 +0200 commented answer given a list of coefficients how can I get a polynomial
2014-09-24 09:58:06 +0200 commented answer given a list of coefficients how can I get a polynomial

Ah, thanks, little before that, I wrote R(v) and it worked. Thank you for answering.

2014-09-24 09:53:59 +0200 asked a question applying the script to running over variables-(write to file/read from file?)

As I am new in programming with SAGE, I wonder whether anyone can help me in this topic which I think is a matter of writing results to a file first, and then taking them from there.

In particular, I have a command like this;

n = 11
K = GF(4,'a')
R = PolynomialRing(GF(4,'a'),"x")
x = R.gen()
a = K.gen()

v = [1,0,0,0,1,1,1,0,0,0,1]
R(v)
f = x^n-R(v)
S = R.quotient(f, 'y')
y = S.gen()

In the later steps I am using this v as a list of coefficients of a polynomial. And I do some algebra on them. But I want this v to run over all possible 11-length vectors over the finite field K as I defined. And I want to get the results for each v separately.

How can I write a program that will do this for me?

Thanks in advance.

2014-09-23 11:26:39 +0200 asked a question given a list of coefficients how can I get a polynomial

In sage,

given a list/vector v of coefficients, how can I get the polynomial v[i]*x^i ?

Here is my environment;

n = 11
K = GF(4,'a')
R = PolynomialRing(GF(4,'a'),"x")
x = R.gen()
a = K.gen()
v = vector([1,a,0,0,1,1,1,a,a,0,1])

I want to get the polynomial v(x) in x, having v as the list of coefficients. This seems simple but I couldn't write it... Can anyone help?