Ask Your Question

Semin's profile - activity

2021-03-03 21:17:24 +0200 received badge  Famous Question (source)
2021-03-03 21:17:24 +0200 received badge  Notable Question (source)
2021-03-03 21:17:24 +0200 received badge  Popular Question (source)
2020-03-22 11:41:21 +0200 received badge  Famous Question (source)
2020-01-10 18:34:12 +0200 received badge  Famous Question (source)
2019-05-06 00:55:45 +0200 received badge  Popular Question (source)
2017-11-25 18:01:32 +0200 received badge  Notable Question (source)
2017-11-15 16:36:28 +0200 received badge  Famous Question (source)
2017-07-12 10:00:09 +0200 received badge  Notable Question (source)
2017-05-19 10:51:47 +0200 received badge  Famous Question (source)
2017-04-11 12:17:53 +0200 received badge  Popular Question (source)
2017-02-05 23:34:40 +0200 received badge  Notable Question (source)
2016-10-20 12:35:55 +0200 received badge  Popular Question (source)
2016-10-03 23:01:20 +0200 commented answer number fields and irreducible polynomials

Okay, I see. Thank you very much. :-)

2016-10-03 16:14:14 +0200 commented answer number fields and irreducible polynomials

Hmm.. That's good information but when I have some more polynomials, it looks hard to control variables. When I want to get the splitting field of f1,f2,...,fn which are irreducible in the field of rationals, then I have to make R1.<y1>, R2.<y2>,...,Rn.<yn>, right?

2016-10-02 07:28:44 +0200 received badge  Notable Question (source)
2016-10-02 07:26:00 +0200 asked a question number fields and irreducible polynomials

Hello gentle people. Let's see an example.


The extension field of F by g cannot obtained by F.extension(g(s),'s') although we input s=var('s') before. Because g is reducible in F. ( g=(x^2-4I)(x^2+4I) )

Can I check irreducibility of a polynomial in a number field?

Is there any method which makes a number field by given polynomial?

Thanks in advance.

2016-09-15 12:04:15 +0200 received badge  Notable Question (source)
2016-07-25 14:11:26 +0200 received badge  Famous Question (source)
2016-01-23 23:19:44 +0200 received badge  Popular Question (source)
2015-12-09 21:06:59 +0200 received badge  Popular Question (source)
2015-04-17 16:11:47 +0200 commented answer How can I get the coefficient of a Dirichlet series?

okay. Thank you very much for your kind answers. :)

2015-04-17 06:47:11 +0200 received badge  Commentator
2015-04-17 06:47:11 +0200 commented answer How can I get the coefficient of a Dirichlet series?

I found "". It contains "Copyright (C) 2015 Ralf Stephan". Maybe that's the development version you said. But I have some problem.

sage: s=var('s')
sage: dirichlet_series(zeta(s))
<repr(<sage.all_cmdline.DirichletSeries at 0x115ae6490>) failed: AttributeError: 'sage.libs.pari.gen.gen' object has no attribute 'dirmul'>
sage: dirichlet_series(1)
<repr(<sage.all_cmdline.DirichletSeries at 0x115ae68d0>) failed: AttributeError: 'sage.libs.pari.gen.gen' object has no attribute 'dirmul'>

Hmm.. It doesn't work. How to solve that problem?

2015-04-16 15:28:56 +0200 commented answer How can I get the coefficient of a Dirichlet series?

That's awesome. Very useful information. Thanks. But I'm not sure how to use the commands in the "Dirichlet_series.sage" in order to (1-3(-s))*zeta__series(n)^2. How to control "s"??

2015-04-16 15:11:17 +0200 commented question How can I get the coefficient of a Dirichlet series?

I see. I edited the title. Thanks.

2015-04-15 18:10:04 +0200 asked a question How can I get the coefficient of a Dirichlet series?


Let's see this example.


where f(x) is the Riemann zeta function and x is complex variable.

If Re(s) is sufficiently large then g(x) is converges.

We only view this g(x) as a formal Dirichlet series.

What I want is coefficients.

The Riemann zeta function is rewritten by

f(x)=1+2^(-x)+3^(-x)+ ...

We can also rewrite the g(x) by the sum of a_n * n^(-x).

g(x)=sum{a_n * n^(-x) | n=1,2,...}

For given n, how can I get a_n ??

Is there any helpful sage command ??


2015-03-27 04:10:08 +0200 marked best answer save and load in SAGE


In my case, I am using SAGE in my macbook.

For example...

At first, I make file.sage file.

def plus_one(number):
  return number+1

In terminal, I go to the folder which has file.sage and enter SAGE

And then I load file by using the below command.

sage: load("file.sage")

After some calculations, I make L.

sage: L=[]
sage: for i in range(10):
sage:   L=L+[a+plus_one(i)]

My question is how can I save L in some file like file.sage.

file.sage is editable in another editors, easily.

It is almost same as ordinary text file.

But if I use the command save(L, "file") then file.sobj file appears. I don't know how do I edit that file.

In that case, if I want to change value of before variables then... it is uncomfortable.

Is there any good way to save some datas?

2015-03-27 04:10:07 +0200 marked best answer breaking out of while, for loops.


Actually, my problem is to get all new representatives.

But I think it is only an algorithmic problem to me.

My consideration is following:

  1. Let A be a group and Rep=[A]. And i=0

  2. Make i=i+1 and the list L of all subgroups with index 2^i.

  3. Make empty list New.

  4. For B in L, if B is not conjugate to any group in Rep then add to Rep and add to New else do nothing.

  5. If New is empty then return Rep else make New empty list and go to STEP 2.

How can I do this in SAGE....

I cannot give a simple example. :(

In my problem,

  1. A=[1,x,x^2], Rep=[A], i=0 (A is a generator of the rank 3 Z-module in Z[x])

  2. i=i+1, L : the list of all submodule of A with index 2^i.

  3. New=[]

  4. For B in L, [ For C in Rep, t=False, if B~C then t=true. ] If t=False then Rep=Rep+[B] and New=New+[B]

  5. If len(New)==0 then return Rep else New=[] and go to STEP 2.

If you have some question I WILL answer as soon as possible. :)


2015-03-27 04:10:07 +0200 marked best answer Can I get coefficients of a vector with respect to given basis for a vector space.


I have a question.

For example,

  1. make vector space V by a basis B=[1+x,3*x,x^2] over the field of rationalsQ
  2. v=3*x^2+17*x+5 in V
  3. v=a*B[0]+b*B[1]+c*B[2] for some a,b,c in Q
  4. [a,b,c]=?

We easily know the solution of previous example.

In general, for given basis B and a vector v, how can I get the list of coefficients?

And is it possible to the case of matrix space (B: the basis consists of matrices) ?

Thanks. :)

2015-03-27 04:09:54 +0200 marked best answer How can I get an invertible matrix X with integral entries and AX=XB, where A and B are matrices with integral entries.

Let M be the set of all n by n matrices with integral entries.

For A and B in M, how can I get an invertible matrix X in M with AX=XB in Sage.

I can partially solve that problem in GAP following method.

  • V={ X in Mn(QQ) | AX=XB }

(V is a vector space over QQ)

  • Basis(V)={B_1,B_2, ..., B_k}

(I wonder which number k it is according to the changes of A and B.)

  • Make X=a_1 * B_1 + ... +a_k * B_k , a_i in some interval in ZZ.

  • Check two things which are X in Mn(ZZ) and the existence of the inverse of X in Mn(ZZ).

I can find such X for some easy matrices A,B.

How can I solve this problem in Sage?


2015-03-27 04:08:59 +0200 marked best answer How to get a vector space generated by a list of matrices?

Sage is very nice.

I want to get a matrix space. For example,

  • F=GF(p)
  • V= " vector space over F generated by [M1, M2, ... ,Mn] ,which Mi are n by n matrices with its coefficients in F "

V consist of matrices. In general, how can I get such V?

Many thanks~

2015-03-27 04:07:43 +0200 marked best answer Can I draw a graph whose vertices have two kind of labels?


I want to draw a graph.

Each vertex connects to another information.

For example,

for i in [1,2,3]:
    for j in [i+1..4]:
       if j%i==0:

for i in G.vertices():
    if i<3:

Then 1,2 --> Dog and 3,4 --> Cat.

I want to get a plotting graph which shows the second information Dog and Cat.

Is that possible?


2015-02-05 07:12:52 +0200 received badge  Popular Question (source)
2015-01-15 09:58:52 +0200 received badge  Notable Question (source)