Questions tagged [sage]

Sage is a mathematical software system, and this tag is intended for questions involving this software in a substantive way. This tag should hardly ever be the only tag of a question; typically there should be additional tags to indicate the mathematical content of the question. Please note that questions that are purely support-questions on Sage are not a good fit for this site.

Filter by
Sorted by
Tagged with
7 votes
3 answers
397 views

Why mpmath computes $\sum_{n=2}^\infty (-1)^n\log(n)=\log\left(\frac1 2 \sqrt{2} \sqrt{\pi}\right)$

Working with precision 500 decimal digits, mpmath in sage computes: $$\sum_{n=2}^\infty (-1)^n\log(n)=\log\left(\frac1 2 \sqrt{2} \sqrt{\pi}\right).\tag{1}\label{1}$$ We believe the LHS of \eqref{1} ...
user avatar
  • 23.3k
12 votes
3 answers
2k views

Is there any fast implementation of four color theorem in Python?

I'm now using scipy.spatial.Voronoi to generate a Voronoi graph, as shown here: voronoi graph. I'd like to apply the four color theorem on it, so that no adjcent regions share the same color. I ...
user avatar
  • 129
1 vote
0 answers
153 views

Calculating multiplication in a finite dimensional algebra over $\mathbb{Q}$

Suppose $ L $ be an extension over $ \mathbb{Q} $ of degree $ n $. Let $\{e_{1},e_{2},\dots,e_{n}\} $ be a basis of this extension. Now I know the product $ e_{i}^{2} $ and $ e_{i}e_{j} $ . So we can ...
user avatar
  • 693
2 votes
0 answers
172 views

Degree $8$ cyclic extension over $\mathbb{Q}$

Actually I am interested in degree $ 8 $ cyclic extension over $ \mathbb{Q} $. Let $ L $ be such extension. At first I was thinking to take basis as normal basis, as we can determine the galois group ...
user avatar
  • 693
1 vote
0 answers
107 views

Can PARI compute class numbers without factoring the discriminant?

When calculating properties of algebraic number fields, one of the hardest steps is factorizing the discriminant of a defining polynomial. This is necessary in the Pohst-Zassenhaus algorithm for ...
user avatar
  • 125
4 votes
1 answer
192 views

How to calculate genus number of number field using sage?

I am looking to find real quadratic fields whose Hilbert class field is abelian over $\Bbb Q$. Then I learned about genus numbers and genus field of the number field. It is enough to find a number ...
user avatar
3 votes
1 answer
191 views

Understanding the implementation of the $p$-adic(?) sigma function in SageMath

I'm trying to understand the (pretty undocumented) method .sigma() method for formal groups of elliptic curves, as listed here. The source code looks like this: <...
user avatar
  • 1,369
2 votes
1 answer
111 views

Software for $S$-unit equation

Is there any implementation available of an algorithm which solves in full generality the $S$-unit equation $x+y=1$ in a number field? It seems that Magma solves $ax+by=c$ but only in the algebraic ...
user avatar
  • 509
4 votes
1 answer
300 views

All rational periodic points

I am trying to find all rational periodic points of a polynomial. To specify: a periodic point is the point that satisfy $f^n(x)=x$. It is related to dynamical systems in fact. So the current codes ...
user avatar
  • 41
2 votes
2 answers
192 views

How to find a solution of a large system of linear diophantine inequalities?

I need to find a solution (all solutions, or at least upper and lower bounds) in positive integer numbers to the system $Ax \ge f$, where $A$ is an integer matrix. With SageMath, I solved it with the ...
user avatar
4 votes
0 answers
150 views

Indexed character tables for wreath products in Sage and GAP

I am trying to obtain character table for the Hyperoctahedral group $\mathcal{H}_n$ in Sage using GAP. This group arises as the wreath product $\mathcal{C}_2 \wr \mathcal{S}_n$, so of course I can ...
user avatar
  • 41
0 votes
1 answer
314 views

Mistake in SageMathCell code, finding integral points on elliptic curves [closed]

I've the following number: $$12\left(n-2\right)^2x^3+36\left(n-2\right)x^2-12\left(n-5\right)\left(n-2\right)x+9\left(n-4\right)^2\tag1$$ Now I know that $n\in\mathbb{N}^+$ and $n\ge3$ (and $n$ has ...
user avatar
5 votes
1 answer
275 views

Implementing zeta functions of algebraic varieties in SAGE

I am fairly new to sage, I was studying zeta functions of hypersurfaces over finite fields and I don't know how to compute them in Sage. Are there any packages that do most of the work, or maybe some ...
user avatar
4 votes
1 answer
159 views

Branching to Levi subgroups in SAGE and the circle action

In the SAGE computer package, there useful exist tools for branching representations of a simple Lie group to a Levi subgroup: http://doc.sagemath.org/html/en/reference/combinat/sage/combinat/...
user avatar
4 votes
2 answers
270 views

GAP versus SageMath for branching to Lie subgroups

Which computer package is better, GAP or SageMath, for decomposing an irreducible representation of a (simple) Lie group $G$ into representations of a Lie subgroup. I am most interested when ...
user avatar
11 votes
0 answers
1k views

Euler's totient function and Riemann hypothesis

I am looking for an upper-bound of the Euler's totient function $\varphi$ which would be equivalent to the Riemann hypothesis (RH). There is the following Nicolas' criterion about primorial numbers $...
user avatar
1 vote
1 answer
210 views

Sage: Evaluation precision for elliptic curves over p-adic fields

Consider the elliptic curve $E: y^2 = x^3 + 23x+11$ over p-adic fields. In Sage I use: k = GF(257) E = EllipticCurve(k,[23,11]) kp = Qp(257,5) # 257-adic Field with capped relative ...
user avatar
3 votes
0 answers
689 views

Puzzle in 3D grid with black and white boxes, related to shelling

Consider a $n$ by $n$ by $n$ grid represented by the set of $3$-uples $S=\{1,2,\dots, n\}^3$. A line (resp. slice) of $S$ is a subset of cardinal $n$ (resp. $n^2$) where two components (resp. one ...
user avatar
22 votes
6 answers
1k views

Number of collinear ways to fill a grid

A way to fill a finite grid (one box after the other) is called collinear if every newly filled box (the first excepted) is vertically or horizontally collinear with a previously filled box. See the ...
user avatar
5 votes
0 answers
172 views

normal form for some finite groups, extending the small groups library

I am in need of a normal (that is, canonical) form for (some) finite groups, computable with - for example - gap or sage or any other freely available package. The goal is to make finite groups ...
user avatar
  • 5,009
11 votes
1 answer
430 views

How do computer algebra packages like Sagemath implement rank of a matrix

I am not sure if this is the right place to ask this question, but I believe there will be people here who do computations on computer algebra packages like Sage in their work. I have been using ...
user avatar
  • 263
2 votes
1 answer
206 views

Memory usage of Gröbner basis computation

I've been calculating some Gröbner bases in preparation for finding non-commutative Hilbert series (and, once I recreate that, characters of group actions). Specifically, I've been using the ...
user avatar
4 votes
1 answer
332 views

Existence of a non-Eulerian atomistic lattice with this property on the Möbius function

Let $L$ be a finite lattice with least element $\hat{0}$, greatest element $\hat{1}$, and Möbius function $\mu$. Question 1: What class of lattices the following property characterizes? $$\mu(\hat{0},...
user avatar
8 votes
6 answers
3k views

Computation of a minimal polynomial

It is relatively easy (but sometimes quite cumbersome) to compute the minimal polynomial of an algebraic number $\alpha$ when $\alpha$ is expressible in radicals. For example, the simple query "...
user avatar
  • 1,369
5 votes
2 answers
325 views

Symmetry-finding with SAGE?

On pp. 152-3 of Hydon's Symmetry Methods for Differential Equations (2000 ed.), he lists some computer packages for symmetry-finding. This related Mathematica StackExchange question mentions the SYM ...
user avatar
  • 185
1 vote
1 answer
226 views

How to return elements of a given length in a symmetric group using Sage?

Let $S_n$ be the symmetric group over $\{1,2,\ldots,n\}$. How to return elements of length $m$ in $S_n$ using Sage? I try to find such function in Sage but didn't find one. Thank you very much. Edit: ...
user avatar
  • 5,865
2 votes
0 answers
86 views

Is the bounded coset poset of a boolean interval of finite groups, Cohen-Macaulay?

Let $[H,G]$ be a boolean interval of finite groups and let $\hat{C}(H,G)$ be its bounded coset poset (i.e. the poset of cosets $Kg$ with $K \in [H,G]$, bounded below by $\emptyset$ and bounded above ...
user avatar
3 votes
0 answers
234 views

Is there an integral simple fusion ring of multiplicity one and Frobenius type? (obvious excepted)

To avoid any confusion, we rewrite the basic definitions for a fusion ring (already written in this post). A fusion ring is a finite dimensional complex space $\mathbb{C}\mathcal{B}$ together ...
user avatar
6 votes
0 answers
254 views

Is there an integral simple fusion ring rank<6, FPdim>60 and Frobenius type?

A fusion ring is a finite dimensional $\mathbb{Z}$-module $\mathbb{Z}\mathcal{B}$ together with a distinguished basis $\mathcal{B} = \{ h_1,...,h_r\}$ and fusion rules $ h_i \cdot h_j = \sum_k n_{ij}^...
user avatar
2 votes
0 answers
262 views

Basis for a set of polynomials in Sage? [closed]

I have a large set of polynomials in the coordinates $x,y,z$ in Sage, (e.g. $x^5y-3x^2y^2+2xy^3+x^2yz-y^2z$). I want to know, for example, if $x^5y$ is in the span of my set. Is there a Sage command ...
user avatar
  • 131
1 vote
1 answer
574 views

magma generators for unit group/ sage totally positive

Does anyone know how to find explicit generators for the unit group of a number field on magma? For example, in sage one could do K. = NumberField(x^3+x^2-2*x-1) UnitGroup(K).gens() and it ...
user avatar
2 votes
2 answers
272 views

Computer algebra system that test zero divisors in a quotient algebra

I have an algebra $A$ over a Noetherian ring and an ideal $I=(x,y)$, where $x,y \in A$. I need to examine whether a polynomial $h \in A$ is a zero divisor in $A/I$ or not. Is there a computer algebra ...
user avatar
5 votes
2 answers
493 views

Matroids relaxations of a given matroid

Let $\mathcal{M}$ be a rank-$d$ matroid on $[n]$. Say a matroid $\mathcal{N}$ is a relaxation of $\mathcal{M}$ if $\mathrm{rank}(\mathcal{N})=d$, $\mathrm{groundset}(\mathcal{N})=[n]$, and every ...
user avatar
9 votes
3 answers
835 views

Multiprecision numerical evaluation of integral: Sage vs. PARI/GP vs. mpmath

I am trying to compute thousands of integrals of the below type, that comes up in a conformal mapping problem, to as many accurate digits as possible (preferably 50+): $$ \int_{-1}^1\textrm{d}t \frac{...
user avatar
6 votes
3 answers
688 views

Torsion group of the following elliptic curve

Let $p_1=2, p_2 = 3,\ldots,$ be the prime numbers, and define $n_i = \prod_{j=1}^i p_j$. Moreover, let $E_i $ be the elliptic curve defined by $y^2 = x^3 + n_i$. Can one compute the torsion group $...
user avatar
10 votes
1 answer
419 views

Genus of the graph $K_{4,2,2,2}$

I have ask this question in math.stackexchange, here. Since, there is no answer and apart from that i feel that the problem is difficult, i would like to ask it here. The problem is to find the genus ...
user avatar
  • 309
4 votes
2 answers
618 views

Finding relations between invariant polynomials

Suppose I have an action of a linear reductive group ($GL(2,\mathbb{C})^2$ in this case) on a complex vector space (of dimension $16$) and I want to compute explicitly the ring of invariants of this ...
user avatar
  • 305
1 vote
2 answers
343 views

Ihara zeta function (graph theory) coefficients using a line graph [closed]

I'VE COMPLETELY REVISED MY QUESTION I wish to take a simple undirected graph (i.e. the complete graph K_4) Arbitrarily direct said graph, and then create a line graph from the directed version of ...
user avatar
  • 21
11 votes
3 answers
825 views

What CASes say about the analytic rank of rank 8 elliptic curve '457532830151317a1'

For the rank $8$ elliptic curve with a-invariants $(0, 0, 1, -23737, 960366)$ sage 5.3 reports analytic rank $4$ in about 2.4 hours. Almost sure this a bug, so I am interested what other CAS say on ...
user avatar
  • 23.3k