2020-02-24 07:36:52 +0200 | received badge | ● Nice Answer (source) |

2015-12-02 10:11:52 +0200 | commented answer | Latex name of generators of number fields extending other number field This is now trac ticket 19657 |

2015-12-01 17:26:31 +0200 | answered a question | Latex name of generators of number fields extending other number field The problem is caused in the first place by a mistake in Unfortunately, you cannot get round this by using The inconsistencies here indicate that there are other things that need correcting in this part of the code. |

2015-05-21 09:31:44 +0200 | answered a question | get the coefficients from the Polynomial or |

2015-05-20 11:20:52 +0200 | commented question | Elements in the lattice $A_n$ Perhaps |

2015-05-16 11:28:22 +0200 | answered a question | TypeError for hom between multivariate Laurent polynomial rings? It seems that the root of the problem is : |

2015-05-15 11:54:46 +0200 | commented question | TypeError for hom between multivariate Laurent polynomial rings? I note that |

2015-05-10 07:45:28 +0200 | commented answer | How to build a matrix thought of as an array of smaller matrices? This is mostly fairly basic python syntax: (1) (2) m is a list of four lists of four 2 by 2 zero matrices. It is not a matrix, but (after it is modified) it is used to create a (block) matrix. The command could have been written as (3) |

2015-05-09 14:14:59 +0200 | answered a question | How to build a matrix thought of as an array of smaller matrices? The I first set up a dictionary containing data of the kind you discussed (I'm assuming that the final entry in your data set should be $(1,3,D)$ if you want a $4k$ by $4k$ matrix ) Then I defined a 4 by 4 array of zero matrices and put the data matrices in the appropriate positions Now All the usual matrix methods are available, e.g., |

2015-05-02 18:47:09 +0200 | answered a question | Factor base of class group computation The following does involve calling PARI's bnfinit. But for a number field K, K.class_group() calls bnfinit, the output of which is cached. The factor base used can be recovered as follows: |

2015-02-01 18:57:36 +0200 | answered a question | Units in number fields. The problem is that your |

2014-12-17 14:55:42 +0200 | commented answer | Computations in a Quotient Ring But |

2014-12-03 09:35:33 +0200 | commented question | Bug in roots()? Seems to be a bug in the Singular interface. For |

2014-11-19 11:26:43 +0200 | answered a question | Possible coefficients for a given discriminant You can do: and to get the coefficients: |

2014-11-02 10:47:51 +0200 | commented answer | How to compute this exponential generating function? Probably worth noting that print oeis('Narayana')[0].programs()[0] gives a very simple formula for the coefficients. |

2014-10-28 10:43:42 +0200 | received badge | ● Good Answer (source) |

2014-10-28 10:43:42 +0200 | received badge | ● Enlightened (source) |

2014-10-27 13:59:10 +0200 | received badge | ● Nice Answer (source) |

2014-10-27 11:11:09 +0200 | answered a question | what matrix.plot meanings? The will give more information. |

2014-10-25 18:21:28 +0200 | commented answer | Homomorphisms for relative number fields The problem should be solved by trac #10843. |

2014-09-18 17:49:41 +0200 | commented answer | Homomorphisms for relative number fields Now I see. Your F_pol was a symbolic expression, but mine was a polynomial. Unfortunately the root methods for each are not compatible. |

2014-09-18 13:52:59 +0200 | answered a question | Homomorphisms for relative number fields First you need to write Then the following works Typing explains the syntax. There should be an easier way to do this. ## On the second questionThis is a bug, the check parameter does not get passed on as it should be. I will raise a ticket to deal with this, but in the meantime you can get the result you want as follows. This is taken, with some slight modifications, from the code for |

2014-08-16 17:43:59 +0200 | received badge | ● Commentator |

2014-08-16 17:43:59 +0200 | commented question | Plane curve genus: new minimal polynomial No, I did look briefly at the Singular documentation, but couldn't find anything helpful. Yes, I also found that the minimal polynomial varies. I tried calling genus(I) 32 times, and got 17 distinct polynomials. However, there were only 5 distinct leading coefficients. |

2014-08-15 09:57:38 +0200 | commented question | Plane curve genus: new minimal polynomial The calculation seems to be performed by Singular. Unwrapping the code, what C.genus() does is: sage: I = C.defining_ideal() sage: genus = sage.libs.singular.ff.normal__lib.genus sage: genus(I) // new minimal polynomial: 2097152a6+2359296a5-239616a4-518400a3+37800a2+13203a+54 11 |

2014-06-20 03:48:39 +0200 | received badge | ● Editor (source) |

2014-06-20 03:46:53 +0200 | answered a question | polynomial list, array But maybe you meant: or |

2014-04-12 06:15:27 +0200 | commented question | QQ.extension() with embedding: incorrect modulus This is definitely a defect in Sage. If z is an element in a number field K, then z.abs(i) returns the absolute value of the the i-th embedding of K into CC , and if i is omitted, the zero-th embedding is used. Thus any specified embedding used to construct K is ignored. I have raises a ticket on this issue; see http://trac.sagemath.org/ticket/16147. |

2013-12-15 03:25:25 +0200 | received badge | ● Nice Answer (source) |

2013-12-11 04:46:46 +0200 | answered a question | interger-ring() and maximal_order() is the same in numberfield I think you must mean |

2013-11-30 06:23:09 +0200 | answered a question | Yet another linear combination This is just standard linear algebra: form a 21 by 20 matrix whose rows consist of the linearly dependent vectors and the 20 linearly independent vectors, and find the one-dimensional left kernel (nullspace); alternatively transpose and find the right kernel. The coefficients of the single element in a basis of the kernel provide a linear combination of all 21 vectors which is zero. Hence the dependent vector can be written as a linear combination of the 20 independent vectors. A small scale version in Sage: Confirming that the vectors are linearly independent, otherwise repeat. Then form a random linear combination, and create the matrix: Now take the first (and only) generator of the kernel, and verify the result: |

2013-05-27 13:39:45 +0200 | commented answer | referencing polynomial variables It is worth mentioning that R = PolynomialRing(ZZ, n, 'x') and P = sum(c\*R.gen(i) for i, c in enumerate(mylist)) are perhaps a little less cryptic, and that R.inject_variables() allows one to write things like Q = 3\*x1\*x2^3 - x3^4 |

2013-04-18 04:29:38 +0200 | received badge | ● Supporter (source) |

2013-02-27 11:18:56 +0200 | received badge | ● Nice Answer (source) |

2013-02-25 06:09:05 +0200 | answered a question | berlekamp massey Yes, there is a problem with the Sage implementation. But other implementations such as the one at bma.bozhu.me may give varying results. The point is that for your sequence $s_0,s_1,\dots,s_{35}$ there does not exist a unique sequence $c_1,c_2,\dots,c_k$ in $GF(2)$ such that $$s_i+\sum_{j=1}^{k}c_js_{i-j}=0,\qquad\text{for $i=k,\dots,35$.}$$ The result that Sage produces comes from the fact that $$s_i+s_{i-2}+s_{i-3}+s_{i-4}+s_{i-5}=0,\qquad\text{for $i=16,\dots,33$.}$$ But this fails (generally) if $i=5,\dots,15$ or $i=34, 35$. The degree 19 result indeed says that $$s_i+\sum_{j\in\lbrace1, 2, 5, 6, 9, 10, 11, 13, 16, 17, 19\rbrace}s_{i-j}=0,\qquad\text{for $i=19,\dots,35$.}$$ However, this is not unique (it cannot be because the input sequence only has length 36), for example we could add in $s_{i-2}+s_{i-4}+s_{i-5}+s_{i-6}+s_{i-7}$, which, as we have seen, is zero for $i=18,\dots,35$. Thus the degree 19 polynomial has no right to be called |

2013-02-21 11:33:02 +0200 | received badge | ● Good Answer (source) |

2013-02-20 08:30:48 +0200 | received badge | ● Nice Answer (source) |

2013-02-16 07:29:17 +0200 | answered a question | How does one find solutions to a polynomial over a finite field? Alternatively |

2013-02-06 06:22:52 +0200 | answered a question | polynomial evaluation For polynomial substitution there are several possibilities: To handle symmetric polynomials it may be best to work in a polynomial ring. For example: We can then check symmetry and do other sorts of substitution |

2013-01-16 02:43:40 +0200 | answered a question | extracting digits in p-adic expansion But note that here the coefficient of $3^9$, which is zero, yields [] as its list of coefficients. Similarly, for the coefficient of $3^4$, which is $2$, we get [2]. |

2012-12-30 18:05:47 +0200 | commented answer | Problem with infinite sum The remark that $|B_{2k}|\to\infty$ was intended only to justify divergence for $n=1$. The final sentence implies divergence for $n>1$. |

2012-12-30 12:10:19 +0200 | commented answer | Problem with infinite sum The series certainly doesn't converge for n=1, since abs(bernoulli(2*k)) tends to infinity as k tends to infinity. In fact I don't believe that the series converges for any integral value of n, for I think $sum_{k=1}^{\infty}B_{2k}x^{2k}$ has zero radius of convergence. This should follow from knowing that $sum_{k=1}^{\infty}B_{2k}x^{2k}/(2k)!$ has radius of convergence $2\pi$; the value is $x/(e^x-1)-1-x/2$. |

2012-12-07 04:56:08 +0200 | answered a question | Explicit finite field extensions There can't be a coercion from GF(q) to GF(q^k) if q is not prime since there will be several embeddings, none of which has any reason to be preferred. But it is simple to list the embeddings: It is possible to construct a field of order 5^6 which GF(25) coerces into: But at present there are limits to what can be done with this field: |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.